// Models.kt
package com.example.myapplication.network

// 通用API响应模型
data class ApiResponse<T>(
    val code: Int,
    val message: String,
    val data: T?
)

// 错误响应
data class ErrorResponse(
    val code: Int,
    val message: String
)

// ======================================登录================================
// 登录
data class LoginRequest(
    val mail: String,
    val password: String
)
// 登录响应
data class LoginResponse(
    val uid: Long,
    val nickName: String,
    val gender: Int,
    val avatarUrl: String?,
    val email: String,
    val emailVerified: Boolean,
    val isVip: Boolean,
    val vipExpiry: String,
    val token: String
)

// ======================================用户===================================
//获取用户详情
data class User(
    val uid: Long,
    val nickName: String,
    val gender: Int,
    val avatarUrl: String?,
    val email: String,
    val emailVerified: Boolean,
    val isVip: Boolean,
    val vipExpiry: String,
    val token: String
)

//更新用户
data class updateInfoRequest(
    val uid: Long,
    val nickName: String,
    val gender: Int,
    val avatarUrl: String?,
)

// =======================================首页======================================
//标签列表
data class Tag(
    val id: Int,
    val tagName: String
)

data class TagList(
    val data: List<Tag>
)

// 人设详情点击事件
sealed class PersonaClick {
    data class Item(val persona: listByTagWithNotLogin) : PersonaClick()
    data class Add(val persona: listByTagWithNotLogin) : PersonaClick()
}


data class listByTagWithNotLogin(
    val id: Int,
    val characterName: String,
    val characterBackground: String ,
    val avatarUrl: String ,
    val download: String ,
    val tag: Int ,
    val rank: Int ,
    val added: Boolean ,
    val emoji: String 
)

// 人设详情响应
data class CharacterDetailResponse(
    val id: Long? = null,
    val characterName: String? = null,
    val characterBackground: String? = null,
    val avatarUrl: String? = null,
    val download: String? = null,
    val tag: Long? = null,
    val rank: Int? = null,
    val added: Boolean? = null,
    val emoji: String? = null
)

//添加用户人设点击事件
data class AddPersonaClick(
    val characterId: Int,
    val emoji: String
)

// ============================================商城======================================
//查询所有主题风格
data class Theme(
    val id: Int,
    val styleName: String
)

data class Wallet(
    val balance: Number,
    val balanceDisplay: String
)

data class SubjectTag(
    val label: String,
    val color: String
)

//按风格查询主题
data class themeStyle(
    val id: Int,
    val themeName: String,
    val themePrice: Number,
    val themeTag: List<SubjectTag>?,
    val themeDownload: String,
    val themeStyle: Int,
    val themePreviewImageUrl: String,
    val themeDownloadUrl: String,
    val themePurchasesNumber: Int,
    val sort: Int,
    val isFree: Boolean,
    val isPurchased: Boolean
)

//查询主题详情
data class themeDetail(
    val id: Int,
    val themeName: String,
    val themePrice: Number,
    val themeTag: List<SubjectTag>?,
    val themeDownload: String,
    val themeStyle: Int,
    val themePreviewImageUrl: String,
    val themeDownloadUrl: String,
    val themePurchasesNumber: Int,
    val sort: Int,
    val isFree: Boolean,
    val isPurchased: Boolean,
)

// 批量删除主题
data class deleteThemeRequest(
    val themeIds: List<Int>
)

//购买主题
data class purchaseThemeRequest(
    val themeId: Int,
)