/**
 * @filename:SalesContract 2024-09-03
 * @project KJT v1.0.0 Copyright(c) 2024 wanglang Co. Ltd. All right reserved.
 */
package com.trade.service.trade.salescontract.dto;

import java.math.BigDecimal;
import java.time.LocalDate;

import com.trade.common.validate.ValidatorGroup;
import org.springframework.format.annotation.DateTimeFormat;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.trade.common.core.domain.CommonEntity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

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

/**
 * @Description:销售合同基础信息实体类
 * @version: v1.0.0
 * @author: wanglang
 */
@Data
@EqualsAndHashCode(callSuper = false)
// @Accessors(chain = true)
public class SalesContractDto extends CommonEntity<SalesContractDto> {

    private static final long serialVersionUID = 1725359840652L;
    @ApiModelProperty(name = "customerUserId", value = "客户id")
    private Long customerUserId;
    @ApiModelProperty(name = "fileId", value = "文件id")
    private Long fileId;
    @ApiModelProperty(name = "contractNo", value = "合同编号")
    private String contractNo;
    @ApiModelProperty(name = "contractName", value = "合同名称")
    @NotBlank(message = "合同名称不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String contractName;
    @NotBlank(message = "进口商注册号不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "importerCertNo", value = "进口商统一社会信用代码/注册号")
    private String importerCertNo;
    @NotBlank(message = "进口商名称不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "importerEnterpriseName", value = "进口商企业名称")
    private String importerEnterpriseName;
    @ApiModelProperty(name = "agencyCertNo", value = "代理公司统一社会信用代码/注册号")
    private String agencyCertNo;
    @ApiModelProperty(name = "agencyEnterpriseName", value = "代理公司企业名称")
    private String agencyEnterpriseName;
    @NotBlank(message = "贸易术语不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "tradeTerms", value = "贸易术语")
    private String tradeTerms;
    @NotBlank(message = "起运港不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "portDeparture", value = "起运港")
    private String portDeparture;
    @NotBlank(message = "目的港不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "portDestination", value = "目的港")
    private String portDestination;
    @NotNull(message = "模板类型不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "templateType", value = "模板类型1长银0自有")
    private Boolean templateType;
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @ApiModelProperty(name = "signDate", value = "签署日期")
    private LocalDate signDate;
    /**
     * @link com.trade.common.enums.SubmitStatusEnum
     */
    @ApiModelProperty(name = "submitStatus", value = "提交状态1草稿2正式")
    private String submitStatus;
    /**
     * @link com.trade.common.enums.ContractStatus
     */
    @ApiModelProperty(name = "contractStatus", value = "合同状态1草稿2生效3待上传6已完成")
    private String contractStatus;
    @ApiModelProperty(name = "auditStatus", value = "审核状态1待审核2风控审核通过3法务审核通过4风控审核不通过5法务审核不通过")
    private String auditStatus;
    @ApiModelProperty(name = "contractAmount", value = "合同金额")
    private BigDecimal contractAmount;
    @ApiModelProperty(name = "createBy", value = "创建者")
    private String createBy;
    @ApiModelProperty(name = "updateBy", value = "更新者")
    private String updateBy;
    @ApiModelProperty(name = "exportType", value = "出口类型")
    private String exportType;
    @ApiModelProperty(name = "exchangeRate", value = "成交汇率")
//    @NotNull(message = "成交汇率不能为空", groups = {
//            ValidatorGroup.Submit.class
//    })
    private BigDecimal exchangeRate;
}
