package com.hys.app.model.erp.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.hys.app.model.erp.dos.StockInventory;
import com.hys.app.model.erp.dos.StockInventoryProduct;
import com.hys.app.model.erp.dto.StockInventoryProductDTO;
import com.hys.app.model.erp.enums.DamageinventoryEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 库存盘点单实体VO
 *
 * @author dmy
 * 2023-12-05
 */
@ApiModel
@Data
public class StockInventoryVO implements Serializable {

    private static final long serialVersionUID = 5362636527081818965L;

    /**
     * 盘点时间
     */
    @ApiModelProperty(name = "inventory_time", value = "盘点时间", required = true)
    @NotNull(message = "盘点时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date inventoryTime;

    /**
     * 仓库ID
     */
    @ApiModelProperty(name = "warehouse_id", value = "仓库ID", required = true)
    @NotNull(message = "仓库ID不能为空")
    private Long warehouseId;

    /**
     * 盘点人ID
     */
    @ApiModelProperty(name = "inventory_person_id", value = "盘点人ID", required = true)
    @NotNull(message = "盘点人ID不能为空")
    private Long inventoryPersonId;

    /**
     * 库存盘点单产品集合
     */
    @ApiModelProperty(name = "product_list", value = "库存盘点单产品集合", required = true)
    @NotNull(message = "库存盘点单产品不能为空")
    private List<StockInventoryProductDTO> productList;

    /**
     * 盘点说明
     */
    @ApiModelProperty(name = "inventory_desc", value = "盘点说明")
    private String inventoryDesc;

    /**
     * 部门名称
     */
    @ApiModelProperty(name = "inventory_type", value = "盘点类型", required = true)
    private String inventoryType;

    @ApiModelProperty(name = "status", value = "状态")
    private DamageinventoryEnum status = DamageinventoryEnum.NOT_HANDLE;

    /**
     * 盘点人ID
     */
    @ApiModelProperty(name = "creator_id", value = "盘点人ID", required = true)
    @NotNull(message = "盘点人ID不能为空")
    private Long creatorId;

    private String sn;
}
