package com.fjhx.entity.stock;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fjhx.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;

/**
 * <p>
 * 库存
 * </p>
 *
 * @author ${author}
 * @since 2022-11-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
public class Stock extends BaseEntity {

    /**
     * 物品id
     */
    private Long goodsId;

    /**
     * 数量
     */
    private BigDecimal quantity;

    /**
     * 冻结数量
     */
    private BigDecimal frozenQuantity;

    /**
     * 加权平均单价
     */
    private BigDecimal weightingAveragePrice;

    /**
     * 仓库id
     */
    private Long warehouseId;

    /**
     * 逻辑删除 0未删除 1已删除
     */
    @TableField(fill = FieldFill.INSERT)
    @TableLogic
    private Integer delFlag;

}
