feat(billing): introduce billing domain and service infrastructure

- **Billing Domain:**
  - Added Kotlin Multiplatform project with domain models (`TeilnehmerKonto`, `Buchung`, `BuchungsTyp`) to represent billing entities.
  - Defined serialization strategies using `InstantSerializer`.

- **Service Implementation:**
  - Introduced `BillingServiceApplication` as the main entry point for the billing service.
  - Developed `TeilnehmerKontoService` for account management and transactions.

- **Persistence Layer:**
  - Implemented Exposed repositories (`ExposedTeilnehmerKontoRepository`, `ExposedBillingRepositories`) for database interaction.
  - Added table definitions (`TeilnehmerKontoTable`, `BuchungTable`) with indexes for efficient querying.

- **Build Configuration:**
  - Setup Gradle build files for billing domain and service modules with dependencies for Kotlin, Serialization, Spring Boot, and Exposed.

- **Test Additions:**
  - Extended ZNS importer tests with new scenarios for qualification parsing
This commit is contained in:
2026-04-10 12:18:00 +02:00
parent bab95d14f4
commit 21f3a57e6e
12 changed files with 1237 additions and 5 deletions
@@ -0,0 +1,38 @@
---
type: Journal
status: ACTIVE
owner: Curator
last_update: 2026-04-10
---
# Journal Entry: 2026-04-10 - Billing Service Setup & ZNS Importer Hardening
## 👷 [Backend Developer] / 🏗️ [Lead Architect] / 🧹 [Curator]
### Zusammenfassung der Session
In dieser Session wurde das Fundament für den Kassa-Service (`billing-context`) gelegt und die Robustheit des ZNS-Importers durch zusätzliche Integrationstests für Funktionäre gesteigert.
### Wichtigste Ergebnisse
1. **Billing Service Initialisierung:**
* `billing-service` Modul erstellt und konfiguriert.
* Exposed-Tabellendefinitionen für `TeilnehmerKonto` und `Buchung` implementiert.
* Repository-Schnittstellen (Domain) und Exposed-Implementierungen (Service) erstellt.
* `TeilnehmerKontoService` mit Basis-Logik (Kontoerstellung & Buchungen) implementiert.
2. **ZNS-Importer Hardening:**
* Erweiterung von `ZnsImportServiceTest` um Tests für mehrfache Qualifikationen und die Update-Strategie (Delete+Insert) bei Funktionären (`RICHT01.dat`).
* Alle 11 Integrationstests sind erfolgreich durchgelaufen.
3. **Kompilations-Fixes (Billing):**
* `billing-service` auf korrekte Exposed DSL Syntax (`selectAll().where { ... }`) umgestellt.
* Explizite `transaction { ... }` Blöcke in `TeilnehmerKontoService` eingeführt (da `@Transactional` ohne JPA-Starter nicht verfügbar war).
* Typ-Konsistenz für `Instant` (kotlin.time) in `billing-domain` zur Übereinstimmung mit `core-domain` hergestellt.
### Betroffene Dateien
- `backend/services/billing/` (Neuer SCS-Kontext)
- `backend/infrastructure/zns-importer/src/test/kotlin/at/mocode/zns/importer/ZnsImportServiceTest.kt`
### Nächste Schritte
- Implementierung der REST-API für den Billing-Service (OpenAPI-First).
- Integration des Billing-Services in den `entries-context` (z.B. automatische Buchung von Nenngebühren).
- UI-Anbindung im Frontend für Kontenübersicht und manuelle Buchungen.
---
*Co-authored-by: Junie <junie@jetbrains.com>*