package top.yeij.cyrene.data.remote.dto

import com.google.gson.annotations.SerializedName

// POST /api/v1/sessions — request body
data class CreateSessionRequest(
    @SerializedName("session_id") val sessionId: String? = null,
    @SerializedName("title") val title: String = "新的对话",
    @SerializedName("is_main") val isMain: Boolean = false,
)

// GET /api/v1/sessions — response wrapper
data class SessionsListResponse(
    @SerializedName("sessions") val sessions: List<SessionDto>,
)

data class SessionDto(
    @SerializedName("id") val id: String,
    @SerializedName("user_id") val userId: String?,
    @SerializedName("title") val title: String,
    @SerializedName("is_main") val isMain: Boolean?,
    @SerializedName("created_at") val createdAt: Long,
    @SerializedName("updated_at") val updatedAt: Long,
)

// GET /api/v1/sessions/{id}/messages — response wrapper
data class MessagesListResponse(
    @SerializedName("messages") val messages: List<SessionMessageDto>,
)

data class SessionMessageDto(
    @SerializedName("id") val id: String,
    @SerializedName("session_id") val sessionId: String,
    @SerializedName("role") val role: String,
    @SerializedName("msg_type") val msgType: String?,
    @SerializedName("content") val content: String,
    @SerializedName("created_at") val createdAt: Long,
)

// POST /api/v1/files/upload — response
data class FileUploadResponse(
    @SerializedName("id") val id: String,
    @SerializedName("filename") val filename: String? = null,
    @SerializedName("mime_type") val mimeType: String? = null,
    @SerializedName("size") val size: Long? = null,
    @SerializedName("url") val url: String? = null,
)
