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 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
@NoArgsConstructor
@AllArgsConstructor
@ExportTitle("存货批次明细")
public class InventoryBatchResponse {

    /*
     * 数据库字段
     */

    /**
     * 存货批次明细ID
     */
    @ApiModelProperty(value = "存货批次明细ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String batchId;


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


    /**
     * 来源单ID (入库单、出库单、调库单)
     */
    @ApiModelProperty(value = "来源单ID (入库单、出库单、调库单)")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String fromId;


    /**
     * 来源单明细ID (入库明细、出库明细、调库单明细)
     */
    @ApiModelProperty(value = "来源单明细ID (入库明细、出库明细、调库单明细)")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String fromItemId;


    /**
     * 仓库ID
     */
    @ApiModelProperty(value = "仓库ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String whId;


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


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


    /**
     * 库存数量
     */
    @Excel(name = "库存数量")
    @ApiModelProperty(value = "库存数量")
    private BigDecimal invQty;


    /**
     * 存货单价
     */
    @Excel(name = "存货单价")
    @ApiModelProperty(value = "存货单价")
    private BigDecimal costPrice;


    /**
     * 存货资产
     */
    @Excel(name = "存货资产")
    @ApiModelProperty(value = "存货资产")
    private BigDecimal costAmt;


    /**
     * 账务日期
     */
    @Excel(name = "账务日期")
    @ApiModelProperty(value = "入库日期")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    @TableField(typeHandler = TimestampTypeHandler.class, updateStrategy = FieldStrategy.IGNORED)
    private LocalDate accDate;


    /**
     * 备注
     */
    @Excel(name = "备注")
    @ApiModelProperty(value = "备注")
    private String remarks;


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


    /**
     * 企业ID
     */
    @ApiModelProperty(value = "企业ID")
    private Integer cpId;





    /*
     * 相关属性
     * @TableField(exist = false)
     */

    /*
     * 关联属性 + 查询条件
     * @TableField(exist = false)
     */

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

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

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


    /**
     * 商品型号
     */
    @Excel(name = "商品品牌名称")
    @ApiModelProperty(value = "商品品牌名称")
    private String brandName;

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


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


    /**
     * 来源单号
     */
    @Excel(name = "来源单号")
    @ApiModelProperty(value = "来源单号")
    private String fromNo;


    /**
     * 来源明细单号
     */
    @Excel(name = "来源明细单号")
    @ApiModelProperty(value = "来源明细单号")
    private String fromItemNo;



    private static final long serialVersionUID = 1L;

}
