(fix) cleanup Gradle-Build
This commit is contained in:
+13
-23
@@ -1,6 +1,6 @@
|
||||
@file:OptIn(ExperimentalWasmDsl::class)
|
||||
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat // HIER FEHLTE DER IMPORT
|
||||
import org.jetbrains.compose.desktop.application.dsl.TargetFormat
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalWasmDsl
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||
|
||||
@@ -16,15 +16,13 @@ kotlin {
|
||||
wasmJs {
|
||||
outputModuleName = "composeApp"
|
||||
browser {
|
||||
val rootDirPath = project.rootDir.path
|
||||
val projectDirPath = project.projectDir.path
|
||||
commonWebpackConfig {
|
||||
outputFileName = "composeApp.js"
|
||||
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
|
||||
static = (static ?: mutableListOf()).apply {
|
||||
// Serve sources to debug inside browser
|
||||
add(rootDirPath)
|
||||
add(projectDirPath)
|
||||
add(project.rootDir.path)
|
||||
add(project.projectDir.path)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -33,30 +31,22 @@ kotlin {
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
commonMain.dependencies {
|
||||
implementation(projects.shared)
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.components.uiToolingPreview)
|
||||
}
|
||||
|
||||
val desktopMain by getting {
|
||||
dependencies {
|
||||
implementation(compose.desktop.currentOs)
|
||||
implementation(libs.kotlinx.coroutines.swing)
|
||||
}
|
||||
}
|
||||
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
commonMain.dependencies {
|
||||
implementation(projects.shared)
|
||||
implementation(compose.runtime)
|
||||
implementation(compose.foundation)
|
||||
implementation(compose.material)
|
||||
implementation(compose.ui)
|
||||
implementation(compose.components.resources)
|
||||
implementation(compose.components.uiToolingPreview)
|
||||
}
|
||||
desktopMain.dependencies {
|
||||
implementation(compose.desktop.currentOs)
|
||||
implementation(libs.kotlinx.coroutines.swing)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+1
-3
@@ -1,10 +1,8 @@
|
||||
package at.mocode.compose
|
||||
package at.mocode
|
||||
|
||||
import androidx.compose.animation.AnimatedVisibility
|
||||
import androidx.compose.foundation.background
|
||||
import androidx.compose.foundation.layout.*
|
||||
import androidx.compose.foundation.lazy.LazyColumn
|
||||
import androidx.compose.foundation.shape.RoundedCornerShape
|
||||
import androidx.compose.material.*
|
||||
import androidx.compose.runtime.*
|
||||
import androidx.compose.ui.Alignment
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package at.mocode.compose
|
||||
package at.mocode
|
||||
|
||||
import androidx.compose.ui.window.Window
|
||||
import androidx.compose.ui.window.application
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package at.mocode.compose
|
||||
package at.mocode
|
||||
|
||||
import androidx.compose.ui.ExperimentalComposeUiApi
|
||||
import androidx.compose.ui.window.ComposeViewport
|
||||
+1
-1
@@ -36,7 +36,7 @@ idea.project.settings.delegate.build.run.actions.to.gradle=true
|
||||
org.gradle.vfs.watch=true
|
||||
# Experimentelles Feature für schnelleren Build-Start (mit Vorsicht verwenden und testen)
|
||||
# Hinweis: Configuration Cache erzeugt Cache-Dateien in build/reports/configuration-cache/
|
||||
org.gradle.unsafe.configuration-cache=true
|
||||
# org.gradle.unsafe.configuration-cache=true # Disabled due to serialization issues with Kotlin/JS WebAssembly tasks
|
||||
|
||||
# Build-Reports minimieren für sauberen Build-Process
|
||||
org.gradle.logging.level=lifecycle
|
||||
|
||||
@@ -31,20 +31,10 @@ bignum = "0.3.10"
|
||||
[libraries]
|
||||
# Kotlin and related libraries
|
||||
kotlin-test = { module = "org.jetbrains.kotlin:kotlin-test", version.ref = "kotlin" }
|
||||
kotlin-test-junit = { module = "org.jetbrains.kotlin:kotlin-test-junit", version.ref = "kotlin" }
|
||||
kotlinx-coroutines-swing = { group = "org.jetbrains.kotlinx", name = "kotlinx-coroutines-swing", version.ref = "kotlinxCoroutines" }
|
||||
kotlinx-serialization-json = { group = "org.jetbrains.kotlinx", name = "kotlinx-serialization-json", version.ref = "kotlinxSerialization" }
|
||||
kotlinx-datetime = { group = "org.jetbrains.kotlinx", name = "kotlinx-datetime", version.ref = "kotlinxDatetime" }
|
||||
|
||||
# Compose
|
||||
compose-runtime = { group = "org.jetbrains.compose.runtime", name = "runtime", version.ref = "composeMultiplatform" }
|
||||
compose-foundation = { group = "org.jetbrains.compose.foundation", name = "foundation", version.ref = "composeMultiplatform" }
|
||||
compose-material = { group = "org.jetbrains.compose.material", name = "material", version.ref = "composeMultiplatform" }
|
||||
compose-ui = { group = "org.jetbrains.compose.ui", name = "ui", version.ref = "composeMultiplatform" }
|
||||
compose-components-resources = { group = "org.jetbrains.compose.components", name = "resources", version.ref = "composeMultiplatform" }
|
||||
compose-components-uiToolingPreview = { group = "org.jetbrains.compose.components", name = "ui-tooling-preview", version.ref = "composeMultiplatform" }
|
||||
compose-desktop-currentOs = { group = "org.jetbrains.compose.desktop", name = "compose-desktop", version.ref = "composeMultiplatform" }
|
||||
|
||||
# Ktor
|
||||
ktor-server-core = { module = "io.ktor:ktor-server-core-jvm", version.ref = "ktor" }
|
||||
ktor-server-netty = { module = "io.ktor:ktor-server-netty-jvm", version.ref = "ktor" }
|
||||
@@ -73,7 +63,6 @@ h2-driver = { module = "com.h2database:h2", version.ref = "h2" }
|
||||
logback = { module = "ch.qos.logback:logback-classic", version.ref = "logback" }
|
||||
|
||||
# Testing
|
||||
junit = { group = "junit", name = "junit", version.ref = "junit" }
|
||||
junitJupiter = { group = "org.junit.jupiter", name = "junit-jupiter", version.ref = "junitJupiter" }
|
||||
|
||||
# Utilities
|
||||
@@ -85,6 +74,5 @@ kotlin-jvm = { id = "org.jetbrains.kotlin.jvm", version.ref = "kotlin" }
|
||||
kotlin-serialization = { id = "org.jetbrains.kotlin.plugin.serialization", version.ref = "kotlin" }
|
||||
compose-multiplatform = { id = "org.jetbrains.compose", version.ref = "composeMultiplatform" }
|
||||
ktor = { id = "io.ktor.plugin", version.ref = "ktor" }
|
||||
#jetbrains-compose = { id = "org.jetbrains.compose", version.ref = "composePlugin" }
|
||||
kotlin-multiplatform = { id = "org.jetbrains.kotlin.multiplatform", version.ref = "kotlin" }
|
||||
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }
|
||||
|
||||
+17
-41
@@ -1,5 +1,3 @@
|
||||
import org.jetbrains.kotlin.gradle.dsl.JvmTarget
|
||||
|
||||
plugins {
|
||||
alias(libs.plugins.kotlin.jvm)
|
||||
alias(libs.plugins.ktor)
|
||||
@@ -9,82 +7,60 @@ plugins {
|
||||
group = "at.mocode"
|
||||
version = "1.0.0"
|
||||
|
||||
// Enable Gradle caching and parallel execution for better build performance
|
||||
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||
compilerOptions {
|
||||
jvmTarget.set(JvmTarget.JVM_21)
|
||||
freeCompilerArgs = listOf(
|
||||
"-Xjsr305=strict",
|
||||
"-opt-in=kotlin.RequiresOptIn"
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
// Configure application
|
||||
// Anwendungskonfiguration
|
||||
application {
|
||||
mainClass.set("at.mocode.ApplicationKt")
|
||||
|
||||
// JVM-Argumente für optimale Performance und Entwicklung
|
||||
applicationDefaultJvmArgs = listOf(
|
||||
"-Dio.ktor.development=${extra["io.ktor.development"] ?: "false"}",
|
||||
"-XX:+UseG1GC", // Use G1 Garbage Collector
|
||||
"-XX:MaxGCPauseMillis=100", // Target max GC pause time
|
||||
"-Djava.awt.headless=true" // Headless mode for server
|
||||
"-XX:+UseG1GC", // G1 Garbage Collector für bessere Performance
|
||||
"-XX:MaxGCPauseMillis=100", // Maximale GC-Pausenzeit
|
||||
"-Djava.awt.headless=true" // Headless-Modus für Server-Umgebung
|
||||
)
|
||||
}
|
||||
|
||||
dependencies {
|
||||
// Projekt-Abhängigkeiten
|
||||
// === PROJEKT-ABHÄNGIGKEITEN ===
|
||||
implementation(projects.shared)
|
||||
|
||||
// Kotlin und verwandte Bibliotheken
|
||||
// === KOTLIN CORE BIBLIOTHEKEN ===
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
implementation(libs.uuid)
|
||||
implementation(libs.bignum)
|
||||
|
||||
// Ktor Server-Komponenten
|
||||
// === KTOR SERVER CORE ===
|
||||
implementation(libs.ktor.server.core)
|
||||
implementation(libs.ktor.server.netty)
|
||||
implementation(libs.ktor.server.config.yaml)
|
||||
implementation(libs.ktor.server.html.builder)
|
||||
|
||||
// Ktor Server-Plugins
|
||||
// === KTOR SERVER PLUGINS ===
|
||||
implementation(libs.ktor.server.contentNegotiation)
|
||||
implementation(libs.ktor.server.serializationKotlinxJson)
|
||||
implementation(libs.ktor.server.cors)
|
||||
implementation(libs.ktor.server.callLogging)
|
||||
implementation(libs.ktor.server.defaultHeaders)
|
||||
implementation(libs.ktor.server.statusPages)
|
||||
implementation(libs.ktor.server.auth)
|
||||
implementation(libs.ktor.server.authJwt)
|
||||
|
||||
// Datenbank - Exposed ORM
|
||||
// === DATENBANK - EXPOSED ORM ===
|
||||
implementation(libs.exposed.core)
|
||||
implementation(libs.exposed.dao)
|
||||
implementation(libs.exposed.jdbc)
|
||||
implementation(libs.exposed.kotlinDatetime)
|
||||
|
||||
// Connection Pooling
|
||||
// === CONNECTION POOLING ===
|
||||
implementation(libs.hikari.cp)
|
||||
|
||||
// Logging
|
||||
// === LOGGING ===
|
||||
implementation(libs.logback)
|
||||
|
||||
// Datenbanktreiber
|
||||
runtimeOnly(libs.postgresql.driver)
|
||||
runtimeOnly(libs.h2.driver)
|
||||
// === DATENBANKTREIBER ===
|
||||
runtimeOnly(libs.postgresql.driver) // PostgreSQL für Produktion
|
||||
runtimeOnly(libs.h2.driver) // H2 für Entwicklung und Tests
|
||||
|
||||
// Testing
|
||||
// === TESTING ===
|
||||
testImplementation(libs.ktor.server.tests)
|
||||
testImplementation(libs.kotlin.test)
|
||||
testImplementation(libs.junitJupiter)
|
||||
|
||||
}
|
||||
|
||||
// Configure tests
|
||||
tasks.withType<Test> {
|
||||
useJUnitPlatform()
|
||||
testLogging {
|
||||
events("passed", "skipped", "failed")
|
||||
}
|
||||
maxParallelForks = (Runtime.getRuntime().availableProcessors() / 2).takeIf { it > 0 } ?: 1
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.model.Artikel
|
||||
import com.benasher44.uuid.Uuid
|
||||
|
||||
interface ArtikelRepository {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.stammdaten.Person
|
||||
import at.mocode.stammdaten.Person
|
||||
import com.benasher44.uuid.Uuid
|
||||
|
||||
interface PersonRepository {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.model.Artikel
|
||||
import at.mocode.tables.ArtikelTable
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
@@ -16,7 +15,7 @@ class PostgresArtikelRepository : ArtikelRepository {
|
||||
}
|
||||
|
||||
override suspend fun findById(id: Uuid): Artikel? = transaction {
|
||||
ArtikelTable.select { ArtikelTable.id eq id }
|
||||
ArtikelTable.selectAll().where { ArtikelTable.id eq id }
|
||||
.map { rowToArtikel(it) }
|
||||
.singleOrNull()
|
||||
}
|
||||
@@ -44,7 +43,7 @@ class PostgresArtikelRepository : ArtikelRepository {
|
||||
it[updatedAt] = Clock.System.now()
|
||||
}
|
||||
if (updateCount > 0) {
|
||||
ArtikelTable.select { ArtikelTable.id eq id }
|
||||
ArtikelTable.selectAll().where { ArtikelTable.id eq id }
|
||||
.map { rowToArtikel(it) }
|
||||
.singleOrNull()
|
||||
} else null
|
||||
@@ -55,14 +54,14 @@ class PostgresArtikelRepository : ArtikelRepository {
|
||||
}
|
||||
|
||||
override suspend fun findByVerbandsabgabe(istVerbandsabgabe: Boolean): List<Artikel> = transaction {
|
||||
ArtikelTable.select { ArtikelTable.istVerbandsabgabe eq istVerbandsabgabe }
|
||||
ArtikelTable.selectAll().where { ArtikelTable.istVerbandsabgabe eq istVerbandsabgabe }
|
||||
.map { rowToArtikel(it) }
|
||||
}
|
||||
|
||||
override suspend fun search(query: String): List<Artikel> = transaction {
|
||||
ArtikelTable.select {
|
||||
ArtikelTable.selectAll().where {
|
||||
(ArtikelTable.bezeichnung.lowerCase() like "%${query.lowercase()}%") or
|
||||
(ArtikelTable.einheit.lowerCase() like "%${query.lowercase()}%")
|
||||
(ArtikelTable.einheit.lowerCase() like "%${query.lowercase()}%")
|
||||
}.map { rowToArtikel(it) }
|
||||
}
|
||||
|
||||
@@ -72,7 +71,7 @@ class PostgresArtikelRepository : ArtikelRepository {
|
||||
bezeichnung = row[ArtikelTable.bezeichnung],
|
||||
preis = try {
|
||||
BigDecimal.parseString(row[ArtikelTable.preis])
|
||||
} catch (e: Exception) {
|
||||
} catch (_: Exception) {
|
||||
BigDecimal.ZERO
|
||||
},
|
||||
einheit = row[ArtikelTable.einheit],
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.enums.FunktionaerRolle
|
||||
import at.mocode.shared.stammdaten.LizenzInfo
|
||||
import at.mocode.shared.stammdaten.Person
|
||||
import at.mocode.enums.FunktionaerRolle
|
||||
import at.mocode.stammdaten.Person
|
||||
import at.mocode.tables.PersonenTable
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuidFrom
|
||||
import kotlinx.datetime.Clock
|
||||
import org.jetbrains.exposed.sql.*
|
||||
import org.jetbrains.exposed.sql.SqlExpressionBuilder.eq
|
||||
@@ -18,13 +16,13 @@ class PostgresPersonRepository : PersonRepository {
|
||||
}
|
||||
|
||||
override suspend fun findById(id: Uuid): Person? = transaction {
|
||||
PersonenTable.select { PersonenTable.id eq id }
|
||||
PersonenTable.selectAll().where { PersonenTable.id eq id }
|
||||
.map { rowToPerson(it) }
|
||||
.singleOrNull()
|
||||
}
|
||||
|
||||
override suspend fun findByOepsSatzNr(oepsSatzNr: String): Person? = transaction {
|
||||
PersonenTable.select { PersonenTable.oepsSatzNr eq oepsSatzNr }
|
||||
PersonenTable.selectAll().where { PersonenTable.oepsSatzNr eq oepsSatzNr }
|
||||
.map { rowToPerson(it) }
|
||||
.singleOrNull()
|
||||
}
|
||||
@@ -87,7 +85,7 @@ class PostgresPersonRepository : PersonRepository {
|
||||
it[updatedAt] = Clock.System.now()
|
||||
}
|
||||
if (updateCount > 0) {
|
||||
PersonenTable.select { PersonenTable.id eq id }
|
||||
PersonenTable.selectAll().where { PersonenTable.id eq id }
|
||||
.map { rowToPerson(it) }
|
||||
.singleOrNull()
|
||||
} else null
|
||||
@@ -98,15 +96,15 @@ class PostgresPersonRepository : PersonRepository {
|
||||
}
|
||||
|
||||
override suspend fun findByVereinId(vereinId: Uuid): List<Person> = transaction {
|
||||
PersonenTable.select { PersonenTable.stammVereinId eq vereinId }
|
||||
PersonenTable.selectAll().where { PersonenTable.stammVereinId eq vereinId }
|
||||
.map { rowToPerson(it) }
|
||||
}
|
||||
|
||||
override suspend fun search(query: String): List<Person> = transaction {
|
||||
PersonenTable.select {
|
||||
PersonenTable.selectAll().where {
|
||||
(PersonenTable.nachname.lowerCase() like "%${query.lowercase()}%") or
|
||||
(PersonenTable.vorname.lowerCase() like "%${query.lowercase()}%") or
|
||||
(PersonenTable.email?.lowerCase()?.like("%${query.lowercase()}%") ?: Op.FALSE)
|
||||
(PersonenTable.vorname.lowerCase() like "%${query.lowercase()}%") or
|
||||
PersonenTable.email.lowerCase().like("%${query.lowercase()}%")
|
||||
}.map { rowToPerson(it) }
|
||||
}
|
||||
|
||||
@@ -149,7 +147,7 @@ class PostgresPersonRepository : PersonRepository {
|
||||
.mapNotNull { roleName ->
|
||||
try {
|
||||
FunktionaerRolle.valueOf(roleName.trim())
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
null
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.stammdaten.Verein
|
||||
import at.mocode.stammdaten.Verein
|
||||
import at.mocode.tables.VereineTable
|
||||
import com.benasher44.uuid.Uuid
|
||||
import kotlinx.datetime.Clock
|
||||
@@ -15,13 +15,13 @@ class PostgresVereinRepository : VereinRepository {
|
||||
}
|
||||
|
||||
override suspend fun findById(id: Uuid): Verein? = transaction {
|
||||
VereineTable.select { VereineTable.id eq id }
|
||||
VereineTable.selectAll().where { VereineTable.id eq id }
|
||||
.map { rowToVerein(it) }
|
||||
.singleOrNull()
|
||||
}
|
||||
|
||||
override suspend fun findByOepsVereinsNr(oepsVereinsNr: String): Verein? = transaction {
|
||||
VereineTable.select { VereineTable.oepsVereinsNr eq oepsVereinsNr }
|
||||
VereineTable.selectAll().where { VereineTable.oepsVereinsNr eq oepsVereinsNr }
|
||||
.map { rowToVerein(it) }
|
||||
.singleOrNull()
|
||||
}
|
||||
@@ -62,7 +62,7 @@ class PostgresVereinRepository : VereinRepository {
|
||||
it[updatedAt] = Clock.System.now()
|
||||
}
|
||||
if (updateCount > 0) {
|
||||
VereineTable.select { VereineTable.id eq id }
|
||||
VereineTable.selectAll().where { VereineTable.id eq id }
|
||||
.map { rowToVerein(it) }
|
||||
.singleOrNull()
|
||||
} else null
|
||||
@@ -73,15 +73,15 @@ class PostgresVereinRepository : VereinRepository {
|
||||
}
|
||||
|
||||
override suspend fun findByBundesland(bundesland: String): List<Verein> = transaction {
|
||||
VereineTable.select { VereineTable.bundesland eq bundesland }
|
||||
VereineTable.selectAll().where { VereineTable.bundesland eq bundesland }
|
||||
.map { rowToVerein(it) }
|
||||
}
|
||||
|
||||
override suspend fun search(query: String): List<Verein> = transaction {
|
||||
VereineTable.select {
|
||||
VereineTable.selectAll().where {
|
||||
(VereineTable.name.lowerCase() like "%${query.lowercase()}%") or
|
||||
(VereineTable.kuerzel?.lowerCase()?.like("%${query.lowercase()}%") ?: Op.FALSE) or
|
||||
(VereineTable.ort?.lowerCase()?.like("%${query.lowercase()}%") ?: Op.FALSE)
|
||||
VereineTable.kuerzel.lowerCase().like("%${query.lowercase()}%") or
|
||||
VereineTable.ort.lowerCase().like("%${query.lowercase()}%")
|
||||
}.map { rowToVerein(it) }
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.stammdaten.Verein
|
||||
import at.mocode.stammdaten.Verein
|
||||
import com.benasher44.uuid.Uuid
|
||||
|
||||
interface VereinRepository {
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
package at.mocode.routes
|
||||
|
||||
import at.mocode.model.Artikel
|
||||
import at.mocode.model.ArtikelRepository
|
||||
import at.mocode.model.PostgresArtikelRepository
|
||||
import at.mocode.shared.model.Artikel
|
||||
import com.benasher44.uuid.uuidFrom
|
||||
import io.ktor.http.*
|
||||
import io.ktor.server.application.*
|
||||
import io.ktor.server.request.*
|
||||
import io.ktor.server.response.*
|
||||
import io.ktor.server.routing.*
|
||||
import kotlin.collections.mapOf
|
||||
|
||||
fun Route.artikelRoutes() {
|
||||
val artikelRepository: ArtikelRepository = PostgresArtikelRepository()
|
||||
@@ -38,7 +38,7 @@ fun Route.artikelRoutes() {
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound, mapOf("error" to "Artikel not found"))
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.InternalServerError, mapOf("error" to e.message))
|
||||
@@ -99,7 +99,7 @@ fun Route.artikelRoutes() {
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound, mapOf("error" to "Artikel not found"))
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to e.message))
|
||||
@@ -120,7 +120,7 @@ fun Route.artikelRoutes() {
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound, mapOf("error" to "Artikel not found"))
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.InternalServerError, mapOf("error" to e.message))
|
||||
|
||||
@@ -2,10 +2,9 @@ package at.mocode.routes
|
||||
|
||||
import at.mocode.model.PersonRepository
|
||||
import at.mocode.model.PostgresPersonRepository
|
||||
import at.mocode.shared.stammdaten.Person
|
||||
import at.mocode.stammdaten.Person
|
||||
import com.benasher44.uuid.uuidFrom
|
||||
import io.ktor.http.*
|
||||
import io.ktor.server.application.*
|
||||
import io.ktor.server.request.*
|
||||
import io.ktor.server.response.*
|
||||
import io.ktor.server.routing.*
|
||||
@@ -38,7 +37,7 @@ fun Route.personRoutes() {
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound, mapOf("error" to "Person not found"))
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.InternalServerError, mapOf("error" to e.message))
|
||||
@@ -87,7 +86,7 @@ fun Route.personRoutes() {
|
||||
val uuid = uuidFrom(vereinId)
|
||||
val persons = personRepository.findByVereinId(uuid)
|
||||
call.respond(HttpStatusCode.OK, persons)
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.InternalServerError, mapOf("error" to e.message))
|
||||
@@ -120,7 +119,7 @@ fun Route.personRoutes() {
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound, mapOf("error" to "Person not found"))
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to e.message))
|
||||
@@ -141,7 +140,7 @@ fun Route.personRoutes() {
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound, mapOf("error" to "Person not found"))
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.InternalServerError, mapOf("error" to e.message))
|
||||
|
||||
@@ -2,10 +2,9 @@ package at.mocode.routes
|
||||
|
||||
import at.mocode.model.PostgresVereinRepository
|
||||
import at.mocode.model.VereinRepository
|
||||
import at.mocode.shared.stammdaten.Verein
|
||||
import at.mocode.stammdaten.Verein
|
||||
import com.benasher44.uuid.uuidFrom
|
||||
import io.ktor.http.*
|
||||
import io.ktor.server.application.*
|
||||
import io.ktor.server.request.*
|
||||
import io.ktor.server.response.*
|
||||
import io.ktor.server.routing.*
|
||||
@@ -38,7 +37,7 @@ fun Route.vereinRoutes() {
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound, mapOf("error" to "Verein not found"))
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.InternalServerError, mapOf("error" to e.message))
|
||||
@@ -117,7 +116,7 @@ fun Route.vereinRoutes() {
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound, mapOf("error" to "Verein not found"))
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to e.message))
|
||||
@@ -138,7 +137,7 @@ fun Route.vereinRoutes() {
|
||||
} else {
|
||||
call.respond(HttpStatusCode.NotFound, mapOf("error" to "Verein not found"))
|
||||
}
|
||||
} catch (e: IllegalArgumentException) {
|
||||
} catch (_: IllegalArgumentException) {
|
||||
call.respond(HttpStatusCode.BadRequest, mapOf("error" to "Invalid UUID format"))
|
||||
} catch (e: Exception) {
|
||||
call.respond(HttpStatusCode.InternalServerError, mapOf("error" to e.message))
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package at.mocode.tables
|
||||
|
||||
|
||||
import at.mocode.shared.enums.LizenzTypE
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.enums.LizenzTypE
|
||||
import at.mocode.enums.SparteE
|
||||
import org.jetbrains.exposed.sql.Table
|
||||
import org.jetbrains.exposed.sql.kotlin.datetime.date
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package at.mocode.tables
|
||||
|
||||
import at.mocode.shared.enums.GeschlechtE
|
||||
import at.mocode.enums.GeschlechtE
|
||||
import org.jetbrains.exposed.sql.Table
|
||||
import org.jetbrains.exposed.sql.kotlin.datetime.date
|
||||
import org.jetbrains.exposed.sql.kotlin.datetime.timestamp
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package at.mocode.tables
|
||||
|
||||
import at.mocode.shared.enums.GeschlechtPferdE
|
||||
import at.mocode.enums.GeschlechtPferdE
|
||||
import org.jetbrains.exposed.sql.Table
|
||||
import org.jetbrains.exposed.sql.kotlin.datetime.timestamp
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package at.mocode.tables
|
||||
|
||||
import at.mocode.shared.enums.PlatzTypE
|
||||
import at.mocode.enums.PlatzTypE
|
||||
import org.jetbrains.exposed.sql.Table
|
||||
|
||||
object PlaetzeTable : Table("plaetze") {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package at.mocode.tables
|
||||
|
||||
import at.mocode.shared.enums.VeranstalterTypE
|
||||
import at.mocode.enums.VeranstalterTypE
|
||||
import org.jetbrains.exposed.sql.Table
|
||||
import org.jetbrains.exposed.sql.kotlin.datetime.date
|
||||
import org.jetbrains.exposed.sql.kotlin.datetime.timestamp
|
||||
|
||||
+11
-18
@@ -1,4 +1,3 @@
|
||||
// shared/build.gradle.kts
|
||||
@file:OptIn(org.jetbrains.kotlin.gradle.ExperimentalWasmDsl::class)
|
||||
|
||||
import org.jetbrains.kotlin.gradle.targets.js.webpack.KotlinWebpackConfig
|
||||
@@ -13,14 +12,12 @@ kotlin {
|
||||
|
||||
wasmJs {
|
||||
browser {
|
||||
val rootDirPath = project.rootDir.path
|
||||
val projectDirPath = project.projectDir.path
|
||||
commonWebpackConfig {
|
||||
devServer = (devServer ?: KotlinWebpackConfig.DevServer()).apply {
|
||||
static = (static ?: mutableListOf()).apply {
|
||||
// Serve sources to debug inside browser
|
||||
add(rootDirPath)
|
||||
add(projectDirPath)
|
||||
// Serve sources for browser debugging
|
||||
add(project.rootDir.path)
|
||||
add(project.projectDir.path)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,20 +25,16 @@ kotlin {
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
val commonMain by getting {
|
||||
dependencies {
|
||||
// Multiplatform-Abhängigkeiten
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
implementation(libs.uuid)
|
||||
implementation(libs.bignum)
|
||||
}
|
||||
commonMain.dependencies {
|
||||
// Multiplatform dependencies
|
||||
implementation(libs.kotlinx.serialization.json)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
implementation(libs.uuid)
|
||||
implementation(libs.bignum)
|
||||
}
|
||||
|
||||
val commonTest by getting {
|
||||
dependencies {
|
||||
implementation(kotlin("test"))
|
||||
}
|
||||
commonTest.dependencies {
|
||||
implementation(kotlin("test"))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package at.mocode.shared.enums
|
||||
package at.mocode.enums
|
||||
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package at.mocode.shared.model
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.enums.BeginnzeitTypE
|
||||
import at.mocode.shared.serializers.BigDecimalSerializer
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalTimeSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.BeginnzeitTypE
|
||||
import at.mocode.serializers.BigDecimalSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalTimeSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package at.mocode.shared.model
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.serializers.BigDecimalSerializer
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.serializers.BigDecimalSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package at.mocode.shared.model
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.enums.BeginnzeitTypE
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.serializers.*
|
||||
import at.mocode.enums.BeginnzeitTypE
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.serializers.*
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package at.mocode.shared.model
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.serializers.BigDecimalSerializer
|
||||
import at.mocode.serializers.BigDecimalSerializer
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package at.mocode.shared.model
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.serialization.Serializable
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package at.mocode.shared.model
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.enums.PlatzTypE
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.PlatzTypE
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.serialization.Serializable
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package at.mocode.shared.model
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package at.mocode.shared.model
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
@@ -1,41 +1,64 @@
|
||||
package at.mocode.model
|
||||
|
||||
//import kotlinx.serialization.Serializable
|
||||
//
|
||||
///**
|
||||
// * Represents a tournament (Turnier) with its details and associated competitions (Bewerbe).
|
||||
// * Each tournament can have one or more competitions.
|
||||
// */
|
||||
//@Serializable
|
||||
//data class Turnier(
|
||||
// /** The name of the tournament, e.g. "CSN-C NEU CSNP-C NEU NEUMARKT/M., OÖ" */
|
||||
// val name: String,
|
||||
//
|
||||
// /** The date of the tournament as a formatted string, e.g. "7.JUNI 2025" */
|
||||
// val datum: String,
|
||||
//
|
||||
// /** Unique identifier for the tournament */
|
||||
// val number: Int,
|
||||
//
|
||||
// /** List of competitions (Bewerbe) associated with this tournament */
|
||||
// var bewerbe: List<Bewerb>
|
||||
//)
|
||||
//
|
||||
///**
|
||||
// * Represents a competition (Bewerb) within a tournament.
|
||||
// * A competition has specific details like number, title, class, and optional task.
|
||||
// */
|
||||
//@Serializable
|
||||
//data class Bewerb(
|
||||
// /** Competition number, e.g. 1, 2, etc. */
|
||||
// val nummer: Int,
|
||||
//
|
||||
// /** Title of the competition, e.g. "Stilspringprüfung" or "Dressurprüfung" */
|
||||
// val titel: String,
|
||||
//
|
||||
// /** Class/level of the competition, e.g. "60 cm" or "Kl. A" */
|
||||
// val klasse: String,
|
||||
//
|
||||
// /** Optional task identifier, e.g. "DRA 1" */
|
||||
// val task: String?
|
||||
//)
|
||||
import at.mocode.enums.NennungsArtE
|
||||
import at.mocode.serializers.BigDecimalSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateTimeSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Turnier(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid = uuid4(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var veranstaltungId: Uuid,
|
||||
var oepsTurnierNr: String,
|
||||
var titel: String,
|
||||
var untertitel: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
var datumVon: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
var datumBis: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateTimeSerializer::class) // Beispiel
|
||||
var nennungsschluss: LocalDateTime?,
|
||||
var nennungsArt: List<NennungsArtE> = emptyList(),
|
||||
var nennungsHinweis: String?,
|
||||
var eigenesNennsystemUrl: String?,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
var nenngeld: BigDecimal?,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
var startgeldStandard: BigDecimal?,
|
||||
var austragungsplaetze: List<Platz> = emptyList(),
|
||||
var vorbereitungsplaetze: List<Platz> = emptyList(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var turnierleiterId: Uuid?, // FK zu Person
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var turnierbeauftragterId: Uuid?, // FK zu Person
|
||||
var richterIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(), // Pool Richtern
|
||||
var parcoursbauerIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(), // FKs zu Person
|
||||
var parcoursAssistentIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(), // FKs zu Person
|
||||
var tierarztInfos: String?,
|
||||
var hufschmiedInfo: String?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var meldestelleVerantwortlicherId: Uuid?, // FK zu Person
|
||||
var meldestelleTelefon: String?,
|
||||
var meldestelleOeffnungszeiten: String?,
|
||||
var ergebnislistenUrl: String?, // Wird später meist system-generiert
|
||||
var verfuegbareArtikel: List<Artikel> = emptyList(), // Zur Auswahl für die Kassa
|
||||
var meisterschaftRefs: List<MeisterschaftReferenz> = emptyList(),
|
||||
// var cupRefs: List<CupReferenz> = emptyList(),
|
||||
// var sonderpruefungRefs: List<SonderpruefungReferenz> = emptyList(),
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant = Clock.System.now(),
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
var updatedAt: Instant = Clock.System.now()
|
||||
)
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package at.mocode.shared.model
|
||||
package at.mocode.model
|
||||
|
||||
import at.mocode.shared.enums.VeranstalterTypE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
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 com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+5
-5
@@ -1,8 +1,8 @@
|
||||
import at.mocode.shared.enums.DatenQuelleE
|
||||
import at.mocode.shared.enums.GeschlechtE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.DatenQuelleE
|
||||
import at.mocode.enums.GeschlechtE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
import at.mocode.shared.enums.DatenQuelleE
|
||||
import at.mocode.shared.enums.PferdeGeschlechtE // NEUES ENUM
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.DatenQuelleE
|
||||
import at.mocode.enums.PferdeGeschlechtE // NEUES ENUM
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package at.mocode.shared.model.domaene
|
||||
package at.mocode.model.domaene
|
||||
|
||||
import at.mocode.shared.enums.DatenQuelleE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.DatenQuelleE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package at.mocode.shared.model.oeto_verwaltung
|
||||
package at.mocode.model.oeto_verwaltung
|
||||
|
||||
import at.mocode.shared.enums.SparteE // Optional, falls Altersklassen stark spartenspezifisch sind
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.SparteE // Optional, falls Altersklassen stark spartenspezifisch sind
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package at.mocode.shared.model.oeto_verwaltung
|
||||
package at.mocode.model.oeto_verwaltung
|
||||
|
||||
import at.mocode.shared.enums.LizenzKategorieE
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.enums.VerbandE // Wiederverwendung von VerbandE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.LizenzKategorieE
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.enums.VerbandE // Wiederverwendung von VerbandE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package at.mocode.shared.model.oeto_verwaltung
|
||||
package at.mocode.model.oeto_verwaltung
|
||||
|
||||
import at.mocode.shared.enums.RegelwerkTypE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.RegelwerkTypE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package at.mocode.shared.model.oeto_verwaltung
|
||||
package at.mocode.model.oeto_verwaltung
|
||||
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.enums.VerbandE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.enums.VerbandE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package at.mocode.shared.model.oeto_verwaltung
|
||||
package at.mocode.model.oeto_verwaltung
|
||||
|
||||
import at.mocode.shared.enums.*
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.*
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package at.mocode.shared.model.stammdaten
|
||||
package at.mocode.model.stammdaten
|
||||
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package at.mocode.shared.model.stammdaten
|
||||
package at.mocode.model.stammdaten
|
||||
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import at.mocode.shared.enums.PlatzTypE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.PlatzTypE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+7
-8
@@ -1,11 +1,10 @@
|
||||
import at.mocode.shared.enums.BeginnzeitTypE
|
||||
import at.mocode.shared.enums.PlatzTypE
|
||||
import at.mocode.shared.model.DotierungsAbstufung
|
||||
import at.mocode.shared.serializers.BigDecimalSerializer
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalTimeSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.BeginnzeitTypE
|
||||
import at.mocode.model.DotierungsAbstufung
|
||||
import at.mocode.serializers.BigDecimalSerializer
|
||||
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 com.benasher44.uuid.uuid4
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import at.mocode.shared.enums.BeginnzeitTypE
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.serializers.*
|
||||
import at.mocode.enums.BeginnzeitTypE
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.serializers.*
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
+7
-8
@@ -1,11 +1,10 @@
|
||||
import at.mocode.shared.enums.EventStatusE
|
||||
import at.mocode.shared.enums.NennungsArtE
|
||||
import at.mocode.shared.enums.RegelwerkTypE
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateTimeSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.EventStatusE
|
||||
import at.mocode.enums.RegelwerkTypE
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateTimeSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
+5
-5
@@ -1,9 +1,9 @@
|
||||
package at.mocode.shared.model.veranstaltung
|
||||
package at.mocode.model.veranstaltung
|
||||
|
||||
import at.mocode.shared.enums.EventStatusE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.EventStatusE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+2
-8
@@ -1,13 +1,7 @@
|
||||
import at.mocode.shared.enums.CupSerieTypE
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.serializers.BigDecimalSerializer
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.serializers.BigDecimalSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
import at.mocode.shared.enums.CupSerieTypE
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.CupSerieTypE
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
import at.mocode.shared.enums.PruefungsViereckE
|
||||
import at.mocode.shared.enums.RichterPositionE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.PruefungsViereckE
|
||||
import at.mocode.enums.RichterPositionE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.datetime.Instant
|
||||
+3
-3
@@ -1,6 +1,6 @@
|
||||
import at.mocode.shared.enums.ArtDesStechensE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.ArtDesStechensE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.datetime.Instant
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package at.mocode.shared.model.zns_staging
|
||||
package at.mocode.model.zns_staging
|
||||
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.serialization.Serializable
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package at.mocode.shared.model.zns_staging
|
||||
package at.mocode.model.zns_staging
|
||||
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.serialization.Serializable
|
||||
+2
-2
@@ -1,6 +1,6 @@
|
||||
package at.mocode.shared.model.zns_staging
|
||||
package at.mocode.model.zns_staging
|
||||
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.serialization.Serializable
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
package at.mocode.shared.serializers
|
||||
package at.mocode.serializers
|
||||
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuidFrom
|
||||
@@ -1,64 +0,0 @@
|
||||
package at.mocode.shared.model
|
||||
|
||||
import at.mocode.shared.enums.NennungsArtE
|
||||
import at.mocode.shared.serializers.BigDecimalSerializer
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateTimeSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import com.ionspin.kotlin.bignum.decimal.BigDecimal
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlinx.datetime.Instant
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.datetime.LocalDateTime
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
@Serializable
|
||||
data class Turnier(
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
val id: Uuid = uuid4(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var veranstaltungId: Uuid,
|
||||
var oepsTurnierNr: String,
|
||||
var titel: String,
|
||||
var untertitel: String?,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
var datumVon: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateSerializer::class)
|
||||
var datumBis: LocalDate,
|
||||
@Serializable(with = KotlinLocalDateTimeSerializer::class) // Beispiel
|
||||
var nennungsschluss: LocalDateTime?,
|
||||
var nennungsArt: List<NennungsArtE> = emptyList(),
|
||||
var nennungsHinweis: String?,
|
||||
var eigenesNennsystemUrl: String?,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
var nenngeld: BigDecimal?,
|
||||
@Serializable(with = BigDecimalSerializer::class)
|
||||
var startgeldStandard: BigDecimal?,
|
||||
var austragungsplaetze: List<Platz> = emptyList(),
|
||||
var vorbereitungsplaetze: List<Platz> = emptyList(),
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var turnierleiterId: Uuid?, // FK zu Person
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var turnierbeauftragterId: Uuid?, // FK zu Person
|
||||
var richterIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(), // Pool Richtern
|
||||
var parcoursbauerIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(), // FKs zu Person
|
||||
var parcoursAssistentIds: List<@Serializable(with = UuidSerializer::class) Uuid> = emptyList(), // FKs zu Person
|
||||
var tierarztInfos: String?,
|
||||
var hufschmiedInfo: String?,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var meldestelleVerantwortlicherId: Uuid?, // FK zu Person
|
||||
var meldestelleTelefon: String?,
|
||||
var meldestelleOeffnungszeiten: String?,
|
||||
var ergebnislistenUrl: String?, // Wird später meist system-generiert
|
||||
var verfuegbareArtikel: List<Artikel> = emptyList(), // Zur Auswahl für die Kassa
|
||||
var meisterschaftRefs: List<MeisterschaftReferenz> = emptyList(),
|
||||
// var cupRefs: List<CupReferenz> = emptyList(),
|
||||
// var sonderpruefungRefs: List<SonderpruefungReferenz> = emptyList(),
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
val createdAt: Instant = Clock.System.now(),
|
||||
@Serializable(with = KotlinInstantSerializer::class)
|
||||
var updatedAt: Instant = Clock.System.now()
|
||||
)
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package at.mocode.shared.stammdaten
|
||||
package at.mocode.stammdaten
|
||||
|
||||
import at.mocode.shared.enums.LizenzTypE
|
||||
import at.mocode.shared.enums.SparteE
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.enums.LizenzTypE
|
||||
import at.mocode.enums.SparteE
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import kotlinx.datetime.LocalDate
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
+6
-6
@@ -1,10 +1,10 @@
|
||||
package at.mocode.shared.stammdaten
|
||||
package at.mocode.stammdaten
|
||||
|
||||
import at.mocode.shared.enums.FunktionaerRolle
|
||||
import at.mocode.shared.enums.GeschlechtE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.FunktionaerRolle
|
||||
import at.mocode.enums.GeschlechtE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.KotlinLocalDateSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+4
-4
@@ -1,8 +1,8 @@
|
||||
package at.mocode.shared.stammdaten
|
||||
package at.mocode.stammdaten
|
||||
|
||||
import at.mocode.shared.enums.GeschlechtPferdE
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.enums.GeschlechtPferdE
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
+3
-3
@@ -1,7 +1,7 @@
|
||||
package at.mocode.shared.stammdaten
|
||||
package at.mocode.stammdaten
|
||||
|
||||
import at.mocode.shared.serializers.KotlinInstantSerializer
|
||||
import at.mocode.shared.serializers.UuidSerializer
|
||||
import at.mocode.serializers.KotlinInstantSerializer
|
||||
import at.mocode.serializers.UuidSerializer
|
||||
import com.benasher44.uuid.Uuid
|
||||
import com.benasher44.uuid.uuid4
|
||||
import kotlinx.datetime.Clock
|
||||
Reference in New Issue
Block a user