package com.hotwj.platform.resourceManagement.vehicleManagement.domain.vo;

import cn.idev.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.hotwj.platform.resourceManagement.vehicleManagement.domain.HotVehicle;
import io.github.linpeilie.annotations.AutoMapper;
import jakarta.validation.constraints.Min;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;

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

/**
 * 车辆导入VO
 */
@Data
@AutoMapper(target = HotVehicle.class)
public class HotVehicleImportVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    @ExcelProperty("档案号")
    private String archiveNo;

    @ExcelProperty("车牌号")
    private String plateNumber;

    @ExcelProperty("车辆类型")
    private String vehicleType;

    @ExcelProperty("运输证号")
    private String transportLicenseNo;

    @ExcelProperty("有效期")
    private Date transportValidMonth;

    @ExcelProperty("机动车所有人")
    private String owner;

    @ExcelProperty("地址")
    private String address;

    @ExcelProperty("使用性质")
    private String useNature;

    @ExcelProperty("品牌型号")
    private String brandModel;

    @ExcelProperty("车架号")
    private String frameNumber;

    @ExcelProperty("发动机号")
    private String engineNo;

    @ExcelProperty("行驶证注册日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date firstRegisterDate;

    @ExcelProperty("行驶证发证日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date certificateIssueDate;

    @ExcelProperty("行驶证检验有效期")
    private Date inspectionValidMonth;

    @ExcelProperty("出厂日期")
    private Date manufactureDate;

    @ExcelProperty("核定载人数(人)")
    @Min(value = 0, message = "核定载人数必须大于等于0")
    private Long ratedPassengerCount;

    @ExcelProperty("总质量(KG)")
    @Min(value = 0, message = "总质量必须大于等于0")
    private Long grossWeightKg;

    @ExcelProperty("整备质量(KG)")
    @Min(value = 0, message = "整备质量必须大于等于0")
    private Long curbWeightKg;

    @ExcelProperty("核定载质量(KG)")
    @Min(value = 0, message = "核定载质量必须大于等于0")
    private Long ratedLoadKg;

    @ExcelProperty("车辆外廓长(mm)")
    @Min(value = 0, message = "车辆外廓长必须大于等于0")
    private Long vehicleLengthMm;

    @ExcelProperty("车辆外廓宽(mm)")
    @Min(value = 0, message = "车辆外廓宽必须大于等于0")
    private Long vehicleWidthMm;

    @ExcelProperty("车辆外廓高(mm)")
    @Min(value = 0, message = "车辆外廓高必须大于等于0")
    private Long vehicleHeightMm;

    @ExcelProperty("准牵引总质量(KG)")
    @Min(value = 0, message = "准牵引总质量必须大于等于0")
    private Long towingMassKg;

    @ExcelProperty("强制报废期止")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date mandatoryScrapEndDate;

    @ExcelProperty("车身颜色")
    private String color;

    @ExcelProperty("燃料种类")
    private String fuelType;

    @ExcelProperty("发动机排量(ml)")
    @Min(value = 0, message = "发动机排量必须大于等于0")
    private Long engineDisplacementMl;

    @ExcelProperty("发动机净功率(KW)")
    @Min(value = 0, message = "发动机净功率必须大于等于0")
    private Long enginePowerKw;

    @ExcelProperty("轮胎数量")
    @Min(value = 0, message = "轮胎数量必须大于等于0")
    private Long tireCount;

    @ExcelProperty("轴距(mm)")
    @Min(value = 0, message = "轴距必须大于等于0")
    private Long wheelbaseMm;

    @ExcelProperty("货箱内部长(mm)")
    @Min(value = 0, message = "货箱内部长必须大于等于0")
    private Long cargoInnerLengthMm;

    @ExcelProperty("货箱内部宽(mm)")
    @Min(value = 0, message = "货箱内部宽必须大于等于0")
    private Long cargoInnerWidthMm;

    @ExcelProperty("货箱内部高(mm)")
    @Min(value = 0, message = "货箱内部高必须大于等于0")
    private Long cargoInnerHeightMm;

    @ExcelProperty("车牌颜色")
    private String plateColor;

    @ExcelProperty("登记日期")
    private Date vehicleRegisterDate;

    @ExcelProperty("制造厂名称")
    private String manufacturerName;

    @ExcelProperty("电机功率(KW)")
    @Min(value = 0, message = "电机功率必须大于等于0")
    private Long motorPowerKw;

    @ExcelProperty("驱动电机型号")
    private String engineNumber;

    @ExcelProperty("轮胎规格")
    private String tireSpec;

    @ExcelProperty("车轴数量")
    @Min(value = 0, message = "车轴数量必须大于等于0")
    private Long axleCount;

    @ExcelProperty(value = "车辆分类", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "hot_vehicle_vehicle")
    private String vehicleCategory;

    @ExcelProperty(value = "是否为挂车", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "sys_yes_no")
    private Long isTrailer;
}
