package com.dk.mdm.model.query.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.LocalDateTime;

/**
 *  库存明细
 */
@Data
@Accessors(chain = true)
public class InventoryQuery extends PageInfo<InventoryQuery>{

    /*
     * 数据库字段
     */

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

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


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


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


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


    /**
     * 出库中数量
     */
    @ApiModelProperty(value = "出库中数量")
    private BigDecimal outingQty;


    /**
     * 可售数量（可用量） (库存数量-出库中数量)
     */
    @ApiModelProperty(value = "可售数量（可用量） (库存数量-出库中数量)")
    private BigDecimal usableQty;


    /**
     * 成本单价
     */
    @ApiModelProperty(value = "成本单价")
    private BigDecimal costPrice;


    /**
     * 成本金额
     */
    @ApiModelProperty(value = "成本金额")
    private BigDecimal costAmt;


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


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


    /**
     * 冻结数量
     */
    @ApiModelProperty(value = "冻结数量")
    private BigDecimal freezeQty;

    @ApiModelProperty(value = "模糊查询")
    private String searchText;

    @ApiModelProperty(value = "排序")
    private String desc;
    /*
     * 相关属性
     * @TableField(exist = false)
     */

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


    private static final long serialVersionUID = 1L;

}
