Refactor license matrix and tokenizer logic: rename LicenseTable to LizenzTable, replace LicenseMatrixService with LizenzMatrixService, enhance tokenizer with normalized and fallback token handling, improve ZNS import for license extraction, and update related documentation.
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Waiting to run
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Waiting to run
Desktop CI — Headless Tests & Build / Compose Desktop — Tests (headless) & Build (push) Waiting to run
Build and Publish Docker Images / build-and-push (., backend/infrastructure/gateway/Dockerfile, api-gateway, api-gateway) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., backend/services/ping/Dockerfile, ping-service, ping-service) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., config/docker/caddy/web-app/Dockerfile, web-app, web-app) (push) Waiting to run
Build and Publish Docker Images / build-and-push (., config/docker/keycloak/Dockerfile, keycloak, keycloak) (push) Waiting to run
This commit is contained in:
+10
-10
@@ -29,7 +29,7 @@ class ExposedRegulationRepository : RegulationRepository {
|
||||
}
|
||||
|
||||
override suspend fun findAllLicenseMatrixEntries(): List<LicenseMatrixEntry> = DatabaseFactory.dbQuery {
|
||||
LicenseTable.selectAll()
|
||||
LizenzTable.selectAll()
|
||||
.map { it.toLicenseMatrixEntry() }
|
||||
}
|
||||
|
||||
@@ -89,15 +89,15 @@ class ExposedRegulationRepository : RegulationRepository {
|
||||
)
|
||||
|
||||
private fun ResultRow.toLicenseMatrixEntry() = LicenseMatrixEntry(
|
||||
licenseId = this[LicenseTable.id],
|
||||
sparte = SparteE.valueOf(this[LicenseTable.sparte]),
|
||||
lizenzKlasse = ReiterLizenzKlasseE.valueOf(this[LicenseTable.lizenzKlasse]),
|
||||
maxTurnierklasseCode = this[LicenseTable.maxTurnierklasseCode],
|
||||
validFrom = this[LicenseTable.validFrom].toKtInstant(),
|
||||
validTo = this[LicenseTable.validTo]?.toOptionalKtInstant(),
|
||||
istAktiv = this[LicenseTable.istAktiv],
|
||||
createdAt = this[LicenseTable.createdAt].toKtInstant(),
|
||||
updatedAt = this[LicenseTable.updatedAt].toKtInstant()
|
||||
licenseId = this[LizenzTable.id],
|
||||
sparte = SparteE.valueOf(this[LizenzTable.sparte]),
|
||||
lizenzKlasse = ReiterLizenzKlasseE.valueOf(this[LizenzTable.lizenzKlasse]),
|
||||
maxTurnierklasseCode = this[LizenzTable.maxTurnierklasseCode],
|
||||
validFrom = this[LizenzTable.validFrom].toKtInstant(),
|
||||
validTo = this[LizenzTable.validTo]?.toOptionalKtInstant(),
|
||||
istAktiv = this[LizenzTable.istAktiv],
|
||||
createdAt = this[LizenzTable.createdAt].toKtInstant(),
|
||||
updatedAt = this[LizenzTable.updatedAt].toKtInstant()
|
||||
)
|
||||
|
||||
private fun ResultRow.toRichtverfahrenDefinition() = RichtverfahrenDefinition(
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@ import org.jetbrains.exposed.v1.datetime.timestamp
|
||||
* Exposed-Tabellendefinition für die Lizenz-Matrix (Reiter-Lizenz vs. Turnierklasse).
|
||||
* Basierend auf ÖTO 2026.
|
||||
*/
|
||||
object LicenseTable : Table("license_matrix") {
|
||||
object LizenzTable : Table("license_matrix") {
|
||||
val id = uuid("license_id")
|
||||
val sparte = varchar("sparte", 20) // DRESSUR, SPRINGEN, ALLGEMEIN
|
||||
val lizenzKlasse = varchar("lizenz_klasse", 20) // R1, R2, R3, RD1, RD2, RD3, LF
|
||||
+6
-6
@@ -4,21 +4,21 @@ package at.mocode.masterdata.infrastructure.persistence.reiter
|
||||
|
||||
import at.mocode.core.utils.database.DatabaseFactory
|
||||
import at.mocode.masterdata.domain.model.FahrLizenz
|
||||
import at.mocode.masterdata.domain.model.ReitLizenz
|
||||
import at.mocode.masterdata.domain.model.Reiterlizenz
|
||||
import at.mocode.masterdata.domain.model.Startkarte
|
||||
import at.mocode.masterdata.domain.repository.MasterdataLicenseRepository
|
||||
import at.mocode.masterdata.domain.repository.LizenzRepository
|
||||
import org.jetbrains.exposed.v1.core.eq
|
||||
import org.jetbrains.exposed.v1.jdbc.selectAll
|
||||
|
||||
/**
|
||||
* Exposed-basierte Implementierung des MasterdataLicenseRepository.
|
||||
* Exposed-basierte Implementierung des LizenzRepository.
|
||||
*/
|
||||
class MasterdataLicenseExposedRepository : MasterdataLicenseRepository {
|
||||
class MasterdataLicenseExposedRepository : LizenzRepository {
|
||||
|
||||
override suspend fun findReitLizenzByCode(code: String): ReitLizenz? = DatabaseFactory.dbQuery {
|
||||
override suspend fun findReitLizenzByCode(code: String): Reiterlizenz? = DatabaseFactory.dbQuery {
|
||||
ReitLizenzenTable.selectAll().where { ReitLizenzenTable.code eq code }
|
||||
.map {
|
||||
ReitLizenz(
|
||||
Reiterlizenz(
|
||||
lizenzId = it[ReitLizenzenTable.id],
|
||||
code = it[ReitLizenzenTable.code],
|
||||
bezeichnung = it[ReitLizenzenTable.bezeichnung],
|
||||
|
||||
+2
-2
@@ -29,7 +29,7 @@ class RegulationSeedVerificationTest {
|
||||
transaction {
|
||||
SchemaUtils.create(
|
||||
TurnierKlassenTable,
|
||||
LicenseTable,
|
||||
LizenzTable,
|
||||
RichtverfahrenTable,
|
||||
GebuehrTable,
|
||||
RegulationConfigTable,
|
||||
@@ -71,7 +71,7 @@ class RegulationSeedVerificationTest {
|
||||
|
||||
@Test
|
||||
fun `verify domain logic with simulated oeto data`() {
|
||||
val service = at.mocode.masterdata.domain.service.LicenseMatrixServiceImpl()
|
||||
val service = at.mocode.masterdata.domain.service.LizenzMatrixServiceImpl()
|
||||
val now = Clock.System.now()
|
||||
|
||||
val oetoMatrix = listOf(
|
||||
|
||||
Reference in New Issue
Block a user