package cn.iocoder.yudao.module.contract.controller.admin.suppliercontract.vo;

import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.List;

@Schema(description = "管理后台 - 采购合同信息新增/修改 Request VO")
@Data
public class SupplierContractSaveReqVO {

    @Schema(description = "主键id")
    private Long id;

    @Schema(description = "合同编号，年月日+uuid", requiredMode = Schema.RequiredMode.REQUIRED, example = "2024080965a74fe2f33c4273803d08d2b5e4aefb")
    @NotBlank(message = "合同编号不能为空")
    private String supplierContractCode;

    @Schema(description = "合同名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "合同名称不能为空")
    @NotBlank(message = "合同名称不能为空")
    private String supplierContractName;

    @Schema(description = "是否为框架合同 0否 1是", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
    @NotNull(message = "是否为框架合同 0否 1是不能为空")
    private Integer isFrameContract;

    @Schema(description = "供应商id")
    private Long supplierId;

    @Schema(description = "供应商名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "供应商名称不能为空")
    @NotBlank(message = "供应商名称不能为空")
    private String supplierName;

    @Schema(description = "合同开始日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2023-08-09")
    @NotBlank(message = "合同开始日期不能为空")
    private String startDate;

    @Schema(description = "合同结束日期", requiredMode = Schema.RequiredMode.REQUIRED, example = "2023-08-09")
    @NotBlank(message = "合同结束日期不能为空")
    private String endDate;

    @Schema(description = "合同金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "10.00")
    @NotNull(message = "合同金额不能为空")
    @Min(value = 0, message = "合同金额不能小于0")
    private BigDecimal money;

    @Schema(description = "合同负责人", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    private Long ownerEmployeeId;

    @Schema(description = "备注", example = "备注可以为空")
    private String remarks;

    @Schema(description = "附件主键id", example = "[]")
    private List<Long> fileIdList;

    @Schema(description = "是否变更 0否 1是，无需传递该参数", example = "0")
    @JsonIgnore
    private Integer isChange;
}