package com.sckw.fleet.model.vo;

import com.sckw.fleet.model.KwfTruckDispatchCoefficient;
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 KwfTruckDispatchCoefficientVO 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 vehicleWorkHours;

    /**
     * 车辆装货时长
     */
    @Schema(description = "车辆装货时长")
    private Integer vehicleLoadingHours;

    /**
     * 车辆卸货时长
     */
    @Schema(description = "车辆卸货时长")
    private Integer vehicleUnloadingHours;

    /**
     * 司机超时限制
     */
    @Schema(description = "司机超时限制")
    private Integer driverTimeoutLimit;

    /**
     * 车辆平均载重
     */
    @Schema(description = "车辆平均载重")
    private Integer vehicleAvgLoad;

    /**
     * 车辆平均速度
     */
    @Schema(description = "车辆平均速度")
    private Integer vehicleAvgSpeed;

    /**
     * 车辆最大任务数
     */
    @Schema(description = "车辆最大任务数")
    private Integer vehicleMaxTasks;

    /**
     * 司机接单限制
     */
    @Schema(description = "司机接单限制")
    private Integer driverOrderLimit;

    /**
     * 场内车辆容量
     */
    @Schema(description = "场内车辆容量")
    private Integer yardVehicleCapacity;

    /**
     * 最大占比
     */
    @Schema(description = "最大占比")
    private Integer maxRatio;

    /**
     * 缓冲系数
     */
    @Schema(description = "缓冲系数")
    private BigDecimal bufferCoefficient;

    /**
     * 创建时间
     */
    @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 KwfTruckDispatchCoefficientVO getInstance(){
        return new KwfTruckDispatchCoefficientVO();
    }

    public static KwfTruckDispatchCoefficientVO toVO(KwfTruckDispatchCoefficient result){
        if (result == null) {
            return null;
        }
        KwfTruckDispatchCoefficientVO rulesVO = KwfTruckDispatchCoefficientVO.getInstance();
        rulesVO.setId(result.getId());
        rulesVO.setEntId(result.getEntId());
        rulesVO.setVehicleWorkHours(result.getVehicleWorkHours());
        rulesVO.setVehicleLoadingHours(result.getVehicleLoadingHours());
        rulesVO.setVehicleUnloadingHours(result.getVehicleUnloadingHours());
        rulesVO.setDriverTimeoutLimit(result.getDriverTimeoutLimit());
        rulesVO.setVehicleAvgLoad(result.getVehicleAvgLoad());
        rulesVO.setVehicleAvgSpeed(result.getVehicleAvgSpeed());
        rulesVO.setVehicleMaxTasks(result.getVehicleMaxTasks());
        rulesVO.setDriverOrderLimit(result.getDriverOrderLimit());
        rulesVO.setYardVehicleCapacity(result.getYardVehicleCapacity());
        rulesVO.setMaxRatio(result.getMaxRatio());
        rulesVO.setBufferCoefficient(result.getBufferCoefficient());
        rulesVO.setCreateTime(result.getCreateTime());
        rulesVO.setUpdateTime(result.getUpdateTime());
        rulesVO.setCreateUser(result.getCreateUser());
        rulesVO.setUpdateUser(result.getUpdateUser());

        return rulesVO;
    }


}