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.fasterxml.jackson.annotation.JsonFormat;
import com.hys.app.model.erp.enums.OrderTypeEnum;
import com.hys.app.model.erp.enums.ScanFormCodeTypeEnum;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

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


/**
 * 出库单产品明细实体类
 *
 * @author 张崧
 * @since 2023-12-07 17:06:32
 */
@TableName("erp_warehouse_out_item")
@Data
public class WarehouseOutItemDO implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(name = "warehouse_out_id", value = "出库单id")
    private Long warehouseOutId;

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

    @ApiModelProperty(name = "warehouse_entry_sn", value = "入库单编号")
    private String warehouseEntrySn;

    @ApiModelProperty(name = "warehouse_entry_item_id", value = "入库单明细id")
    private Long warehouseEntryItemId;

    @ApiModelProperty(name = "warehouse_entry_batch_id", value = "入库批次id")
    private Long warehouseEntryBatchId;

    @ApiModelProperty(name = "warehouse_entry_batch_sn", value = "入库批次号")
    private String warehouseEntryBatchSn;

    @ApiModelProperty(name = "order_id", value = "订单id")
    private Long orderId;

    @ApiModelProperty(name = "order_item_id", value = "订单详情id(不是发货单的)")
    private Long orderItemId;

    @ApiModelProperty(name = "order_sn", value = "订单编号")
    private String orderSn;


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

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

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

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

    @ApiModelProperty(name = "product_specification", value = "产品规格")
    private String productSpecification;

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

    @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 = "product_price", value = "产品单价")
    private Double productPrice;

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

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

    @ApiModelProperty(name = "out_num", value = "出库数量")
    private Integer outNum;

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

    @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 = "end_time", value = "结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date endTime;


    @ApiModelProperty(name = "type", value = "订单类型")
    private OrderTypeEnum orderType;

}
