package com.hz.pm.api.projectdeclared.model.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * @Classname Contract
 * @Description
 * @Date 2023/5/30 15:35
 * @Author PoffyZhang
 */
@Data
@ApiModel(value = "合同对象")
public class ContractSaveDTO {

    @ApiModelProperty("项目ID")
    @NotNull(message = "项目ID不能为空")
    private Long projectId;

    @ApiModelProperty("合同名称")
    private String name;

    @ApiModelProperty("合同总金额")
    private BigDecimal totalAmount;

    @ApiModelProperty("供应商开户行")
    private String supplierBank;

    @ApiModelProperty("供应商开户行帐号")
    private String supplierAccount;

    @ApiModelProperty("质保期 年")
    private Integer warrantyPeriod;

    @ApiModelProperty("质保金")
    private BigDecimal retentionMoney;

    @ApiModelProperty("合同完成时间")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime contractTime;

    @ApiModelProperty("交货日期")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private LocalDateTime deliveryTime;

    @ApiModelProperty("附件")
    private String attachment;

    @ApiModelProperty("支付计划")
    private List<PaymentPlanSaveDTO> payments;
}
