package com.dk.mdm.model.response.ivt;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import com.dk.common.infrastructure.annotaiton.ExportTitle;
import com.dk.common.infrastructure.handler.TimestampTypeHandler;
import com.dk.common.infrastructure.handler.UuidTypeHandler;
import com.dk.common.model.pojo.PageInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.time.LocalDateTime;

/**
 *  调整单明细
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExportTitle("调整单明细")
@TableName(value = "t_psi_transfer_item", autoResultMap = true)
@ApiModel(value="实体类：调整单明细", description="表名：t_psi_transfer_item")
public class TransferItemResponse extends PageInfo<TransferItemResponse> implements Serializable {

    /*
     * 数据库字段
     */

    /**
     * 明细ID
     */
    @TableId(value = "item_id", type = IdType.AUTO)
    @ApiModelProperty(value = "明细ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String itemId;


    /**
     * 调整单ID
     */
    @Excel(name = "调整单ID")
    @ApiModelProperty(value = "调整单ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String transferId;


    /**
     * 调整日期
     */
    @Excel(name = "调整日期")
    @ApiModelProperty(value = "调整日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDate transferDate;


    /**
     * 商品顺序
     */
    @Excel(name = "商品顺序")
    @ApiModelProperty(value = "商品顺序")
    private Integer itemIndex;


    /**
     * 商品ID
     */
    @Excel(name = "商品ID")
    @ApiModelProperty(value = "商品ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String skuId;

    @Excel(name = "箱")
    @ApiModelProperty(value = "箱")
    private  Integer box;

    @Excel(name = "片")
    @ApiModelProperty(value = "片")
    private  BigDecimal piece;

    @Excel(name = "包装")
    @ApiModelProperty(value = "包装")
    private  BigDecimal packBox;

    /**
     * 包装数量
     */
    @Excel(name = "包装数量")
    @ApiModelProperty(value = "包装数量")
    private String boxPiece;

    /**
     * 基本单位
     */
    @ApiModelProperty(value = "基本单位")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String unitId;

    /**
     * 包装单位
     */
    @ApiModelProperty(value = "包装单位")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String subUnitId;

    /**
     * 源库存ID
     */
    @Excel(name = "源库存ID")
    @ApiModelProperty(value = "源库存ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String oInvId;


    /**
     * 库存ID
     */
    @Excel(name = "库存ID")
    @ApiModelProperty(value = "库存ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String invId;


    /**
     * 源库区ID
     */
    @Excel(name = "源库区ID")
    @ApiModelProperty(value = "源库区ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String oWhId;


    /**
     * 目标库区ID
     */
    @Excel(name = "目标库区ID")
    @ApiModelProperty(value = "目标库区ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String whId;


    /**
     * 源批号
     */
    @Excel(name = "源批号")
    @ApiModelProperty(value = "源批号")
    @JsonProperty(value = "oNonStdCode")
    private String oNonStdCode;


    /**
     * 目标批号
     */
    @Excel(name = "目标批号")
    @ApiModelProperty(value = "目标批号")
    @JsonProperty(value = "nonStdCode")
    private String nonStdCode;


    @ApiModelProperty(value = "")
    private BigDecimal priceInto;


    @ApiModelProperty(value = "")
    private BigDecimal intoingAmt;


    /**
     * 调整数量
     */
    @Excel(name = "调整数量")
    @ApiModelProperty(value = "调整数量")
    private BigDecimal transferQty;

    /**
     * 有效标识 (1：正常 0：停用)
     */
    @Excel(name = "有效标识 (1：正常 0：停用)")
    @ApiModelProperty(value = "有效标识 (1：正常 0：停用)")
    private Boolean flgValid;


    /**
     * 企业ID
     */
    @TableField(fill = FieldFill.INSERT)
    @Excel(name = "企业ID")
    @ApiModelProperty(value = "企业ID")
    private Integer cpId;


    /**
     * 创建时间 (触发器自动处理)
     */
    @Excel(name = "创建时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
    @ApiModelProperty(value = "创建时间 (触发器自动处理)")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDateTime opCreateTime;


    /**
     * 创建用户 (触发器自动处理)
     */
    @Excel(name = "创建用户 (触发器自动处理)")
    @ApiModelProperty(value = "创建用户 (触发器自动处理)")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String opCreateUserId;


    /**
     * 修改时间 (触发器自动处理)
     */
    @Excel(name = "修改时间 (触发器自动处理)", format = "yyyy-MM-dd HH:mm:ss", width = 20)
    @ApiModelProperty(value = "修改时间 (触发器自动处理)")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDateTime opUpdateTime;


    /**
     * 修改用户 (触发器自动处理)
     */
    @Excel(name = "修改用户 (触发器自动处理)")
    @ApiModelProperty(value = "修改用户 (触发器自动处理)")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String opUpdateUserId;


    /**
     * 数据操作应用 (触发器自动处理)
     */
    @Excel(name = "数据操作应用 (触发器自动处理)")
    @ApiModelProperty(value = "数据操作应用 (触发器自动处理)")
    private String opAppCode;


    /**
     * 数据时间戳 (触发器自动处理)
     */
    @Excel(name = "数据时间戳 (触发器自动处理)")
    @ApiModelProperty(value = "数据时间戳 (触发器自动处理)")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class)
    private LocalDateTime opTimestamp;


    /**
     * 数据操作数据库用户 (触发器自动处理)
     */
    @Excel(name = "数据操作数据库用户 (触发器自动处理)")
    @ApiModelProperty(value = "数据操作数据库用户 (触发器自动处理)")
    private String opDbUser;


    /**
     * 商品名称
     */
    @Excel(name = "商品名称")
    @ApiModelProperty(value = "商品名称")
    private String skuName;

    /**
     * 商品编码
     */
    @Excel(name = "商品编码")
    @ApiModelProperty(value = "商品编码")
    private String skuCode;

    /**
     * 商品型号
     */
    @Excel(name = "商品型号")
    @ApiModelProperty(value = "商品型号")
    private String skuModel;

    /**
     * 品牌简称
     */
    @Excel(name = "品牌简称")
    @ApiModelProperty(value = "品牌简称")
    private String shortName;


    /**
     * 仓库名称
     */
    @Excel(name = "仓库名称")
    @ApiModelProperty(value = "仓库名称")
    private String whName;

    /**
     * 原仓库名称
     */
    @Excel(name = "原仓库名称")
    @ApiModelProperty(value = "原仓库名称")
    @JsonProperty(value = "oWhName")
    private String oWhName;


    /*
     * 相关属性
     * @TableField(exist = false)
     */
    /**
     * 小数位数 ([0-6]能改大，不能改小)
     */
    @ApiModelProperty(value = "小数位数 ([0-6]能改大，不能改小)")
    @TableField(exist = false)
    private Integer decimalPlaces;
    /*
     * 关联属性 + 查询条件
     * @TableField(exist = false)
     */


    private static final long serialVersionUID = 1L;

}
