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:
@@ -63,15 +63,25 @@ model StockAdjustment {
|
||||
model StockReservation {
|
||||
id Int @id @default(autoincrement())
|
||||
quantity Decimal @db.Decimal(10, 0)
|
||||
expiresAt DateTime @db.Timestamp(0)
|
||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||
productId Int
|
||||
inventoryId Int
|
||||
orderId Int
|
||||
inventory Inventory @relation(fields: [inventoryId], references: [id])
|
||||
product Product @relation(fields: [productId], references: [id])
|
||||
order Order @relation(fields: [orderId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([inventoryId])
|
||||
@@index([productId])
|
||||
@@map("Stock_Reservations")
|
||||
}
|
||||
|
||||
view StockAvailableView {
|
||||
productId Int
|
||||
inventoryId Int
|
||||
physicalQuantity Decimal @db.Decimal(10, 0)
|
||||
reservedQuantity Decimal @db.Decimal(10, 0)
|
||||
availableQuantity Decimal @db.Decimal(10, 0)
|
||||
|
||||
@@map("Stock_Available_View")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user