package com.ffii.fpsms.modules.purchaseQuotation.entity

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

@Entity
@Table(name = "purchase_quotation_line")
open class PurchaseQuotationLine : BaseEntity<Long>() {
    @ManyToOne
    @JoinColumn(name = "purchaseQuotationId")
    open var purchaseQuotation: PurchaseQuotation? = null

    @ManyToOne
    @JoinColumn(name = "itemId")
    open var item: Items? = null

    @Size(max = 30)
    @Column(name = "code", length = 30)
    open var code: String? = null

    @Size(max = 300)
    @Column(name = "description", length = 300)
    open var description: String? = null

    @ManyToOne
    @JoinColumn(name = "uomId")
    open var uom: UomConversion? = null

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

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