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

import com.ffii.core.entity.BaseEntity
import com.ffii.fpsms.modules.master.entity.Items
import jakarta.persistence.*
import jakarta.validation.constraints.NotNull
import java.time.LocalDateTime

@Entity
@Table(name = "stock_out_line")
open class StockOutLine: BaseEntity<Long>() {
    @NotNull
    @OneToOne
    @JoinColumn(name = "itemId")
    open var item: Items? = null

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

    @NotNull
    @ManyToOne
    @JoinColumn(name = "stockOutId")
    open var stockOut: StockOut? = null

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

    @NotNull
    @Column(name = "status")
    open var status: String? = null

    @Column(name = "pickTime")
    open var pickTime: LocalDateTime? = null

    @Column(name = "pickerId")
    open var pickerId: Long? = null
}