update pos consumer module
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
model Customer {
|
||||
id String @id @default(uuid())
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
type CustomerType
|
||||
complex_id String
|
||||
is_favorite Boolean? @default(false)
|
||||
|
||||
sales_invoices SalesInvoice[]
|
||||
customerIndividuals CustomerIndividual?
|
||||
customerLegals CustomerLegal?
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
|
||||
sales_invoices SalesInvoice[]
|
||||
customer_individuals CustomerIndividual?
|
||||
customer_legals CustomerLegal?
|
||||
|
||||
@@map("customers")
|
||||
}
|
||||
@@ -24,6 +24,7 @@ model CustomerIndividual {
|
||||
complex_id String
|
||||
|
||||
customer Customer @relation(fields: [customer_id], references: [id])
|
||||
complex Complex @relation(fields: [complex_id], references: [id])
|
||||
|
||||
@@unique([complex_id, national_id])
|
||||
@@map("customer_individuals")
|
||||
@@ -38,6 +39,7 @@ model CustomerLegal {
|
||||
complex_id String
|
||||
|
||||
customer Customer @relation(fields: [customer_id], references: [id])
|
||||
complex Complex @relation(fields: [complex_id], references: [id])
|
||||
|
||||
@@unique([complex_id, registration_number])
|
||||
@@map("customer_legal")
|
||||
|
||||
@@ -10,9 +10,11 @@ model SalesInvoice {
|
||||
|
||||
customer_id String?
|
||||
account_id String
|
||||
complex_id String
|
||||
pos_id String
|
||||
|
||||
customer Customer? @relation(fields: [customer_id], references: [id])
|
||||
pos Pos @relation(fields: [pos_id], references: [id])
|
||||
account ConsumerAccount @relation(fields: [account_id], references: [id])
|
||||
items SalesInvoiceItem[]
|
||||
payments SalesInvoicePayment[]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user