package com.trade.service.trade.purchasecontract.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.trade.common.core.dto.BaseDTO;
import com.trade.common.validate.ValidatorGroup;
import com.trade.service.filestorage.dto.FileAbstractDto;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 采购合同表基础信息
 *
 * @author hlb
 * @since 2024-09-07 16:23:15
 */
public class PurchaseContractDto extends BaseDTO {

    /**
     * 主键id
     */
    @NotNull(message = "采购合同主键id不能为空")
    private Long id;
    /**
     * 客户id
     */
    private Long customerUserId;
    /**
     * 客户编号
     */
    private String customerIdentifierNo;
    /**
     * 企业名称（客户名称）
     */
    private String customerEnterpriseName;
    /**
     * 统一社会信用编码
     */
    private String customerEnterpriseCertNo;
    /**
     * 合同编号
     */
    private String contractNo;
    /**
     * 合同名称
     */
    @NotNull(message = "合同编号不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String contractName;
    /**
     * 销售合同编号
     */
    @NotNull(message = "销售合同编号不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private String salesContractNo;
    /**
     * 销售合同id
     */
    private Long salesContractId;
    /**
     * 销售合同名称
     */
    private String salesContractName;
    /**
     * 供应商编号
     */
    private String vendorEntityNo;
    /**
     * 供应商名称
     */
    private String vendorEntityName;
    /**
     * 代理公司（贸易平台）证件号
     */
    private String agencyCertNo;
    /**
     * 代理公司（贸易平台）名称
     */
    private String agencyEnterpriseName;
    /**
     * 是否使用标准模版 false-否 true-是
     */
    @NotNull(message = "是否使用标准模版不能为空", groups = {
            ValidatorGroup.Submit.class
    })
    private Boolean templateType;
    /**
     * 签署日期
     */
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    private Date signDate;
    /**
     * 采购合同附件
     */
    private FileAbstractDto purchaseContractFile;
    /**
     * 承诺函附件
     */
    private FileAbstractDto platformCommitmentLetter;
    /**
     * 提交状态 true-草稿 false-正式
     */
    private Boolean draft;
    /**
     * 合同状态,枚举：purchase_contract_status
     */
    private String status;
    /**
     * 结算周期，单位：天
     */
    private Integer settlementCycle;
    /**
     * 合同金额
     */
    private BigDecimal contractAmount;
    /**
     * 合同币种
     */
    private String contractCurrency;
    /**
     * 创建者
     */
    private String createBy;
    /**
     * 更新者
     */
    private String updateBy;
    /**
     * 创建时间
     */
    private Date gmtCreate;
    /**
     * 修改时间
     */
    private Date gmtModified;
    /**
     * 提交时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date gmtSubmit;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getCustomerUserId() {
        return customerUserId;
    }

    public void setCustomerUserId(Long customerUserId) {
        this.customerUserId = customerUserId;
    }

    public String getCustomerIdentifierNo() {
        return customerIdentifierNo;
    }

    public void setCustomerIdentifierNo(String customerIdentifierNo) {
        this.customerIdentifierNo = customerIdentifierNo;
    }

    public String getCustomerEnterpriseName() {
        return customerEnterpriseName;
    }

    public void setCustomerEnterpriseName(String customerEnterpriseName) {
        this.customerEnterpriseName = customerEnterpriseName;
    }

    public String getCustomerEnterpriseCertNo() {
        return customerEnterpriseCertNo;
    }

    public void setCustomerEnterpriseCertNo(String customerEnterpriseCertNo) {
        this.customerEnterpriseCertNo = customerEnterpriseCertNo;
    }

    public String getContractNo() {
        return contractNo;
    }

    public void setContractNo(String contractNo) {
        this.contractNo = contractNo;
    }

    public String getContractName() {
        return contractName;
    }

    public void setContractName(String contractName) {
        this.contractName = contractName;
    }

    public String getSalesContractNo() {
        return salesContractNo;
    }

    public void setSalesContractNo(String salesContractNo) {
        this.salesContractNo = salesContractNo;
    }

    public Long getSalesContractId() {
        return salesContractId;
    }

    public void setSalesContractId(Long salesContractId) {
        this.salesContractId = salesContractId;
    }

    public String getSalesContractName() {
        return salesContractName;
    }

    public void setSalesContractName(String salesContractName) {
        this.salesContractName = salesContractName;
    }

    public String getVendorEntityNo() {
        return vendorEntityNo;
    }

    public void setVendorEntityNo(String vendorEntityNo) {
        this.vendorEntityNo = vendorEntityNo;
    }

    public String getVendorEntityName() {
        return vendorEntityName;
    }

    public void setVendorEntityName(String vendorEntityName) {
        this.vendorEntityName = vendorEntityName;
    }

    public String getAgencyCertNo() {
        return agencyCertNo;
    }

    public void setAgencyCertNo(String agencyCertNo) {
        this.agencyCertNo = agencyCertNo;
    }

    public String getAgencyEnterpriseName() {
        return agencyEnterpriseName;
    }

    public void setAgencyEnterpriseName(String agencyEnterpriseName) {
        this.agencyEnterpriseName = agencyEnterpriseName;
    }

    public Boolean getTemplateType() {
        return templateType;
    }

    public void setTemplateType(Boolean templateType) {
        this.templateType = templateType;
    }

    public Date getSignDate() {
        return signDate;
    }

    public void setSignDate(Date signDate) {
        this.signDate = signDate;
    }

    public FileAbstractDto getPurchaseContractFile() {
        return purchaseContractFile;
    }

    public void setPurchaseContractFile(FileAbstractDto purchaseContractFile) {
        this.purchaseContractFile = purchaseContractFile;
    }

    public FileAbstractDto getPlatformCommitmentLetter() {
        return platformCommitmentLetter;
    }

    public void setPlatformCommitmentLetter(FileAbstractDto platformCommitmentLetter) {
        this.platformCommitmentLetter = platformCommitmentLetter;
    }

    public Boolean getDraft() {
        return draft;
    }

    public void setDraft(Boolean draft) {
        this.draft = draft;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public Integer getSettlementCycle() {
        return settlementCycle;
    }

    public void setSettlementCycle(Integer settlementCycle) {
        this.settlementCycle = settlementCycle;
    }

    public BigDecimal getContractAmount() {
        return contractAmount;
    }

    public void setContractAmount(BigDecimal contractAmount) {
        this.contractAmount = contractAmount;
    }

    public String getContractCurrency() {
        return contractCurrency;
    }

    public void setContractCurrency(String contractCurrency) {
        this.contractCurrency = contractCurrency;
    }

    public String getCreateBy() {
        return createBy;
    }

    public void setCreateBy(String createBy) {
        this.createBy = createBy;
    }

    public String getUpdateBy() {
        return updateBy;
    }

    public void setUpdateBy(String updateBy) {
        this.updateBy = updateBy;
    }

    public Date getGmtCreate() {
        return gmtCreate;
    }

    public void setGmtCreate(Date gmtCreate) {
        this.gmtCreate = gmtCreate;
    }

    public Date getGmtModified() {
        return gmtModified;
    }

    public void setGmtModified(Date gmtModified) {
        this.gmtModified = gmtModified;
    }

    public Date getGmtSubmit() {
        return gmtSubmit;
    }

    public void setGmtSubmit(Date gmtSubmit) {
        this.gmtSubmit = gmtSubmit;
    }
}
