seperate delivery and billig adresses in contract added
This commit is contained in:
+4
-3
File diff suppressed because one or more lines are too long
+1
@@ -405,6 +405,7 @@ exports.Prisma.ContractScalarFieldEnum = {
|
||||
status: 'status',
|
||||
contractCategoryId: 'contractCategoryId',
|
||||
addressId: 'addressId',
|
||||
billingAddressId: 'billingAddressId',
|
||||
bankCardId: 'bankCardId',
|
||||
identityDocumentId: 'identityDocumentId',
|
||||
salesPlatformId: 'salesPlatformId',
|
||||
|
||||
+712
-79
File diff suppressed because it is too large
Load Diff
+4
-3
File diff suppressed because one or more lines are too long
+1
-1
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "prisma-client-3c4bb688688ba372393d0bf86523c07e8b4de3ff0d9ad23a89f905f15047a1a5",
|
||||
"name": "prisma-client-5918fcf1a24d6a26f6b4fad7137d1ae3a684231bfa7340820c473996737deea6",
|
||||
"main": "index.js",
|
||||
"types": "index.d.ts",
|
||||
"browser": "index-browser.js",
|
||||
|
||||
+20
-14
@@ -148,19 +148,20 @@ enum AddressType {
|
||||
}
|
||||
|
||||
model Address {
|
||||
id Int @id @default(autoincrement())
|
||||
customerId Int
|
||||
customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)
|
||||
type AddressType @default(DELIVERY_RESIDENCE)
|
||||
street String
|
||||
houseNumber String
|
||||
postalCode String
|
||||
city String
|
||||
country String @default("Deutschland")
|
||||
isDefault Boolean @default(false)
|
||||
contracts Contract[]
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
id Int @id @default(autoincrement())
|
||||
customerId Int
|
||||
customer Customer @relation(fields: [customerId], references: [id], onDelete: Cascade)
|
||||
type AddressType @default(DELIVERY_RESIDENCE)
|
||||
street String
|
||||
houseNumber String
|
||||
postalCode String
|
||||
city String
|
||||
country String @default("Deutschland")
|
||||
isDefault Boolean @default(false)
|
||||
contractsAsDelivery Contract[] @relation("DeliveryAddress")
|
||||
contractsAsBilling Contract[] @relation("BillingAddress")
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
}
|
||||
|
||||
// ==================== BANK CARDS ====================
|
||||
@@ -481,8 +482,13 @@ model Contract {
|
||||
contractCategoryId Int?
|
||||
contractCategory ContractCategory? @relation(fields: [contractCategoryId], references: [id])
|
||||
|
||||
// Lieferadresse
|
||||
addressId Int?
|
||||
address Address? @relation(fields: [addressId], references: [id])
|
||||
address Address? @relation("DeliveryAddress", fields: [addressId], references: [id])
|
||||
|
||||
// Rechnungsadresse (falls leer, wird Lieferadresse verwendet)
|
||||
billingAddressId Int?
|
||||
billingAddress Address? @relation("BillingAddress", fields: [billingAddressId], references: [id])
|
||||
|
||||
bankCardId Int?
|
||||
bankCard BankCard? @relation(fields: [bankCardId], references: [id])
|
||||
|
||||
+1
@@ -405,6 +405,7 @@ exports.Prisma.ContractScalarFieldEnum = {
|
||||
status: 'status',
|
||||
contractCategoryId: 'contractCategoryId',
|
||||
addressId: 'addressId',
|
||||
billingAddressId: 'billingAddressId',
|
||||
bankCardId: 'bankCardId',
|
||||
identityDocumentId: 'identityDocumentId',
|
||||
salesPlatformId: 'salesPlatformId',
|
||||
|
||||
Reference in New Issue
Block a user