package id.iiyh.inatrading.feature.profile.data.model

import com.google.gson.annotations.SerializedName

data class ShippingAddress(
    val address: String? = null,
    val city: String? = null,
    val country: String? = null,
    val id: String? = null,
    val isPrimary: Boolean = false,
    val label: String? = null,
    val latitude: Double? = null,
    val longitude: Double? = null,
    val postalCode: String? = null,
    val province: String? = null,
    val recipient: String? = null,
    @SerializedName(value = "mobile", alternate = ["phone"])
    val mobile: String? = null,
)

data class CreateShippingAddressRequest(
    val label: String,
    val recipient: String,
    @SerializedName("mobile")
    val mobile: String,
    val address: String,
    val country: String,
    val province: String,
    val city: String,
    val postalCode: String,
    val isPrimary: Boolean,
    val latitude: Double? = null,
    val longitude: Double? = null,
)

data class ShippingAddressListResponse(
    val responseCode: String? = null,
    val responseDesc: String? = null,
    val rows: List<ShippingAddress> = emptyList(),
    val totalItem: Int = 0,
    val totalPage: Int = 0,
) {
    val isSuccess: Boolean get() = responseCode == "0000"
}
