package com.shkj.wms.domain;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.shkj.common.annotation.Excel;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.springframework.data.annotation.Transient;

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

/**
 * 出入库计划对象 busin_out_in_plan
 *
 * @author lch
 * @date 2023-06-02
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("busin_out_in_plan")
public class BusinOutInPlan implements Serializable {

    private static final long serialVersionUID = 1L;


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


    /**
     * 订单号
     */
    @Excel(name = "订单号", width = 20)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long orderNo;


    /**
     * 模具条码
     */
    @Excel(name = "模具条码", width = 20)
    private String moldBarcode;


    /**
     * 磨具id
     */
    @Excel(name = "磨具id", width = 20)
    private Long moldId;


    /**
     * 磨具编码
     */
    @Excel(name = "磨具编码", width = 20)
    private String moldNo;


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


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


    /**
     * 出入库类型 in=入库 出库=out 计划入库=inplan 计划出库=outplan
     */
    @Excel(name = "出入库类型", width = 20)
    private String type;

    /**
     * 出入库方向 in=入库 出库=out
     */
    @Excel(name = "出入库方向 in=入库 出库=out", width = 20)
    private String direction;


    /**
     * 出入库状态 状态 0 待入(出)库 1 入(出)库中  2已入(出)库   3已取消 -1异常
     */
    @Excel(name = "出入库状态 状态 0 待入(出)库 1 入(出)库中  2已入(出)库   3已取消 -1异常", width = 20)
    private String planStatus;


    /**
     * 分配货位
     */
    @Excel(name = "分配货位", width = 20)
    private Long locationId;




    /**
     * 异常信息
     */
    @Excel(name = "异常信息", width = 20)
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private String errorMsg;


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


    /**
     * 仓ID
     */
    @Excel(name = "仓ID", width = 20)
    private Long branchId;


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


    /**
     * 创建人
     */
    @TableField(fill = FieldFill.INSERT)
    @Excel(name = "创建人", width = 20)
    private String createBy;


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


    /**
     * 修改人
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @Excel(name = "修改人", width = 20)
    private String updateBy;

    /**
     * 库存明细表的id
     */
    private Long detailId;


    /**
     * 计划出入库时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+7")
    private Date planTime;

    /**
     * 出库楼层
     */
    private Integer layer;
}
