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 InOutRecordResponse  {

    /*
     * 数据库字段
     */

    /**
     * 明细ID
     */
    @ApiModelProperty(value = "明细ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String recordId;


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


    /**
     * 业务单据 (表名（哪个业务单据触发的库存变化）)
     */
    @Excel(name = "业务单据 (表名（哪个业务单据触发的库存变化）)")
    @ApiModelProperty(value = "业务单据 (表名（哪个业务单据触发的库存变化）)")
    private String biznisType;


    /**
     * 业务单ID
     */
    @ApiModelProperty(value = "业务单ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String biznisId;


    /**
     * 业务单明细ID
     */
    @ApiModelProperty(value = "业务单明细ID")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String biznisItemId;


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


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


    /**
     * 入库价
     */
    @Excel(name = "入库价")
    @ApiModelProperty(value = "入库价")
    private BigDecimal priceInto;


    /**
     * 入库数量 (流入为正数，流出为负数)
     */
    @Excel(name = "入库数量 (流入为正数，流出为负数)")
    @ApiModelProperty(value = "入库数量 (流入为正数，流出为负数)")
    private BigDecimal intoQty;


    /**
     * 入库金额
     */
    @Excel(name = "入库金额")
    @ApiModelProperty(value = "入库金额")
    private BigDecimal intoAmt;


    /**
     * 入库日期
     */
    @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 = "业务单单号")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String biznisNo;


    /**
     * 业务单明细单号
     */
    @Excel(name = "业务单明细单号")
    @ApiModelProperty(value = "业务单明细单号")
    @TableField(typeHandler = UuidTypeHandler.class)
    private String biznisItemNo;



    private static final long serialVersionUID = 1L;

}
