contractnumber provider added, old provider number field only if no previous contact exist

This commit is contained in:
2026-02-08 14:34:56 +01:00
parent 4442ab08b3
commit 06489299d5
30 changed files with 2046 additions and 744 deletions
+7 -4
View File
File diff suppressed because one or more lines are too long
+4
View File
@@ -412,11 +412,15 @@ exports.Prisma.ContractScalarFieldEnum = {
cancellationPeriodId: 'cancellationPeriodId',
contractDurationId: 'contractDurationId',
previousContractId: 'previousContractId',
previousProviderId: 'previousProviderId',
previousCustomerNumber: 'previousCustomerNumber',
previousContractNumber: 'previousContractNumber',
providerId: 'providerId',
tariffId: 'tariffId',
providerName: 'providerName',
tariffName: 'tariffName',
customerNumberAtProvider: 'customerNumberAtProvider',
contractNumberAtProvider: 'contractNumberAtProvider',
priceFirst12Months: 'priceFirst12Months',
priceFrom13Months: 'priceFrom13Months',
priceAfter24Months: 'priceAfter24Months',
+1069
View File
File diff suppressed because it is too large Load Diff
+7 -4
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,5 +1,5 @@
{
"name": "prisma-client-05071f627540060c098bd6f9ad2705f280d372ae8cdaf0576ff7e91f8d0f9863",
"name": "prisma-client-ab03eeebd49b41f4edbc7df102e0a7779d814508dbccb860745760460e9e271f",
"main": "index.js",
"types": "index.d.ts",
"browser": "index-browser.js",
+8
View File
@@ -413,6 +413,7 @@ model Provider {
isActive Boolean @default(true)
tariffs Tariff[]
contracts Contract[]
previousContracts Contract[] @relation("PreviousProvider") // Verträge wo dieser Provider Altanbieter ist
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
@@ -509,6 +510,12 @@ model Contract {
previousContract Contract? @relation("ContractHistory", fields: [previousContractId], references: [id])
followUpContract Contract? @relation("ContractHistory")
// Altanbieter-Daten (nur wenn kein Vorgängervertrag existiert)
previousProviderId Int?
previousProvider Provider? @relation("PreviousProvider", fields: [previousProviderId], references: [id])
previousCustomerNumber String? // Kundennummer beim Altanbieter
previousContractNumber String? // Vertragsnummer beim Altanbieter
// Anbieter & Tarif (neue Verknüpfung)
providerId Int?
provider Provider? @relation(fields: [providerId], references: [id])
@@ -519,6 +526,7 @@ model Contract {
providerName String?
tariffName String?
customerNumberAtProvider String?
contractNumberAtProvider String? // Vertragsnummer beim Anbieter
priceFirst12Months String? // Preis erste 12 Monate
priceFrom13Months String? // Preis ab 13. Monat
priceAfter24Months String? // Preis nach 24 Monaten
+4
View File
@@ -412,11 +412,15 @@ exports.Prisma.ContractScalarFieldEnum = {
cancellationPeriodId: 'cancellationPeriodId',
contractDurationId: 'contractDurationId',
previousContractId: 'previousContractId',
previousProviderId: 'previousProviderId',
previousCustomerNumber: 'previousCustomerNumber',
previousContractNumber: 'previousContractNumber',
providerId: 'providerId',
tariffId: 'tariffId',
providerName: 'providerName',
tariffName: 'tariffName',
customerNumberAtProvider: 'customerNumberAtProvider',
contractNumberAtProvider: 'contractNumberAtProvider',
priceFirst12Months: 'priceFirst12Months',
priceFrom13Months: 'priceFrom13Months',
priceAfter24Months: 'priceAfter24Months',