package com.sckw.transport.model.dto;

import com.alibaba.excel.annotation.ExcelProperty;
import com.fasterxml.jackson.annotation.JsonFormat;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;

/**
 * @desc 承运订单导入
 * @author zk
 * @date 2023/12/10 0010
 */
@Data
public class CarrierOrderImportDto implements Serializable {
    private static final long serialVersionUID = 307622351109421619L;

    /**
     * 托运单位[必填]
     */
    @ExcelProperty(index = 0)
    @NotBlank(message = "托运单位不能为空!")
    @Size(max=40, message = "托运单位长度不能大于40个字符！")
    private String checkFirmName;

    /**
     *承运单位[必填]
     */
    @ExcelProperty(index = 1)
    @NotBlank(message = "承运单位不能为空!")
    @Size(max=40, message = "承运单位长度不能大于40个字符！")
    private String carrierFirmName;

    /**
     *货物名称[必填]
     */
    @ExcelProperty(index = 2)
    @NotBlank(message = "货物名称不能为空!")
    @Size(max=40, message = "货物名称长度不能大于40个字符！")
    private String goodsName;

    /**
     *货物分类[必填]
     */
    @ExcelProperty(index = 3)
    @NotBlank(message = "货物分类不能为空!")
    @Size(max=20, message = "货物分类长度不能大于20个字符！")
    private String goodsType;

    /**
     *合同编号[必填]
     */
    @ExcelProperty(index = 4)
    @NotBlank(message = "合同编号不能为空!")
    @Size(max=20, message = "合同编号长度不能大于20个字符！")
    private String contractNo;

    /**
     *计费方式[必填]
     */
    @ExcelProperty(index = 5)
    @NotBlank(message = "计费方式不能为空!")
    @Size(max=20, message = "计费方式长度不能大于20个字符！")
    private String billingMode;

    /**
     *运价[必填]
     */
    @ExcelProperty(index = 6)
    @NotNull(message = "运价不能为空!")
    //@DecimalMin(value= "0", inclusive=false, message = "运价必须等于或大于0")
    private String price;

    /**
     *运价单位[必填]
     */
    @ExcelProperty(index = 7)
    @NotBlank(message = "运价单位不能为空!")
    @Size(max=20, message = "运价单位长度不能大于20个字符！")
    private String priceType;

    /**
     *税率(%)[必填]
     */
    @ExcelProperty(index = 8)
    @NotNull(message = "税率不能为空!")
    //@DecimalMin(value= "0", inclusive=false, message = "税率必须等于或大于0")
    private String taxRate;

    /**
     *分配承运量[必填]
     */
    @ExcelProperty(index = 9)
    @NotNull(message = "分配承运量不能为空!")
    //@DecimalMin(value= "0", inclusive=false, message = "分配承运量必须等于或大于0")
    private String amount;

    /**
     *分配承运量单位[必填]
     */
    @ExcelProperty(index = 10)
    @NotBlank(message = "分配承运量单位不能为空!")
    @Size(max=20, message = "分配承运量单位长度不能大于20个字符！")
    private String unit;

    /**
     *合理耗损(‰)
     */
    @ExcelProperty(index = 11)
    //@DecimalMin(value= "0", inclusive=false, message = "合理耗损必须等于或大于0")
    private String loss;

    /**
     *扣亏货值
     */
    @ExcelProperty(index = 12)
    //@DecimalMin(value= "0", inclusive=false, message = "扣亏货值必须等于或大于0")
    private String goodsPrice;

    /**
     *扣亏货值单位
     */
    @ExcelProperty(index = 13)
    @Size(max=20, message = "扣亏货值单位长度不能大于20个字符！")
    private String goodsPriceUnit;

    /**
     *计划发货时间[必填]
     */
    @ExcelProperty(index = 14)
    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "计划发货时间不能为空!")
    private String loadTime;

    /**
     *计划卸货时间[必填]
     */
    @ExcelProperty(index = 15)
    @JsonFormat(locale="zh", pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @NotNull(message = "计划卸货时间不能为空!")
    private String unloadTime;

    /**
     *结算周期[必填]
     */
    @ExcelProperty(index = 16)
    @NotBlank(message = "结算周期不能为空!")
    @Size(max=20, message = "结算周期长度不能大于20个字符！")
    private String settlementCycle;

    /**
     *支付方式[必填]
     */
    @ExcelProperty(index = 17)
    @NotBlank(message = "支付方式不能为空!")
    @Size(max=20, message = "支付方式长度不能大于20个字符！")
    private String payment;

    /**
     *装货地址[必填]
     */
    @ExcelProperty(index = 18)
    @NotBlank(message = "装货地址不能为空!")
    @Size(max=30, message = "装货地址长度不能大于30个字符！")
    private String loadAddress;

    /**
     *卸货地址[必填]
     */
    @ExcelProperty(index = 19)
    @NotBlank(message = "卸货地址不能为空!")
    @Size(max=30, message = "卸货地址长度不能大于30个字符！")
    private String unloadAddress;

    /**
     *备注
     */
    @ExcelProperty(index = 20)
    @Size(max=200, message = "备注长度不能大于200个字符！")
    private String remark;

}
