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

import kotlinx.serialization.SerialName
import kotlinx.serialization.Serializable

@Serializable
data class MemberContactSetBody(
    val type: String,
    val value: String,
    val isParent: Boolean = false,
    val parentName: String? = null,
    val isPrimary: Boolean = false,
)

/**
 * Body für [POST /api/clubmembers/set/:clubId] – Feldnamen wie Web (`firstname`/`lastname`/`birthdate`).
 */
@Serializable
data class MemberSetBody(
    val id: Int? = null,
    @SerialName("firstname") val firstname: String,
    @SerialName("lastname") val lastname: String,
    val street: String? = "",
    val city: String? = "",
    val postalCode: String? = null,
    @SerialName("birthdate") val birthdate: String? = null,
    val phone: String? = "",
    val email: String? = "",
    val active: Boolean = true,
    val testMembership: Boolean = false,
    val picsInInternetAllowed: Boolean = false,
    val gender: String? = "unknown",
    val ttr: Int? = null,
    val qttr: Int? = null,
    val memberFormHandedOver: Boolean = false,
    val adultReleaseApproved: Boolean = false,
    val adultReserveApproved: Boolean = false,
    val contacts: List<MemberContactSetBody> = emptyList(),
)
