package com.trade.service.trade.purchaseorder.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 * @description:
 * @Author: wanglang
 * @Date: 2024/9/10 14:32
 * @Version: 1.0
 */
@Data
public class PurchaseOrderLogisticsDto {

    @ApiModelProperty(name = "id", value = "主键id")
    private Long id;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @NotNull(message = "送达时间不能为空")
    @ApiModelProperty(name = "arriveTime", value = "送达时间")
    private LocalDate arriveTime;
    @NotBlank(message = "物流公司名称不能为空")
    @ApiModelProperty(name = "companyName", value = "物流公司名称")
    private String companyName;
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @ApiModelProperty(name = "deliveryTime", value = "发货时间")
    @NotNull(message = "发货时间不能为空")
    private LocalDateTime deliveryTime;
    @ApiModelProperty(name = "logisticsOrderNumber", value = "物流单号")
    @NotBlank(message = "物流单号不能为空")
    private String logisticsOrderNumber;
    @ApiModelProperty(name = "transportInvoiceNumber", value = "运输发票号码")
    @NotBlank(message = "运输发票号码不能为空")
    private String transportInvoiceNumber;
    @ApiModelProperty(name = "purchaseOrderId", value = "采购订单id")
    private Long purchaseOrderId;
    @ApiModelProperty(name = "remark", value = "备注")
    private String remark;
    @ApiModelProperty(name = "transportCertificateFileId", value = "运输证明文件id")
    @NotNull(message = "文件id不能为空")
    private Long transportCertificateFileId;
    @ApiModelProperty(name = "orderNo", value = "订单编号")
    private String orderNo;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(name = "kprq", value = "开票日期")
    @NotNull(message = "开票日期不能为空")
    private LocalDate kprq;
}
