package de.oaa.xxx.app.data.model

import com.google.gson.JsonObject

// ---- User ----
data class User(
    val userId: String? = null,
    val name: String? = null,
    val email: String? = null,
    val profilePicture: String? = null,
    val alter: Int? = null,
    val groesse: Int? = null,
    val gewicht: Int? = null,
    val geschlecht: String? = null,
    val neigung: String? = null,
    val beziehungsstatus: String? = null,
    val beschreibung: String? = null
)

data class UserProfile(
    val user: User? = null,
    val friendshipStatus: String? = null
)

// ---- Aufgaben ----
data class AufgabenGruppe(
    val gruppenId: String? = null,
    val name: String? = null,
    val beschreibung: String? = null,
    val userId: String? = null,
    val privateGruppe: Boolean = false,
    val bild: String? = null,
    val von: String? = null,
    val aufgaben: List<Aufgabe> = emptyList(),
    val strafen: List<Strafe> = emptyList(),
    val sperren: List<Sperre> = emptyList(),
    val finisher: List<Finisher> = emptyList()
)

data class AufgabenGruppeDisplay(
    val gruppenId: String? = null,
    val name: String? = null,
    val beschreibung: String? = null,
    val userId: String? = null,
    val privateGruppe: Boolean = false,
    val bild: String? = null,
    val von: String? = null
)

data class Aufgabe(
    val aufgabeId: String? = null,
    val kurzText: String? = null,
    val text: String? = null,
    val level: Int? = null,
    val sekundenVon: Int? = null,
    val sekundenBis: Int? = null,
    val benoetigtAktiv: List<String>? = null,
    val benoetigtPassiv: List<String>? = null,
    val benoetigteToys: List<String>? = null
)

data class Strafe(
    val strafeId: String? = null,
    val kurzText: String? = null,
    val text: String? = null,
    val level: Int? = null,
    val sekundenVon: Int? = null,
    val sekundenBis: Int? = null
)

data class Sperre(
    val sperreId: String? = null,
    val kurzText: String? = null,
    val text: String? = null,
    val releaseText: String? = null,
    val minutenVon: Int? = null,
    val minutenBis: Int? = null,
    val sperreFuer: String? = null
)

data class Finisher(
    val finisherId: String? = null,
    val kurzText: String? = null,
    val text: String? = null,
    val geschlecht: String? = null,
    val benoetigtAktiv: List<String>? = null,
    val benoetigtPassiv: List<String>? = null
)

data class Toy(
    val toyId: String? = null,
    val name: String? = null,
    val beschreibung: String? = null,
    val bild: String? = null,
    val userId: String? = null
)

data class Favorit(
    val favoritId: String? = null,
    val gruppenId: String? = null,
    val userId: String? = null
)

data class GruppenAbo(
    val aboId: String? = null,
    val gruppenId: String? = null,
    val userId: String? = null
)

// ---- Session ----
data class Session(
    val sessionId: String? = null,
    val userId: String? = null,
    val wahrscheinlichkeitSperre: Int? = null,
    val wahrscheinlichkeitStrafe: Int? = null,
    val aufgabenProLevel: Int? = null,
    val zeitfaktorZeitstrafen: Double? = null,
    val level: Int? = null,
    val aufgabenAufAktuellemLevel: Int? = null,
    val startZeit: String? = null,
    val letzteAktivitaet: String? = null
)

data class Mitspieler(
    val mitspielerId: String? = null,
    val name: String? = null,
    val geschlecht: String? = null,
    val rollen: List<String>? = null,
    val spieltMit: List<String>? = null,
    val verfuegbareWerkzeuge: List<String>? = null
)

data class AufgabeAnzeige(
    val nameAktiverMitspieler: String? = null,
    val aufgabeText: String? = null,
    val timer: Int? = null,
    val callback: JsonObject? = null,
    val level: Int? = null
)

data class AufgabenList(
    val aufgaben: List<AufgabenGruppenRef> = emptyList()
)

data class AufgabenGruppenRef(
    val gruppenId: String,
    val aktiv: Boolean = true,
    val passiv: Boolean = true
)

// ---- Social ----
data class FriendshipDto(
    val friendshipId: String? = null,
    val senderId: String? = null,
    val receiverId: String? = null,
    val senderName: String? = null,
    val receiverName: String? = null,
    val status: String? = null,
    val createdAt: String? = null
)

data class MessageDto(
    val messageId: String? = null,
    val senderId: String? = null,
    val receiverId: String? = null,
    val text: String? = null,
    val sentAt: String? = null,
    val readAt: String? = null
)

data class ConversationSummary(
    val partnerId: String? = null,
    val partnerName: String? = null,
    val lastMessage: String? = null,
    val lastMessageAt: String? = null,
    val unreadCount: Int? = null
)

data class PinnwandEintragDto(
    val eintragId: String? = null,
    val profilUserId: String? = null,
    val authorId: String? = null,
    val authorName: String? = null,
    val text: String? = null,
    val createdAt: String? = null
)

// ---- Community Gruppen ----
data class GruppeDto(
    val gruppeId: String? = null,
    val name: String? = null,
    val beschreibung: String? = null,
    val bild: String? = null,
    val isPrivate: Boolean = false,
    val createdAt: String? = null,
    val createdByUserId: String? = null,
    val memberCount: Int? = null,
    val userRole: String? = null
)

data class GruppenbeitragDto(
    val beitragId: String? = null,
    val gruppeId: String? = null,
    val authorId: String? = null,
    val authorName: String? = null,
    val text: String? = null,
    val beitragTyp: String? = null,
    val createdAt: String? = null,
    val likeCount: Int? = null,
    val userHasLiked: Boolean = false,
    val umfrageOptionen: List<UmfrageOptionDto>? = null
)

data class UmfrageOptionDto(
    val optionId: String? = null,
    val text: String? = null,
    val stimmenAnzahl: Int? = null,
    val userHasVoted: Boolean = false
)

data class BeitrittsanfrageDto(
    val anfrageId: String? = null,
    val gruppeId: String? = null,
    val userId: String? = null,
    val userName: String? = null,
    val nachricht: String? = null,
    val angefragtAt: String? = null,
    val status: String? = null
)

// ---- Feed ----
data class FeedItemDto(
    val postId: String? = null,
    val authorId: String? = null,
    val authorName: String? = null,
    val text: String? = null,
    val beitragTyp: String? = null,
    val isPublic: Boolean = false,
    val createdAt: String? = null,
    val likeCount: Int? = null,
    val userHasLiked: Boolean = false,
    val umfrageOptionen: List<UmfrageOptionDto>? = null
)

data class FeedPostRequest(
    val text: String,
    val beitragTyp: String = "TEXT",
    val isPublic: Boolean = false,
    val umfrageOptionen: List<String>? = null,
    val multiChoice: Boolean = false
)

// ---- Registration ----
data class RegistrationRequest(
    val name: String,
    val email: String,
    val password: String
)

// ---- Count responses ----
data class CountResponse(val count: Int)

// ---- Page responses ----
data class PageResponse<T>(
    val content: List<T> = emptyList(),
    val totalElements: Long = 0,
    val totalPages: Int = 0,
    val number: Int = 0
)
