package com.trade.service.trade.salesorder.domain;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.trade.common.core.domain.BizBaseEntity;
import java.time.LocalDate;
import java.time.LocalDateTime;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * <p>
 * 销售订单-物流信息
 * </p>
 *
 * @author zhangchenm
 * @since 2024-09-06
 */
@Getter
@Setter
@TableName("sales_order_logistics")
public class SalesOrderLogistics extends BizBaseEntity {

    private static final long serialVersionUID = 1L;
    /**
     * 销售订单id
     */
    @NotNull(message = "订单id不能为空")
    private Long orderId;
    /**
     * 物流公司
     */
    @NotBlank(message = "物流公司不能为空")
    private String logisticsCompany;
    /**
     * 发货时间
     */
    @NotNull(message = "发货时间不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime deliverTime;
    /**
     * 启运港
     */
    @NotBlank(message = "启运港不能为空")
    private String fromPort;
    /**
     * 目的港
     */
    @NotBlank(message = "目的港不能为空")
    private String destPort;
    /**
     * 提运单类型
     */
    @NotBlank(message = "提运单类型不能为空")
    private String ladingType;
    /**
     * 提运单日期
     */
    @NotNull(message = "提运单日期不能为空")
    private LocalDate ladingDate;
    /**
     * 提单号
     */
    @NotBlank(message = "提单号不能为空")
    private String ladingBillNo;
    /**
     * 提单文件id
     */
    @NotNull(message = "提单文件id不能为空")
    private Long ladingBillFileId;
    /**
     * 预计送达日期
     */
    @NotNull(message = "预计送达日期不能为空")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private LocalDate estimatedArrivalTime;
    /**
     * 发货备注
     */
    private String deliverRemark;
}
