Mobilfunk: Feld "Mobilfunknetz" unter Anbieter & Tarif

Neues Dropdown "Mobilfunknetz" in der Anbieter-&-Tarif-Karte, nur
sichtbar bei Vertragstyp Mobilfunk. Optionen: Bitte auswählen (leer),
Telekom, Vodafone, Telefónica.

Neues Feld MobileContractDetails.mobileNetwork (String nullable,
speichert TELEKOM/VODAFONE/TELEFONICA) + idempotente Migration
(ADD COLUMN IF NOT EXISTS). String statt Enum, damit weitere Netze
ohne Migration ergänzbar sind. Anzeige in der Vertragsansicht mit
lesbarem Netz-Namen.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-07-27 13:07:56 +02:00
co-authored by Claude Opus 4.7
parent 8508bdc38e
commit 8eb3790e7b
7 changed files with 45 additions and 0 deletions
@@ -0,0 +1,6 @@
-- Mobilfunknetz pro Mobilfunkvertrag (TELEKOM | VODAFONE | TELEFONICA,
-- NULL = nicht gewählt). String statt Enum, damit weitere Netze ohne
-- Migration ergänzbar sind.
ALTER TABLE `MobileContractDetails`
ADD COLUMN IF NOT EXISTS `mobileNetwork` VARCHAR(191) NULL;
+4
View File
@@ -970,6 +970,10 @@ model MobileContractDetails {
contractId Int @unique
contract Contract @relation(fields: [contractId], references: [id], onDelete: Cascade)
requiresMultisim Boolean @default(false) // Multisim erforderlich?
// Physisches Mobilfunknetz, auf dem der Tarif läuft: TELEKOM | VODAFONE
// | TELEFONICA (null = nicht gewählt). Als String statt Enum gehalten,
// damit weitere Netze ohne Migration ergänzbar sind.
mobileNetwork String?
dataVolume Float?
includedMinutes Int?
includedSMS Int?
+2
View File
@@ -279,6 +279,7 @@ interface ContractCreateData {
};
mobileDetails?: {
requiresMultisim?: boolean;
mobileNetwork?: string | null;
dataVolume?: number;
includedMinutes?: number;
includedSMS?: number;
@@ -386,6 +387,7 @@ export async function createContract(data: ContractCreateData) {
mobileDetails: {
create: {
requiresMultisim: mobileDetails.requiresMultisim,
mobileNetwork: mobileDetails.mobileNetwork ?? null,
dataVolume: mobileDetails.dataVolume,
includedMinutes: mobileDetails.includedMinutes,
includedSMS: mobileDetails.includedSMS,