package com.amz.genie.models

import com.google.gson.JsonObject

data class GeneralResponse(
    val items: ArrayList<GeneralThreadItem>? = arrayListOf()
)

data class GeneralThreadItem(
    val counterpart: String? = null,
    val tipe: String, // "AKSI" atau "REAKSI"
    val aksi: Aksi,
    val unread_count: Int = 0,
    val reaksi: Reaksi? = null,
    val is_unread: Boolean? = null,
    val is_aktif: Int? = null
)

data class GeneralDetailResponse(
    val counterpart: Pegawai? = null,
    val items: List<GeneralThreadItem> = emptyList(),
    val meta: Meta? = null
) {
    data class Meta(
        val page: Int? = null,
        val per_page: Int? = null,
        val total: Int? = null,
        val has_more: Boolean? = null,
        val next_page: Int? = null
    )
}

data class InboxThreadResponse(
    val items: List<RawMessage>?,
    val meta: Meta?
)

data class Meta(
    val page: Int?,
    val per_page: Int?,
    val total: Int?,
    val has_more: Boolean?,
    val next_page: Int?
)

data class Sender(
    val nama: String?,
    val jabatan: Jabatan?,
    val outlet: Outlet?
)

data class RawMessage(
    val id: String?,
    val sender_kode: String,
    val sender: Sender?,
    val message: JsonObject?,
    val waktu_buat: String?,
    val tipe: String?
)


