Integrate Ktor HTTP clients and repositories for Veranstalter and Turnier features:
- Add `ApiRoutes` for central backend routing configuration. - Implement `DefaultVeranstalterRepository` and `DefaultTurnierRepository` with Ktor clients. - Add domain models (`Turnier`, `Bewerb`, `Abteilung`, `Veranstalter`) and respective repository interfaces. - Replace fake VeranstalterRepository with real implementation. - Update DI with `veranstalterModule` and HTTP client injection. - Simplify TokenProvider and update HttpClient setup (timeouts, retries, logging). - Mark roadmap tasks B-2 as partially complete.
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
package at.mocode.turnier.feature.domain
|
||||
|
||||
data class Abteilung(
|
||||
val id: Long,
|
||||
val bewerbId: Long,
|
||||
val name: String,
|
||||
)
|
||||
|
||||
interface AbteilungRepository {
|
||||
suspend fun list(bewerbId: Long): Result<List<Abteilung>>
|
||||
suspend fun getById(id: Long): Result<Abteilung>
|
||||
suspend fun create(model: Abteilung): Result<Abteilung>
|
||||
suspend fun update(id: Long, model: Abteilung): Result<Abteilung>
|
||||
suspend fun delete(id: Long): Result<Unit>
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package at.mocode.turnier.feature.domain
|
||||
|
||||
data class Bewerb(
|
||||
val id: Long,
|
||||
val turnierId: Long,
|
||||
val name: String,
|
||||
)
|
||||
|
||||
interface BewerbRepository {
|
||||
suspend fun list(turnierId: Long): Result<List<Bewerb>>
|
||||
suspend fun getById(id: Long): Result<Bewerb>
|
||||
suspend fun create(model: Bewerb): Result<Bewerb>
|
||||
suspend fun update(id: Long, model: Bewerb): Result<Bewerb>
|
||||
suspend fun delete(id: Long): Result<Unit>
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package at.mocode.turnier.feature.domain
|
||||
|
||||
data class Turnier(
|
||||
val id: Long,
|
||||
val name: String,
|
||||
)
|
||||
|
||||
interface TurnierRepository {
|
||||
suspend fun list(): Result<List<Turnier>>
|
||||
suspend fun getById(id: Long): Result<Turnier>
|
||||
suspend fun create(model: Turnier): Result<Turnier>
|
||||
suspend fun update(id: Long, model: Turnier): Result<Turnier>
|
||||
suspend fun delete(id: Long): Result<Unit>
|
||||
}
|
||||
Reference in New Issue
Block a user