package com.shkj.wms.bo;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

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

/**
 * 库存管理对象
 *
 * @author lch
 * @date 2023-05-07
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class SysStockAddBo implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 货主Id
     */
    @NotNull(message = "货主Id不得为空")
    private Long consignorId;


    /**
     * 所属仓库
     */
    @NotNull(message = "所属仓库不得为空")
    private Long branchId;


    /**
     * 所属库房
     */
    @NotNull(message = "所属库房不得为空")
    private Long storageId;


    /**
     * 所属区域
     */
    @NotNull(message = "所属区域不得为空")
    private Long areaId;


    /**
     * 所属巷道
     */
    @NotBlank(message = "所属巷道不得为空")
    private String tunnel;


    /**
     * 产品信息
     */
    @NotBlank(message = "产品信息不得为空")
    private String goodsNo;


    /**
     * 实际库存
     */
    @NotNull(message = "实际库存不得为空")
    private Long qty;


    /**
     * 入预占库存
     */
    @NotNull(message = "入预占库存不得为空")
    private Long inQty;


    /**
     * 出预占库存
     */
    @NotNull(message = "出预占库存不得为空")
    private Long outQty;


    /**
     * 库存状态
     */
    @NotBlank(message = "库存状态不得为空")
    private String stockStatus;


    /**
     * $column.columnComment
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;


    /**
     * $column.columnComment
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;


    /**
     * $column.columnComment
     */
    @TableField(fill = FieldFill.INSERT)
    @NotBlank(message = "${column.columnComment}不得为空")
    private String createBy;


    /**
     * $column.columnComment
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @NotBlank(message = "${column.columnComment}不得为空")
    private String updateBy;

}
