af9695e23c
- Removed old supplier DTOs and controller, replacing them with new implementations. - Introduced new CreateSupplierDto and UpdateSupplierDto in the index directory. - Updated SuppliersController to handle new routes and methods. - Implemented SuppliersService with updated logic for creating, finding, updating, and removing suppliers. - Added new invoices module with corresponding controller and service for handling invoice-related operations. - Created new DTOs for handling receipt payments and updated the service to manage payment creation and retrieval. - Updated Prisma migrations to reflect changes in the database schema, including dropping unnecessary columns.
471 lines
62 KiB
TypeScript
471 lines
62 KiB
TypeScript
|
|
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
/* eslint-disable */
|
|
// biome-ignore-all lint: generated file
|
|
// @ts-nocheck
|
|
/*
|
|
* WARNING: This is an internal file that is subject to change!
|
|
*
|
|
* 🛑 Under no circumstances should you import this file directly! 🛑
|
|
*
|
|
* Please import the `PrismaClient` class from the `client.ts` file instead.
|
|
*/
|
|
|
|
import * as runtime from "@prisma/client/runtime/client"
|
|
import type * as Prisma from "./prismaNamespace.js"
|
|
|
|
|
|
const config: runtime.GetPrismaClientConfig = {
|
|
"previewFeatures": [],
|
|
"clientVersion": "7.1.0",
|
|
"engineVersion": "ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba",
|
|
"activeProvider": "mysql",
|
|
"inlineSchema": "model User {\n id Int @id @default(autoincrement())\n mobileNumber String @unique @db.Char(11)\n password String\n firstName String\n lastName String\n roleId Int\n createdAt DateTime @default(now()) @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n refreshTokens RefreshToken[]\n role Role @relation(\"User_Role\", fields: [roleId], references: [id], onUpdate: NoAction)\n\n @@index([roleId], map: \"Users_roleId_fkey\")\n @@map(\"Users\")\n}\n\nmodel Role {\n id Int @id @default(autoincrement())\n name String @unique @db.VarChar(100)\n description String? @db.Text\n permissions Json?\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n users User[] @relation(\"User_Role\")\n\n @@map(\"Roles\")\n}\n\nmodel OtpCode {\n id Int @id @default(autoincrement())\n mobileNumber String @db.VarChar(20)\n code String @db.VarChar(10)\n used Boolean @default(false)\n expiresAt DateTime @db.Timestamp(0)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n\n @@index([mobileNumber])\n @@map(\"Otp_Codes\")\n}\n\nmodel RefreshToken {\n id Int @id @default(autoincrement())\n tokenHash String @db.VarChar(255)\n userId Int\n revoked Boolean @default(false)\n expiresAt DateTime @db.Timestamp(0)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n user User @relation(fields: [userId], references: [id])\n\n @@index([userId])\n @@map(\"Refresh_Tokens\")\n}\n\nmodel BankBranch {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n code String @unique() @db.VarChar(10)\n address String? @db.VarChar(500)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n bankId Int\n\n bank Bank @relation(\"bank_branches\", fields: [bankId], references: [id])\n bankAccounts BankAccount[] @relation(\"Bank_Accounts_branchId_fkey\")\n\n @@map(\"Bank_Branches\")\n}\n\nmodel BankAccount {\n id Int @id @default(autoincrement())\n accountNumber String? @unique @db.VarChar(20)\n cardNumber String? @unique @db.VarChar(16)\n name String @db.VarChar(255)\n iban String? @unique @db.VarChar(34)\n branchId Int\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n\n branch BankBranch @relation(\"Bank_Accounts_branchId_fkey\", fields: [branchId], references: [id])\n inventoryBankAccounts InventoryBankAccount[]\n\n @@map(\"Bank_Accounts\")\n}\n\nenum OrderStatus {\n PENDING\n REJECT\n DONE\n}\n\nenum MovementType {\n IN\n OUT\n ADJUST\n}\n\nenum MovementReferenceType {\n PURCHASE\n SALES\n ADJUSTMENT\n INVENTORY_TRANSFER\n}\n\nenum PaymentMethodType {\n CASH\n CARD\n BANK\n CHECK\n OTHER\n}\n\nenum LedgerSourceType {\n PURCHASE\n PAYMENT\n ADJUSTMENT\n REFUND\n}\n\nenum PaymentType {\n PAYMENT\n REFUND\n}\n\nenum PurchaseReceiptStatus {\n UNPAID\n PARTIALLY_PAID\n PAID\n}\n\nmodel Inventory {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n location String? @db.VarChar(255)\n isActive Boolean @default(true)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n isPointOfSale Boolean @default(false)\n inventoryTransfersFrom InventoryTransfer[] @relation(\"Inventory_From\")\n inventoryTransfersTo InventoryTransfer[] @relation(\"Inventory_To\")\n purchaseReceipts PurchaseReceipt[]\n salesInvoices SalesInvoice[] @relation(\"Inventory_SalesInvoices\")\n stockAdjustments StockAdjustment[] @relation(\"Inventory_Stock_Adjustments\")\n stockBalances StockBalance[] @relation(\"StockBalance_inventory\")\n counterStockMovements StockMovement[] @relation(\"StockMovement_CounterInventory\")\n stockMovements StockMovement[] @relation(\"StockMovement_Inventory\")\n inventoryBankAccounts InventoryBankAccount[]\n\n @@map(\"Inventories\")\n}\n\nmodel InventoryBankAccount {\n inventoryId Int\n bankAccountId Int\n\n inventory Inventory @relation(fields: [inventoryId], references: [id])\n bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])\n posAccounts PosAccount[]\n\n @@id([inventoryId, bankAccountId])\n @@index([bankAccountId])\n @@map(\"Inventory_Bank_Accounts\")\n}\n\nmodel PosAccount {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n code String @unique() @db.VarChar(10)\n description String? @db.VarChar(500)\n bankAccountId Int\n inventoryId Int\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n\n inventoryBankAccount InventoryBankAccount @relation(fields: [inventoryId, bankAccountId], references: [inventoryId, bankAccountId])\n\n @@index([inventoryId])\n @@map(\"Pos_Accounts\")\n}\n\nmodel InventoryTransfer {\n id Int @id @default(autoincrement())\n code String @unique @db.VarChar(100)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n fromInventoryId Int\n toInventoryId Int\n items InventoryTransferItem[] @relation(\"InventoryTransfer_Items\")\n fromInventory Inventory @relation(\"Inventory_From\", fields: [fromInventoryId], references: [id])\n toInventory Inventory @relation(\"Inventory_To\", fields: [toInventoryId], references: [id])\n\n @@index([fromInventoryId], map: \"Inventory_Transfers_fromInventoryId_fkey\")\n @@index([toInventoryId], map: \"Inventory_Transfers_toInventoryId_fkey\")\n @@map(\"Inventory_Transfers\")\n}\n\nmodel InventoryTransferItem {\n id Int @id @default(autoincrement())\n count Decimal @db.Decimal(10, 0)\n productId Int\n transferId Int\n product Product @relation(\"InventoryTransferItem_Product\", fields: [productId], references: [id])\n transfer InventoryTransfer @relation(\"InventoryTransfer_Items\", fields: [transferId], references: [id])\n\n @@index([productId], map: \"Inventory_Transfer_Items_productId_fkey\")\n @@index([transferId], map: \"Inventory_Transfer_Items_transferId_fkey\")\n @@map(\"Inventory_Transfer_Items\")\n}\n\nmodel Bank {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n shortName String @unique() @db.VarChar(3)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n\n bankBranches BankBranch[] @relation(\"bank_branches\")\n\n @@map(\"Banks\")\n}\n\nmodel Customer {\n id Int @id @default(autoincrement())\n firstName String @db.VarChar(255)\n lastName String @db.VarChar(255)\n email String? @db.VarChar(255)\n mobileNumber String @unique @db.Char(11)\n address String? @db.Text\n city String? @db.VarChar(100)\n state String? @db.VarChar(100)\n country String? @db.VarChar(100)\n isActive Boolean @default(true)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n orders Order[] @relation(\"Customer_Orders\")\n salesInvoices SalesInvoice[] @relation(\"Customer_Sales_Invoices\")\n stockMovements StockMovement[] @relation(\"StockMovement_Customer\")\n\n @@map(\"Customers\")\n}\n\nmodel Order {\n id Int @id @default(autoincrement())\n orderNumber String @unique @db.VarChar(100)\n status OrderStatus @default(PENDING)\n paymentMethod PaymentMethodType @default(CARD)\n totalAmount Decimal @db.Decimal(15, 2)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n customerId Int\n customer Customer @relation(\"Customer_Orders\", fields: [customerId], references: [id], onUpdate: NoAction)\n\n @@index([customerId], map: \"Orders_customerId_fkey\")\n @@map(\"Orders\")\n}\n\nmodel SalesInvoice {\n id Int @id @default(autoincrement())\n code String @unique @db.VarChar(100)\n totalAmount Decimal @db.Decimal(15, 2)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n customerId Int?\n inventoryId Int\n items SalesInvoiceItem[] @relation(\"SalesInvoice_Items\")\n customer Customer? @relation(\"Customer_Sales_Invoices\", fields: [customerId], references: [id])\n inventory Inventory @relation(\"Inventory_SalesInvoices\", fields: [inventoryId], references: [id])\n\n @@index([inventoryId], map: \"Sales_Invoices_inventoryId_fkey\")\n @@index([customerId], map: \"Sales_Invoices_customerId_fkey\")\n @@map(\"Sales_Invoices\")\n}\n\nmodel SalesInvoiceItem {\n id Int @id @default(autoincrement())\n count Decimal @db.Decimal(10, 0)\n fee Decimal @db.Decimal(15, 2)\n total Decimal @db.Decimal(15, 2)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n invoiceId Int\n productId Int\n invoice SalesInvoice @relation(\"SalesInvoice_Items\", fields: [invoiceId], references: [id])\n product Product @relation(\"Product_SalesInvoiceItems\", fields: [productId], references: [id])\n\n @@index([invoiceId], map: \"Sales_Invoice_Items_invoiceId_fkey\")\n @@index([productId], map: \"Sales_Invoice_Items_productId_fkey\")\n @@map(\"Sales_Invoice_Items\")\n}\n\nmodel TriggerLog {\n id Int @id @default(autoincrement())\n message String @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n name String @db.Text\n\n @@map(\"Trigger_Logs\")\n}\n\nmodel ProductVariant {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n basePrice Decimal @db.Decimal(15, 2)\n salePrice Decimal @db.Decimal(15, 2)\n description String? @db.Text\n barcode String? @unique(map: \"products_barcode_unique\") @db.VarChar(100)\n imageUrl String? @db.VarChar(255)\n unit String? @db.VarChar(10)\n quantity Decimal? @default(0.00) @db.Decimal(10, 0)\n alertQuantity Decimal? @default(5.00) @db.Decimal(10, 0)\n isActive Boolean @default(true)\n isFeatured Boolean @default(false)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n productId Int\n product Product @relation(\"Product_Variant\", fields: [productId], references: [id], onUpdate: NoAction)\n\n @@index([productId], map: \"Product_Variants_productId_fkey\")\n @@map(\"Product_Variants\")\n}\n\nmodel Product {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n description String? @db.Text\n sku String? @unique(map: \"products_sku_unique\") @db.VarChar(100)\n barcode String? @unique(map: \"products_barcode_unique\") @db.VarChar(100)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n brandId Int?\n categoryId Int?\n salePrice Decimal @default(0.00) @db.Decimal(15, 0)\n inventoryTransferItems InventoryTransferItem[] @relation(\"InventoryTransferItem_Product\")\n // productCharges ProductCharge[] @relation(\"Product_Charges\")\n variants ProductVariant[] @relation(\"Product_Variant\")\n brand ProductBrand? @relation(\"Product_Brand\", fields: [brandId], references: [id], onUpdate: NoAction)\n category ProductCategory? @relation(\"Product_Category\", fields: [categoryId], references: [id], onUpdate: NoAction)\n purchaseReceiptItems PurchaseReceiptItem[] @relation(\"Product_PurchaseReceiptItems\")\n salesInvoiceItems SalesInvoiceItem[] @relation(\"Product_SalesInvoiceItems\")\n stockAdjustments StockAdjustment[] @relation(\"Product_Stock_Adjustments\")\n stockBalances StockBalance[] @relation(\"StockBalance_Product\")\n stockMovements StockMovement[] @relation(\"StockMovement_Product\")\n\n @@index([brandId], map: \"Products_brandId_fkey\")\n @@index([categoryId], map: \"Products_categoryId_fkey\")\n @@map(\"Products\")\n}\n\nmodel ProductBrand {\n id Int @id @default(autoincrement())\n name String @db.VarChar(100)\n description String? @db.Text\n imageUrl String? @db.VarChar(255)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n products Product[] @relation(\"Product_Brand\")\n\n @@map(\"Product_brands\")\n}\n\nmodel ProductCategory {\n id Int @id @default(autoincrement())\n name String @db.VarChar(100)\n description String? @db.Text\n imageUrl String? @db.VarChar(255)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n products Product[] @relation(\"Product_Category\")\n\n @@map(\"Product_categories\")\n}\n\nmodel PurchaseReceipt {\n id Int @id @default(autoincrement())\n code String @unique @db.VarChar(100)\n totalAmount Decimal @db.Decimal(15, 2)\n paidAmount Decimal @default(0.00) @db.Decimal(15, 2)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n status PurchaseReceiptStatus @default(UNPAID)\n supplierId Int\n inventoryId Int\n items PurchaseReceiptItem[] @relation(\"PurchaseReceipt_Items\")\n inventory Inventory @relation(fields: [inventoryId], references: [id])\n supplier Supplier @relation(fields: [supplierId], references: [id])\n payments PurchaseReceiptPayments[]\n\n @@index([inventoryId], map: \"Purchase_Receipts_inventoryId_fkey\")\n @@index([supplierId], map: \"Purchase_Receipts_supplierId_fkey\")\n @@map(\"Purchase_Receipts\")\n}\n\nmodel PurchaseReceiptItem {\n id Int @id @default(autoincrement())\n count Decimal @db.Decimal(10, 0)\n fee Decimal @db.Decimal(15, 2)\n total Decimal @db.Decimal(15, 2)\n receiptId Int\n productId Int\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n product Product @relation(\"Product_PurchaseReceiptItems\", fields: [productId], references: [id])\n receipt PurchaseReceipt @relation(\"PurchaseReceipt_Items\", fields: [receiptId], references: [id])\n\n @@index([productId], map: \"Purchase_Receipt_Items_productId_fkey\")\n @@index([receiptId], map: \"Purchase_Receipt_Items_receiptId_fkey\")\n @@map(\"Purchase_Receipt_Items\")\n}\n\nmodel PurchaseReceiptPayments {\n id Int @id @default(autoincrement())\n amount Decimal @db.Decimal(15, 2)\n paymentMethod PaymentMethodType\n type PaymentType\n bankAccountId Int\n receiptId Int\n payedAt DateTime @db.Timestamp(0)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n\n receipt PurchaseReceipt @relation(fields: [receiptId], references: [id])\n\n @@index([receiptId], map: \"Purchase_Receipt_Payments_receiptId_fkey\")\n @@map(\"Purchase_Receipt_Payments\")\n}\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../../src/generated/prisma\"\n moduleFormat = \"cjs\"\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel StockMovement {\n id Int @id @default(autoincrement())\n type MovementType\n quantity Decimal @db.Decimal(10, 0)\n fee Decimal @db.Decimal(15, 2)\n totalCost Decimal @db.Decimal(15, 2)\n referenceType MovementReferenceType\n referenceId String\n createdAt DateTime @default(now()) @db.Timestamp(0)\n productId Int\n inventoryId Int\n avgCost Decimal @db.Decimal(15, 2)\n supplierId Int?\n remainedInStock Decimal @default(0.00) @db.Decimal(10, 0)\n counterInventoryId Int?\n customerId Int?\n counterInventory Inventory? @relation(\"StockMovement_CounterInventory\", fields: [counterInventoryId], references: [id])\n customer Customer? @relation(\"StockMovement_Customer\", fields: [customerId], references: [id])\n inventory Inventory @relation(\"StockMovement_Inventory\", fields: [inventoryId], references: [id])\n product Product @relation(\"StockMovement_Product\", fields: [productId], references: [id])\n supplier Supplier? @relation(\"StockMovement_Supplier\", fields: [supplierId], references: [id])\n\n @@index([inventoryId], map: \"Stock_Movements_inventoryId_fkey\")\n @@index([productId], map: \"Stock_Movements_productId_fkey\")\n @@index([counterInventoryId], map: \"Stock_Movements_counterInventoryId_fkey\")\n @@index([customerId], map: \"Stock_Movements_customerId_fkey\")\n @@index([supplierId], map: \"Stock_Movements_supplierId_fkey\")\n @@map(\"Stock_Movements\")\n}\n\nmodel StockBalance {\n quantity Decimal @default(0.000) @db.Decimal(14, 3)\n totalCost Decimal @default(0.00) @db.Decimal(14, 2)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n avgCost Decimal @default(0.00) @db.Decimal(14, 2)\n inventoryId Int\n productId Int\n createdAt DateTime @default(now()) @db.Timestamp(0)\n id Int @id @default(autoincrement())\n inventory Inventory @relation(\"StockBalance_inventory\", fields: [inventoryId], references: [id])\n product Product @relation(\"StockBalance_Product\", fields: [productId], references: [id])\n\n @@unique([productId, inventoryId])\n @@index([productId])\n @@index([inventoryId])\n @@map(\"Stock_Balance\")\n}\n\nmodel StockAdjustment {\n id Int @id @default(autoincrement())\n adjustedQuantity Decimal @db.Decimal(10, 0)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n productId Int\n inventoryId Int\n inventory Inventory @relation(\"Inventory_Stock_Adjustments\", fields: [inventoryId], references: [id])\n product Product @relation(\"Product_Stock_Adjustments\", fields: [productId], references: [id])\n\n @@index([inventoryId], map: \"Stock_Adjustments_inventoryId_fkey\")\n @@index([productId], map: \"Stock_Adjustments_productId_fkey\")\n @@map(\"Stock_Adjustments\")\n}\n\nmodel Supplier {\n id Int @id @default(autoincrement())\n firstName String @db.VarChar(255)\n lastName String @db.VarChar(255)\n email String? @db.VarChar(255)\n mobileNumber String @unique @db.Char(11)\n address String? @db.Text\n city String? @db.VarChar(100)\n state String? @db.VarChar(100)\n country String? @db.VarChar(100)\n isActive Boolean @default(true)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n stockMovements StockMovement[] @relation(\"StockMovement_Supplier\")\n receipts PurchaseReceipt[]\n ledger SupplierLedger[]\n\n @@map(\"Suppliers\")\n}\n\nmodel SupplierLedger {\n id Int @id @default(autoincrement())\n description String? @db.Text\n debit Decimal @default(0) @db.Decimal(15, 2)\n credit Decimal @default(0) @db.Decimal(15, 2)\n balance Decimal @db.Decimal(15, 2)\n sourceType LedgerSourceType\n sourceId Int\n createdAt DateTime @default(now()) @db.Timestamp(0)\n\n supplierId Int\n supplier Supplier @relation(fields: [supplierId], references: [id])\n\n @@index([supplierId])\n @@map(\"Supplier_Ledger\")\n}\n",
|
|
"runtimeDataModel": {
|
|
"models": {},
|
|
"enums": {},
|
|
"types": {}
|
|
}
|
|
}
|
|
|
|
config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mobileNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"roleId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"refreshTokens\",\"kind\":\"object\",\"type\":\"RefreshToken\",\"relationName\":\"RefreshTokenToUser\"},{\"name\":\"role\",\"kind\":\"object\",\"type\":\"Role\",\"relationName\":\"User_Role\"}],\"dbName\":\"Users\"},\"Role\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"permissions\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"users\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"User_Role\"}],\"dbName\":\"Roles\"},\"OtpCode\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mobileNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"used\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"Otp_Codes\"},\"RefreshToken\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tokenHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"revoked\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"RefreshTokenToUser\"}],\"dbName\":\"Refresh_Tokens\"},\"BankBranch\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bankId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bank\",\"kind\":\"object\",\"type\":\"Bank\",\"relationName\":\"bank_branches\"},{\"name\":\"bankAccounts\",\"kind\":\"object\",\"type\":\"BankAccount\",\"relationName\":\"Bank_Accounts_branchId_fkey\"}],\"dbName\":\"Bank_Branches\"},\"BankAccount\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"accountNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cardNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"iban\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"branchId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"branch\",\"kind\":\"object\",\"type\":\"BankBranch\",\"relationName\":\"Bank_Accounts_branchId_fkey\"},{\"name\":\"inventoryBankAccounts\",\"kind\":\"object\",\"type\":\"InventoryBankAccount\",\"relationName\":\"BankAccountToInventoryBankAccount\"}],\"dbName\":\"Bank_Accounts\"},\"Inventory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"location\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"isPointOfSale\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"inventoryTransfersFrom\",\"kind\":\"object\",\"type\":\"InventoryTransfer\",\"relationName\":\"Inventory_From\"},{\"name\":\"inventoryTransfersTo\",\"kind\":\"object\",\"type\":\"InventoryTransfer\",\"relationName\":\"Inventory_To\"},{\"name\":\"purchaseReceipts\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"InventoryToPurchaseReceipt\"},{\"name\":\"salesInvoices\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"Inventory_SalesInvoices\"},{\"name\":\"stockAdjustments\",\"kind\":\"object\",\"type\":\"StockAdjustment\",\"relationName\":\"Inventory_Stock_Adjustments\"},{\"name\":\"stockBalances\",\"kind\":\"object\",\"type\":\"StockBalance\",\"relationName\":\"StockBalance_inventory\"},{\"name\":\"counterStockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_CounterInventory\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Inventory\"},{\"name\":\"inventoryBankAccounts\",\"kind\":\"object\",\"type\":\"InventoryBankAccount\",\"relationName\":\"InventoryToInventoryBankAccount\"}],\"dbName\":\"Inventories\"},\"InventoryBankAccount\":{\"fields\":[{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bankAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"InventoryToInventoryBankAccount\"},{\"name\":\"bankAccount\",\"kind\":\"object\",\"type\":\"BankAccount\",\"relationName\":\"BankAccountToInventoryBankAccount\"},{\"name\":\"posAccounts\",\"kind\":\"object\",\"type\":\"PosAccount\",\"relationName\":\"InventoryBankAccountToPosAccount\"}],\"dbName\":\"Inventory_Bank_Accounts\"},\"PosAccount\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"bankAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"inventoryBankAccount\",\"kind\":\"object\",\"type\":\"InventoryBankAccount\",\"relationName\":\"InventoryBankAccountToPosAccount\"}],\"dbName\":\"Pos_Accounts\"},\"InventoryTransfer\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"fromInventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"toInventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"items\",\"kind\":\"object\",\"type\":\"InventoryTransferItem\",\"relationName\":\"InventoryTransfer_Items\"},{\"name\":\"fromInventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_From\"},{\"name\":\"toInventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_To\"}],\"dbName\":\"Inventory_Transfers\"},\"InventoryTransferItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"transferId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"InventoryTransferItem_Product\"},{\"name\":\"transfer\",\"kind\":\"object\",\"type\":\"InventoryTransfer\",\"relationName\":\"InventoryTransfer_Items\"}],\"dbName\":\"Inventory_Transfer_Items\"},\"Bank\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"shortName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bankBranches\",\"kind\":\"object\",\"type\":\"BankBranch\",\"relationName\":\"bank_branches\"}],\"dbName\":\"Banks\"},\"Customer\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mobileNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"orders\",\"kind\":\"object\",\"type\":\"Order\",\"relationName\":\"Customer_Orders\"},{\"name\":\"salesInvoices\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"Customer_Sales_Invoices\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Customer\"}],\"dbName\":\"Customers\"},\"Order\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"orderNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"OrderStatus\"},{\"name\":\"paymentMethod\",\"kind\":\"enum\",\"type\":\"PaymentMethodType\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"Customer_Orders\"}],\"dbName\":\"Orders\"},\"SalesInvoice\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"items\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"SalesInvoice_Items\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"Customer_Sales_Invoices\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_SalesInvoices\"}],\"dbName\":\"Sales_Invoices\"},\"SalesInvoiceItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"invoiceId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"invoice\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"SalesInvoice_Items\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_SalesInvoiceItems\"}],\"dbName\":\"Sales_Invoice_Items\"},\"TriggerLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":\"Trigger_Logs\"},\"ProductVariant\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"basePrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"salePrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"barcode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"alertQuantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isFeatured\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Variant\"}],\"dbName\":\"Product_Variants\"},\"Product\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sku\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"barcode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"brandId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"salePrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"inventoryTransferItems\",\"kind\":\"object\",\"type\":\"InventoryTransferItem\",\"relationName\":\"InventoryTransferItem_Product\"},{\"name\":\"variants\",\"kind\":\"object\",\"type\":\"ProductVariant\",\"relationName\":\"Product_Variant\"},{\"name\":\"brand\",\"kind\":\"object\",\"type\":\"ProductBrand\",\"relationName\":\"Product_Brand\"},{\"name\":\"category\",\"kind\":\"object\",\"type\":\"ProductCategory\",\"relationName\":\"Product_Category\"},{\"name\":\"purchaseReceiptItems\",\"kind\":\"object\",\"type\":\"PurchaseReceiptItem\",\"relationName\":\"Product_PurchaseReceiptItems\"},{\"name\":\"salesInvoiceItems\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"Product_SalesInvoiceItems\"},{\"name\":\"stockAdjustments\",\"kind\":\"object\",\"type\":\"StockAdjustment\",\"relationName\":\"Product_Stock_Adjustments\"},{\"name\":\"stockBalances\",\"kind\":\"object\",\"type\":\"StockBalance\",\"relationName\":\"StockBalance_Product\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Product\"}],\"dbName\":\"Products\"},\"ProductBrand\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"products\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Brand\"}],\"dbName\":\"Product_brands\"},\"ProductCategory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"products\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Category\"}],\"dbName\":\"Product_categories\"},\"PurchaseReceipt\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"paidAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"PurchaseReceiptStatus\"},{\"name\":\"supplierId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"items\",\"kind\":\"object\",\"type\":\"PurchaseReceiptItem\",\"relationName\":\"PurchaseReceipt_Items\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"InventoryToPurchaseReceipt\"},{\"name\":\"supplier\",\"kind\":\"object\",\"type\":\"Supplier\",\"relationName\":\"PurchaseReceiptToSupplier\"},{\"name\":\"payments\",\"kind\":\"object\",\"type\":\"PurchaseReceiptPayments\",\"relationName\":\"PurchaseReceiptToPurchaseReceiptPayments\"}],\"dbName\":\"Purchase_Receipts\"},\"PurchaseReceiptItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"receiptId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_PurchaseReceiptItems\"},{\"name\":\"receipt\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"PurchaseReceipt_Items\"}],\"dbName\":\"Purchase_Receipt_Items\"},\"PurchaseReceiptPayments\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"paymentMethod\",\"kind\":\"enum\",\"type\":\"PaymentMethodType\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"PaymentType\"},{\"name\":\"bankAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"receiptId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"payedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"receipt\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"PurchaseReceiptToPurchaseReceiptPayments\"}],\"dbName\":\"Purchase_Receipt_Payments\"},\"StockMovement\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"MovementType\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"referenceType\",\"kind\":\"enum\",\"type\":\"MovementReferenceType\"},{\"name\":\"referenceId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"avgCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"supplierId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"remainedInStock\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"counterInventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"counterInventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"StockMovement_CounterInventory\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"StockMovement_Customer\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"StockMovement_Inventory\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"StockMovement_Product\"},{\"name\":\"supplier\",\"kind\":\"object\",\"type\":\"Supplier\",\"relationName\":\"StockMovement_Supplier\"}],\"dbName\":\"Stock_Movements\"},\"StockBalance\":{\"fields\":[{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"avgCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"StockBalance_inventory\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"StockBalance_Product\"}],\"dbName\":\"Stock_Balance\"},\"StockAdjustment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"adjustedQuantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_Stock_Adjustments\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Stock_Adjustments\"}],\"dbName\":\"Stock_Adjustments\"},\"Supplier\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mobileNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Supplier\"},{\"name\":\"receipts\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"PurchaseReceiptToSupplier\"},{\"name\":\"ledger\",\"kind\":\"object\",\"type\":\"SupplierLedger\",\"relationName\":\"SupplierToSupplierLedger\"}],\"dbName\":\"Suppliers\"},\"SupplierLedger\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"debit\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"credit\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"balance\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"sourceType\",\"kind\":\"enum\",\"type\":\"LedgerSourceType\"},{\"name\":\"sourceId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"supplierId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"supplier\",\"kind\":\"object\",\"type\":\"Supplier\",\"relationName\":\"SupplierToSupplierLedger\"}],\"dbName\":\"Supplier_Ledger\"}},\"enums\":{},\"types\":{}}")
|
|
|
|
async function decodeBase64AsWasm(wasmBase64: string): Promise<WebAssembly.Module> {
|
|
const { Buffer } = await import('node:buffer')
|
|
const wasmArray = Buffer.from(wasmBase64, 'base64')
|
|
return new WebAssembly.Module(wasmArray)
|
|
}
|
|
|
|
config.compilerWasm = {
|
|
getRuntime: async () => await import("@prisma/client/runtime/query_compiler_bg.mysql.js"),
|
|
|
|
getQueryCompilerWasmModule: async () => {
|
|
const { wasm } = await import("@prisma/client/runtime/query_compiler_bg.mysql.wasm-base64.js")
|
|
return await decodeBase64AsWasm(wasm)
|
|
}
|
|
}
|
|
|
|
|
|
|
|
export type LogOptions<ClientOptions extends Prisma.PrismaClientOptions> =
|
|
'log' extends keyof ClientOptions ? ClientOptions['log'] extends Array<Prisma.LogLevel | Prisma.LogDefinition> ? Prisma.GetEvents<ClientOptions['log']> : never : never
|
|
|
|
export interface PrismaClientConstructor {
|
|
/**
|
|
* ## Prisma Client
|
|
*
|
|
* Type-safe database client for TypeScript
|
|
* @example
|
|
* ```
|
|
* const prisma = new PrismaClient()
|
|
* // Fetch zero or more Users
|
|
* const users = await prisma.user.findMany()
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://pris.ly/d/client).
|
|
*/
|
|
|
|
new <
|
|
Options extends Prisma.PrismaClientOptions = Prisma.PrismaClientOptions,
|
|
LogOpts extends LogOptions<Options> = LogOptions<Options>,
|
|
OmitOpts extends Prisma.PrismaClientOptions['omit'] = Options extends { omit: infer U } ? U : Prisma.PrismaClientOptions['omit'],
|
|
ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
>(options: Prisma.Subset<Options, Prisma.PrismaClientOptions> ): PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
|
}
|
|
|
|
/**
|
|
* ## Prisma Client
|
|
*
|
|
* Type-safe database client for TypeScript
|
|
* @example
|
|
* ```
|
|
* const prisma = new PrismaClient()
|
|
* // Fetch zero or more Users
|
|
* const users = await prisma.user.findMany()
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://pris.ly/d/client).
|
|
*/
|
|
|
|
export interface PrismaClient<
|
|
in LogOpts extends Prisma.LogLevel = never,
|
|
in out OmitOpts extends Prisma.PrismaClientOptions['omit'] = undefined,
|
|
in out ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs
|
|
> {
|
|
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['other'] }
|
|
|
|
$on<V extends LogOpts>(eventType: V, callback: (event: V extends 'query' ? Prisma.QueryEvent : Prisma.LogEvent) => void): PrismaClient;
|
|
|
|
/**
|
|
* Connect with the database
|
|
*/
|
|
$connect(): runtime.Types.Utils.JsPromise<void>;
|
|
|
|
/**
|
|
* Disconnect from the database
|
|
*/
|
|
$disconnect(): runtime.Types.Utils.JsPromise<void>;
|
|
|
|
/**
|
|
* Executes a prepared raw query and returns the number of affected rows.
|
|
* @example
|
|
* ```
|
|
* const result = await prisma.$executeRaw`UPDATE User SET cool = ${true} WHERE email = ${'user@email.com'};`
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
*/
|
|
$executeRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
|
|
/**
|
|
* Executes a raw query and returns the number of affected rows.
|
|
* Susceptible to SQL injections, see documentation.
|
|
* @example
|
|
* ```
|
|
* const result = await prisma.$executeRawUnsafe('UPDATE User SET cool = $1 WHERE email = $2 ;', true, 'user@email.com')
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
*/
|
|
$executeRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<number>;
|
|
|
|
/**
|
|
* Performs a prepared raw query and returns the `SELECT` data.
|
|
* @example
|
|
* ```
|
|
* const result = await prisma.$queryRaw`SELECT * FROM User WHERE id = ${1} OR email = ${'user@email.com'};`
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
*/
|
|
$queryRaw<T = unknown>(query: TemplateStringsArray | Prisma.Sql, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
|
|
/**
|
|
* Performs a raw query and returns the `SELECT` data.
|
|
* Susceptible to SQL injections, see documentation.
|
|
* @example
|
|
* ```
|
|
* const result = await prisma.$queryRawUnsafe('SELECT * FROM User WHERE id = $1 OR email = $2;', 1, 'user@email.com')
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://pris.ly/d/raw-queries).
|
|
*/
|
|
$queryRawUnsafe<T = unknown>(query: string, ...values: any[]): Prisma.PrismaPromise<T>;
|
|
|
|
|
|
/**
|
|
* Allows the running of a sequence of read/write operations that are guaranteed to either succeed or fail as a whole.
|
|
* @example
|
|
* ```
|
|
* const [george, bob, alice] = await prisma.$transaction([
|
|
* prisma.user.create({ data: { name: 'George' } }),
|
|
* prisma.user.create({ data: { name: 'Bob' } }),
|
|
* prisma.user.create({ data: { name: 'Alice' } }),
|
|
* ])
|
|
* ```
|
|
*
|
|
* Read more in our [docs](https://www.prisma.io/docs/concepts/components/prisma-client/transactions).
|
|
*/
|
|
$transaction<P extends Prisma.PrismaPromise<any>[]>(arg: [...P], options?: { isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<runtime.Types.Utils.UnwrapTuple<P>>
|
|
|
|
$transaction<R>(fn: (prisma: Omit<PrismaClient, runtime.ITXClientDenyList>) => runtime.Types.Utils.JsPromise<R>, options?: { maxWait?: number, timeout?: number, isolationLevel?: Prisma.TransactionIsolationLevel }): runtime.Types.Utils.JsPromise<R>
|
|
|
|
$extends: runtime.Types.Extensions.ExtendsHook<"extends", Prisma.TypeMapCb<OmitOpts>, ExtArgs, runtime.Types.Utils.Call<Prisma.TypeMapCb<OmitOpts>, {
|
|
extArgs: ExtArgs
|
|
}>>
|
|
|
|
/**
|
|
* `prisma.user`: Exposes CRUD operations for the **User** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Users
|
|
* const users = await prisma.user.findMany()
|
|
* ```
|
|
*/
|
|
get user(): Prisma.UserDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.role`: Exposes CRUD operations for the **Role** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Roles
|
|
* const roles = await prisma.role.findMany()
|
|
* ```
|
|
*/
|
|
get role(): Prisma.RoleDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.otpCode`: Exposes CRUD operations for the **OtpCode** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more OtpCodes
|
|
* const otpCodes = await prisma.otpCode.findMany()
|
|
* ```
|
|
*/
|
|
get otpCode(): Prisma.OtpCodeDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.refreshToken`: Exposes CRUD operations for the **RefreshToken** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more RefreshTokens
|
|
* const refreshTokens = await prisma.refreshToken.findMany()
|
|
* ```
|
|
*/
|
|
get refreshToken(): Prisma.RefreshTokenDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.bankBranch`: Exposes CRUD operations for the **BankBranch** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more BankBranches
|
|
* const bankBranches = await prisma.bankBranch.findMany()
|
|
* ```
|
|
*/
|
|
get bankBranch(): Prisma.BankBranchDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.bankAccount`: Exposes CRUD operations for the **BankAccount** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more BankAccounts
|
|
* const bankAccounts = await prisma.bankAccount.findMany()
|
|
* ```
|
|
*/
|
|
get bankAccount(): Prisma.BankAccountDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.inventory`: Exposes CRUD operations for the **Inventory** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Inventories
|
|
* const inventories = await prisma.inventory.findMany()
|
|
* ```
|
|
*/
|
|
get inventory(): Prisma.InventoryDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.inventoryBankAccount`: Exposes CRUD operations for the **InventoryBankAccount** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more InventoryBankAccounts
|
|
* const inventoryBankAccounts = await prisma.inventoryBankAccount.findMany()
|
|
* ```
|
|
*/
|
|
get inventoryBankAccount(): Prisma.InventoryBankAccountDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.posAccount`: Exposes CRUD operations for the **PosAccount** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more PosAccounts
|
|
* const posAccounts = await prisma.posAccount.findMany()
|
|
* ```
|
|
*/
|
|
get posAccount(): Prisma.PosAccountDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.inventoryTransfer`: Exposes CRUD operations for the **InventoryTransfer** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more InventoryTransfers
|
|
* const inventoryTransfers = await prisma.inventoryTransfer.findMany()
|
|
* ```
|
|
*/
|
|
get inventoryTransfer(): Prisma.InventoryTransferDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.inventoryTransferItem`: Exposes CRUD operations for the **InventoryTransferItem** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more InventoryTransferItems
|
|
* const inventoryTransferItems = await prisma.inventoryTransferItem.findMany()
|
|
* ```
|
|
*/
|
|
get inventoryTransferItem(): Prisma.InventoryTransferItemDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.bank`: Exposes CRUD operations for the **Bank** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Banks
|
|
* const banks = await prisma.bank.findMany()
|
|
* ```
|
|
*/
|
|
get bank(): Prisma.BankDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.customer`: Exposes CRUD operations for the **Customer** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Customers
|
|
* const customers = await prisma.customer.findMany()
|
|
* ```
|
|
*/
|
|
get customer(): Prisma.CustomerDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.order`: Exposes CRUD operations for the **Order** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Orders
|
|
* const orders = await prisma.order.findMany()
|
|
* ```
|
|
*/
|
|
get order(): Prisma.OrderDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.salesInvoice`: Exposes CRUD operations for the **SalesInvoice** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more SalesInvoices
|
|
* const salesInvoices = await prisma.salesInvoice.findMany()
|
|
* ```
|
|
*/
|
|
get salesInvoice(): Prisma.SalesInvoiceDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.salesInvoiceItem`: Exposes CRUD operations for the **SalesInvoiceItem** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more SalesInvoiceItems
|
|
* const salesInvoiceItems = await prisma.salesInvoiceItem.findMany()
|
|
* ```
|
|
*/
|
|
get salesInvoiceItem(): Prisma.SalesInvoiceItemDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.triggerLog`: Exposes CRUD operations for the **TriggerLog** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more TriggerLogs
|
|
* const triggerLogs = await prisma.triggerLog.findMany()
|
|
* ```
|
|
*/
|
|
get triggerLog(): Prisma.TriggerLogDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.productVariant`: Exposes CRUD operations for the **ProductVariant** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more ProductVariants
|
|
* const productVariants = await prisma.productVariant.findMany()
|
|
* ```
|
|
*/
|
|
get productVariant(): Prisma.ProductVariantDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.product`: Exposes CRUD operations for the **Product** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Products
|
|
* const products = await prisma.product.findMany()
|
|
* ```
|
|
*/
|
|
get product(): Prisma.ProductDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.productBrand`: Exposes CRUD operations for the **ProductBrand** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more ProductBrands
|
|
* const productBrands = await prisma.productBrand.findMany()
|
|
* ```
|
|
*/
|
|
get productBrand(): Prisma.ProductBrandDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.productCategory`: Exposes CRUD operations for the **ProductCategory** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more ProductCategories
|
|
* const productCategories = await prisma.productCategory.findMany()
|
|
* ```
|
|
*/
|
|
get productCategory(): Prisma.ProductCategoryDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.purchaseReceipt`: Exposes CRUD operations for the **PurchaseReceipt** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more PurchaseReceipts
|
|
* const purchaseReceipts = await prisma.purchaseReceipt.findMany()
|
|
* ```
|
|
*/
|
|
get purchaseReceipt(): Prisma.PurchaseReceiptDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.purchaseReceiptItem`: Exposes CRUD operations for the **PurchaseReceiptItem** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more PurchaseReceiptItems
|
|
* const purchaseReceiptItems = await prisma.purchaseReceiptItem.findMany()
|
|
* ```
|
|
*/
|
|
get purchaseReceiptItem(): Prisma.PurchaseReceiptItemDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.purchaseReceiptPayments`: Exposes CRUD operations for the **PurchaseReceiptPayments** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more PurchaseReceiptPayments
|
|
* const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.findMany()
|
|
* ```
|
|
*/
|
|
get purchaseReceiptPayments(): Prisma.PurchaseReceiptPaymentsDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.stockMovement`: Exposes CRUD operations for the **StockMovement** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more StockMovements
|
|
* const stockMovements = await prisma.stockMovement.findMany()
|
|
* ```
|
|
*/
|
|
get stockMovement(): Prisma.StockMovementDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.stockBalance`: Exposes CRUD operations for the **StockBalance** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more StockBalances
|
|
* const stockBalances = await prisma.stockBalance.findMany()
|
|
* ```
|
|
*/
|
|
get stockBalance(): Prisma.StockBalanceDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.stockAdjustment`: Exposes CRUD operations for the **StockAdjustment** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more StockAdjustments
|
|
* const stockAdjustments = await prisma.stockAdjustment.findMany()
|
|
* ```
|
|
*/
|
|
get stockAdjustment(): Prisma.StockAdjustmentDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.supplier`: Exposes CRUD operations for the **Supplier** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more Suppliers
|
|
* const suppliers = await prisma.supplier.findMany()
|
|
* ```
|
|
*/
|
|
get supplier(): Prisma.SupplierDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
|
|
/**
|
|
* `prisma.supplierLedger`: Exposes CRUD operations for the **SupplierLedger** model.
|
|
* Example usage:
|
|
* ```ts
|
|
* // Fetch zero or more SupplierLedgers
|
|
* const supplierLedgers = await prisma.supplierLedger.findMany()
|
|
* ```
|
|
*/
|
|
get supplierLedger(): Prisma.SupplierLedgerDelegate<ExtArgs, { omit: OmitOpts }>;
|
|
}
|
|
|
|
export function getPrismaClientClass(): PrismaClientConstructor {
|
|
return runtime.getPrismaClient(config) as unknown as PrismaClientConstructor
|
|
}
|