docs: add class diagram for core entities in C4 architecture
- Created `class_diagram_core.drawio` to visualize core domain entities (`Veranstaltung`, `Platz`, `Turnier`, etc.). - Included relationships and associations between entities such as 1:N and reference mappings. - Structured diagram to align with Clean Architecture principles for better domain comprehension.
This commit is contained in:
+18
-4
@@ -2,6 +2,7 @@
|
||||
|
||||
package at.mocode.events.domain.model
|
||||
|
||||
import at.mocode.core.domain.model.ReglementE
|
||||
import at.mocode.core.domain.model.SparteE
|
||||
import at.mocode.core.domain.model.TeilnehmerKreisE
|
||||
import at.mocode.core.domain.model.TurnierkategorieE
|
||||
@@ -26,11 +27,17 @@ import kotlin.uuid.Uuid
|
||||
* @property turnierId Eindeutige interne ID (UUID).
|
||||
* @property veranstaltungId Referenz auf die übergeordnete Veranstaltung.
|
||||
* @property name Offizieller Name des Turniers.
|
||||
* @property turnierNummer Offizielle 5-stellige Turniernummer.
|
||||
* @property sparte Sparte des Turniers (Springen, Dressur, Vielseitigkeit, etc.).
|
||||
* @property kategorie Turnierkategorie gemäß ÖTO (CSN-C, CDN, CAN, etc.).
|
||||
* @property reglement Reglement, dem das Turnier unterliegt.
|
||||
* @property datum Datum des Turniers (kann innerhalb der Veranstaltungsdauer liegen).
|
||||
* @property richterObmannId ID des Richter-Obmanns (Referenz auf officials-context).
|
||||
* @property einschraenkungen Einschränkungen des Teilnehmerkreises.
|
||||
* @property turnierbeauftragterId ID des Turnierbeauftragten (TB) (Referenz auf officials-context).
|
||||
* @property parcoursbauerId ID des Parcoursbauers (Referenz auf officials-context, nur Springen).
|
||||
* @property nennschluss Nennschluss (Datum/Uhrzeit).
|
||||
* @property nachnenngebuehrVerlangt Ob Nachnenngebühr verlangt wird.
|
||||
* @property nenntauschboerseAktiv Ob die Nenntauschbörse aktiv ist.
|
||||
* @property status Aktueller Status des Turniers.
|
||||
* @property maxBewerbe Maximale Anzahl an Bewerben (optional, aus Ausschreibung).
|
||||
* @property istMeisterschaft Ob dieses Turnier Meisterschafts-Charakter hat.
|
||||
@@ -52,15 +59,22 @@ data class Turnier(
|
||||
val turnierNummer: String,
|
||||
var sparte: SparteE,
|
||||
var kategorie: TurnierkategorieE,
|
||||
var reglement: ReglementE = ReglementE.OETO,
|
||||
var datum: LocalDate,
|
||||
var einschraenkungen: List<TeilnehmerKreisE> = emptyList(),
|
||||
|
||||
// Funktionäre
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var richterObmannId: Uuid? = null,
|
||||
var turnierbeauftragterId: Uuid? = null,
|
||||
@Serializable(with = UuidSerializer::class)
|
||||
var parcoursbauerId: Uuid? = null,
|
||||
|
||||
// Meldestellen-Flags
|
||||
@Serializable(with = InstantSerializer::class)
|
||||
var nennschluss: Instant? = null,
|
||||
var nachnenngebuehrVerlangt: Boolean = false,
|
||||
var nenntauschboerseAktiv: Boolean = false,
|
||||
|
||||
// Workflow-Status
|
||||
var status: TurnierStatusE = TurnierStatusE.GEPLANT,
|
||||
|
||||
@@ -83,8 +97,8 @@ data class Turnier(
|
||||
*/
|
||||
fun validateFunktionaerBesetzung(): List<String> {
|
||||
val warnings = mutableListOf<String>()
|
||||
if (richterObmannId == null) {
|
||||
warnings.add("Kein Richter-Obmann zugewiesen. Pflichtfeld für Turnierdurchführung (ÖTO).")
|
||||
if (turnierbeauftragterId == null) {
|
||||
warnings.add("Kein Turnierbeauftragter (TB) zugewiesen. Pflichtfeld für Turnierdurchführung (ÖTO).")
|
||||
}
|
||||
if (sparte == SparteE.SPRINGEN && parcoursbauerId == null) {
|
||||
warnings.add("Kein Parcoursbauer zugewiesen. Pflichtfeld für Springturniere (ÖTO).")
|
||||
|
||||
+4
@@ -26,6 +26,8 @@ import kotlin.time.Instant
|
||||
* @property ort Location where the event takes place.
|
||||
* @property veranstalterVereinId ID of the organizing club/association.
|
||||
* @property sparten List of sport disciplines included in this event.
|
||||
* @property austragungsplaetze List of locations/arenas available at this event.
|
||||
* @property artikelPreisliste List of items/services sold by the organizer at this event.
|
||||
* @property istAktiv Whether the event is currently active.
|
||||
* @property istOeffentlich Whether the event is public.
|
||||
* @property maxTeilnehmer Maximum number of participants (optional).
|
||||
@@ -58,6 +60,8 @@ data class Veranstaltung(
|
||||
|
||||
// Event Details
|
||||
var sparten: List<SparteE> = emptyList(),
|
||||
var austragungsplaetze: List<Austragungsplatz> = emptyList(),
|
||||
var artikelPreisliste: List<TurnierArtikel> = emptyList(),
|
||||
var istAktiv: Boolean = true,
|
||||
var istOeffentlich: Boolean = true,
|
||||
var maxTeilnehmer: Int? = null,
|
||||
|
||||
Reference in New Issue
Block a user