package com.ffii.fpsms.modules.stock.entity

import com.ffii.core.entity.BaseEntity
import jakarta.persistence.Column
import jakarta.persistence.Entity
import jakarta.persistence.JoinColumn
import jakarta.persistence.OneToOne
import jakarta.persistence.Table
import jakarta.validation.constraints.NotNull

@Entity
@Table(name = "stock_ledger")
open class StockLedger: BaseEntity<Long>() {
//    @OneToOne
//    @JoinColumn(name = "stockInLineId")
//    open var stockInLine: StockInLine? = null

    @OneToOne
    @JoinColumn(name = "stockOutLineId")
    open var stockOutLine: StockOutLine? = null

    @NotNull
    @OneToOne
    @JoinColumn(name = "inventoryId")
    open var inventory: Inventory? = null

    @Column(name = "inQty")
    open var inQty: Double? = null

    @Column(name = "outQty")
    open var outQty: Double? = null

    @Column(name = "balance")
    open var balance: Double? = null
}