package com.hys.app.model.erp.dos;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
import com.hys.app.model.erp.dto.ProductSpec;
import com.hys.app.model.erp.enums.ScanFormCodeTypeEnum;
import com.hys.app.service.kuaidiniao.entity.KdGood;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;


/**
 * 入库单产品明细实体类
 *
 * @author 张崧
 * @since 2023-12-05 15:30:10
 */
@TableName("erp_warehouse_entry_product")
@Data
public class WarehouseEntryProductDO implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(hidden = true)
    private Long id;

    @ApiModelProperty(name = "warehouse_entry_id", value = "入库单id")
    @TableField("warehouse_entry_id")
    private Long warehouseEntryId;

    @ApiModelProperty(name = "goods_id", value = "商品id")
    private Long goodsId;

    @ApiModelProperty(name = "product_id", value = "产品id")
    private Long productId;

    @ApiModelProperty(name = "sn", value = "产品编号")
    private String sn;

    @ApiModelProperty(name = "name", value = "产品名称")
    private String name;

    @ApiModelProperty(name = "specification", value = "产品规格型号")
    private String specification;

    @ApiModelProperty(name = "brand", value = "产品品牌")
    private String brand;

    @ApiModelProperty(name = "unit", value = "产品单位")
    private String unit;

    @ApiModelProperty(name = "product_barcode", value = "产品条形码")
    private String productBarcode;

    @ApiModelProperty(name = "category_id", value = "产品分类id")
    private Long categoryId;

    @ApiModelProperty(name = "category_name", value = "产品分类名称")
    private String categoryName;

    @ApiModelProperty(name = "contract_num", value = "合同数量")
    private Integer contractNum;

    @ApiModelProperty(name = "num", value = "本次入库数量")
    private Integer num;

    @ApiModelProperty(name = "contract_price", value = "合同单价")
    private Double contractPrice;

    @ApiModelProperty(name = "sn_code_list", value = "货物信息，最大数量50")
    @TableField(exist = false)
    private List<GoodsSnDO> snCodeList;

    @ApiModelProperty(name = "total_price", value = "入库总价")
    private Double totalPrice;

    @ApiModelProperty(name = "cost_price", value = "进货单价")
    private Double costPrice;

    @ApiModelProperty(name = "tax_rate", value = "税率")
    private Double taxRate;

    @ApiModelProperty(name = "return_num", value = "退货数量")
    private Integer returnNum;

    @ApiModelProperty(name = "商品")
    @TableField(exist = false)
    private GoodsDO goodsVO;

    @ApiModelProperty(name = "sku信息")
    @TableField(exist = false)
    private ProductDO productVO;

    @ApiModelProperty(name = "usable_stock", value = "可用库存")
    @TableField(exist = false)
    private Integer usableStock;

    @ApiModelProperty(name = "product_stock_id", value = "商品库存id")
    private Long productStockId;

    @ApiModelProperty(name = "scan_order_id", value = "扫码的单号，扫码订单打出来的数据必传")
    private Long scanOrderId;

    @ApiModelProperty(name = "scan_order_item_id", value = "订单项id,扫码订单打出来的数据必传")
    private Long scanOrderItemId;

    @ApiModelProperty(name = "scan_order_sn", value = "扫码的单号，扫码订单打出来的数据必传")
    private String scanOrderSn;

    @ApiModelProperty(name = "scan_order_type", value = "扫码的单号，扫码订单打出来的数据必传")
    private ScanFormCodeTypeEnum scanOrderType;

    @ApiModelProperty(name = "order_num", value = "订单原数量")
    private Long orderNum;
}
