package de.tsschulz.tt_tagebuch.shared.api.models

import kotlinx.serialization.Serializable

@Serializable
data class DiaryDate(
    val id: Int,
    val clubId: Int,
    val date: String,
    val trainingStart: String? = null,
    val trainingEnd: String? = null,
    val excludeFromBilling: Boolean = false,
    val diaryNotes: List<DiaryNote> = emptyList(),
    val diaryTags: List<DiaryTag> = emptyList(),
)

@Serializable
data class DiaryNote(
    val id: Int,
    val content: String? = null,
    val createdAt: String? = null,
)

@Serializable
data class DiaryTag(
    val id: Int,
    val name: String,
)

@Serializable
data class CreateDiaryDateRequest(
    val date: String,
    val trainingStart: String? = null,
    val trainingEnd: String? = null,
    val excludeFromBilling: Boolean = false,
)

@Serializable
data class UpdateDiaryTimesRequest(
    val dateId: Int,
    val trainingStart: String? = null,
    val trainingEnd: String? = null,
    val excludeFromBilling: Boolean? = null,
)

@Serializable
data class LinkDiaryTagRequest(
    val diaryDateId: Int,
    val tagId: Int,
)

@Serializable
data class AddDiaryNoteRequest(
    val diaryDateId: Int,
    val content: String,
)
