package com.shkj.wms.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.shkj.common.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * 库存流水对象 sys_stock_detail
 *
 * @author voidlove
 * @date 2022-05-05
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("sys_stock_detail")
public class SysStockDetail implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * $column.columnComment
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;


    /**
     * 仓ID
     */
    private Long branchId;


    /**
     * 库房ID
     */
    private Long storageId;


    /**
     * 库房区域ID
     */
    private Long areaId;


    /**
     * 产品编号
     */
    private String moldNo;


    /**
     * 产品编号id
     */
    private Long moldId;

    /**
     * 产品条码
     */
    @Excel(name = "模具编号", width = 20, sort = 1)
    private String barcode;


    /**
     * 托盘编号
     */
    @Excel(name = "托盘编号", width = 20)
    private String containerCode;

    /**
     * 托盘id
     */
    private Long containerId;


    /**
     * 数量
     */
    @Excel(name = "数量", width = 20)
    private BigDecimal qty;


    /**
     * 仓库库位ID
     */
    private Long locationId;

    /**
     * 货位
     */
    @Excel(name = "货位", width = 20, sort = 4)
    private String locationCode;


    /**
     * 入库时间
     */
    @Excel(name = "入库时间", width = 20, sort = 6)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7")
    private Date inTime;


    /**
     * 出库时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7")
    private Date outTime;

    /**
     * 入库预占库存
     */
    @Excel(name = "数量", width = 20)
    private BigDecimal inQty;

    /**
     * 出库预占库存
     */
    @Excel(name = "数量", width = 20)
    private BigDecimal outQty;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7")
    private Date createTime;


    /**
     * 修改时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7")
    private Date updateTime;

}
