package com.dk.mdm.model.pojo.sale;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.baomidou.mybatisplus.annotation.*;
import java.io.Serializable;

import com.dk.common.infrastructure.annotaiton.ExportTitle;
import com.dk.common.infrastructure.handler.*;
import com.dk.common.model.pojo.PageInfo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.alibaba.fastjson.JSONObject;

import java.math.BigDecimal;
import java.util.List;
import java.time.LocalDateTime;

/**
 *  销售明细
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@ExportTitle("销售明细")
@TableName(value = "t_psi_order_item", autoResultMap = true, schema = "dkic_b")
@ApiModel(value="实体类：销售明细", description="表名：t_psi_order_item")
public class OrderItem extends PageInfo<OrderItem> 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 orderId;


    /**
     * 商品顺序
     */
    @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 BigDecimal itemQty;


    /**
     * 标价
     */
    @Excel(name = "标价")
    @ApiModelProperty(value = "标价")
    private BigDecimal priceStd;


    /**
     * 标价金额 (商品数量*标价)
     */
    @Excel(name = "标价金额 (商品数量*标价)")
    @ApiModelProperty(value = "标价金额 (商品数量*标价)")
    private BigDecimal amtStd;


    /**
     * 售价
     */
    @Excel(name = "售价")
    @ApiModelProperty(value = "售价")
    private BigDecimal priceSale;


    /**
     * 售价金额 (商品数量*售价)
     */
    @Excel(name = "售价金额 (商品数量*售价)")
    @ApiModelProperty(value = "售价金额 (商品数量*售价)")
    private BigDecimal itemAmt;


    /**
     * 折扣 (售价/标价)
     */
    @Excel(name = "折扣 (售价/标价)")
    @ApiModelProperty(value = "折扣 (售价/标价)")
    private BigDecimal priceDiscount;


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


    /**
     * 出库状态
     */
    @Excel(name = "出库状态")
    @ApiModelProperty(value = "出库状态")
    private String outStatus;


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


    /**
     * 出库中金额
     */
    @Excel(name = "出库中金额")
    @ApiModelProperty(value = "出库中金额")
    private BigDecimal outingAmt;


    /**
     * 已出库数量
     */
    @Excel(name = "已出库数量")
    @ApiModelProperty(value = "已出库数量")
    private BigDecimal outQty;


    /**
     * 已出库金额
     */
    @Excel(name = "已出库金额")
    @ApiModelProperty(value = "已出库金额")
    private BigDecimal outAmt;


    /**
     * 已出库退货数量
     */
    @Excel(name = "已出库退货数量")
    @ApiModelProperty(value = "已出库退货数量")
    private BigDecimal returnQty;


    /**
     * 已出库退货金额
     */
    @Excel(name = "已出库退货金额")
    @ApiModelProperty(value = "已出库退货金额")
    private BigDecimal returnAmt;


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


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


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

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

    private static final long serialVersionUID = 1L;

}
