package com.khmer9.yuki.remote

import com.squareup.moshi.Json
import com.squareup.moshi.JsonClass

@JsonClass(generateAdapter = true)
class LoginRequest(
    @Json(name = "user_name")
    val username: String,

    @Json(name = "password")
    val password: String,

    @Json(name = "app_id")
    val appId: String? = "630475c2eca0ac8bd61e7e58"
)

@JsonClass(generateAdapter = true)
data class LoginResponse(
    @Json(name = "code")
    val resultCode: String,

    @Json(name = "message")
    val message: LoginMessage,

    @Json(name = "data")
    val data: LoginData?
)

@JsonClass(generateAdapter = true)
data class LoginMessage(
    @Json(name = "code")
    val code: String,

    @Json(name = "descriptions")
    val description: String,
)

@JsonClass(generateAdapter = true)
data class LoginData(
    @Json(name = "user")
    val user: User?,

    @Json(name = "token")
    val token: String?,
)

@JsonClass(generateAdapter = true)
data class User(
    @Json(name = "user_name")
    val userName: String,

    @Json(name = "role")
    val role: String,

    @Json(name = "enable")
    val enable: Boolean,

    @Json(name = "is_suspend")
    val isSuspend: Boolean,

    @Json(name = "account_info")
    val accountInfo: String,

    @Json(name = "account_name")
    val accountName: String?,

    @Json(name = "account_number")
    val accountNumber: String?,

    @Json(name = "balance")
    val accountBalances: Double,

    @Json(name = "currency_type")
    val currencyType: Int,

    @Json(name = "amount_min")
    val amountMin: Int? = 0,

    @Json(name = "amount_max")
    val amountMax: Int? = 0,
)