feat: implement POS order management system
- Added CreateOrderDto and CreateOrderItemDto for order creation. - Developed PosOrdersController to handle order-related endpoints. - Created PosOrdersService for business logic related to orders. - Implemented PosOrdersWorkflow for order processing workflows. - Established Prisma integration for database operations in orders. - Introduced SalesInvoicesModule and related DTOs for sales invoice management. - Enhanced SalesInvoicesService and SalesInvoicesWorkflow for invoice processing.
This commit is contained in:
+17
-11
@@ -1,16 +1,22 @@
|
||||
model Order {
|
||||
id Int @id @default(autoincrement())
|
||||
orderNumber String @unique @db.VarChar(100)
|
||||
status OrderStatus @default(PENDING)
|
||||
totalAmount Decimal @db.Decimal(15, 2)
|
||||
description String? @db.Text
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
deletedAt DateTime? @db.Timestamp(0)
|
||||
customerId Int?
|
||||
customer Customer? @relation(fields: [customerId], references: [id], onUpdate: NoAction)
|
||||
orderItems OrderItem[]
|
||||
id Int @id @default(autoincrement())
|
||||
orderNumber String @unique @db.VarChar(100)
|
||||
status OrderStatus @default(PENDING)
|
||||
totalAmount Decimal @db.Decimal(15, 2)
|
||||
description String? @db.Text
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||
deletedAt DateTime? @db.Timestamp(0)
|
||||
customerId Int?
|
||||
posAccountId Int
|
||||
|
||||
customer Customer? @relation(fields: [customerId], references: [id], onUpdate: NoAction)
|
||||
posAccount PosAccount @relation(fields: [posAccountId], references: [id], onUpdate: NoAction)
|
||||
|
||||
orderItems OrderItem[]
|
||||
stockReservations StockReservation[]
|
||||
|
||||
@@index([posAccountId])
|
||||
@@index([customerId])
|
||||
@@map("Orders")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user