/**
 * @filename:ContractTerms 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 com.trade.common.core.domain.CommonEntity;

import com.trade.common.validate.ValidatorGroup;
import com.trade.service.trade.salescontract.domain.ContractTermsExtend;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.util.List;

/**
 * @Description:合同条款实体类
 * @version: v1.0.0
 * @author: wanglang
 */
@Data
@EqualsAndHashCode(callSuper = false)
// @Accessors(chain = true)
@Valid
public class ContractTermsDto extends CommonEntity<ContractTermsDto> {

    private static final long serialVersionUID = 1725364450348L;
    @ApiModelProperty(name = "contractId", value = "合同ID")
    @NotNull(message = "合同ID", groups = {
            ValidatorGroup.Submit.class
    })
    private Long contractId;
    @ApiModelProperty(name = "contractType", value = "合同类型")
    @NotBlank(message = "合同类型", groups = {
            ValidatorGroup.Submit.class
    })
    private String contractType;
    @ApiModelProperty(name = "contractNo", value = "合同编号")
    private String contractNo;
    @NotBlank(message = "付款方式", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "paymentWay", value = "付款方式")
    private String paymentWay;
    @ApiModelProperty(name = "paymentCurrency", value = "付款币种")
    private String paymentCurrency;
    @ApiModelProperty(name = "invoiceType", value = "发票类型1增值税专用发票2增值税普通发票3增值税电子专用发票4增值税电子普通发票5数电票（增值税专用发票）6（数电票）增值税普通发票")
    private String invoiceType;
    @NotNull(message = "结算周期单位天", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "settlementCycle", value = "结算周期单位天")
    private Integer settlementCycle;
    @NotBlank(message = "账户名称", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "accountName", value = "账户名称")
    private String accountName;
    @NotBlank(message = "账号", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "accountNumber", value = "账号")
    private String accountNumber;
    @NotBlank(message = "开户行名称", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "openingBank", value = "开户行名称")
    private String openingBank;
    @ApiModelProperty(name = "swiftCode", value = "香港开户行")
    private String swiftCode;
    @ApiModelProperty(name = "remark", value = "备注")
    private String remark;
    @NotBlank(message = "提交状态", groups = {
            ValidatorGroup.Submit.class
    })
    @ApiModelProperty(name = "submitStatus", value = "提交状态1草稿2正式")
    private String submitStatus;
    @ApiModelProperty(name = "paymentInfo", value = "付款信息")
    @Size(min = 1, message = "付款信息至少需要一条", groups = {
            ValidatorGroup.Submit.class
    })
    private List<ContractTermsExtend> paymentInfo;
    @ApiModelProperty(name = "titleInfo", value = "特殊约定")
    @Size(min = 1, message = "特殊约定必须填写", groups = {
            ValidatorGroup.Submit.class
    })
    private List<ContractTermsExtend> titleInfo;
}
