chore: remove deprecated horses, clubs, officials, and persons services
- Deleted obsolete modules related to horses, clubs, officials, and persons services, including their configurations, build files, and database provisioning scripts. - Cleaned up associated references in the project structure (e.g., `settings.gradle.kts`). - Removed unused database tables and Spring beans related to these domains. Signed-off-by: Stefan Mogeritsch <stefan.mo.co@gmail.com>
This commit is contained in:
@@ -3,8 +3,9 @@ plugins {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(projects.masterdata.masterdataDomain)
|
||||
implementation(projects.backend.services.masterdata.masterdataDomain)
|
||||
implementation(projects.core.coreDomain)
|
||||
implementation(projects.core.coreUtils)
|
||||
implementation(libs.kotlinx.datetime)
|
||||
testImplementation(projects.platform.platformTesting)
|
||||
}
|
||||
|
||||
+2
-2
@@ -7,7 +7,7 @@ import at.mocode.masterdata.domain.repository.AltersklasseRepository
|
||||
import at.mocode.core.domain.model.ValidationResult
|
||||
import at.mocode.core.domain.model.ValidationError
|
||||
import kotlin.uuid.Uuid
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlin.time.Clock
|
||||
|
||||
/**
|
||||
* Use case for creating and updating age class information.
|
||||
@@ -209,7 +209,7 @@ class CreateAltersklasseUseCase(
|
||||
}
|
||||
|
||||
/**
|
||||
* Validates a create age class request.
|
||||
* Validates a creation age class request.
|
||||
*/
|
||||
private fun validateCreateRequest(request: CreateAltersklasseRequest): ValidationResult {
|
||||
val errors = mutableListOf<ValidationError>()
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import at.mocode.masterdata.domain.repository.BundeslandRepository
|
||||
import at.mocode.core.domain.model.ValidationResult
|
||||
import at.mocode.core.domain.model.ValidationError
|
||||
import kotlin.uuid.Uuid
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlin.time.Clock
|
||||
|
||||
/**
|
||||
* Use case for creating and updating federal state information.
|
||||
|
||||
+1
-1
@@ -6,7 +6,7 @@ import at.mocode.masterdata.domain.repository.LandRepository
|
||||
import at.mocode.core.domain.model.ValidationResult
|
||||
import at.mocode.core.domain.model.ValidationError
|
||||
import kotlin.uuid.Uuid
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlin.time.Clock
|
||||
|
||||
/**
|
||||
* Use case for creating and updating country information.
|
||||
|
||||
+1
-1
@@ -7,7 +7,7 @@ import at.mocode.masterdata.domain.repository.PlatzRepository
|
||||
import at.mocode.core.domain.model.ValidationResult
|
||||
import at.mocode.core.domain.model.ValidationError
|
||||
import kotlin.uuid.Uuid
|
||||
import kotlinx.datetime.Clock
|
||||
import kotlin.time.Clock
|
||||
|
||||
/**
|
||||
* Use case for creating and updating venue/arena information.
|
||||
|
||||
+10
-4
@@ -22,10 +22,13 @@ class GetAltersklasseUseCase(
|
||||
* @param altersklasseId The unique identifier of the age class
|
||||
* @return The age class if found, null otherwise
|
||||
*/
|
||||
suspend fun getById(altersklasseId: Uuid): AltersklasseDefinition? {
|
||||
return altersklasseRepository.findById(altersklasseId)
|
||||
suspend fun getById(altersklasseId: Uuid): GetAltersklasseResponse {
|
||||
val altersklasse = altersklasseRepository.findById(altersklasseId)
|
||||
return GetAltersklasseResponse(altersklasse = altersklasse)
|
||||
}
|
||||
|
||||
data class GetAltersklasseResponse(val altersklasse: AltersklasseDefinition?)
|
||||
|
||||
/**
|
||||
* Retrieves an age class by its code.
|
||||
*
|
||||
@@ -57,13 +60,16 @@ class GetAltersklasseUseCase(
|
||||
* @param geschlechtFilter Optional filter by gender ('M', 'W')
|
||||
* @return List of active age classes
|
||||
*/
|
||||
suspend fun getAllActive(sparteFilter: SparteE? = null, geschlechtFilter: Char? = null): List<AltersklasseDefinition> {
|
||||
suspend fun getAllActive(sparteFilter: SparteE? = null, geschlechtFilter: Char? = null): GetAltersklassenResponse {
|
||||
geschlechtFilter?.let { gender ->
|
||||
require(gender == 'M' || gender == 'W') { "Gender filter must be 'M' or 'W'" }
|
||||
}
|
||||
return altersklasseRepository.findAllActive(sparteFilter, geschlechtFilter)
|
||||
val altersklassen = altersklasseRepository.findAllActive(sparteFilter, geschlechtFilter)
|
||||
return GetAltersklassenResponse(altersklassen = altersklassen)
|
||||
}
|
||||
|
||||
data class GetAltersklassenResponse(val altersklassen: List<AltersklasseDefinition>)
|
||||
|
||||
/**
|
||||
* Finds age classes applicable for a specific age.
|
||||
*
|
||||
|
||||
+17
-20
@@ -21,10 +21,13 @@ class GetBundeslandUseCase(
|
||||
* @param bundeslandId The unique identifier of the federal state
|
||||
* @return The federal state if found, null otherwise
|
||||
*/
|
||||
suspend fun getById(bundeslandId: Uuid): BundeslandDefinition? {
|
||||
return bundeslandRepository.findById(bundeslandId)
|
||||
suspend fun getById(bundeslandId: Uuid): GetBundeslandResponse {
|
||||
val bundesland = bundeslandRepository.findById(bundeslandId)
|
||||
return GetBundeslandResponse(bundesland = bundesland)
|
||||
}
|
||||
|
||||
data class GetBundeslandResponse(val bundesland: BundeslandDefinition?)
|
||||
|
||||
/**
|
||||
* Retrieves a federal state by its OEPS code for a specific country.
|
||||
*
|
||||
@@ -56,22 +59,13 @@ class GetBundeslandUseCase(
|
||||
* @param orderBySortierung Whether to order by sortierReihenfolge field (default: true)
|
||||
* @return List of federal states for the country
|
||||
*/
|
||||
suspend fun getByCountry(landId: Uuid, activeOnly: Boolean = true, orderBySortierung: Boolean = true): List<BundeslandDefinition> {
|
||||
return bundeslandRepository.findByCountry(landId, activeOnly, orderBySortierung)
|
||||
}
|
||||
|
||||
/**
|
||||
* Searches for federal states by name (partial match).
|
||||
*
|
||||
* @param searchTerm The search term to match against federal state names
|
||||
* @param landId Optional country ID to limit search
|
||||
* @param limit Maximum number of results to return (default: 50)
|
||||
* @return List of matching federal states
|
||||
*/
|
||||
suspend fun searchByName(searchTerm: String, landId: Uuid? = null, limit: Int = 50): List<BundeslandDefinition> {
|
||||
require(searchTerm.isNotBlank()) { "Search term cannot be blank" }
|
||||
require(limit > 0) { "Limit must be positive" }
|
||||
return bundeslandRepository.findByName(searchTerm.trim(), landId, limit)
|
||||
suspend fun getByCountry(
|
||||
landId: Uuid,
|
||||
activeOnly: Boolean = true,
|
||||
orderBySortierung: Boolean = true
|
||||
): GetBundeslaenderResponse {
|
||||
val bundeslaender = bundeslandRepository.findByCountry(landId, activeOnly, orderBySortierung)
|
||||
return GetBundeslaenderResponse(bundeslaender = bundeslaender)
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -80,10 +74,13 @@ class GetBundeslandUseCase(
|
||||
* @param orderBySortierung Whether to order by sortierReihenfolge field (default: true)
|
||||
* @return List of active federal states
|
||||
*/
|
||||
suspend fun getAllActive(orderBySortierung: Boolean = true): List<BundeslandDefinition> {
|
||||
return bundeslandRepository.findAllActive(orderBySortierung)
|
||||
suspend fun getAllActive(orderBySortierung: Boolean = true): GetBundeslaenderResponse {
|
||||
val bundeslaender = bundeslandRepository.findAllActive(orderBySortierung)
|
||||
return GetBundeslaenderResponse(bundeslaender = bundeslaender)
|
||||
}
|
||||
|
||||
data class GetBundeslaenderResponse(val bundeslaender: List<BundeslandDefinition>)
|
||||
|
||||
/**
|
||||
* Checks if a federal state with the given OEPS code exists for a country.
|
||||
*
|
||||
|
||||
+10
-4
@@ -21,10 +21,13 @@ class GetCountryUseCase(
|
||||
* @param countryId The unique identifier of the country
|
||||
* @return The country if found, null otherwise
|
||||
*/
|
||||
suspend fun getById(countryId: Uuid): LandDefinition? {
|
||||
return landRepository.findById(countryId)
|
||||
suspend fun getById(countryId: Uuid): GetCountryResponse {
|
||||
val country = landRepository.findById(countryId)
|
||||
return GetCountryResponse(country = country)
|
||||
}
|
||||
|
||||
data class GetCountryResponse(val country: LandDefinition?)
|
||||
|
||||
/**
|
||||
* Retrieves a country by its ISO Alpha-2 code.
|
||||
*
|
||||
@@ -66,10 +69,13 @@ class GetCountryUseCase(
|
||||
* @param orderBySortierung Whether to order by sortierReihenfolge field (default: true)
|
||||
* @return List of active countries
|
||||
*/
|
||||
suspend fun getAllActive(orderBySortierung: Boolean = true): List<LandDefinition> {
|
||||
return landRepository.findAllActive(orderBySortierung)
|
||||
suspend fun getAllActive(orderBySortierung: Boolean = true): GetCountriesResponse {
|
||||
val countries = landRepository.findAllActive(orderBySortierung)
|
||||
return GetCountriesResponse(countries = countries)
|
||||
}
|
||||
|
||||
data class GetCountriesResponse(val countries: List<LandDefinition>)
|
||||
|
||||
/**
|
||||
* Retrieves all EU member countries.
|
||||
*
|
||||
|
||||
+14
-4
@@ -22,10 +22,13 @@ class GetPlatzUseCase(
|
||||
* @param platzId The unique identifier of the venue
|
||||
* @return The venue if found, null otherwise
|
||||
*/
|
||||
suspend fun getById(platzId: Uuid): Platz? {
|
||||
return platzRepository.findById(platzId)
|
||||
suspend fun getById(platzId: Uuid): GetPlatzResponse {
|
||||
val platz = platzRepository.findById(platzId)
|
||||
return GetPlatzResponse(platz = platz)
|
||||
}
|
||||
|
||||
data class GetPlatzResponse(val platz: Platz?)
|
||||
|
||||
/**
|
||||
* Retrieves all venues for a specific tournament.
|
||||
*
|
||||
@@ -34,10 +37,17 @@ class GetPlatzUseCase(
|
||||
* @param orderBySortierung Whether to order by sortierReihenfolge field (default: true)
|
||||
* @return List of venues for the tournament
|
||||
*/
|
||||
suspend fun getByTournament(turnierId: Uuid, activeOnly: Boolean = true, orderBySortierung: Boolean = true): List<Platz> {
|
||||
return platzRepository.findByTournament(turnierId, activeOnly, orderBySortierung)
|
||||
suspend fun getByTournament(
|
||||
turnierId: Uuid,
|
||||
activeOnly: Boolean = true,
|
||||
orderBySortierung: Boolean = true
|
||||
): GetPlaetzeResponse {
|
||||
val plaetze = platzRepository.findByTournament(turnierId, activeOnly, orderBySortierung)
|
||||
return GetPlaetzeResponse(plaetze = plaetze)
|
||||
}
|
||||
|
||||
data class GetPlaetzeResponse(val plaetze: List<Platz>)
|
||||
|
||||
/**
|
||||
* Searches for venues by name (partial match).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user