package cn.lihongjie.coal.warehouseReceiptDetail.dto;

import cn.lihongjie.coal.base.dto.OrgCommonDto;
import cn.lihongjie.coal.warehouseGoods.dto.WarehouseGoodsDto;
import cn.lihongjie.coal.warehouseReceipt.dto.WarehouseReceiptDto;
import cn.lihongjie.coal.warehouseShelve.dto.WarehouseShelveDto;

import jakarta.persistence.ManyToOne;

import lombok.Data;

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

@Data
public class WarehouseReceiptDetailDto extends OrgCommonDto {

    @ManyToOne
    private WarehouseGoodsDto goods;

    @ManyToOne
    private WarehouseShelveDto shelve;

    @ManyToOne
    private WarehouseReceiptDto receipt;

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


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


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