fix: update SupplierLedger model to use correct enum casing and adjust types

feat: enhance PosAccountsService to include inventoryBankAccount details in responses

refactor: modify PosService to return structured inventory and bank account data

chore: remove isSettled field from CreatePurchaseReceiptDto and adjust related logic

feat: add payments selection in SuppliersService for better payment tracking

chore: apply database migrations to adjust decimal types and enforce constraints

chore: create index on Pos_Accounts for improved query performance

feat: define Supplier and SupplierLedger models in Prisma schema for better data management
This commit is contained in:
2025-12-26 22:09:46 +03:30
parent d59be5995d
commit d98507fc1f
35 changed files with 2670 additions and 2802 deletions
+5 -5
View File
@@ -1,14 +1,14 @@
model ProductVariant {
id Int @id @default(autoincrement())
name String @db.VarChar(255)
basePrice Decimal @db.Decimal(10, 2)
salePrice Decimal @db.Decimal(10, 2)
basePrice Decimal @db.Decimal(15, 2)
salePrice Decimal @db.Decimal(15, 2)
description String? @db.Text
barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100)
imageUrl String? @db.VarChar(255)
unit String? @db.VarChar(10)
quantity Decimal? @default(0.00) @db.Decimal(10, 2)
alertQuantity Decimal? @default(5.00) @db.Decimal(10, 2)
quantity Decimal? @default(0.00) @db.Decimal(10, 0)
alertQuantity Decimal? @default(5.00) @db.Decimal(10, 0)
isActive Boolean @default(true)
isFeatured Boolean @default(false)
createdAt DateTime @default(now()) @db.Timestamp(0)
@@ -32,7 +32,7 @@ model Product {
deletedAt DateTime? @db.Timestamp(0)
brandId Int?
categoryId Int?
salePrice Decimal @default(0.00) @db.Decimal(10, 2)
salePrice Decimal @default(0.00) @db.Decimal(15, 0)
inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product")
// productCharges ProductCharge[] @relation("Product_Charges")
variants ProductVariant[] @relation("Product_Variant")