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

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

@Entity
@Table(name = "purchase_quotation")
open class PurchaseQuotation : BaseEntity<Long>(){
    @Size(max = 30)
    @NotNull
    @Column(name = "code", nullable = false, length = 30)
    open var code: String? = null

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

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

    @ManyToOne
    @JoinColumn(name = "shopId")
    open var shop: Shop? = null

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

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

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