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

import org.springframework.beans.factory.annotation.Value
import java.time.LocalDateTime

data class PickOrderLineInfo(
    val name: String?,
    val type: String?,
)

interface PickOrderInfo {
    val id: Long?
    val code: String?
    val consoCode: String?
    val targetDate: LocalDateTime?
    val completeDate: LocalDateTime?
    val type: String?
    val status: String?

    @get:Value("#{target.releasedBy?.name}")
    val releasedBy: String?
    @get:Value("#{target.pickOrderLines?.size() > 0 ? target.pickOrderLines.![new com.ffii.fpsms.modules.pickOrder.entity.projection.PickOrderLineInfo(item.name, item.type)] : null}")
    val items: List<PickOrderLineInfo?>?
}