package com.example.ops_android.data.model

import com.example.ops_android.data.remote.api.LinkedCustomerInfo
import com.google.gson.annotations.SerializedName

data class Item(
    @SerializedName("ID") val id: Int = 0,
    @SerializedName("Name") val name: String? = null,
    @SerializedName("SerialNumber") val serial_number: String? = null,
    @SerializedName("Remark") val remark: String? = null,
    @SerializedName("Quantity") val quantity: Int = 1,
    @SerializedName("ContainerID") val container_id: Int? = null,
    @SerializedName("CreatedAt") val created_at: String? = null,
    @SerializedName("UpdatedAt") val updated_at: String? = null,
    @SerializedName("CreatorID") val user_id: Int? = null,
    @SerializedName("barcode") private val _barcode: String? = null,
    @SerializedName("spec") private val _spec: String? = null,
    @SerializedName("move_history") private val _move_history: List<MoveHistory>? = null,
    // Filled from detail API
    @kotlin.jvm.Transient val linkedCustomers: List<LinkedCustomerInfo>? = null,
    @kotlin.jvm.Transient val containerBreadcrumb: String? = null
) {
    val barcode: String? get() = _barcode
    val spec: String? get() = _spec
    val move_history: List<MoveHistory>? get() = _move_history
}

data class MoveHistory(
    @SerializedName("from_container") val from_container: String? = null,
    @SerializedName("to_container") val to_container: String? = null,
    @SerializedName("moved_at") val moved_at: String? = null,
    @SerializedName("user_id") val user_id: Int? = null
)
