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

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

import java.io.Serializable;


/**
 * 商品库存实体类
 *
 * @author 张崧
 * @since 2023-12-07 10:08:44
 */
@TableName("erp_product_stock")
@Data
@NoArgsConstructor
@EqualsAndHashCode
public class ProductStockDO implements Serializable  {

    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(name = "id",value = "id")
    private Long id;

    @ApiModelProperty(name = "warehouse_id", value = "仓库id")
    private Long warehouseId;

    @ApiModelProperty(name = "area_id", value = "库位id")
    private String areaId;

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

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

    @ApiModelProperty(name = "stock", value = "库存数量")
    private Integer num;

    @ApiModelProperty(name = "warehouse_name", value = "仓库名称")
    private String warehouseName;


    @ApiModelProperty(name = "goods_name", value = "商品名称")
    private String goodsName;

    @ApiModelProperty(name = "goods_bar_code", value = "商品条码")
    private String goodsBarCode;

    @ApiModelProperty(name = "goods_sn_code", value = "商品序列号")
    private String goodsSnCode;

    @ApiModelProperty(name = "goods_style", value = "商品规格型号")
    private String goodsStyle;

    @ApiModelProperty(name = "goods_unit", value = "商品单位")
    private String goodsUnit;

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


    @ApiModelProperty(name = "area_name", value = "库位名称")
    private String areaName;

    @ApiModelProperty(name = "actual_stock", value = "实际库存")
    private Integer actualStock =0;

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

    @ApiModelProperty(name = "transit_Stock", value = "在途库存")
    private Integer transitStock =0;

    @ApiModelProperty(name = "warning_stock", value = "预警库存")
    private Integer warningStock =0;


    @ApiModelProperty(name = "locked_stock", value = "预警库存")
    private Integer lockedStock =0;

    public ProductStockDO(Long warehouseId, Long goodsId, Long productId, Integer num) {
        this.setWarehouseId(warehouseId);
        this.setGoodsId(goodsId);
        this.setNum(num);
    }

}
