(fix) Implementiere einen Service-Layer
Erstellung von DTOs für alle Ressourcen Implement a versioning system
This commit is contained in:
@@ -0,0 +1,114 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.enums.BeginnzeitTypE
|
||||
import at.mocode.model.DotierungsAbstufung
|
||||
import at.mocode.serializers.*
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalTime
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class AbteilungDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val bewerbId: Uuid,
|
||||
val abteilungsKennzeichen: String,
|
||||
val bezeichnungIntern: String?,
|
||||
val bezeichnungAufStartliste: String?,
|
||||
val teilungsKriteriumLizenz: String?,
|
||||
val teilungsKriteriumPferdealter: String?,
|
||||
val teilungsKriteriumAltersklasseReiter: String?,
|
||||
val teilungsKriteriumAnzahlMin: Int?,
|
||||
val teilungsKriteriumAnzahlMax: Int?,
|
||||
val teilungsKriteriumFreiText: String?,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeld: BigDecimal?,
|
||||
val dotierungen: List<DotierungsAbstufung>,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val platzId: Uuid?,
|
||||
val datum: LocalDate?,
|
||||
val beginnzeitTypE: BeginnzeitTypE,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val beginnzeitFix: LocalTime?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val beginnNachAbteilungId: Uuid?,
|
||||
val beginnzeitCa: LocalTime?,
|
||||
val dauerProStartGeschaetztSek: Int?,
|
||||
val umbauzeitNachAbteilungMin: Int?,
|
||||
val besichtigungszeitVorAbteilungMin: Int?,
|
||||
val stechzeitZusaetzlichMin: Int?,
|
||||
val anzahlStarter: Int,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateAbteilungDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val bewerbId: Uuid,
|
||||
val abteilungsKennzeichen: String,
|
||||
val bezeichnungIntern: String? = null,
|
||||
val bezeichnungAufStartliste: String? = null,
|
||||
val teilungsKriteriumLizenz: String? = null,
|
||||
val teilungsKriteriumPferdealter: String? = null,
|
||||
val teilungsKriteriumAltersklasseReiter: String? = null,
|
||||
val teilungsKriteriumAnzahlMin: Int? = null,
|
||||
val teilungsKriteriumAnzahlMax: Int? = null,
|
||||
val teilungsKriteriumFreiText: String? = null,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeld: BigDecimal? = null,
|
||||
val dotierungen: List<DotierungsAbstufung> = emptyList(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val platzId: Uuid? = null,
|
||||
val datum: LocalDate? = null,
|
||||
val beginnzeitTypE: BeginnzeitTypE = BeginnzeitTypE.ANSCHLIESSEND,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val beginnzeitFix: LocalTime? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val beginnNachAbteilungId: Uuid? = null,
|
||||
val beginnzeitCa: LocalTime? = null,
|
||||
val dauerProStartGeschaetztSek: Int? = null,
|
||||
val umbauzeitNachAbteilungMin: Int? = null,
|
||||
val besichtigungszeitVorAbteilungMin: Int? = null,
|
||||
val stechzeitZusaetzlichMin: Int? = null,
|
||||
val anzahlStarter: Int = 0,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateAbteilungDto(
|
||||
val abteilungsKennzeichen: String,
|
||||
val bezeichnungIntern: String? = null,
|
||||
val bezeichnungAufStartliste: String? = null,
|
||||
val teilungsKriteriumLizenz: String? = null,
|
||||
val teilungsKriteriumPferdealter: String? = null,
|
||||
val teilungsKriteriumAltersklasseReiter: String? = null,
|
||||
val teilungsKriteriumAnzahlMin: Int? = null,
|
||||
val teilungsKriteriumAnzahlMax: Int? = null,
|
||||
val teilungsKriteriumFreiText: String? = null,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeld: BigDecimal? = null,
|
||||
val dotierungen: List<DotierungsAbstufung> = emptyList(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val platzId: Uuid? = null,
|
||||
val datum: LocalDate? = null,
|
||||
val beginnzeitTypE: BeginnzeitTypE = BeginnzeitTypE.ANSCHLIESSEND,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val beginnzeitFix: LocalTime? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val beginnNachAbteilungId: Uuid? = null,
|
||||
val beginnzeitCa: LocalTime? = null,
|
||||
val dauerProStartGeschaetztSek: Int? = null,
|
||||
val umbauzeitNachAbteilungMin: Int? = null,
|
||||
val besichtigungszeitVorAbteilungMin: Int? = null,
|
||||
val stechzeitZusaetzlichMin: Int? = null,
|
||||
val anzahlStarter: Int = 0,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
@@ -0,0 +1,53 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.dto.base.VersionedDto
|
||||
import at.mocode.dto.base.Since
|
||||
import at.mocode.serializers.BigDecimalSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
@Since("1.0")
|
||||
data class ArtikelDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val bezeichnung: String,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val preis: BigDecimal,
|
||||
val einheit: String,
|
||||
val istVerbandsabgabe: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant,
|
||||
override val schemaVersion: String = "1.0",
|
||||
override val dataVersion: Long? = null
|
||||
) : VersionedDto
|
||||
|
||||
@Serializable
|
||||
@Since("1.0")
|
||||
data class CreateArtikelDto(
|
||||
val bezeichnung: String,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val preis: BigDecimal,
|
||||
val einheit: String,
|
||||
val istVerbandsabgabe: Boolean = false,
|
||||
override val schemaVersion: String = "1.0",
|
||||
override val dataVersion: Long? = null
|
||||
) : VersionedDto
|
||||
|
||||
@Serializable
|
||||
@Since("1.0")
|
||||
data class UpdateArtikelDto(
|
||||
val bezeichnung: String,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val preis: BigDecimal,
|
||||
val einheit: String,
|
||||
val istVerbandsabgabe: Boolean = false,
|
||||
override val schemaVersion: String = "1.0",
|
||||
override val dataVersion: Long? = null
|
||||
) : VersionedDto
|
||||
@@ -0,0 +1,196 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.enums.BeginnzeitTypE
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.model.DotierungsAbstufung
|
||||
import at.mocode.serializers.*
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalTime
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class BewerbDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val turnierId: Uuid,
|
||||
val nummer: String,
|
||||
val bezeichnungOffiziell: String,
|
||||
val internerName: String?,
|
||||
val sparteE: SparteE,
|
||||
val klasse: String?,
|
||||
val kategorieOetoDesBewerbs: String?,
|
||||
val teilnahmebedingungenText: String?,
|
||||
val maxPferdeProReiter: Int?,
|
||||
val pferdealterAnforderung: String?,
|
||||
val zusatzTextZeile1: String?,
|
||||
val zusatzTextZeile2: String?,
|
||||
val zusatzTextZeile3: String?,
|
||||
val logoBewerbUrl: String?,
|
||||
val parcoursskizzeUrl: String?,
|
||||
val pruefungsArtDetailName: String?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val pruefungsaufgabeId: Uuid?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val richtverfahrenId: Uuid?,
|
||||
val anzahlRichterGeplant: Int?,
|
||||
val paraGradeAnforderung: String?,
|
||||
val istManuellKalkuliert: Boolean,
|
||||
val istDotiert: Boolean,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeldStandard: BigDecimal?,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeldKaderreiter: BigDecimal?,
|
||||
val auszahlungsModusGeldpreis: String?,
|
||||
val hatGeldpreisFuerKaderreiter: Boolean,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val geldpreisVorlageId: Uuid?,
|
||||
val dotierungenManuell: List<DotierungsAbstufung>,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val standardPlatzId: Uuid?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val standardDatum: LocalDate?,
|
||||
val standardBeginnzeitTypE: BeginnzeitTypE,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val standardBeginnzeitFix: LocalTime?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val standardBeginnNachBewerbId: Uuid?,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val standardBeginnzeitCa: LocalTime?,
|
||||
val standardDauerProStartGeschaetztSek: Int?,
|
||||
val standardUmbauzeitNachBewerbMin: Int?,
|
||||
val standardBesichtigungszeitVorBewerbMin: Int?,
|
||||
val standardStechzeitZusaetzlichMin: Int?,
|
||||
val oepsBewerbsartCodeZns: String?,
|
||||
val oepsAltersklasseCodeZns: String?,
|
||||
val oepsPferderassenCodeZns: String?,
|
||||
val notizenIntern: String?,
|
||||
val istStartlisteFinal: Boolean,
|
||||
val istErgebnislisteFinal: Boolean,
|
||||
val erfordertAbteilungsAuswahlFuerNennung: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateBewerbDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val turnierId: Uuid,
|
||||
val nummer: String,
|
||||
val bezeichnungOffiziell: String,
|
||||
val internerName: String? = null,
|
||||
val sparteE: SparteE,
|
||||
val klasse: String? = null,
|
||||
val kategorieOetoDesBewerbs: String? = null,
|
||||
val teilnahmebedingungenText: String? = null,
|
||||
val maxPferdeProReiter: Int? = null,
|
||||
val pferdealterAnforderung: String? = null,
|
||||
val zusatzTextZeile1: String? = null,
|
||||
val zusatzTextZeile2: String? = null,
|
||||
val zusatzTextZeile3: String? = null,
|
||||
val logoBewerbUrl: String? = null,
|
||||
val parcoursskizzeUrl: String? = null,
|
||||
val pruefungsArtDetailName: String? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val pruefungsaufgabeId: Uuid? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val richtverfahrenId: Uuid? = null,
|
||||
val anzahlRichterGeplant: Int? = 1,
|
||||
val paraGradeAnforderung: String? = null,
|
||||
val istManuellKalkuliert: Boolean = false,
|
||||
val istDotiert: Boolean = false,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeldStandard: BigDecimal? = null,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeldKaderreiter: BigDecimal? = null,
|
||||
val auszahlungsModusGeldpreis: String? = null,
|
||||
val hatGeldpreisFuerKaderreiter: Boolean = false,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val geldpreisVorlageId: Uuid? = null,
|
||||
val dotierungenManuell: List<DotierungsAbstufung> = emptyList(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val standardPlatzId: Uuid? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val standardDatum: LocalDate? = null,
|
||||
val standardBeginnzeitTypE: BeginnzeitTypE = BeginnzeitTypE.ANSCHLIESSEND,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val standardBeginnzeitFix: LocalTime? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val standardBeginnNachBewerbId: Uuid? = null,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val standardBeginnzeitCa: LocalTime? = null,
|
||||
val standardDauerProStartGeschaetztSek: Int? = 120,
|
||||
val standardUmbauzeitNachBewerbMin: Int? = 10,
|
||||
val standardBesichtigungszeitVorBewerbMin: Int? = 10,
|
||||
val standardStechzeitZusaetzlichMin: Int? = 0,
|
||||
val oepsBewerbsartCodeZns: String? = null,
|
||||
val oepsAltersklasseCodeZns: String? = null,
|
||||
val oepsPferderassenCodeZns: String? = null,
|
||||
val notizenIntern: String? = null,
|
||||
val istStartlisteFinal: Boolean = false,
|
||||
val istErgebnislisteFinal: Boolean = false,
|
||||
val erfordertAbteilungsAuswahlFuerNennung: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateBewerbDto(
|
||||
val nummer: String,
|
||||
val bezeichnungOffiziell: String,
|
||||
val internerName: String? = null,
|
||||
val sparteE: SparteE,
|
||||
val klasse: String? = null,
|
||||
val kategorieOetoDesBewerbs: String? = null,
|
||||
val teilnahmebedingungenText: String? = null,
|
||||
val maxPferdeProReiter: Int? = null,
|
||||
val pferdealterAnforderung: String? = null,
|
||||
val zusatzTextZeile1: String? = null,
|
||||
val zusatzTextZeile2: String? = null,
|
||||
val zusatzTextZeile3: String? = null,
|
||||
val logoBewerbUrl: String? = null,
|
||||
val parcoursskizzeUrl: String? = null,
|
||||
val pruefungsArtDetailName: String? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val pruefungsaufgabeId: Uuid? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val richtverfahrenId: Uuid? = null,
|
||||
val anzahlRichterGeplant: Int? = 1,
|
||||
val paraGradeAnforderung: String? = null,
|
||||
val istManuellKalkuliert: Boolean = false,
|
||||
val istDotiert: Boolean = false,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeldStandard: BigDecimal? = null,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeldKaderreiter: BigDecimal? = null,
|
||||
val auszahlungsModusGeldpreis: String? = null,
|
||||
val hatGeldpreisFuerKaderreiter: Boolean = false,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val geldpreisVorlageId: Uuid? = null,
|
||||
val dotierungenManuell: List<DotierungsAbstufung> = emptyList(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val standardPlatzId: Uuid? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val standardDatum: LocalDate? = null,
|
||||
val standardBeginnzeitTypE: BeginnzeitTypE = BeginnzeitTypE.ANSCHLIESSEND,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val standardBeginnzeitFix: LocalTime? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val standardBeginnNachBewerbId: Uuid? = null,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val standardBeginnzeitCa: LocalTime? = null,
|
||||
val standardDauerProStartGeschaetztSek: Int? = 120,
|
||||
val standardUmbauzeitNachBewerbMin: Int? = 10,
|
||||
val standardBesichtigungszeitVorBewerbMin: Int? = 10,
|
||||
val standardStechzeitZusaetzlichMin: Int? = 0,
|
||||
val oepsBewerbsartCodeZns: String? = null,
|
||||
val oepsAltersklasseCodeZns: String? = null,
|
||||
val oepsPferderassenCodeZns: String? = null,
|
||||
val notizenIntern: String? = null,
|
||||
val istStartlisteFinal: Boolean = false,
|
||||
val istErgebnislisteFinal: Boolean = false,
|
||||
val erfordertAbteilungsAuswahlFuerNennung: Boolean = true
|
||||
)
|
||||
@@ -0,0 +1,233 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.serializers.BigDecimalSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
// Pruefungsaufgabe DTOs
|
||||
@Serializable
|
||||
data class PruefungsaufgabeDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val kategorie: String?,
|
||||
val schwierigkeitsgrad: String?,
|
||||
val punkteMax: Int?,
|
||||
val zeitlimitSekunden: Int?,
|
||||
val istAktiv: Boolean,
|
||||
val notizen: String?,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreatePruefungsaufgabeDto(
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val kategorie: String? = null,
|
||||
val schwierigkeitsgrad: String? = null,
|
||||
val punkteMax: Int? = null,
|
||||
val zeitlimitSekunden: Int? = null,
|
||||
val istAktiv: Boolean = true,
|
||||
val notizen: String? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdatePruefungsaufgabeDto(
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val kategorie: String? = null,
|
||||
val schwierigkeitsgrad: String? = null,
|
||||
val punkteMax: Int? = null,
|
||||
val zeitlimitSekunden: Int? = null,
|
||||
val istAktiv: Boolean = true,
|
||||
val notizen: String? = null
|
||||
)
|
||||
|
||||
// Richtverfahren DTOs
|
||||
@Serializable
|
||||
data class RichtverfahrenDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val kategorie: String?,
|
||||
val anzahlRichterErforderlich: Int,
|
||||
val bewertungsSchema: String?,
|
||||
val istStandardVerfahren: Boolean,
|
||||
val istAktiv: Boolean,
|
||||
val regelwerk: String?,
|
||||
val notizen: String?,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateRichtverfahrenDto(
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val kategorie: String? = null,
|
||||
val anzahlRichterErforderlich: Int = 1,
|
||||
val bewertungsSchema: String? = null,
|
||||
val istStandardVerfahren: Boolean = false,
|
||||
val istAktiv: Boolean = true,
|
||||
val regelwerk: String? = null,
|
||||
val notizen: String? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateRichtverfahrenDto(
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val kategorie: String? = null,
|
||||
val anzahlRichterErforderlich: Int = 1,
|
||||
val bewertungsSchema: String? = null,
|
||||
val istStandardVerfahren: Boolean = false,
|
||||
val istAktiv: Boolean = true,
|
||||
val regelwerk: String? = null,
|
||||
val notizen: String? = null
|
||||
)
|
||||
|
||||
// DotierungsAbstufung DTOs
|
||||
@Serializable
|
||||
data class DotierungsAbstufungDto(
|
||||
val platz: Int,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val betrag: BigDecimal
|
||||
)
|
||||
|
||||
// MeisterschaftReferenz DTOs
|
||||
@Serializable
|
||||
data class MeisterschaftReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val meisterschaftId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val kategorie: String?
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateMeisterschaftReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val meisterschaftId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val kategorie: String? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateMeisterschaftReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val meisterschaftId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val kategorie: String? = null
|
||||
)
|
||||
|
||||
// CupReferenz DTOs
|
||||
@Serializable
|
||||
data class CupReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val cupId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val kategorie: String?
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateCupReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val cupId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val kategorie: String? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateCupReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val cupId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val kategorie: String? = null
|
||||
)
|
||||
|
||||
// SonderpruefungReferenz DTOs
|
||||
@Serializable
|
||||
data class SonderpruefungReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val sonderpruefungId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val kategorie: String?
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateSonderpruefungReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val sonderpruefungId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val kategorie: String? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateSonderpruefungReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val sonderpruefungId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val kategorie: String? = null
|
||||
)
|
||||
|
||||
// Platz DTOs
|
||||
@Serializable
|
||||
data class PlatzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val adresse: String?,
|
||||
val gpsKoordinaten: String?,
|
||||
val kapazitaet: Int?,
|
||||
val ausstattung: List<String>,
|
||||
val istVerfuegbar: Boolean,
|
||||
val kontaktInfo: String?,
|
||||
val notizen: String?,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreatePlatzDto(
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val adresse: String? = null,
|
||||
val gpsKoordinaten: String? = null,
|
||||
val kapazitaet: Int? = null,
|
||||
val ausstattung: List<String> = emptyList(),
|
||||
val istVerfuegbar: Boolean = true,
|
||||
val kontaktInfo: String? = null,
|
||||
val notizen: String? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdatePlatzDto(
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val adresse: String? = null,
|
||||
val gpsKoordinaten: String? = null,
|
||||
val kapazitaet: Int? = null,
|
||||
val ausstattung: List<String> = emptyList(),
|
||||
val istVerfuegbar: Boolean = true,
|
||||
val kontaktInfo: String? = null,
|
||||
val notizen: String? = null
|
||||
)
|
||||
@@ -0,0 +1,269 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
// DomLizenz DTOs
|
||||
@Serializable
|
||||
data class DomLizenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val lizenzTyp: String,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val sparte: String?,
|
||||
val mindestalter: Int?,
|
||||
val voraussetzungen: String?,
|
||||
val gueltigkeitsdauerJahre: Int?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateDomLizenzDto(
|
||||
val lizenzTyp: String,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val sparte: String? = null,
|
||||
val mindestalter: Int? = null,
|
||||
val voraussetzungen: String? = null,
|
||||
val gueltigkeitsdauerJahre: Int? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateDomLizenzDto(
|
||||
val lizenzTyp: String,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val sparte: String? = null,
|
||||
val mindestalter: Int? = null,
|
||||
val voraussetzungen: String? = null,
|
||||
val gueltigkeitsdauerJahre: Int? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
// DomPerson DTOs
|
||||
@Serializable
|
||||
data class DomPersonDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val nachname: String,
|
||||
val vorname: String,
|
||||
val titel: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate?,
|
||||
val geschlecht: String?,
|
||||
val nationalitaet: String?,
|
||||
val email: String?,
|
||||
val telefon: String?,
|
||||
val adresse: String?,
|
||||
val plz: String?,
|
||||
val ort: String?,
|
||||
val land: String?,
|
||||
val feiId: String?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateDomPersonDto(
|
||||
val nachname: String,
|
||||
val vorname: String,
|
||||
val titel: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate? = null,
|
||||
val geschlecht: String? = null,
|
||||
val nationalitaet: String? = null,
|
||||
val email: String? = null,
|
||||
val telefon: String? = null,
|
||||
val adresse: String? = null,
|
||||
val plz: String? = null,
|
||||
val ort: String? = null,
|
||||
val land: String? = null,
|
||||
val feiId: String? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateDomPersonDto(
|
||||
val nachname: String,
|
||||
val vorname: String,
|
||||
val titel: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate? = null,
|
||||
val geschlecht: String? = null,
|
||||
val nationalitaet: String? = null,
|
||||
val email: String? = null,
|
||||
val telefon: String? = null,
|
||||
val adresse: String? = null,
|
||||
val plz: String? = null,
|
||||
val ort: String? = null,
|
||||
val land: String? = null,
|
||||
val feiId: String? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
// DomPferd DTOs
|
||||
@Serializable
|
||||
data class DomPferdDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val name: String,
|
||||
val rasse: String?,
|
||||
val farbe: String?,
|
||||
val geschlecht: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate?,
|
||||
val geburtsland: String?,
|
||||
val vater: String?,
|
||||
val mutter: String?,
|
||||
val zuechter: String?,
|
||||
val eigentuemer: String?,
|
||||
val feiId: String?,
|
||||
val lebensnummer: String?,
|
||||
val chipNummer: String?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateDomPferdDto(
|
||||
val name: String,
|
||||
val rasse: String? = null,
|
||||
val farbe: String? = null,
|
||||
val geschlecht: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate? = null,
|
||||
val geburtsland: String? = null,
|
||||
val vater: String? = null,
|
||||
val mutter: String? = null,
|
||||
val zuechter: String? = null,
|
||||
val eigentuemer: String? = null,
|
||||
val feiId: String? = null,
|
||||
val lebensnummer: String? = null,
|
||||
val chipNummer: String? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateDomPferdDto(
|
||||
val name: String,
|
||||
val rasse: String? = null,
|
||||
val farbe: String? = null,
|
||||
val geschlecht: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate? = null,
|
||||
val geburtsland: String? = null,
|
||||
val vater: String? = null,
|
||||
val mutter: String? = null,
|
||||
val zuechter: String? = null,
|
||||
val eigentuemer: String? = null,
|
||||
val feiId: String? = null,
|
||||
val lebensnummer: String? = null,
|
||||
val chipNummer: String? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
// DomQualifikation DTOs
|
||||
@Serializable
|
||||
data class DomQualifikationDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val kategorie: String?,
|
||||
val sparte: String?,
|
||||
val voraussetzungen: String?,
|
||||
val gueltigkeitsdauerJahre: Int?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateDomQualifikationDto(
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val kategorie: String? = null,
|
||||
val sparte: String? = null,
|
||||
val voraussetzungen: String? = null,
|
||||
val gueltigkeitsdauerJahre: Int? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateDomQualifikationDto(
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String? = null,
|
||||
val kategorie: String? = null,
|
||||
val sparte: String? = null,
|
||||
val voraussetzungen: String? = null,
|
||||
val gueltigkeitsdauerJahre: Int? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
// DomVerein DTOs
|
||||
@Serializable
|
||||
data class DomVereinDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val name: String,
|
||||
val kuerzel: String?,
|
||||
val adresse: String?,
|
||||
val plz: String?,
|
||||
val ort: String?,
|
||||
val land: String?,
|
||||
val email: String?,
|
||||
val telefon: String?,
|
||||
val webseite: String?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateDomVereinDto(
|
||||
val name: String,
|
||||
val kuerzel: String? = null,
|
||||
val adresse: String? = null,
|
||||
val plz: String? = null,
|
||||
val ort: String? = null,
|
||||
val land: String? = null,
|
||||
val email: String? = null,
|
||||
val telefon: String? = null,
|
||||
val webseite: String? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateDomVereinDto(
|
||||
val name: String,
|
||||
val kuerzel: String? = null,
|
||||
val adresse: String? = null,
|
||||
val plz: String? = null,
|
||||
val ort: String? = null,
|
||||
val land: String? = null,
|
||||
val email: String? = null,
|
||||
val telefon: String? = null,
|
||||
val webseite: String? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
@@ -0,0 +1,285 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.KotlinLocalTimeSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalTime
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
// Veranstaltung subdirectory DTOs
|
||||
|
||||
// Pruefung_OEPS DTOs
|
||||
@Serializable
|
||||
data class PruefungOepsDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val abteilungId: Uuid,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val kategorie: String?,
|
||||
val schwierigkeitsgrad: String?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val richterIds: List<Uuid>,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datum: LocalDate?,
|
||||
@Serializable(with = KotlinLocalTimeSerializer::class)
|
||||
val startzeit: LocalTime?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val platzId: Uuid?,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
// Pruefung_Abteilung DTOs
|
||||
@Serializable
|
||||
data class PruefungAbteilungDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val pruefungId: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val abteilungId: Uuid,
|
||||
val reihenfolge: Int,
|
||||
val istAktiv: Boolean
|
||||
)
|
||||
|
||||
// VeranstaltungsRahmen DTOs
|
||||
@Serializable
|
||||
data class VeranstaltungsRahmenDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val kategorie: String?,
|
||||
val regelwerk: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val gueltigVon: LocalDate?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val gueltigBis: LocalDate?,
|
||||
val istStandard: Boolean,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val veranstalterId: Uuid?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val veranstaltungsortId: Uuid?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
// Turnier_hat_Platz DTOs
|
||||
@Serializable
|
||||
data class TurnierHatPlatzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val turnierId: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val platzId: Uuid,
|
||||
val verwendungszweck: String?
|
||||
)
|
||||
|
||||
// OETO Verwaltung DTOs
|
||||
|
||||
// AltersklasseDefinition DTOs
|
||||
@Serializable
|
||||
data class AltersklasseDefinitionDto(
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val minAlter: Int?,
|
||||
val maxAlter: Int?,
|
||||
val beschreibung: String?,
|
||||
val istAktiv: Boolean
|
||||
)
|
||||
|
||||
// LizenzTypGlobal DTOs
|
||||
@Serializable
|
||||
data class LizenzTypGlobalDto(
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val sparte: String?,
|
||||
val kategorie: String?,
|
||||
val istAktiv: Boolean
|
||||
)
|
||||
|
||||
// QualifikationsTyp DTOs
|
||||
@Serializable
|
||||
data class QualifikationsTypDto(
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val sparte: String?,
|
||||
val kategorie: String?,
|
||||
val istAktiv: Boolean
|
||||
)
|
||||
|
||||
// Sportfachliche_Stammdaten DTOs
|
||||
@Serializable
|
||||
data class SportfachlicheStammdatenDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val typ: String,
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val kategorie: String?,
|
||||
val sortierung: Int?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
// OETORegelReferenz DTOs
|
||||
@Serializable
|
||||
data class OetoRegelReferenzDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val regelCode: String,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val kategorie: String?,
|
||||
val version: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val gueltigVon: LocalDate?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val gueltigBis: LocalDate?,
|
||||
val istAktiv: Boolean
|
||||
)
|
||||
|
||||
// ZNS Staging DTOs
|
||||
|
||||
// Person_ZNS_Staging DTOs
|
||||
@Serializable
|
||||
data class PersonZnsStagingDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val znsSatzNr: String,
|
||||
val nachname: String,
|
||||
val vorname: String,
|
||||
val titel: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate?,
|
||||
val geschlecht: String?,
|
||||
val nationalitaet: String?,
|
||||
val email: String?,
|
||||
val telefon: String?,
|
||||
val adresse: String?,
|
||||
val plz: String?,
|
||||
val ort: String?,
|
||||
val vereinsname: String?,
|
||||
val vereinsnummer: String?,
|
||||
val feiId: String?,
|
||||
val importDatum: Instant,
|
||||
val istVerarbeitet: Boolean,
|
||||
val verarbeitungsStatus: String?,
|
||||
val fehlerMeldung: String?
|
||||
)
|
||||
|
||||
// Pferd_ZNS_Staging DTOs
|
||||
@Serializable
|
||||
data class PferdZnsStagingDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val znsPferdNr: String,
|
||||
val name: String,
|
||||
val rasse: String?,
|
||||
val farbe: String?,
|
||||
val geschlecht: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate?,
|
||||
val geburtsland: String?,
|
||||
val vater: String?,
|
||||
val mutter: String?,
|
||||
val zuechter: String?,
|
||||
val eigentuemer: String?,
|
||||
val feiId: String?,
|
||||
val lebensnummer: String?,
|
||||
val importDatum: Instant,
|
||||
val istVerarbeitet: Boolean,
|
||||
val verarbeitungsStatus: String?,
|
||||
val fehlerMeldung: String?
|
||||
)
|
||||
|
||||
// Verein_ZNS_Staging DTOs
|
||||
@Serializable
|
||||
data class VereinZnsStagingDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val znsVereinsNr: String,
|
||||
val name: String,
|
||||
val kuerzel: String?,
|
||||
val adresse: String?,
|
||||
val plz: String?,
|
||||
val ort: String?,
|
||||
val bundesland: String?,
|
||||
val email: String?,
|
||||
val telefon: String?,
|
||||
val webseite: String?,
|
||||
val importDatum: Instant,
|
||||
val istVerarbeitet: Boolean,
|
||||
val verarbeitungsStatus: String?,
|
||||
val fehlerMeldung: String?
|
||||
)
|
||||
|
||||
// Cup DTOs
|
||||
|
||||
// Meisterschaft_Cup_Serie DTOs
|
||||
@Serializable
|
||||
data class MeisterschaftCupSerieDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val bezeichnung: String,
|
||||
val beschreibung: String?,
|
||||
val saison: String,
|
||||
val kategorie: String?,
|
||||
val sparte: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val startDatum: LocalDate?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val endDatum: LocalDate?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
// MCS_Wertungspruefung DTOs
|
||||
@Serializable
|
||||
data class McsWertungspruefungDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val meisterschaftCupSerieId: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val pruefungId: Uuid,
|
||||
val wertungsfaktor: Double?,
|
||||
val istPflichtpruefung: Boolean,
|
||||
val reihenfolge: Int?
|
||||
)
|
||||
|
||||
// Spezifika DTOs
|
||||
|
||||
// DressurPruefungSpezifika DTOs
|
||||
@Serializable
|
||||
data class DressurPruefungSpezifikaDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val pruefungId: Uuid,
|
||||
val aufgabenbezeichnung: String?,
|
||||
val aufgabenbeschreibung: String?,
|
||||
val bewertungsschema: String?,
|
||||
val maxPunkte: Int?,
|
||||
val zeitlimit: Int?,
|
||||
val besonderheiten: String?
|
||||
)
|
||||
@@ -0,0 +1,260 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.enums.FunktionaerRolle
|
||||
import at.mocode.enums.GeschlechtE
|
||||
import at.mocode.stammdaten.LizenzInfo
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
// Person DTOs
|
||||
@Serializable
|
||||
data class PersonDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val oepsSatzNr: String?,
|
||||
val nachname: String,
|
||||
val vorname: String,
|
||||
val titel: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate?,
|
||||
val geschlechtE: GeschlechtE?,
|
||||
val nationalitaet: String?,
|
||||
val email: String?,
|
||||
val telefon: String?,
|
||||
val adresse: String?,
|
||||
val plz: String?,
|
||||
val ort: String?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val stammVereinId: Uuid?,
|
||||
val mitgliedsNummerIntern: String?,
|
||||
val letzteZahlungJahr: Int?,
|
||||
val feiId: String?,
|
||||
val istGesperrt: Boolean,
|
||||
val sperrGrund: String?,
|
||||
val rollen: Set<FunktionaerRolle>,
|
||||
val lizenzen: List<LizenzInfo>,
|
||||
val qualifikationenRichter: List<String>,
|
||||
val qualifikationenParcoursbauer: List<String>,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreatePersonDto(
|
||||
val oepsSatzNr: String? = null,
|
||||
val nachname: String,
|
||||
val vorname: String,
|
||||
val titel: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate? = null,
|
||||
val geschlechtE: GeschlechtE? = null,
|
||||
val nationalitaet: String? = null,
|
||||
val email: String? = null,
|
||||
val telefon: String? = null,
|
||||
val adresse: String? = null,
|
||||
val plz: String? = null,
|
||||
val ort: String? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val stammVereinId: Uuid? = null,
|
||||
val mitgliedsNummerIntern: String? = null,
|
||||
val letzteZahlungJahr: Int? = null,
|
||||
val feiId: String? = null,
|
||||
val istGesperrt: Boolean = false,
|
||||
val sperrGrund: String? = null,
|
||||
val rollen: Set<FunktionaerRolle> = emptySet(),
|
||||
val lizenzen: List<LizenzInfo> = emptyList(),
|
||||
val qualifikationenRichter: List<String> = emptyList(),
|
||||
val qualifikationenParcoursbauer: List<String> = emptyList(),
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdatePersonDto(
|
||||
val oepsSatzNr: String? = null,
|
||||
val nachname: String,
|
||||
val vorname: String,
|
||||
val titel: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate? = null,
|
||||
val geschlechtE: GeschlechtE? = null,
|
||||
val nationalitaet: String? = null,
|
||||
val email: String? = null,
|
||||
val telefon: String? = null,
|
||||
val adresse: String? = null,
|
||||
val plz: String? = null,
|
||||
val ort: String? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val stammVereinId: Uuid? = null,
|
||||
val mitgliedsNummerIntern: String? = null,
|
||||
val letzteZahlungJahr: Int? = null,
|
||||
val feiId: String? = null,
|
||||
val istGesperrt: Boolean = false,
|
||||
val sperrGrund: String? = null,
|
||||
val rollen: Set<FunktionaerRolle> = emptySet(),
|
||||
val lizenzen: List<LizenzInfo> = emptyList(),
|
||||
val qualifikationenRichter: List<String> = emptyList(),
|
||||
val qualifikationenParcoursbauer: List<String> = emptyList(),
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
// Pferd DTOs
|
||||
@Serializable
|
||||
data class PferdDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val oepsPferdNr: String?,
|
||||
val name: String,
|
||||
val rasse: String?,
|
||||
val farbe: String?,
|
||||
val geschlecht: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate?,
|
||||
val geburtsland: String?,
|
||||
val vater: String?,
|
||||
val mutter: String?,
|
||||
val zuechter: String?,
|
||||
val eigentuemer: String?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val heimatVereinId: Uuid?,
|
||||
val feiId: String?,
|
||||
val lebensnummer: String?,
|
||||
val chipNummer: String?,
|
||||
val istGesperrt: Boolean,
|
||||
val sperrGrund: String?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreatePferdDto(
|
||||
val oepsPferdNr: String? = null,
|
||||
val name: String,
|
||||
val rasse: String? = null,
|
||||
val farbe: String? = null,
|
||||
val geschlecht: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate? = null,
|
||||
val geburtsland: String? = null,
|
||||
val vater: String? = null,
|
||||
val mutter: String? = null,
|
||||
val zuechter: String? = null,
|
||||
val eigentuemer: String? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val heimatVereinId: Uuid? = null,
|
||||
val feiId: String? = null,
|
||||
val lebensnummer: String? = null,
|
||||
val chipNummer: String? = null,
|
||||
val istGesperrt: Boolean = false,
|
||||
val sperrGrund: String? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdatePferdDto(
|
||||
val oepsPferdNr: String? = null,
|
||||
val name: String,
|
||||
val rasse: String? = null,
|
||||
val farbe: String? = null,
|
||||
val geschlecht: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val geburtsdatum: LocalDate? = null,
|
||||
val geburtsland: String? = null,
|
||||
val vater: String? = null,
|
||||
val mutter: String? = null,
|
||||
val zuechter: String? = null,
|
||||
val eigentuemer: String? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val heimatVereinId: Uuid? = null,
|
||||
val feiId: String? = null,
|
||||
val lebensnummer: String? = null,
|
||||
val chipNummer: String? = null,
|
||||
val istGesperrt: Boolean = false,
|
||||
val sperrGrund: String? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
// LizenzInfo DTOs
|
||||
@Serializable
|
||||
data class LizenzInfoDto(
|
||||
val lizenzTyp: String,
|
||||
val gueltigVon: LocalDate?,
|
||||
val gueltigBis: LocalDate?,
|
||||
val istAktiv: Boolean
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateLizenzInfoDto(
|
||||
val lizenzTyp: String,
|
||||
val gueltigVon: LocalDate? = null,
|
||||
val gueltigBis: LocalDate? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateLizenzInfoDto(
|
||||
val lizenzTyp: String,
|
||||
val gueltigVon: LocalDate? = null,
|
||||
val gueltigBis: LocalDate? = null,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
// BundeslandDefinition DTOs
|
||||
@Serializable
|
||||
data class BundeslandDefinitionDto(
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val land: String,
|
||||
val istAktiv: Boolean
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateBundeslandDefinitionDto(
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val land: String,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateBundeslandDefinitionDto(
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val land: String,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
// LandDefinition DTOs
|
||||
@Serializable
|
||||
data class LandDefinitionDto(
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val istEuMitglied: Boolean,
|
||||
val istAktiv: Boolean
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateLandDefinitionDto(
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val istEuMitglied: Boolean = false,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateLandDefinitionDto(
|
||||
val code: String,
|
||||
val bezeichnung: String,
|
||||
val istEuMitglied: Boolean = false,
|
||||
val istAktiv: Boolean = true
|
||||
)
|
||||
@@ -0,0 +1,137 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.enums.NennungsArtE
|
||||
import at.mocode.model.Artikel
|
||||
import at.mocode.model.MeisterschaftReferenz
|
||||
import at.mocode.model.Platz
|
||||
import at.mocode.serializers.*
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class TurnierDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val veranstaltungId: Uuid,
|
||||
val oepsTurnierNr: String,
|
||||
val titel: String,
|
||||
val untertitel: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumVon: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumBis: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateTimeSerializer::class)
|
||||
val nennungsschluss: LocalDateTime?,
|
||||
val nennungsArt: List<NennungsArtE>,
|
||||
val nennungsHinweis: String?,
|
||||
val eigenesNennsystemUrl: String?,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val nenngeld: BigDecimal?,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeldStandard: BigDecimal?,
|
||||
val austragungsplaetze: List<Platz>,
|
||||
val vorbereitungsplaetze: List<Platz>,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val turnierleiterId: Uuid?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val turnierbeauftragterId: Uuid?,
|
||||
val richterIds: List<@Serializable(with = UuidSerializer::class) Uuid>,
|
||||
val parcoursbauerIds: List<@Serializable(with = UuidSerializer::class) Uuid>,
|
||||
val parcoursAssistentIds: List<@Serializable(with = UuidSerializer::class) Uuid>,
|
||||
val tierarztInfos: String?,
|
||||
val hufschmiedInfo: String?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val meldestelleVerantwortlicherId: Uuid?,
|
||||
val meldestelleTelefon: String?,
|
||||
val meldestelleOeffnungszeiten: String?,
|
||||
val ergebnislistenUrl: String?,
|
||||
val verfuegbareArtikel: List<Artikel>,
|
||||
val meisterschaftRefs: List<MeisterschaftReferenz>,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateTurnierDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val veranstaltungId: Uuid,
|
||||
val oepsTurnierNr: String,
|
||||
val titel: String,
|
||||
val untertitel: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumVon: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumBis: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateTimeSerializer::class)
|
||||
val nennungsschluss: LocalDateTime? = null,
|
||||
val nennungsArt: List<NennungsArtE> = emptyList(),
|
||||
val nennungsHinweis: String? = null,
|
||||
val eigenesNennsystemUrl: String? = null,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val nenngeld: BigDecimal? = null,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeldStandard: BigDecimal? = null,
|
||||
val austragungsplaetze: List<Platz> = emptyList(),
|
||||
val vorbereitungsplaetze: List<Platz> = emptyList(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val turnierleiterId: Uuid? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val turnierbeauftragterId: Uuid? = null,
|
||||
val richterIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(),
|
||||
val parcoursbauerIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(),
|
||||
val parcoursAssistentIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(),
|
||||
val tierarztInfos: String? = null,
|
||||
val hufschmiedInfo: String? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val meldestelleVerantwortlicherId: Uuid? = null,
|
||||
val meldestelleTelefon: String? = null,
|
||||
val meldestelleOeffnungszeiten: String? = null,
|
||||
val ergebnislistenUrl: String? = null,
|
||||
val verfuegbareArtikel: List<Artikel> = emptyList(),
|
||||
val meisterschaftRefs: List<MeisterschaftReferenz> = emptyList()
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateTurnierDto(
|
||||
val oepsTurnierNr: String,
|
||||
val titel: String,
|
||||
val untertitel: String? = null,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumVon: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumBis: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateTimeSerializer::class)
|
||||
val nennungsschluss: LocalDateTime? = null,
|
||||
val nennungsArt: List<NennungsArtE> = emptyList(),
|
||||
val nennungsHinweis: String? = null,
|
||||
val eigenesNennsystemUrl: String? = null,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val nenngeld: BigDecimal? = null,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
val startgeldStandard: BigDecimal? = null,
|
||||
val austragungsplaetze: List<Platz> = emptyList(),
|
||||
val vorbereitungsplaetze: List<Platz> = emptyList(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val turnierleiterId: Uuid? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val turnierbeauftragterId: Uuid? = null,
|
||||
val richterIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(),
|
||||
val parcoursbauerIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(),
|
||||
val parcoursAssistentIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(),
|
||||
val tierarztInfos: String? = null,
|
||||
val hufschmiedInfo: String? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val meldestelleVerantwortlicherId: Uuid? = null,
|
||||
val meldestelleTelefon: String? = null,
|
||||
val meldestelleOeffnungszeiten: String? = null,
|
||||
val ergebnislistenUrl: String? = null,
|
||||
val verfuegbareArtikel: List<Artikel> = emptyList(),
|
||||
val meisterschaftRefs: List<MeisterschaftReferenz> = emptyList()
|
||||
)
|
||||
@@ -0,0 +1,88 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.enums.VeranstalterTypE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class VeranstaltungDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val name: String,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumVon: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumBis: LocalDate,
|
||||
val veranstalterName: String,
|
||||
val veranstalterOepsNummer: String?,
|
||||
val veranstalterTypE: VeranstalterTypE,
|
||||
val veranstaltungsortName: String,
|
||||
val veranstaltungsortAdresse: String,
|
||||
val kontaktpersonName: String?,
|
||||
val kontaktTelefon: String?,
|
||||
val kontaktEmail: String?,
|
||||
val webseite: String?,
|
||||
val logoUrl: String?,
|
||||
val anfahrtsplanInfo: String?,
|
||||
val sponsorInfos: List<String>,
|
||||
val dsgvoText: String?,
|
||||
val haftungsText: String?,
|
||||
val sonstigeBesondereBestimmungen: String?,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class CreateVeranstaltungDto(
|
||||
val name: String,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumVon: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumBis: LocalDate,
|
||||
val veranstalterName: String,
|
||||
val veranstalterOepsNummer: String? = null,
|
||||
val veranstalterTypE: VeranstalterTypE = VeranstalterTypE.UNBEKANNT,
|
||||
val veranstaltungsortName: String,
|
||||
val veranstaltungsortAdresse: String,
|
||||
val kontaktpersonName: String? = null,
|
||||
val kontaktTelefon: String? = null,
|
||||
val kontaktEmail: String? = null,
|
||||
val webseite: String? = null,
|
||||
val logoUrl: String? = null,
|
||||
val anfahrtsplanInfo: String? = null,
|
||||
val sponsorInfos: List<String> = emptyList(),
|
||||
val dsgvoText: String? = null,
|
||||
val haftungsText: String? = null,
|
||||
val sonstigeBesondereBestimmungen: String? = null
|
||||
)
|
||||
|
||||
@Serializable
|
||||
data class UpdateVeranstaltungDto(
|
||||
val name: String,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumVon: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
val datumBis: LocalDate,
|
||||
val veranstalterName: String,
|
||||
val veranstalterOepsNummer: String? = null,
|
||||
val veranstalterTypE: VeranstalterTypE = VeranstalterTypE.UNBEKANNT,
|
||||
val veranstaltungsortName: String,
|
||||
val veranstaltungsortAdresse: String,
|
||||
val kontaktpersonName: String? = null,
|
||||
val kontaktTelefon: String? = null,
|
||||
val kontaktEmail: String? = null,
|
||||
val webseite: String? = null,
|
||||
val logoUrl: String? = null,
|
||||
val anfahrtsplanInfo: String? = null,
|
||||
val sponsorInfos: List<String> = emptyList(),
|
||||
val dsgvoText: String? = null,
|
||||
val haftungsText: String? = null,
|
||||
val sonstigeBesondereBestimmungen: String? = null
|
||||
)
|
||||
@@ -0,0 +1,68 @@
|
||||
package at.mocode.dto
|
||||
|
||||
import at.mocode.dto.base.VersionedDto
|
||||
import at.mocode.dto.base.Since
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
@Since("1.0")
|
||||
data class VereinDto(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid,
|
||||
val oepsVereinsNr: String,
|
||||
val name: String,
|
||||
val kuerzel: String?,
|
||||
val bundesland: String?,
|
||||
val adresse: String?,
|
||||
val plz: String?,
|
||||
val ort: String?,
|
||||
val email: String?,
|
||||
val telefon: String?,
|
||||
val webseite: String?,
|
||||
val istAktiv: Boolean,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant,
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val updatedAt: Instant,
|
||||
override val schemaVersion: String = "1.0",
|
||||
override val dataVersion: Long? = null
|
||||
) : VersionedDto
|
||||
|
||||
@Serializable
|
||||
@Since("1.0")
|
||||
data class CreateVereinDto(
|
||||
val oepsVereinsNr: String,
|
||||
val name: String,
|
||||
val kuerzel: String? = null,
|
||||
val bundesland: String? = null,
|
||||
val adresse: String? = null,
|
||||
val plz: String? = null,
|
||||
val ort: String? = null,
|
||||
val email: String? = null,
|
||||
val telefon: String? = null,
|
||||
val webseite: String? = null,
|
||||
val istAktiv: Boolean = true,
|
||||
override val schemaVersion: String = "1.0",
|
||||
override val dataVersion: Long? = null
|
||||
) : VersionedDto
|
||||
|
||||
@Serializable
|
||||
@Since("1.0")
|
||||
data class UpdateVereinDto(
|
||||
val name: String,
|
||||
val kuerzel: String? = null,
|
||||
val bundesland: String? = null,
|
||||
val adresse: String? = null,
|
||||
val plz: String? = null,
|
||||
val ort: String? = null,
|
||||
val email: String? = null,
|
||||
val telefon: String? = null,
|
||||
val webseite: String? = null,
|
||||
val istAktiv: Boolean = true,
|
||||
override val schemaVersion: String = "1.0",
|
||||
override val dataVersion: Long? = null
|
||||
) : VersionedDto
|
||||
@@ -0,0 +1,122 @@
|
||||
package at.mocode.dto.base
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* Manages API and DTO versioning across the application.
|
||||
*/
|
||||
object VersionManager {
|
||||
|
||||
// Current API version
|
||||
const val CURRENT_API_VERSION = "1.0"
|
||||
|
||||
// Supported API versions (newest first)
|
||||
val SUPPORTED_VERSIONS = listOf("1.0")
|
||||
|
||||
// Deprecated versions (still supported but discouraged)
|
||||
val DEPRECATED_VERSIONS = emptyList<String>()
|
||||
|
||||
// Minimum client version required
|
||||
const val MINIMUM_CLIENT_VERSION = "1.0"
|
||||
|
||||
/**
|
||||
* Check if a version is supported
|
||||
*/
|
||||
fun isVersionSupported(version: String): Boolean {
|
||||
return version in SUPPORTED_VERSIONS
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if a version is deprecated
|
||||
*/
|
||||
fun isVersionDeprecated(version: String): Boolean {
|
||||
return version in DEPRECATED_VERSIONS
|
||||
}
|
||||
|
||||
/**
|
||||
* Get version compatibility info
|
||||
*/
|
||||
fun getVersionInfo(): ApiVersionInfo {
|
||||
return ApiVersionInfo(
|
||||
apiVersion = CURRENT_API_VERSION,
|
||||
supportedVersions = SUPPORTED_VERSIONS,
|
||||
deprecatedVersions = DEPRECATED_VERSIONS,
|
||||
minimumClientVersion = MINIMUM_CLIENT_VERSION
|
||||
)
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate client version compatibility
|
||||
*/
|
||||
fun validateClientVersion(clientVersion: String?): VersionValidationResult {
|
||||
if (clientVersion == null) {
|
||||
return VersionValidationResult.MissingVersion
|
||||
}
|
||||
|
||||
if (!isVersionSupported(clientVersion)) {
|
||||
return VersionValidationResult.UnsupportedVersion(clientVersion)
|
||||
}
|
||||
|
||||
if (isVersionDeprecated(clientVersion)) {
|
||||
return VersionValidationResult.DeprecatedVersion(clientVersion)
|
||||
}
|
||||
|
||||
return VersionValidationResult.Valid(clientVersion)
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Result of version validation
|
||||
*/
|
||||
sealed class VersionValidationResult {
|
||||
data class Valid(val version: String) : VersionValidationResult()
|
||||
data class DeprecatedVersion(val version: String) : VersionValidationResult()
|
||||
data class UnsupportedVersion(val version: String) : VersionValidationResult()
|
||||
object MissingVersion : VersionValidationResult()
|
||||
}
|
||||
|
||||
/**
|
||||
* Version migration interface for handling DTO evolution
|
||||
*/
|
||||
interface VersionMigrator<T : VersionedDto> {
|
||||
/**
|
||||
* Migrate DTO from one version to another
|
||||
*/
|
||||
fun migrate(dto: T, fromVersion: String, toVersion: String): T
|
||||
|
||||
/**
|
||||
* Check if migration is supported between versions
|
||||
*/
|
||||
fun canMigrate(fromVersion: String, toVersion: String): Boolean
|
||||
}
|
||||
|
||||
/**
|
||||
* Registry for version migrators
|
||||
*/
|
||||
object MigratorRegistry {
|
||||
private val migrators = mutableMapOf<String, VersionMigrator<*>>()
|
||||
|
||||
fun <T : VersionedDto> register(dtoClass: String, migrator: VersionMigrator<T>) {
|
||||
migrators[dtoClass] = migrator
|
||||
}
|
||||
|
||||
@Suppress("UNCHECKED_CAST")
|
||||
fun <T : VersionedDto> getMigrator(dtoClass: String): VersionMigrator<T>? {
|
||||
return migrators[dtoClass] as? VersionMigrator<T>
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Version compatibility annotations
|
||||
*/
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Since(val version: String)
|
||||
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Deprecated(val version: String, val message: String = "")
|
||||
|
||||
@Target(AnnotationTarget.CLASS, AnnotationTarget.PROPERTY)
|
||||
@Retention(AnnotationRetention.RUNTIME)
|
||||
annotation class Until(val version: String)
|
||||
@@ -0,0 +1,52 @@
|
||||
package at.mocode.dto.base
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* Base interface for all versioned DTOs.
|
||||
* Provides version information for API compatibility and evolution.
|
||||
*/
|
||||
interface VersionedDto {
|
||||
/**
|
||||
* The schema version of this DTO.
|
||||
* Used for API versioning and backward compatibility.
|
||||
*/
|
||||
val schemaVersion: String
|
||||
|
||||
/**
|
||||
* Optional data version for optimistic locking.
|
||||
* Can be used to detect concurrent modifications.
|
||||
*/
|
||||
val dataVersion: Long?
|
||||
get() = null
|
||||
}
|
||||
|
||||
/**
|
||||
* Base class for versioned DTOs with common versioning fields.
|
||||
*/
|
||||
@Serializable
|
||||
abstract class BaseVersionedDto(
|
||||
override val schemaVersion: String = "1.0",
|
||||
override val dataVersion: Long? = null
|
||||
) : VersionedDto
|
||||
|
||||
/**
|
||||
* Version information for API responses.
|
||||
*/
|
||||
@Serializable
|
||||
data class ApiVersionInfo(
|
||||
val apiVersion: String,
|
||||
val supportedVersions: List<String>,
|
||||
val deprecatedVersions: List<String> = emptyList(),
|
||||
val minimumClientVersion: String? = null
|
||||
)
|
||||
|
||||
/**
|
||||
* Wrapper for versioned API responses.
|
||||
*/
|
||||
@Serializable
|
||||
data class VersionedResponse<T>(
|
||||
val data: T,
|
||||
val version: ApiVersionInfo,
|
||||
val timestamp: String
|
||||
) where T : VersionedDto
|
||||
@@ -0,0 +1,40 @@
|
||||
package at.mocode.dto.migrations
|
||||
|
||||
import at.mocode.dto.ArtikelDto
|
||||
import at.mocode.dto.base.VersionMigrator
|
||||
|
||||
/**
|
||||
* Migrator for ArtikelDto versions.
|
||||
* Handles migration between different versions of ArtikelDto.
|
||||
*/
|
||||
class ArtikelDtoMigrator : VersionMigrator<ArtikelDto> {
|
||||
|
||||
override fun migrate(dto: ArtikelDto, fromVersion: String, toVersion: String): ArtikelDto {
|
||||
return when {
|
||||
fromVersion == "1.0" && toVersion == "1.0" -> dto
|
||||
// Future migrations would be handled here
|
||||
// fromVersion == "1.0" && toVersion == "1.1" -> migrateFrom1_0To1_1(dto)
|
||||
// fromVersion == "1.1" && toVersion == "1.2" -> migrateFrom1_1To1_2(dto)
|
||||
else -> throw IllegalArgumentException("Unsupported migration from $fromVersion to $toVersion")
|
||||
}
|
||||
}
|
||||
|
||||
override fun canMigrate(fromVersion: String, toVersion: String): Boolean {
|
||||
return when {
|
||||
fromVersion == "1.0" && toVersion == "1.0" -> true
|
||||
// Future migration paths would be defined here
|
||||
// fromVersion == "1.0" && toVersion == "1.1" -> true
|
||||
// fromVersion == "1.1" && toVersion == "1.2" -> true
|
||||
else -> false
|
||||
}
|
||||
}
|
||||
|
||||
// Example of future migration method
|
||||
// private fun migrateFrom1_0To1_1(dto: ArtikelDto): ArtikelDto {
|
||||
// return dto.copy(
|
||||
// schemaVersion = "1.1",
|
||||
// // Add new fields with default values
|
||||
// // newField = "defaultValue"
|
||||
// )
|
||||
// }
|
||||
}
|
||||
Reference in New Issue
Block a user