package com.ffii.fpsms.modules.pickOrder.entity

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

@Entity
@Table(name = "truck_lane_version_line")
open class TruckLaneVersionLine : BaseEntity<Long>() {

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "truckLaneVersionId", nullable = false)
    open var truckLaneVersion: TruckLaneVersion? = null

    @field:NotNull
    @Column(name = "truckRowId", nullable = false)
    open var truckRowId: Long? = null

    @field:Size(max = 100)
    @Column(name = "truckLanceCode", length = 100)
    open var truckLanceCode: String? = null

    @field:Size(max = 50)
    @Column(name = "shopCode", length = 50)
    open var shopCode: String? = null

    @field:Size(max = 255)
    @Column(name = "branchName", length = 255)
    open var branchName: String? = null

    @field:Size(max = 255)
    @Column(name = "districtReference", length = 255)
    open var districtReference: String? = null

    @Column(name = "loadingSequence")
    open var loadingSequence: Int? = null

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

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

    @field:Size(max = 255)
    @Column(name = "remark", length = 255)
    open var remark: String? = null

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

