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

import com.ffii.core.entity.BaseEntity
import jakarta.persistence.*
import jakarta.validation.constraints.NotNull
import jakarta.validation.constraints.Size
import java.time.LocalDateTime

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

    @NotNull
    @Column(name = "planStart", nullable = false)
    open var planStart: LocalDateTime? = null

    @NotNull
    @Column(name = "planEnd", nullable = false)
    open var planEnd: LocalDateTime? = null

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

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

    @Size(max = 20)
    @NotNull
    @Column(name = "status", nullable = false, length = 20)
    open var status: String? = null

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