package cn.lihongjie.coal.warehouseGoodsSummary.entity;

import cn.lihongjie.coal.base.entity.OrgCommonEntity;
import cn.lihongjie.coal.warehouse.entity.WarehouseEntity;
import cn.lihongjie.coal.warehouseGoods.entity.WarehouseGoodsEntity;
import cn.lihongjie.coal.warehouseReceipt.entity.WarehouseReceiptEntity;
import cn.lihongjie.coal.warehouseShelve.entity.WarehouseShelveEntity;

import jakarta.persistence.Entity;
import jakarta.persistence.ManyToOne;

import lombok.Data;

import org.hibernate.annotations.Comment;
import org.hibernate.annotations.Formula;

@Data
@Entity
public class WarehouseGoodsSummaryEntity extends OrgCommonEntity {


    @ManyToOne
    private WarehouseGoodsEntity goods;




    @ManyToOne
    private WarehouseEntity warehouse;

    @ManyToOne
    private WarehouseShelveEntity shelve;

    @ManyToOne
    private WarehouseReceiptEntity receipt;

    @Comment("数量")
    private Double number;


    @Comment("单价")
    private Double price;


    @Formula("(number * price)")
    private Double amount;

}
