package com.shinsoft.sto.model;

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.shinsoft.generator.model.BaseModel;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;
import com.alibaba.fastjson.annotation.JSONField;

/**
 * <p>
 * 库存现有量
 * </p>
 *
 * @author system
 * @since 2024-10-08
 */
@Getter
@Setter
@Accessors(chain = true)
@TableName("STO_ONHAND")
@ApiModel(value = "Onhand对象", description = "库存现有量")
public class Onhand extends BaseModel {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("公司代码")
    private String compCd;

    @ApiModelProperty("部门代码")
    private String deptCd;

    @ApiModelProperty("库房代码（公司代码+类型+编号)")
    private String storeCd;

    @ApiModelProperty("库房名称")
    private String storeNm;

    @ApiModelProperty("区号")
    private String areaCd;

    @ApiModelProperty("垛位号")
    private String stackCd;

    @ApiModelProperty("库房类型（原料库，中间库，成品库，备件库，贸易库，租赁库，其他库）")
    private String storeType;

    @ApiModelProperty("物料编码")
    private String itemCd;

    @ApiModelProperty("物料名称")
    private String itemNm;

    @ApiModelProperty("采购订单号")
    private String purOrdNo;

    @ApiModelProperty("采购订单行号")
    private String purOrdLn;

    @ApiModelProperty("物料类型")
    private String itemType;

    @ApiModelProperty("计量单位")
    private String uom;

    @ApiModelProperty("库存现有量")
    private BigDecimal qty;

    @TableField(exist = false)
    @ApiModelProperty("新库存现有量")
    private BigDecimal qtyNew;

    @ApiModelProperty("湿基量")
    private BigDecimal qtyWet;

    @TableField(exist = false)
    @ApiModelProperty("新湿基量")
    private BigDecimal qtyWetNew;

    @ApiModelProperty("最后操作人")
    private String lastName;

    @ApiModelProperty("最后操作时间")
    @JSONField(format="yyyy-MM-dd HH:mm:ss")
    private Date lastTime;

    @ApiModelProperty("备注")
    private String remarks;

    @ApiModelProperty("物料成本")
    private Short price;

    @ApiModelProperty("批次号")
    private String batchNo;

    private String attr1;

    private String attr2;

    private String attr3;

    private String attr4;

    private String attr5;

    private String attr6;

    private String attr7;

    private String attr8;

    private String attr9;

    private String attr10;

    @TableField(exist = false)
    private Integer outquantity;

    // 目标库房
    @TableField(exist = false)
    private String storeIdMB;
    // 目标库房
    @TableField(exist = false)
    private String storeCdMB;
    // 目标库房
    @TableField(exist = false)
    private String storeNmMB;
    // 目标库房
    @TableField(exist = false)
    private String areaIdMB;
    // 目标库房
    @TableField(exist = false)
    private String areaCdMB;
    // 目标库房
    @TableField(exist = false)
    private String stackIdMB;
    // 目标库房
    @TableField(exist = false)
    private String stackCdMB;

    // 倒库数量
    @TableField(exist = false)
    private BigDecimal qtyDk;
    // 倒库湿基量
    @TableField(exist = false)
    private BigDecimal qtyWetDk;
}
