package com.sckw.fleet.model.vo;

import com.sckw.fleet.model.KwfDriverConductRules;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.io.Serial;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 司机行为规则返回模型
 *
 * @author Generated
 * @since 2024
 */
@Data
public class KwfDriverConductRulesVO implements Serializable {

    @Serial
    private static final long serialVersionUID = -5360767484446805797L;

    /**
     * 主键
     */
    @Schema(description = "主键id")
    private Long id;

    /**
     * 企业id
     */
    @Schema(description = "企业id")
    private Long entId;

    /**
     * 单趟严重超时分数
     */
    @Schema(description = "单趟严重超时分数")
    private Integer unloadSeriousTimeoutScore;

    /**
     * 单趟严重超时倍数
     */
    @Schema(description = "单趟严重超时倍数")
    private BigDecimal unloadSeriousTimeoutMultiple;

    /**
     * 单据错误/缺失分数
     */
    @Schema(description = "单据错误/缺失分数")
    private Integer documentErrorMissingScore;

    /**
     * 未按时到场分数
     */
    @Schema(description = "未按时到场分数")
    private Integer notOnTimeArriveScore;

    /**
     * 虚假卸货分数
     */
    @Schema(description = "虚假卸货分数")
    private Integer fakeUnloadScore;

    /**
     * 虚假卸货偏差距离
     */
    @Schema(description = "虚假卸货偏差距离")
    private Integer fakeUnloadDistance;

    /**
     * 违规取消运单分数
     */
    @Schema(description = "违规取消运单分数")
    private Integer illegalCancelOrderScore;

    /**
     * 违规取消运单分钟数
     */
    @Schema(description = "违规取消运单分钟数")
    private Integer illegalCancelOrderMinutes;

    /**
     * 连续按时到场分数
     */
    @Schema(description = "连续按时到场分数")
    private Integer continuousOnTimeArriveScore;

    /**
     * 连续按时到场次数
     */
    @Schema(description = "连续按时到场次数")
    private Integer continuousOnTimeArriveTimes;

    /**
     * 连续准时卸货分数
     */
    @Schema(description = "连续准时卸货分数")
    private Integer continuousOnTimeUnloadScore;

    /**
     * 连续准时卸货次数
     */
    @Schema(description = "连续准时卸货次数")
    private Integer continuousOnTimeUnloadTimes;

    /**
     * 连续准确填写卸货信息分数
     */
    @Schema(description = "连续准确填写卸货信息分数")
    private Integer continuousAccurateUnloadScore;

    /**
     * 连续准确填写卸货信息次数
     */
    @Schema(description = "连续准确填写卸货信息次数")
    private Integer continuousAccurateUnloadTimes;

    /**
     * 创建时间
     */
    @Schema(description = "创建时间")
    private Date createTime;

    /**
     * 更新时间
     */
    @Schema(description = "更新时间")
    private Date updateTime;

    /**
     * 创建人（用户ID，默认-1）
     */
    @Schema(description = "创建人")
    private Long createUser;

    /**
     * 更新人（用户ID，默认-1）
     */
    @Schema(description = "更新人")
    private Long updateUser;

    private static KwfDriverConductRulesVO getInstance(){
        return new KwfDriverConductRulesVO();
    }

    public static KwfDriverConductRulesVO toVO(KwfDriverConductRules rules){
        if (rules == null) {
            return null;
        }
        KwfDriverConductRulesVO rulesVO = KwfDriverConductRulesVO.getInstance();
        rulesVO.setId(rules.getId());
        rulesVO.setEntId(rules.getEntId());
        rulesVO.setUnloadSeriousTimeoutScore(rules.getUnloadSeriousTimeoutScore());
        rulesVO.setUnloadSeriousTimeoutMultiple(rules.getUnloadSeriousTimeoutMultiple());
        rulesVO.setDocumentErrorMissingScore(rules.getDocumentErrorMissingScore());
        rulesVO.setNotOnTimeArriveScore(rules.getNotOnTimeArriveScore());
        rulesVO.setFakeUnloadScore(rules.getFakeUnloadScore());
        rulesVO.setFakeUnloadDistance(rules.getFakeUnloadDistance());
        rulesVO.setIllegalCancelOrderScore(rules.getIllegalCancelOrderScore());
        rulesVO.setIllegalCancelOrderMinutes(rules.getIllegalCancelOrderMinutes());
        rulesVO.setContinuousOnTimeArriveScore(rules.getContinuousOnTimeArriveScore());
        rulesVO.setContinuousOnTimeArriveTimes(rules.getContinuousOnTimeArriveTimes());
        rulesVO.setContinuousOnTimeUnloadScore(rules.getContinuousOnTimeUnloadScore());
        rulesVO.setContinuousOnTimeUnloadTimes(rules.getContinuousOnTimeUnloadTimes());
        rulesVO.setContinuousAccurateUnloadScore(rules.getContinuousAccurateUnloadScore());
        rulesVO.setContinuousAccurateUnloadTimes(rules.getContinuousAccurateUnloadTimes());
        rulesVO.setCreateTime(rules.getCreateTime());
        rulesVO.setUpdateTime(rules.getUpdateTime());
        rulesVO.setCreateUser(rules.getCreateUser());
        rulesVO.setUpdateUser(rules.getUpdateUser());

        return rulesVO;
    }

}