package com.ningdatech.carapi.industry.model.vo;

import com.ningdatech.carapi.sys.entity.dto.RegionDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

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

/**
 * <p>
 * 原材料采购信息列表视图
 * </p>
 *
 * @author WendyYang
 * @since 2022-11-09
 */
@Data
@ApiModel("原材料采购信息列表视图")
public class PurchaseRawMaterialListVo {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("区域")
    private List<RegionDTO> regions;

    @ApiModelProperty("区域ID")
    @NotNull(message = "区域ID不能为空")
    private Long regionId;

    @ApiModelProperty("原材料名称")
    @NotBlank(message = "原材料名称不能为空")
    private String rawMaterialName;

    @ApiModelProperty("规格型号")
    @NotBlank(message = "规格型号不能为空")
    private String model;

    @ApiModelProperty("数量")
    @NotNull(message = "数量不能为空")
    private Integer number;

    @ApiModelProperty("计量单位")
    @NotBlank(message = "计量单位不能为空")
    private String unit;

    @ApiModelProperty("单价")
    @NotNull(message = "单价不能为空")
    private BigDecimal unitPrice;

    @ApiModelProperty("总金额(保存/修改无需计算)")
    private BigDecimal totalAmount;

    @ApiModelProperty("采购日期")
    @NotNull(message = "采购日期不能为空")
    private LocalDate purchaseDate;

    @ApiModelProperty("采购单位")
    @NotBlank(message = "采购单位不能为空")
    private String purchaseOrg;

    @ApiModelProperty("采购单位ID")
    @NotNull(message = "采购单位ID不能为空")
    private Long purchaseOrgId;

    @ApiModelProperty("批准部门")
    @NotBlank(message = "批准部门不能为空")
    private String approvalDept;

    @ApiModelProperty("备注")
    private String remark;

}
