update pos consumer module

This commit is contained in:
2026-03-29 18:06:41 +03:30
parent 63fa2bc67e
commit c870a43e35
53 changed files with 2145 additions and 671 deletions
+9 -7
View File
@@ -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")
+3 -1
View File
@@ -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[]