package com.ffii.fpsms.modules.pickOrder.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.LocalTime

@Entity
@Table(name = "truck")
open class Truck : BaseEntity<Long>() {
    
    @Size(max = 50)
    @NotNull
    @Column(name = "TruckLanceCode", nullable = false)
    open var truckLanceCode: String? = null

    @Column(name = "DepartureTime")
    open var departureTime: LocalTime? = null

    @ManyToOne
    @JoinColumn(name = "shopId")
    open var shop: Shop? = null
    
    @Column(name = "ShopName", length = 255)
    open var shopName: String? = null
    
    @Column(name = "ShopCode", length = 50)
    open var shopCode: String? = null
    
    @Column(name = "LoadingSequence")
    open var loadingSequence: Int? = null
    
    @Column(name = "Store_id")
    open var storeId: Int? = null
}