From de14d531e189ee9dd644ad5dba820d90a1488a7f Mon Sep 17 00:00:00 2001 From: ahasani194 Date: Wed, 4 Feb 2026 13:49:07 +0330 Subject: [PATCH] init --- package.json | 4 +- pnpm-lock.yaml | 12 + .../20260102204301_init/migration.sql | 662 ---- .../20260102205948_init/migration.sql | 21 - .../20260102214244_init/migration.sql | 27 - .../20260104092437_init/migration.sql | 8 - .../20260105090450_init/migration.sql | 11 - .../migration.sql | 17 - .../migration.sql | 21 - .../20260203172031_init/migration.sql | 155 + prisma/migrations/triggers.sql | 344 -- prisma/schema/auth.prisma | 54 - prisma/schema/bank.prisma | 51 - prisma/schema/enum.prisma | 46 - prisma/schema/good.prisma | 31 + prisma/schema/info.prisma | 1 - prisma/schema/inventory.prisma | 83 - prisma/schema/mdm.prisma | 12 - prisma/schema/order.prisma | 39 - prisma/schema/others.prisma | 27 +- prisma/schema/product.prisma | 78 - prisma/schema/purchase.prisma | 58 - prisma/schema/sales.prisma | 12 +- prisma/schema/service.prisma | 30 + prisma/schema/stock.prisma | 87 - prisma/schema/supplier.prisma | 37 - src/app.module.ts | 44 +- src/generated/prisma/browser.ts | 141 +- src/generated/prisma/client.ts | 145 +- src/generated/prisma/commonInputTypes.ts | 711 +--- src/generated/prisma/enums.ts | 67 - src/generated/prisma/internal/class.ts | 294 +- .../prisma/internal/prismaNamespace.ts | 2648 +------------ .../prisma/internal/prismaNamespaceBrowser.ts | 685 +--- src/generated/prisma/models.ts | 33 +- src/generated/prisma/models/Bank.ts | 1283 ------- src/generated/prisma/models/BankAccount.ts | 1818 --------- .../prisma/models/BankAccountTransaction.ts | 1429 ------- src/generated/prisma/models/BankBranch.ts | 1509 -------- src/generated/prisma/models/Customer.ts | 398 +- src/generated/prisma/models/Good.ts | 1687 +++++++++ src/generated/prisma/models/GoodCategory.ts | 1315 +++++++ src/generated/prisma/models/Inventory.ts | 2566 ------------- .../prisma/models/InventoryBankAccount.ts | 1513 -------- .../prisma/models/InventoryTransfer.ts | 1565 -------- .../prisma/models/InventoryTransferItem.ts | 1343 ------- src/generated/prisma/models/Order.ts | 1914 ---------- src/generated/prisma/models/OrderItem.ts | 1472 -------- src/generated/prisma/models/OtpCode.ts | 1109 ------ src/generated/prisma/models/PosAccount.ts | 1671 --------- src/generated/prisma/models/Product.ts | 3281 ----------------- src/generated/prisma/models/ProductBrand.ts | 1315 ------- .../prisma/models/ProductCategory.ts | 1315 ------- src/generated/prisma/models/ProductVariant.ts | 1658 --------- .../prisma/models/PurchaseReceipt.ts | 1893 ---------- .../prisma/models/PurchaseReceiptItem.ts | 1518 -------- .../prisma/models/PurchaseReceiptPayments.ts | 1799 --------- src/generated/prisma/models/RefreshToken.ts | 1296 ------- src/generated/prisma/models/Role.ts | 1311 ------- src/generated/prisma/models/SalesInvoice.ts | 215 +- .../prisma/models/SalesInvoiceItem.ts | 385 +- .../prisma/models/SalesInvoicePayment.ts | 4 + src/generated/prisma/models/Service.ts | 1610 ++++++++ .../prisma/models/ServiceCategory.ts | 1315 +++++++ .../prisma/models/StockAdjustment.ts | 1382 ------- .../prisma/models/StockAvailableView.ts | 719 ---- src/generated/prisma/models/StockBalance.ts | 1517 -------- src/generated/prisma/models/StockMovement.ts | 2408 ------------ .../prisma/models/StockReservation.ts | 1547 -------- src/generated/prisma/models/Supplier.ts | 1796 --------- src/generated/prisma/models/SupplierLedger.ts | 1423 ------- src/generated/prisma/models/User.ts | 1566 -------- .../dto/create-inventory-transfer-item.dto.ts | 20 - .../dto/update-inventory-transfer-item.dto.ts | 23 - .../inventory-transfer-items.controller.ts | 42 - .../inventory-transfer-items.module.ts | 11 - .../inventory-transfer-items.service.ts | 101 - .../dto/create-inventory-transfer.dto.ts | 30 - .../dto/update-inventory-transfer.dto.ts | 27 - .../inventory-transfers.controller.ts | 34 - .../inventory-transfers.module.ts | 11 - .../inventory-transfers.service.ts | 74 - src/{ => modules}/auth/auth.controller.ts | 0 src/{ => modules}/auth/auth.module.ts | 0 src/{ => modules}/auth/auth.service.ts | 0 .../auth/current-user.decorator.ts | 0 src/{ => modules}/auth/dto/login.dto.ts | 0 .../auth/dto/refresh-token.dto.ts | 0 src/{ => modules}/auth/dto/send-code.dto.ts | 0 src/{ => modules}/auth/dto/verify-code.dto.ts | 0 src/{ => modules}/auth/jwt-auth.guard.ts | 0 .../bank-accounts/bank-accounts.controller.ts | 39 - .../bank-accounts/bank-accounts.module.ts | 13 - .../bank-accounts/bank-accounts.service.ts | 153 - .../bank-accounts/bank-accounts.workflow.ts | 39 - .../bank-accounts/dto/add-transaction.dto.ts | 22 - .../dto/create-bank-account.dto.ts | 27 - .../dto/update-bank-account.dto.ts | 4 - .../bank-branches/bank-branches.controller.ts | 34 - .../bank-branches/bank-branches.module.ts | 11 - .../dto/create-bank-branches.dto.ts | 12 - .../dto/update-bank-branches.dto.ts | 15 - src/modules/banks/banks.controller.ts | 12 - src/modules/banks/banks.module.ts | 11 - src/modules/banks/banks.service.ts | 15 - src/modules/cardex/cardex.controller.ts | 27 - src/modules/cardex/cardex.module.ts | 11 - src/modules/cardex/cardex.service.ts | 54 - src/modules/cardex/dto/read-cardex.dto.ts | 23 - .../customers/customers.controller.ts | 0 .../customers/customers.module.ts | 2 +- .../customers/customers.service.ts | 4 +- .../customers/dto/create-customer.dto.ts | 0 .../customers/dto/update-customer.dto.ts | 0 .../dto/update-inventory-bank-account.dto.ts | 6 - .../inventory-bank-accounts.controller.ts | 38 - .../inventory-bank-accounts.module.ts | 11 - .../inventory-bank-accounts.service.ts | 76 - .../index/dto/create-inventory.dto.ts | 13 - .../index/dto/update-inventory.dto.ts | 21 - .../index/inventories.controller.ts | 59 - .../inventories/index/inventories.service.ts | 211 -- .../index/models/response-inventory.dto.ts | 5 - src/modules/inventories/inventories.module.ts | 13 - .../dto/create-pos-accounts.dto.ts | 16 - .../dto/update-pos-accounts.dto.ts | 8 - .../pos-accounts/pos-accounts.controller.ts | 45 - .../pos-accounts/pos-accounts.module.ts | 11 - .../pos-accounts/pos-accounts.service.ts | 157 - src/modules/pos/dto/update-pos.dto.ts | 21 - .../pos/orders/dto/create-order-item.dto.ts | 37 - src/modules/pos/orders/orders.controller.ts | 44 - src/modules/pos/orders/orders.module.ts | 13 - src/modules/pos/orders/orders.service.ts | 145 - src/modules/pos/orders/orders.workflow.ts | 87 - src/modules/pos/pos.controller.ts | 34 - src/modules/pos/pos.module.ts | 12 - src/modules/pos/pos.service.ts | 154 - .../dto/create-product-category.dto.ts | 0 .../dto/update-product-category.dto.ts | 0 .../product-categories.controller.ts | 0 .../product-categories.module.ts | 2 +- .../product-categories.service.ts} | 18 +- .../products/dto/create-product.dto.ts | 0 .../products/dto/update-product.dto.ts | 0 .../products/products.controller.ts | 0 src/{ => modules}/products/products.module.ts | 2 +- .../products/products.service.ts | 8 +- .../index/dto/create-purchase-receipt.dto.ts | 32 - .../index/dto/update-purchase-receipt.dto.ts | 27 - .../index/purchase-receipts.controller.ts | 34 - .../index/purchase-receipts.service.ts | 114 - .../index/purchase-receipts.workflow.ts | 23 - .../dto/create-purchase-receipt-item.dto.ts | 25 - .../dto/update-purchase-receipt-item.dto.ts | 29 - .../purchase-receipt-items.controller.ts | 41 - .../purchase-receipt-items.module.ts | 11 - .../purchase-receipt-items.service.ts | 100 - .../create-purchase-receipt-payment.dto.ts | 30 - .../update-purchase-receipt-payment.dto.ts | 6 - .../purchase-receipt-payments.controller.ts | 36 - .../purchase-receipt-payments.module.ts | 15 - .../purchase-receipt-payments.service.ts | 80 - .../purchase-receipt-payments.workflow.ts | 58 - .../purchase-receipts.module.ts | 21 - .../dto/create-sales-invoice-item.dto.ts | 0 .../dto/update-sales-invoice-item.dto.ts | 0 .../sales-invoice-items.controller.ts | 0 .../sales-invoice-items.module.ts | 2 +- .../sales-invoice-items.service.ts | 4 +- .../stock-balance/stock-balance.controller.ts | 0 .../stock-balance/stock-balance.module.ts | 2 +- .../stock-balance/stock-balance.service.ts | 4 +- .../index/dto/create-supplier.dto.ts | 33 - .../index/dto/update-supplier.dto.ts | 41 - .../suppliers/index/suppliers.controller.ts | 34 - .../suppliers/index/suppliers.service.ts | 49 - .../dto/create-receipt-payment.dto.ts | 34 - .../suppliers/invoices/invoices.controller.ts | 47 - .../suppliers/invoices/invoices.module.ts | 14 - .../suppliers/invoices/invoices.service.ts | 196 - .../suppliers/invoices/invoices.workflow.ts | 36 - .../ledger/supplier-ledger.controller.ts | 12 - .../ledger/supplier-ledger.module.ts | 13 - .../ledger/supplier-ledger.service.ts | 23 - .../ledger/supplier-ledger.workflow.ts | 57 - src/modules/suppliers/suppliers.module.ts | 13 - src/modules/uploads/image-uploader.service.ts | 21 + src/modules/uploads/uploader.service.ts | 25 + src/modules/uploads/uploads.controller.ts | 19 + src/modules/uploads/uploads.module.ts | 11 + .../dto/create-product-brand.dto.ts | 14 - .../dto/update-product-brand.dto.ts | 15 - .../product-brands.controller.ts | 34 - src/product-brands/product-brands.module.ts | 11 - src/product-brands/product-brands.service.ts | 33 - .../product-categories.service.ts | 33 - .../dto/create-product-variant.dto.ts | 50 - .../dto/update-product-variant.dto.ts | 63 - .../product-variants.controller.ts | 34 - .../product-variants.module.ts | 11 - .../product-variants.service.ts | 43 - src/roles/dto/create-role.dto.ts | 14 - src/roles/dto/update-role.dto.ts | 15 - src/roles/roles.controller.ts | 34 - src/roles/roles.module.ts | 11 - src/roles/roles.service.ts | 33 - .../dto/create-stock-adjustment.dto.ts | 16 - .../dto/update-stock-adjustment.dto.ts | 19 - .../stock-adjustments.controller.ts | 34 - .../stock-adjustments.module.ts | 11 - .../stock-adjustments.service.ts | 63 - .../dto/create-stock-movement.dto.ts | 34 - .../dto/update-stock-movement.dto.ts | 42 - .../stock-movements.controller.ts | 34 - src/stock-movements/stock-movements.module.ts | 11 - .../stock-movements.service.ts | 60 - src/users/dto/create-user.dto.ts | 20 - src/users/dto/update-user.dto.ts | 30 - src/users/users.controller.ts | 34 - src/users/users.module.ts | 11 - src/users/users.service.ts | 41 - 222 files changed, 7053 insertions(+), 57956 deletions(-) delete mode 100644 prisma/migrations/20260102204301_init/migration.sql delete mode 100644 prisma/migrations/20260102205948_init/migration.sql delete mode 100644 prisma/migrations/20260102214244_init/migration.sql delete mode 100644 prisma/migrations/20260104092437_init/migration.sql delete mode 100644 prisma/migrations/20260105090450_init/migration.sql delete mode 100644 prisma/migrations/20260105162935_add_stock_view/migration.sql delete mode 100644 prisma/migrations/20260105165503_update_order_model/migration.sql create mode 100644 prisma/migrations/20260203172031_init/migration.sql delete mode 100644 prisma/migrations/triggers.sql delete mode 100644 prisma/schema/auth.prisma delete mode 100644 prisma/schema/bank.prisma create mode 100644 prisma/schema/good.prisma delete mode 100644 prisma/schema/info.prisma delete mode 100644 prisma/schema/inventory.prisma delete mode 100644 prisma/schema/mdm.prisma delete mode 100644 prisma/schema/order.prisma delete mode 100644 prisma/schema/product.prisma delete mode 100644 prisma/schema/purchase.prisma create mode 100644 prisma/schema/service.prisma delete mode 100644 prisma/schema/stock.prisma delete mode 100644 prisma/schema/supplier.prisma delete mode 100644 src/generated/prisma/models/Bank.ts delete mode 100644 src/generated/prisma/models/BankAccount.ts delete mode 100644 src/generated/prisma/models/BankAccountTransaction.ts delete mode 100644 src/generated/prisma/models/BankBranch.ts create mode 100644 src/generated/prisma/models/Good.ts create mode 100644 src/generated/prisma/models/GoodCategory.ts delete mode 100644 src/generated/prisma/models/Inventory.ts delete mode 100644 src/generated/prisma/models/InventoryBankAccount.ts delete mode 100644 src/generated/prisma/models/InventoryTransfer.ts delete mode 100644 src/generated/prisma/models/InventoryTransferItem.ts delete mode 100644 src/generated/prisma/models/Order.ts delete mode 100644 src/generated/prisma/models/OrderItem.ts delete mode 100644 src/generated/prisma/models/OtpCode.ts delete mode 100644 src/generated/prisma/models/PosAccount.ts delete mode 100644 src/generated/prisma/models/Product.ts delete mode 100644 src/generated/prisma/models/ProductBrand.ts delete mode 100644 src/generated/prisma/models/ProductCategory.ts delete mode 100644 src/generated/prisma/models/ProductVariant.ts delete mode 100644 src/generated/prisma/models/PurchaseReceipt.ts delete mode 100644 src/generated/prisma/models/PurchaseReceiptItem.ts delete mode 100644 src/generated/prisma/models/PurchaseReceiptPayments.ts delete mode 100644 src/generated/prisma/models/RefreshToken.ts delete mode 100644 src/generated/prisma/models/Role.ts create mode 100644 src/generated/prisma/models/Service.ts create mode 100644 src/generated/prisma/models/ServiceCategory.ts delete mode 100644 src/generated/prisma/models/StockAdjustment.ts delete mode 100644 src/generated/prisma/models/StockAvailableView.ts delete mode 100644 src/generated/prisma/models/StockBalance.ts delete mode 100644 src/generated/prisma/models/StockMovement.ts delete mode 100644 src/generated/prisma/models/StockReservation.ts delete mode 100644 src/generated/prisma/models/Supplier.ts delete mode 100644 src/generated/prisma/models/SupplierLedger.ts delete mode 100644 src/generated/prisma/models/User.ts delete mode 100644 src/inventory-transfer-items/dto/create-inventory-transfer-item.dto.ts delete mode 100644 src/inventory-transfer-items/dto/update-inventory-transfer-item.dto.ts delete mode 100644 src/inventory-transfer-items/inventory-transfer-items.controller.ts delete mode 100644 src/inventory-transfer-items/inventory-transfer-items.module.ts delete mode 100644 src/inventory-transfer-items/inventory-transfer-items.service.ts delete mode 100644 src/inventory-transfers/dto/create-inventory-transfer.dto.ts delete mode 100644 src/inventory-transfers/dto/update-inventory-transfer.dto.ts delete mode 100644 src/inventory-transfers/inventory-transfers.controller.ts delete mode 100644 src/inventory-transfers/inventory-transfers.module.ts delete mode 100644 src/inventory-transfers/inventory-transfers.service.ts rename src/{ => modules}/auth/auth.controller.ts (100%) rename src/{ => modules}/auth/auth.module.ts (100%) rename src/{ => modules}/auth/auth.service.ts (100%) rename src/{ => modules}/auth/current-user.decorator.ts (100%) rename src/{ => modules}/auth/dto/login.dto.ts (100%) rename src/{ => modules}/auth/dto/refresh-token.dto.ts (100%) rename src/{ => modules}/auth/dto/send-code.dto.ts (100%) rename src/{ => modules}/auth/dto/verify-code.dto.ts (100%) rename src/{ => modules}/auth/jwt-auth.guard.ts (100%) delete mode 100644 src/modules/bank-accounts/bank-accounts.controller.ts delete mode 100644 src/modules/bank-accounts/bank-accounts.module.ts delete mode 100644 src/modules/bank-accounts/bank-accounts.service.ts delete mode 100644 src/modules/bank-accounts/bank-accounts.workflow.ts delete mode 100644 src/modules/bank-accounts/dto/add-transaction.dto.ts delete mode 100644 src/modules/bank-accounts/dto/create-bank-account.dto.ts delete mode 100644 src/modules/bank-accounts/dto/update-bank-account.dto.ts delete mode 100644 src/modules/bank-branches/bank-branches.controller.ts delete mode 100644 src/modules/bank-branches/bank-branches.module.ts delete mode 100644 src/modules/bank-branches/dto/create-bank-branches.dto.ts delete mode 100644 src/modules/bank-branches/dto/update-bank-branches.dto.ts delete mode 100644 src/modules/banks/banks.controller.ts delete mode 100644 src/modules/banks/banks.module.ts delete mode 100644 src/modules/banks/banks.service.ts delete mode 100644 src/modules/cardex/cardex.controller.ts delete mode 100644 src/modules/cardex/cardex.module.ts delete mode 100644 src/modules/cardex/cardex.service.ts delete mode 100644 src/modules/cardex/dto/read-cardex.dto.ts rename src/{ => modules}/customers/customers.controller.ts (100%) rename src/{ => modules}/customers/customers.module.ts (83%) rename src/{ => modules}/customers/customers.service.ts (86%) rename src/{ => modules}/customers/dto/create-customer.dto.ts (100%) rename src/{ => modules}/customers/dto/update-customer.dto.ts (100%) delete mode 100644 src/modules/inventories/bank-accounts/dto/update-inventory-bank-account.dto.ts delete mode 100644 src/modules/inventories/bank-accounts/inventory-bank-accounts.controller.ts delete mode 100644 src/modules/inventories/bank-accounts/inventory-bank-accounts.module.ts delete mode 100644 src/modules/inventories/bank-accounts/inventory-bank-accounts.service.ts delete mode 100644 src/modules/inventories/index/dto/create-inventory.dto.ts delete mode 100644 src/modules/inventories/index/dto/update-inventory.dto.ts delete mode 100644 src/modules/inventories/index/inventories.controller.ts delete mode 100644 src/modules/inventories/index/inventories.service.ts delete mode 100644 src/modules/inventories/index/models/response-inventory.dto.ts delete mode 100644 src/modules/inventories/inventories.module.ts delete mode 100644 src/modules/inventories/pos-accounts/dto/create-pos-accounts.dto.ts delete mode 100644 src/modules/inventories/pos-accounts/dto/update-pos-accounts.dto.ts delete mode 100644 src/modules/inventories/pos-accounts/pos-accounts.controller.ts delete mode 100644 src/modules/inventories/pos-accounts/pos-accounts.module.ts delete mode 100644 src/modules/inventories/pos-accounts/pos-accounts.service.ts delete mode 100644 src/modules/pos/dto/update-pos.dto.ts delete mode 100644 src/modules/pos/orders/dto/create-order-item.dto.ts delete mode 100644 src/modules/pos/orders/orders.controller.ts delete mode 100644 src/modules/pos/orders/orders.module.ts delete mode 100644 src/modules/pos/orders/orders.service.ts delete mode 100644 src/modules/pos/orders/orders.workflow.ts delete mode 100644 src/modules/pos/pos.controller.ts delete mode 100644 src/modules/pos/pos.module.ts delete mode 100644 src/modules/pos/pos.service.ts rename src/{ => modules}/product-categories/dto/create-product-category.dto.ts (100%) rename src/{ => modules}/product-categories/dto/update-product-category.dto.ts (100%) rename src/{ => modules}/product-categories/product-categories.controller.ts (100%) rename src/{ => modules}/product-categories/product-categories.module.ts (86%) rename src/modules/{bank-branches/bank-branches.service.ts => product-categories/product-categories.service.ts} (55%) rename src/{ => modules}/products/dto/create-product.dto.ts (100%) rename src/{ => modules}/products/dto/update-product.dto.ts (100%) rename src/{ => modules}/products/products.controller.ts (100%) rename src/{ => modules}/products/products.module.ts (83%) rename src/{ => modules}/products/products.service.ts (93%) delete mode 100644 src/modules/purchase-receipts/index/dto/create-purchase-receipt.dto.ts delete mode 100644 src/modules/purchase-receipts/index/dto/update-purchase-receipt.dto.ts delete mode 100644 src/modules/purchase-receipts/index/purchase-receipts.controller.ts delete mode 100644 src/modules/purchase-receipts/index/purchase-receipts.service.ts delete mode 100644 src/modules/purchase-receipts/index/purchase-receipts.workflow.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-items/dto/create-purchase-receipt-item.dto.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-items/dto/update-purchase-receipt-item.dto.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.controller.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.module.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.service.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-payments/dto/create-purchase-receipt-payment.dto.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-payments/dto/update-purchase-receipt-payment.dto.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.controller.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.module.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.service.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.workflow.ts delete mode 100644 src/modules/purchase-receipts/purchase-receipts.module.ts rename src/{ => modules}/sales-invoice-items/dto/create-sales-invoice-item.dto.ts (100%) rename src/{ => modules}/sales-invoice-items/dto/update-sales-invoice-item.dto.ts (100%) rename src/{ => modules}/sales-invoice-items/sales-invoice-items.controller.ts (100%) rename src/{ => modules}/sales-invoice-items/sales-invoice-items.module.ts (86%) rename src/{ => modules}/sales-invoice-items/sales-invoice-items.service.ts (95%) rename src/{ => modules}/stock-balance/stock-balance.controller.ts (100%) rename src/{ => modules}/stock-balance/stock-balance.module.ts (84%) rename src/{ => modules}/stock-balance/stock-balance.service.ts (78%) delete mode 100644 src/modules/suppliers/index/dto/create-supplier.dto.ts delete mode 100644 src/modules/suppliers/index/dto/update-supplier.dto.ts delete mode 100644 src/modules/suppliers/index/suppliers.controller.ts delete mode 100644 src/modules/suppliers/index/suppliers.service.ts delete mode 100644 src/modules/suppliers/invoices/dto/create-receipt-payment.dto.ts delete mode 100644 src/modules/suppliers/invoices/invoices.controller.ts delete mode 100644 src/modules/suppliers/invoices/invoices.module.ts delete mode 100644 src/modules/suppliers/invoices/invoices.service.ts delete mode 100644 src/modules/suppliers/invoices/invoices.workflow.ts delete mode 100644 src/modules/suppliers/ledger/supplier-ledger.controller.ts delete mode 100644 src/modules/suppliers/ledger/supplier-ledger.module.ts delete mode 100644 src/modules/suppliers/ledger/supplier-ledger.service.ts delete mode 100644 src/modules/suppliers/ledger/supplier-ledger.workflow.ts delete mode 100644 src/modules/suppliers/suppliers.module.ts create mode 100644 src/modules/uploads/image-uploader.service.ts create mode 100644 src/modules/uploads/uploader.service.ts create mode 100644 src/modules/uploads/uploads.controller.ts create mode 100644 src/modules/uploads/uploads.module.ts delete mode 100644 src/product-brands/dto/create-product-brand.dto.ts delete mode 100644 src/product-brands/dto/update-product-brand.dto.ts delete mode 100644 src/product-brands/product-brands.controller.ts delete mode 100644 src/product-brands/product-brands.module.ts delete mode 100644 src/product-brands/product-brands.service.ts delete mode 100644 src/product-categories/product-categories.service.ts delete mode 100644 src/product-variants/dto/create-product-variant.dto.ts delete mode 100644 src/product-variants/dto/update-product-variant.dto.ts delete mode 100644 src/product-variants/product-variants.controller.ts delete mode 100644 src/product-variants/product-variants.module.ts delete mode 100644 src/product-variants/product-variants.service.ts delete mode 100644 src/roles/dto/create-role.dto.ts delete mode 100644 src/roles/dto/update-role.dto.ts delete mode 100644 src/roles/roles.controller.ts delete mode 100644 src/roles/roles.module.ts delete mode 100644 src/roles/roles.service.ts delete mode 100644 src/stock-adjustments/dto/create-stock-adjustment.dto.ts delete mode 100644 src/stock-adjustments/dto/update-stock-adjustment.dto.ts delete mode 100644 src/stock-adjustments/stock-adjustments.controller.ts delete mode 100644 src/stock-adjustments/stock-adjustments.module.ts delete mode 100644 src/stock-adjustments/stock-adjustments.service.ts delete mode 100644 src/stock-movements/dto/create-stock-movement.dto.ts delete mode 100644 src/stock-movements/dto/update-stock-movement.dto.ts delete mode 100644 src/stock-movements/stock-movements.controller.ts delete mode 100644 src/stock-movements/stock-movements.module.ts delete mode 100644 src/stock-movements/stock-movements.service.ts delete mode 100644 src/users/dto/create-user.dto.ts delete mode 100644 src/users/dto/update-user.dto.ts delete mode 100644 src/users/users.controller.ts delete mode 100644 src/users/users.module.ts delete mode 100644 src/users/users.service.ts diff --git a/package.json b/package.json index 6b3b85d..20bfdad 100644 --- a/package.json +++ b/package.json @@ -13,9 +13,11 @@ "dotenv": "^17.2.3", "jalaliday": "^3.1.1", "jsonwebtoken": "^9.0.3", + "multer": "^2.0.2", "mysql2": "^3.15.3", "reflect-metadata": "^0.2.2", - "rxjs": "^7.8.1" + "rxjs": "^7.8.1", + "uuid": "^13.0.0" }, "description": "", "devDependencies": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 3a1d821..d25525b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -44,6 +44,9 @@ importers: jsonwebtoken: specifier: ^9.0.3 version: 9.0.3 + multer: + specifier: ^2.0.2 + version: 2.0.2 mysql2: specifier: ^3.15.3 version: 3.15.3 @@ -53,6 +56,9 @@ importers: rxjs: specifier: ^7.8.1 version: 7.8.2 + uuid: + specifier: ^13.0.0 + version: 13.0.0 devDependencies: '@eslint/eslintrc': specifier: ^3.2.0 @@ -3504,6 +3510,10 @@ packages: util-deprecate@1.0.2: resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==} + uuid@13.0.0: + resolution: {integrity: sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==} + hasBin: true + v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} @@ -7353,6 +7363,8 @@ snapshots: util-deprecate@1.0.2: {} + uuid@13.0.0: {} + v8-compile-cache-lib@3.0.1: {} v8-to-istanbul@9.3.0: diff --git a/prisma/migrations/20260102204301_init/migration.sql b/prisma/migrations/20260102204301_init/migration.sql deleted file mode 100644 index ce31427..0000000 --- a/prisma/migrations/20260102204301_init/migration.sql +++ /dev/null @@ -1,662 +0,0 @@ --- CreateTable -CREATE TABLE `Users` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `mobileNumber` CHAR(11) NOT NULL, - `password` VARCHAR(191) NOT NULL, - `firstName` VARCHAR(191) NOT NULL, - `lastName` VARCHAR(191) NOT NULL, - `roleId` INTEGER NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `deletedAt` TIMESTAMP(0) NULL, - `updatedAt` TIMESTAMP(0) NOT NULL, - - UNIQUE INDEX `Users_mobileNumber_key`(`mobileNumber`), - INDEX `Users_roleId_fkey`(`roleId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Roles` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `name` VARCHAR(100) NOT NULL, - `description` TEXT NULL, - `permissions` JSON NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - - UNIQUE INDEX `Roles_name_key`(`name`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Otp_Codes` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `mobileNumber` VARCHAR(20) NOT NULL, - `code` VARCHAR(10) NOT NULL, - `used` BOOLEAN NOT NULL DEFAULT false, - `expiresAt` TIMESTAMP(0) NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - - INDEX `Otp_Codes_mobileNumber_idx`(`mobileNumber`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Refresh_Tokens` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `tokenHash` VARCHAR(255) NOT NULL, - `userId` INTEGER NOT NULL, - `revoked` BOOLEAN NOT NULL DEFAULT false, - `expiresAt` TIMESTAMP(0) NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - - INDEX `Refresh_Tokens_userId_idx`(`userId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Bank_Branches` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `code` VARCHAR(10) NOT NULL, - `address` VARCHAR(500) NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - `bankId` INTEGER NOT NULL, - - UNIQUE INDEX `Bank_Branches_code_key`(`code`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Bank_Accounts` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `accountNumber` VARCHAR(20) NULL, - `cardNumber` VARCHAR(16) NULL, - `name` VARCHAR(255) NOT NULL, - `iban` VARCHAR(34) NULL, - `branchId` INTEGER NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - - UNIQUE INDEX `Bank_Accounts_accountNumber_key`(`accountNumber`), - UNIQUE INDEX `Bank_Accounts_cardNumber_key`(`cardNumber`), - UNIQUE INDEX `Bank_Accounts_iban_key`(`iban`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Bank_Account_Transactions` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `bankAccountId` INTEGER NOT NULL, - `type` ENUM('DEPOSIT', 'WITHDRAWAL') NOT NULL, - `amount` DECIMAL(15, 2) NOT NULL, - `balanceAfter` DECIMAL(15, 2) NOT NULL, - `referenceId` INTEGER NOT NULL, - `referenceType` ENUM('PURCHASE_PAYMENT', 'PURCHASE_REFUND', 'POS_SALE', 'POS_REFUND', 'BANK_TRANSFER', 'MANUAL_ADJUSTMENT') NOT NULL, - `description` TEXT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - - INDEX `Bank_Account_Transactions_bankAccountId_idx`(`bankAccountId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Bank_Account_Balance` ( - `bankAccountId` INTEGER NOT NULL, - `balance` DECIMAL(15, 2) NOT NULL, - `updatedAt` TIMESTAMP(0) NOT NULL, - - UNIQUE INDEX `Bank_Account_Balance_bankAccountId_key`(`bankAccountId`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Inventories` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `location` VARCHAR(255) NULL, - `isActive` BOOLEAN NOT NULL DEFAULT true, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - `isPointOfSale` BOOLEAN NOT NULL DEFAULT false, - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Inventory_Bank_Accounts` ( - `inventoryId` INTEGER NOT NULL, - `bankAccountId` INTEGER NOT NULL, - - INDEX `Inventory_Bank_Accounts_bankAccountId_idx`(`bankAccountId`), - PRIMARY KEY (`inventoryId`, `bankAccountId`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Pos_Accounts` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `code` VARCHAR(10) NOT NULL, - `description` VARCHAR(500) NULL, - `bankAccountId` INTEGER NOT NULL, - `inventoryId` INTEGER NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - - UNIQUE INDEX `Pos_Accounts_code_key`(`code`), - INDEX `Pos_Accounts_inventoryId_idx`(`inventoryId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Inventory_Transfers` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `code` VARCHAR(100) NOT NULL, - `description` TEXT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `fromInventoryId` INTEGER NOT NULL, - `toInventoryId` INTEGER NOT NULL, - - UNIQUE INDEX `Inventory_Transfers_code_key`(`code`), - INDEX `Inventory_Transfers_fromInventoryId_fkey`(`fromInventoryId`), - INDEX `Inventory_Transfers_toInventoryId_fkey`(`toInventoryId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Inventory_Transfer_Items` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `count` DECIMAL(10, 0) NOT NULL, - `productId` INTEGER NOT NULL, - `transferId` INTEGER NOT NULL, - - INDEX `Inventory_Transfer_Items_productId_fkey`(`productId`), - INDEX `Inventory_Transfer_Items_transferId_fkey`(`transferId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Banks` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `shortName` VARCHAR(3) NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - - UNIQUE INDEX `Banks_shortName_key`(`shortName`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Orders` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `orderNumber` VARCHAR(100) NOT NULL, - `status` ENUM('PENDING', 'REJECT', 'DONE') NOT NULL DEFAULT 'PENDING', - `totalAmount` DECIMAL(15, 2) NOT NULL, - `description` TEXT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - `customerId` INTEGER NULL, - - UNIQUE INDEX `Orders_orderNumber_key`(`orderNumber`), - INDEX `Orders_customerId_idx`(`customerId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Order_Items` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `quantity` DECIMAL(10, 0) NOT NULL, - `unitPrice` DECIMAL(15, 2) NOT NULL, - `totalPrice` DECIMAL(15, 2) NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `orderId` INTEGER NOT NULL, - `productId` INTEGER NOT NULL, - - INDEX `Order_Items_orderId_idx`(`orderId`), - INDEX `Order_Items_productId_idx`(`productId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Customers` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `firstName` VARCHAR(255) NOT NULL, - `lastName` VARCHAR(255) NOT NULL, - `email` VARCHAR(255) NULL, - `mobileNumber` CHAR(11) NOT NULL, - `address` TEXT NULL, - `city` VARCHAR(100) NULL, - `state` VARCHAR(100) NULL, - `country` VARCHAR(100) NULL, - `isActive` BOOLEAN NOT NULL DEFAULT true, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - - UNIQUE INDEX `Customers_mobileNumber_key`(`mobileNumber`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Trigger_Logs` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `message` TEXT NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `name` TEXT NOT NULL, - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Product_Variants` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `basePrice` DECIMAL(15, 2) NOT NULL, - `salePrice` DECIMAL(15, 2) NOT NULL, - `description` TEXT NULL, - `barcode` VARCHAR(100) NULL, - `imageUrl` VARCHAR(255) NULL, - `unit` VARCHAR(10) NULL, - `quantity` DECIMAL(10, 0) NULL DEFAULT 0.00, - `alertQuantity` DECIMAL(10, 0) NULL DEFAULT 5.00, - `isActive` BOOLEAN NOT NULL DEFAULT true, - `isFeatured` BOOLEAN NOT NULL DEFAULT false, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - `productId` INTEGER NOT NULL, - - UNIQUE INDEX `Product_Variants_barcode_key`(`barcode`), - INDEX `Product_Variants_productId_fkey`(`productId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Products` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `name` VARCHAR(255) NOT NULL, - `description` TEXT NULL, - `sku` VARCHAR(100) NULL, - `barcode` VARCHAR(100) NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - `brandId` INTEGER NULL, - `categoryId` INTEGER NULL, - `salePrice` DECIMAL(15, 0) NOT NULL DEFAULT 0.00, - `minimumStockAlertLevel` DECIMAL(10, 0) NOT NULL DEFAULT 1.00, - - UNIQUE INDEX `Products_sku_key`(`sku`), - UNIQUE INDEX `Products_barcode_key`(`barcode`), - INDEX `Products_brandId_fkey`(`brandId`), - INDEX `Products_categoryId_fkey`(`categoryId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Product_brands` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `name` VARCHAR(100) NOT NULL, - `description` TEXT NULL, - `imageUrl` VARCHAR(255) NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Product_categories` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `name` VARCHAR(100) NOT NULL, - `description` TEXT NULL, - `imageUrl` VARCHAR(255) NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Purchase_Receipts` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `code` VARCHAR(100) NOT NULL, - `totalAmount` DECIMAL(15, 2) NOT NULL, - `paidAmount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00, - `description` TEXT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `status` ENUM('UNPAID', 'PARTIALLY_PAID', 'PAID') NOT NULL DEFAULT 'UNPAID', - `supplierId` INTEGER NOT NULL, - `inventoryId` INTEGER NOT NULL, - - UNIQUE INDEX `Purchase_Receipts_code_key`(`code`), - INDEX `Purchase_Receipts_inventoryId_fkey`(`inventoryId`), - INDEX `Purchase_Receipts_supplierId_fkey`(`supplierId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Purchase_Receipt_Items` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `count` DECIMAL(10, 0) NOT NULL, - `unitPrice` DECIMAL(15, 2) NOT NULL, - `totalPrice` DECIMAL(15, 2) NOT NULL, - `receiptId` INTEGER NOT NULL, - `productId` INTEGER NOT NULL, - `description` TEXT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - - INDEX `Purchase_Receipt_Items_productId_fkey`(`productId`), - INDEX `Purchase_Receipt_Items_receiptId_fkey`(`receiptId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Purchase_Receipt_Payments` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `amount` DECIMAL(15, 2) NOT NULL, - `paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL, - `type` ENUM('PAYMENT', 'REFUND') NOT NULL, - `bankAccountId` INTEGER NOT NULL, - `receiptId` INTEGER NOT NULL, - `payedAt` TIMESTAMP(0) NOT NULL, - `description` TEXT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `inventoryBankAccountInventoryId` INTEGER NULL, - `inventoryBankAccountBankAccountId` INTEGER NULL, - - INDEX `Purchase_Receipt_Payments_receiptId_fkey`(`receiptId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Sales_Invoices` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `code` VARCHAR(100) NOT NULL, - `totalAmount` DECIMAL(15, 2) NOT NULL, - `description` TEXT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `customerId` INTEGER NULL, - `posAccountId` INTEGER NOT NULL, - - UNIQUE INDEX `Sales_Invoices_code_key`(`code`), - INDEX `Sales_Invoices_customerId_idx`(`customerId`), - INDEX `Sales_Invoices_posAccountId_idx`(`posAccountId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Sales_Invoice_Items` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `count` DECIMAL(10, 0) NOT NULL, - `unitPrice` DECIMAL(15, 2) NOT NULL DEFAULT 0.00, - `totalPrice` DECIMAL(15, 2) NOT NULL DEFAULT 0.00, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `invoiceId` INTEGER NOT NULL, - `productId` INTEGER NOT NULL, - - INDEX `Sales_Invoice_Items_invoiceId_idx`(`invoiceId`), - INDEX `Sales_Invoice_Items_productId_idx`(`productId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `SalesInvoicePayment` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `invoiceId` INTEGER NOT NULL, - `amount` DECIMAL(15, 2) NOT NULL, - `paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL, - `paidAt` DATETIME(3) NOT NULL, - `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), - - INDEX `SalesInvoicePayment_invoiceId_idx`(`invoiceId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Stock_Movements` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `type` ENUM('IN', 'OUT', 'ADJUST') NOT NULL, - `quantity` DECIMAL(10, 0) NOT NULL, - `unitPrice` DECIMAL(15, 2) NOT NULL, - `totalCost` DECIMAL(15, 2) NOT NULL, - `referenceType` ENUM('PURCHASE', 'SALES', 'ADJUSTMENT', 'INVENTORY_TRANSFER') NOT NULL, - `referenceId` VARCHAR(191) NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `productId` INTEGER NOT NULL, - `inventoryId` INTEGER NOT NULL, - `avgCost` DECIMAL(15, 2) NOT NULL, - `supplierId` INTEGER NULL, - `remainedInStock` DECIMAL(10, 0) NOT NULL DEFAULT 0.00, - `counterInventoryId` INTEGER NULL, - `customerId` INTEGER NULL, - - INDEX `Stock_Movements_inventoryId_fkey`(`inventoryId`), - INDEX `Stock_Movements_productId_fkey`(`productId`), - INDEX `Stock_Movements_counterInventoryId_fkey`(`counterInventoryId`), - INDEX `Stock_Movements_customerId_fkey`(`customerId`), - INDEX `Stock_Movements_supplierId_fkey`(`supplierId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Stock_Balance` ( - `quantity` DECIMAL(14, 3) NOT NULL DEFAULT 0.000, - `totalCost` DECIMAL(14, 2) NOT NULL DEFAULT 0.00, - `updatedAt` TIMESTAMP(0) NOT NULL, - `avgCost` DECIMAL(14, 2) NOT NULL DEFAULT 0.00, - `inventoryId` INTEGER NOT NULL, - `productId` INTEGER NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `id` INTEGER NOT NULL AUTO_INCREMENT, - - INDEX `Stock_Balance_productId_idx`(`productId`), - INDEX `Stock_Balance_inventoryId_idx`(`inventoryId`), - UNIQUE INDEX `Stock_Balance_productId_inventoryId_key`(`productId`, `inventoryId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Stock_Adjustments` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `adjustedQuantity` DECIMAL(10, 0) NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `productId` INTEGER NOT NULL, - `inventoryId` INTEGER NOT NULL, - - INDEX `Stock_Adjustments_inventoryId_fkey`(`inventoryId`), - INDEX `Stock_Adjustments_productId_fkey`(`productId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Stock_Reservations` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `quantity` DECIMAL(10, 0) NOT NULL, - `expiresAt` TIMESTAMP(0) NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `productId` INTEGER NOT NULL, - `inventoryId` INTEGER NOT NULL, - `orderId` INTEGER NOT NULL, - - INDEX `Stock_Reservations_inventoryId_idx`(`inventoryId`), - INDEX `Stock_Reservations_productId_idx`(`productId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Suppliers` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `firstName` VARCHAR(255) NOT NULL, - `lastName` VARCHAR(255) NOT NULL, - `email` VARCHAR(255) NULL, - `mobileNumber` CHAR(11) NOT NULL, - `address` TEXT NULL, - `city` VARCHAR(100) NULL, - `state` VARCHAR(100) NULL, - `country` VARCHAR(100) NULL, - `isActive` BOOLEAN NOT NULL DEFAULT true, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - - UNIQUE INDEX `Suppliers_mobileNumber_key`(`mobileNumber`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Supplier_Ledger` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `description` TEXT NULL, - `debit` DECIMAL(15, 2) NOT NULL DEFAULT 0, - `credit` DECIMAL(15, 2) NOT NULL DEFAULT 0, - `balance` DECIMAL(15, 2) NOT NULL, - `sourceType` ENUM('PURCHASE', 'PAYMENT', 'ADJUSTMENT', 'REFUND') NOT NULL, - `sourceId` INTEGER NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `supplierId` INTEGER NOT NULL, - - INDEX `Supplier_Ledger_supplierId_idx`(`supplierId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- AddForeignKey -ALTER TABLE `Users` ADD CONSTRAINT `Users_roleId_fkey` FOREIGN KEY (`roleId`) REFERENCES `Roles`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Refresh_Tokens` ADD CONSTRAINT `Refresh_Tokens_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `Users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Bank_Branches` ADD CONSTRAINT `Bank_Branches_bankId_fkey` FOREIGN KEY (`bankId`) REFERENCES `Banks`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Bank_Accounts` ADD CONSTRAINT `Bank_Accounts_branchId_fkey` FOREIGN KEY (`branchId`) REFERENCES `Bank_Branches`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Bank_Account_Transactions` ADD CONSTRAINT `Bank_Account_Transactions_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Bank_Account_Balance` ADD CONSTRAINT `Bank_Account_Balance_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Inventory_Bank_Accounts` ADD CONSTRAINT `Inventory_Bank_Accounts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Inventory_Bank_Accounts` ADD CONSTRAINT `Inventory_Bank_Accounts_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Pos_Accounts` ADD CONSTRAINT `Pos_Accounts_inventoryId_bankAccountId_fkey` FOREIGN KEY (`inventoryId`, `bankAccountId`) REFERENCES `Inventory_Bank_Accounts`(`inventoryId`, `bankAccountId`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Inventory_Transfers` ADD CONSTRAINT `Inventory_Transfers_fromInventoryId_fkey` FOREIGN KEY (`fromInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Inventory_Transfers` ADD CONSTRAINT `Inventory_Transfers_toInventoryId_fkey` FOREIGN KEY (`toInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Inventory_Transfer_Items` ADD CONSTRAINT `Inventory_Transfer_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Inventory_Transfer_Items` ADD CONSTRAINT `Inventory_Transfer_Items_transferId_fkey` FOREIGN KEY (`transferId`) REFERENCES `Inventory_Transfers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Orders` ADD CONSTRAINT `Orders_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Order_Items` ADD CONSTRAINT `Order_Items_orderId_fkey` FOREIGN KEY (`orderId`) REFERENCES `Orders`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Order_Items` ADD CONSTRAINT `Order_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Product_Variants` ADD CONSTRAINT `Product_Variants_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Products` ADD CONSTRAINT `Products_brandId_fkey` FOREIGN KEY (`brandId`) REFERENCES `Product_brands`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Products` ADD CONSTRAINT `Products_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Product_categories`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Purchase_Receipts` ADD CONSTRAINT `Purchase_Receipts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Purchase_Receipts` ADD CONSTRAINT `Purchase_Receipts_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Purchase_Receipt_Items` ADD CONSTRAINT `Purchase_Receipt_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Purchase_Receipt_Items` ADD CONSTRAINT `Purchase_Receipt_Items_receiptId_fkey` FOREIGN KEY (`receiptId`) REFERENCES `Purchase_Receipts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_receiptId_fkey` FOREIGN KEY (`receiptId`) REFERENCES `Purchase_Receipts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_inventoryBankAccountInventoryId_i_fkey` FOREIGN KEY (`inventoryBankAccountInventoryId`, `inventoryBankAccountBankAccountId`) REFERENCES `Inventory_Bank_Accounts`(`inventoryId`, `bankAccountId`) ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_posAccountId_fkey` FOREIGN KEY (`posAccountId`) REFERENCES `Pos_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `SalesInvoicePayment` ADD CONSTRAINT `SalesInvoicePayment_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_counterInventoryId_fkey` FOREIGN KEY (`counterInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Adjustments` ADD CONSTRAINT `Stock_Adjustments_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Adjustments` ADD CONSTRAINT `Stock_Adjustments_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Reservations` ADD CONSTRAINT `Stock_Reservations_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Stock_Reservations` ADD CONSTRAINT `Stock_Reservations_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `Supplier_Ledger` ADD CONSTRAINT `Supplier_Ledger_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/20260102205948_init/migration.sql b/prisma/migrations/20260102205948_init/migration.sql deleted file mode 100644 index 9b01486..0000000 --- a/prisma/migrations/20260102205948_init/migration.sql +++ /dev/null @@ -1,21 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `totalPrice` on the `Order_Items` table. All the data in the column will be lost. - - You are about to drop the column `totalPrice` on the `Purchase_Receipt_Items` table. All the data in the column will be lost. - - You are about to drop the column `totalPrice` on the `Sales_Invoice_Items` table. All the data in the column will be lost. - - Added the required column `totalAmount` to the `Order_Items` table without a default value. This is not possible if the table is not empty. - - Added the required column `totalAmount` to the `Purchase_Receipt_Items` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE `Order_Items` DROP COLUMN `totalPrice`, - ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL; - --- AlterTable -ALTER TABLE `Purchase_Receipt_Items` DROP COLUMN `totalPrice`, - ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL; - --- AlterTable -ALTER TABLE `Sales_Invoice_Items` DROP COLUMN `totalPrice`, - ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00; diff --git a/prisma/migrations/20260102214244_init/migration.sql b/prisma/migrations/20260102214244_init/migration.sql deleted file mode 100644 index 224907b..0000000 --- a/prisma/migrations/20260102214244_init/migration.sql +++ /dev/null @@ -1,27 +0,0 @@ -/* - Warnings: - - - You are about to drop the `SalesInvoicePayment` table. If the table is not empty, all the data it contains will be lost. - -*/ --- DropForeignKey -ALTER TABLE `SalesInvoicePayment` DROP FOREIGN KEY `SalesInvoicePayment_invoiceId_fkey`; - --- DropTable -DROP TABLE `SalesInvoicePayment`; - --- CreateTable -CREATE TABLE `Sales_Invoice_Payments` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `invoiceId` INTEGER NOT NULL, - `amount` DECIMAL(15, 2) NOT NULL, - `paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL, - `paidAt` DATETIME(3) NOT NULL, - `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), - - INDEX `Sales_Invoice_Payments_invoiceId_idx`(`invoiceId`), - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- AddForeignKey -ALTER TABLE `Sales_Invoice_Payments` ADD CONSTRAINT `Sales_Invoice_Payments_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/20260104092437_init/migration.sql b/prisma/migrations/20260104092437_init/migration.sql deleted file mode 100644 index c212949..0000000 --- a/prisma/migrations/20260104092437_init/migration.sql +++ /dev/null @@ -1,8 +0,0 @@ -/* - Warnings: - - - The values [REJECT] on the enum `Orders_status` will be removed. If these variants are still used in the database, this will fail. - -*/ --- AlterTable -ALTER TABLE `Orders` MODIFY `status` ENUM('PENDING', 'REJECTED', 'CANCELED', 'DONE') NOT NULL DEFAULT 'PENDING'; diff --git a/prisma/migrations/20260105090450_init/migration.sql b/prisma/migrations/20260105090450_init/migration.sql deleted file mode 100644 index 7acc048..0000000 --- a/prisma/migrations/20260105090450_init/migration.sql +++ /dev/null @@ -1,11 +0,0 @@ -/* - Warnings: - - - You are about to drop the `Bank_Account_Balance` table. If the table is not empty, all the data it contains will be lost. - -*/ --- DropForeignKey -ALTER TABLE `Bank_Account_Balance` DROP FOREIGN KEY `Bank_Account_Balance_bankAccountId_fkey`; - --- DropTable -DROP TABLE `Bank_Account_Balance`; diff --git a/prisma/migrations/20260105162935_add_stock_view/migration.sql b/prisma/migrations/20260105162935_add_stock_view/migration.sql deleted file mode 100644 index a32cafa..0000000 --- a/prisma/migrations/20260105162935_add_stock_view/migration.sql +++ /dev/null @@ -1,17 +0,0 @@ -CREATE OR REPLACE VIEW Stock_Available_View AS -SELECT - sb.productId, - sb.inventoryId, - sb.quantity AS physicalQuantity, - COALESCE(SUM(sr.quantity), 0) AS reservedQuantity, - ( - sb.quantity - COALESCE(SUM(sr.quantity), 0) - ) AS availableQuantity -FROM - Stock_Balance sb - LEFT JOIN Stock_Reservations sr ON sr.productId = sb.productId - AND sr.inventoryId = sb.inventoryId -GROUP BY - sb.productId, - sb.inventoryId, - sb.quantity; diff --git a/prisma/migrations/20260105165503_update_order_model/migration.sql b/prisma/migrations/20260105165503_update_order_model/migration.sql deleted file mode 100644 index 5086c54..0000000 --- a/prisma/migrations/20260105165503_update_order_model/migration.sql +++ /dev/null @@ -1,21 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `expiresAt` on the `Stock_Reservations` table. All the data in the column will be lost. - - Added the required column `posAccountId` to the `Orders` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE `Orders` ADD COLUMN `posAccountId` INTEGER NOT NULL; - --- AlterTable -ALTER TABLE `Stock_Reservations` DROP COLUMN `expiresAt`; - --- CreateIndex -CREATE INDEX `Orders_posAccountId_idx` ON `Orders`(`posAccountId`); - --- AddForeignKey -ALTER TABLE `Orders` ADD CONSTRAINT `Orders_posAccountId_fkey` FOREIGN KEY (`posAccountId`) REFERENCES `Pos_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Stock_Reservations` ADD CONSTRAINT `Stock_Reservations_orderId_fkey` FOREIGN KEY (`orderId`) REFERENCES `Orders`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/migrations/20260203172031_init/migration.sql b/prisma/migrations/20260203172031_init/migration.sql new file mode 100644 index 0000000..87216f2 --- /dev/null +++ b/prisma/migrations/20260203172031_init/migration.sql @@ -0,0 +1,155 @@ +-- CreateTable +CREATE TABLE `Goods` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `name` VARCHAR(255) NOT NULL, + `description` TEXT NULL, + `sku` VARCHAR(100) NOT NULL, + `localSku` VARCHAR(100) NOT NULL, + `barcode` VARCHAR(100) NULL, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `updatedAt` TIMESTAMP(0) NOT NULL, + `deletedAt` TIMESTAMP(0) NULL, + `categoryId` INTEGER NULL, + `baseSalePrice` DECIMAL(15, 0) NOT NULL DEFAULT 0.00, + + UNIQUE INDEX `Goods_localSku_key`(`localSku`), + UNIQUE INDEX `Goods_barcode_key`(`barcode`), + INDEX `Goods_categoryId_idx`(`categoryId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Good_categories` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `name` VARCHAR(100) NOT NULL, + `description` TEXT NULL, + `imageUrl` VARCHAR(255) NULL, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `updatedAt` TIMESTAMP(0) NOT NULL, + `deletedAt` TIMESTAMP(0) NULL, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Customers` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `firstName` VARCHAR(255) NOT NULL, + `lastName` VARCHAR(255) NOT NULL, + `email` VARCHAR(255) NULL, + `mobileNumber` CHAR(11) NOT NULL, + `address` TEXT NULL, + `isActive` BOOLEAN NOT NULL DEFAULT true, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `updatedAt` TIMESTAMP(0) NOT NULL, + `deletedAt` TIMESTAMP(0) NULL, + + UNIQUE INDEX `Customers_mobileNumber_key`(`mobileNumber`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Trigger_Logs` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `message` TEXT NOT NULL, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `name` TEXT NOT NULL, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Sales_Invoices` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `code` VARCHAR(100) NOT NULL, + `totalAmount` DECIMAL(15, 2) NOT NULL, + `description` TEXT NULL, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `updatedAt` TIMESTAMP(0) NOT NULL, + `customerId` INTEGER NULL, + + UNIQUE INDEX `Sales_Invoices_code_key`(`code`), + INDEX `Sales_Invoices_customerId_idx`(`customerId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Sales_Invoice_Items` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `count` DECIMAL(10, 0) NOT NULL, + `unitPrice` DECIMAL(15, 2) NOT NULL DEFAULT 0.00, + `totalAmount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `invoiceId` INTEGER NOT NULL, + `goodId` INTEGER NOT NULL, + `serviceId` INTEGER NOT NULL, + + INDEX `Sales_Invoice_Items_invoiceId_goodId_idx`(`invoiceId`, `goodId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Sales_Invoice_Payments` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `invoiceId` INTEGER NOT NULL, + `amount` DECIMAL(15, 2) NOT NULL, + `paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL, + `paidAt` DATETIME(3) NOT NULL, + `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + + INDEX `Sales_Invoice_Payments_invoiceId_idx`(`invoiceId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Services` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `name` VARCHAR(255) NOT NULL, + `description` TEXT NULL, + `sku` VARCHAR(100) NOT NULL, + `barcode` VARCHAR(100) NULL, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `updatedAt` TIMESTAMP(0) NOT NULL, + `deletedAt` TIMESTAMP(0) NULL, + `categoryId` INTEGER NULL, + `baseSalePrice` DECIMAL(15, 0) NOT NULL DEFAULT 0.00, + + UNIQUE INDEX `Services_sku_key`(`sku`), + UNIQUE INDEX `Services_barcode_key`(`barcode`), + INDEX `Services_categoryId_idx`(`categoryId`), + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- CreateTable +CREATE TABLE `Service_categories` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `name` VARCHAR(100) NOT NULL, + `description` TEXT NULL, + `imageUrl` VARCHAR(255) NULL, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `updatedAt` TIMESTAMP(0) NOT NULL, + `deletedAt` TIMESTAMP(0) NULL, + + PRIMARY KEY (`id`) +) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; + +-- AddForeignKey +ALTER TABLE `Goods` ADD CONSTRAINT `Goods_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Good_categories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_goodId_fkey` FOREIGN KEY (`goodId`) REFERENCES `Goods`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_serviceId_fkey` FOREIGN KEY (`serviceId`) REFERENCES `Services`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE `Sales_Invoice_Payments` ADD CONSTRAINT `Sales_Invoice_Payments_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE `Services` ADD CONSTRAINT `Services_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Service_categories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE; diff --git a/prisma/migrations/triggers.sql b/prisma/migrations/triggers.sql deleted file mode 100644 index 34ad72a..0000000 --- a/prisma/migrations/triggers.sql +++ /dev/null @@ -1,344 +0,0 @@ --- ------------------------------------------ --- Trigger: trg_transfer_item_after_insert --- Event: INSERT --- Table: Inventory_Transfer_Items --- ------------------------------------------ -DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`; - -CREATE TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin - -DECLARE fromInv INT; - DECLARE toInv INT; - DECLARE _avgCost DECIMAL(10,2); - DECLARE latestQuantityInOrigin DECIMAL(10,2); - DECLARE latestQuantityInDestination DECIMAL(10,2); - - SELECT fromInventoryId, toInventoryId INTO fromInv, toInv - FROM Inventory_Transfers WHERE id = NEW.transferId; - - SELECT COALESCE(avgCost, 0), COALESCE(quantity, 0) INTO _avgCost, latestQuantityInOrigin FROM Stock_Balance - WHERE ProductId = NEW.productId AND inventoryId = fromInv LIMIT 1; - - SELECT COALESCE(quantity, 0) INTO latestQuantityInDestination FROM Stock_Balance - WHERE ProductId = NEW.productId AND inventoryId = toInv LIMIT 1; - - - -- OUT from source - INSERT INTO Stock_Movements - (type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock) - VALUES - ('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, toInv, NOW(), latestQuantityInOrigin-NEW.count); - - -- IN to destination - INSERT INTO Stock_Movements - (type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock) - VALUES - ('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, fromInv, NOW(), latestQuantityInOrigin-NEW.count); -end; - --- ------------------------------------------ --- Trigger: trg_purchase_receipt_item_after_insert --- Event: INSERT --- Table: Purchase_Receipt_Items --- ------------------------------------------ -DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`; - -CREATE TRIGGER `trg_purchase_receipt_item_after_insert` AFTER INSERT ON `Purchase_Receipt_Items` FOR EACH ROW BEGIN DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0; - -DECLARE invId INT; - DECLARE suppId INT; - - -- Get inventory & supplier from receipt - SELECT inventoryId, supplierId - INTO invId, suppId - FROM Purchase_Receipts - WHERE id = NEW.receiptId; - - -- Get current stock quantity (if exists) - SELECT COALESCE(quantity, 0) - INTO latestQuantity - FROM Stock_Balance sb - WHERE sb.inventoryId = invId - AND sb.productId = NEW.productId - LIMIT 1; - - -- Insert stock movement - INSERT INTO Stock_Movements ( - type, - quantity, - unitPrice, - totalCost, - referenceType, - referenceId, - productId, - inventoryId, - avgCost, - supplierId, - remainedInStock, - createdAt - ) - VALUES ( - 'IN', - NEW.count, - NEW.unitPrice, - NEW.total, - 'PURCHASE', - NEW.receiptId, - NEW.productId, - invId, - CASE - WHEN NEW.count = 0 THEN 0 - ELSE NEW.total / NEW.count - END - -, - suppId, - latestQuantity + NEW.count, - NOW() - ); - -END; - --- ------------------------------------------ --- Trigger: trg_sales_invoice_items_before_insert --- Event: INSERT --- Table: Sales_Invoice_Items --- ------------------------------------------ -DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`; - -CREATE TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2); - -DECLARE inventory_id INT; - - - SELECT inventoryId INTO inventory_id - FROM Sales_Invoices si - WHERE si.id = NEW.invoiceId - LIMIT 1; - - SELECT COALESCE(quantity, 0) INTO current_stock - FROM Stock_Balance sb - WHERE productId = NEW.productId AND sb.inventoryId = inventory_id - LIMIT 1; - - - - IF NEW.count > current_stock THEN - SIGNAL SQLSTATE '45000' - SET MESSAGE_TEXT = 'موجودی کالا در انبار کافی نیست.'; - END IF; -end; - --- ------------------------------------------ --- Trigger: trg_sales_invoice_items_after_insert --- Event: INSERT --- Table: Sales_Invoice_Items --- ------------------------------------------ -DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`; - -CREATE TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2); - -DECLARE inventory_id INT; -DECLARE customer_id INT; - - - SELECT inventoryId , customerId INTO inventory_id, customer_id - FROM Sales_Invoices si - WHERE si.id = NEW.invoiceId - LIMIT 1; - - SELECT COALESCE(quantity, 0) INTO current_stock - FROM Stock_Balance sb - WHERE productId = NEW.productId AND sb.inventoryId = inventory_id - LIMIT 1; - - - - INSERT INTO Stock_Movements ( - type, - quantity, - unitPrice, - totalCost, - referenceType, - referenceId, - productId, - inventoryId, - avgCost, - remainedInStock, - customerId, - createdAt - ) - VALUES ( - 'OUT', - NEW.count, - NEW.unitPrice, - NEW.total, - 'SALES', - NEW.invoiceId, - NEW.productId, - inventory_id, - - CASE - WHEN NEW.count = 0 THEN 0 - ELSE NEW.total / NEW.count - END, - current_stock + NEW.count, - customer_id, - NOW() - ); - - -END; - --- ------------------------------------------ --- Trigger: trg_stock_transfer --- Event: INSERT --- Table: Stock_Movements --- ------------------------------------------ -DROP TRIGGER IF EXISTS `trg_stock_transfer`; - -CREATE TRIGGER `trg_stock_transfer` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'INVENTORY_TRANSFER' THEN IF NEW.type = 'IN' THEN -INSERT INTO - Stock_Balance ( - productId, - inventoryId, - quantity, - totalCost, - avgCost, - updatedAt - ) -VALUES ( - NEW.productId, - NEW.inventoryId, - NEW.quantity, - NEW.totalCost, - CASE - WHEN NEW.quantity = 0 THEN 0 - ELSE NEW.totalCost / NEW.quantity - END, - NOW() - ) -ON DUPLICATE KEY UPDATE - quantity = quantity + NEW.quantity, - totalCost = totalCost + NEW.totalCost, - avgCost = CASE - WHEN (quantity + NEW.quantity) = 0 THEN 0 - ELSE (totalCost + NEW.totalCost) / (quantity + NEW.quantity) - END, - updatedAt = NOW(); - -END IF; - -IF NEW.type = 'OUT' THEN IF EXISTS ( - SELECT 1 - FROM Stock_Balance sb - WHERE - sb.productId = NEW.productId - AND sb.inventoryId = NEW.inventoryId -) THEN - -UPDATE Stock_Balance sb -SET - sb.quantity = sb.quantity - NEW.quantity, - sb.totalCost = sb.totalCost - (sb.avgCost * NEW.quantity), - sb.updatedAt = NOW() -WHERE - sb.productId = NEW.productId - AND sb.inventoryId = NEW.inventoryId; - -ELSE -INSERT INTO - Stock_Balance ( - productId, - inventoryId, - quantity, - totalCost, - avgCost, - updatedAt - ) -VALUES ( - NEW.productId, - NEW.inventoryId, - - NEW.quantity, - - COALESCE(NEW.unitPrice, 0) * NEW.quantity, - COALESCE(NEW.unitPrice, 0), - NOW() - ); - -END IF; - -END IF; - -END IF; - -END; - --- ------------------------------------------ --- Trigger: trg_stock_purchase_insert --- Event: INSERT --- Table: Stock_Movements --- ------------------------------------------ -DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`; - -CREATE TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN - -INSERT INTO - Stock_Balance ( - productId, - quantity, - avgCost, - totalCost, - inventoryId, - updatedAt - ) -VALUES ( - NEW.productId, - NEW.quantity, - NEW.unitPrice, - NEW.totalCost, - NEW.inventoryId, - NOW() - ) -ON DUPLICATE KEY UPDATE - quantity = quantity + NEW.quantity, - totalCost = totalCost + NEW.totalCost, - avgCost = totalCost / quantity; - -END IF; - -END; - --- ------------------------------------------ --- Trigger: trg_stock_sale_insert --- Event: INSERT --- Table: Stock_Movements --- ------------------------------------------ -DROP TRIGGER IF EXISTS `trg_stock_sale_insert`; - -CREATE TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN - -INSERT INTO - Stock_Balance ( - productId, - quantity, - avgCost, - totalCost, - inventoryId, - updatedAt - ) -VALUES ( - NEW.productId, - NEW.quantity, - NEW.unitPrice, - NEW.totalCost, - NEW.inventoryId, - NOW() - ) -ON DUPLICATE KEY UPDATE - quantity = quantity - NEW.quantity, - totalCost = totalCost - NEW.totalCost, - avgCost = totalCost / quantity; - -END IF; - -END; diff --git a/prisma/schema/auth.prisma b/prisma/schema/auth.prisma deleted file mode 100644 index 61b09c5..0000000 --- a/prisma/schema/auth.prisma +++ /dev/null @@ -1,54 +0,0 @@ -model User { - id Int @id @default(autoincrement()) - mobileNumber String @unique @db.Char(11) - password String - firstName String - lastName String - roleId Int - createdAt DateTime @default(now()) @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - refreshTokens RefreshToken[] - role Role @relation("User_Role", fields: [roleId], references: [id], onUpdate: NoAction) - - @@index([roleId], map: "Users_roleId_fkey") - @@map("Users") -} - -model Role { - id Int @id @default(autoincrement()) - name String @unique @db.VarChar(100) - description String? @db.Text - permissions Json? - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - users User[] @relation("User_Role") - - @@map("Roles") -} - -model OtpCode { - id Int @id @default(autoincrement()) - mobileNumber String @db.VarChar(20) - code String @db.VarChar(10) - used Boolean @default(false) - expiresAt DateTime @db.Timestamp(0) - createdAt DateTime @default(now()) @db.Timestamp(0) - - @@index([mobileNumber]) - @@map("Otp_Codes") -} - -model RefreshToken { - id Int @id @default(autoincrement()) - tokenHash String @db.VarChar(255) - userId Int - revoked Boolean @default(false) - expiresAt DateTime @db.Timestamp(0) - createdAt DateTime @default(now()) @db.Timestamp(0) - user User @relation(fields: [userId], references: [id]) - - @@index([userId]) - @@map("Refresh_Tokens") -} diff --git a/prisma/schema/bank.prisma b/prisma/schema/bank.prisma deleted file mode 100644 index d98d5ac..0000000 --- a/prisma/schema/bank.prisma +++ /dev/null @@ -1,51 +0,0 @@ -model BankBranch { - id Int @id @default(autoincrement()) - name String @db.VarChar(255) - code String @unique() @db.VarChar(10) - address String? @db.VarChar(500) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - bankId Int - - bank Bank @relation("bank_branches", fields: [bankId], references: [id]) - bankAccounts BankAccount[] @relation("Bank_Accounts_branchId_fkey") - - @@map("Bank_Branches") -} - -model BankAccount { - id Int @id @default(autoincrement()) - accountNumber String? @unique @db.VarChar(20) - cardNumber String? @unique @db.VarChar(16) - name String @db.VarChar(255) - iban String? @unique @db.VarChar(34) - branchId Int - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - - branch BankBranch @relation("Bank_Accounts_branchId_fkey", fields: [branchId], references: [id]) - inventoryBankAccounts InventoryBankAccount[] - purchaseReceiptPayments PurchaseReceiptPayments[] - bankAccountTransactions BankAccountTransaction[] - - @@map("Bank_Accounts") -} - -model BankAccountTransaction { - id Int @id @default(autoincrement()) - bankAccountId Int - type BankAccountTransactionType - amount Decimal @db.Decimal(15, 2) - balanceAfter Decimal @db.Decimal(15, 2) - referenceId Int - referenceType BankTransactionRefType - description String? @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - - bankAccount BankAccount @relation(fields: [bankAccountId], references: [id]) - - @@index([bankAccountId]) - @@map("Bank_Account_Transactions") -} diff --git a/prisma/schema/enum.prisma b/prisma/schema/enum.prisma index 033e61e..d4e1e53 100644 --- a/prisma/schema/enum.prisma +++ b/prisma/schema/enum.prisma @@ -1,23 +1,3 @@ -enum OrderStatus { - PENDING - REJECTED - CANCELED - DONE -} - -enum MovementType { - IN - OUT - ADJUST -} - -enum MovementReferenceType { - PURCHASE - SALES - ADJUSTMENT - INVENTORY_TRANSFER -} - enum PaymentMethodType { CASH CARD @@ -26,34 +6,8 @@ enum PaymentMethodType { OTHER } -enum LedgerSourceType { - PURCHASE - PAYMENT - ADJUSTMENT - REFUND -} - -enum PaymentType { - PAYMENT - REFUND -} - enum PurchaseReceiptStatus { UNPAID PARTIALLY_PAID PAID } - -enum BankAccountTransactionType { - DEPOSIT - WITHDRAWAL -} - -enum BankTransactionRefType { - PURCHASE_PAYMENT - PURCHASE_REFUND - POS_SALE - POS_REFUND - BANK_TRANSFER - MANUAL_ADJUSTMENT -} diff --git a/prisma/schema/good.prisma b/prisma/schema/good.prisma new file mode 100644 index 0000000..18f4f0f --- /dev/null +++ b/prisma/schema/good.prisma @@ -0,0 +1,31 @@ +model Good { + id Int @id @default(autoincrement()) + name String @db.VarChar(255) + description String? @db.Text + sku String @db.VarChar(100) + localSku String @unique() @db.VarChar(100) + barcode String? @unique() @db.VarChar(100) + createdAt DateTime @default(now()) @db.Timestamp(0) + updatedAt DateTime @updatedAt @db.Timestamp(0) + deletedAt DateTime? @db.Timestamp(0) + categoryId Int? + baseSalePrice Decimal @default(0.00) @db.Decimal(15, 0) + category GoodCategory? @relation(fields: [categoryId], references: [id]) + salesInvoiceItems SalesInvoiceItem[] + + @@index([categoryId]) + @@map("Goods") +} + +model GoodCategory { + id Int @id @default(autoincrement()) + name String @db.VarChar(100) + description String? @db.Text + imageUrl String? @db.VarChar(255) + createdAt DateTime @default(now()) @db.Timestamp(0) + updatedAt DateTime @updatedAt @db.Timestamp(0) + deletedAt DateTime? @db.Timestamp(0) + goods Good[] + + @@map("Good_categories") +} diff --git a/prisma/schema/info.prisma b/prisma/schema/info.prisma deleted file mode 100644 index 8b13789..0000000 --- a/prisma/schema/info.prisma +++ /dev/null @@ -1 +0,0 @@ - diff --git a/prisma/schema/inventory.prisma b/prisma/schema/inventory.prisma deleted file mode 100644 index 37157d4..0000000 --- a/prisma/schema/inventory.prisma +++ /dev/null @@ -1,83 +0,0 @@ -model Inventory { - id Int @id @default(autoincrement()) - name String @db.VarChar(255) - location String? @db.VarChar(255) - isActive Boolean @default(true) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - isPointOfSale Boolean @default(false) - inventoryTransfersFrom InventoryTransfer[] @relation("Inventory_From") - inventoryTransfersTo InventoryTransfer[] @relation("Inventory_To") - purchaseReceipts PurchaseReceipt[] - stockAdjustments StockAdjustment[] @relation("Inventory_Stock_Adjustments") - stockBalances StockBalance[] @relation("StockBalance_inventory") - counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory") - stockMovements StockMovement[] @relation("StockMovement_Inventory") - inventoryBankAccounts InventoryBankAccount[] - stockReservations StockReservation[] - - @@map("Inventories") -} - -model InventoryBankAccount { - inventoryId Int - bankAccountId Int - - inventory Inventory @relation(fields: [inventoryId], references: [id]) - bankAccount BankAccount @relation(fields: [bankAccountId], references: [id]) - posAccounts PosAccount[] - purchaseReceiptPayments PurchaseReceiptPayments[] - - @@id([inventoryId, bankAccountId]) - @@index([bankAccountId]) - @@map("Inventory_Bank_Accounts") -} - -model PosAccount { - id Int @id @default(autoincrement()) - name String @db.VarChar(255) - code String @unique() @db.VarChar(10) - description String? @db.VarChar(500) - bankAccountId Int - inventoryId Int - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - - inventoryBankAccount InventoryBankAccount @relation(fields: [inventoryId, bankAccountId], references: [inventoryId, bankAccountId]) - salesInvoices SalesInvoice[] - orders Order[] - - @@index([inventoryId]) - @@map("Pos_Accounts") -} - -model InventoryTransfer { - id Int @id @default(autoincrement()) - code String @unique @db.VarChar(100) - description String? @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - fromInventoryId Int - toInventoryId Int - items InventoryTransferItem[] @relation("InventoryTransfer_Items") - fromInventory Inventory @relation("Inventory_From", fields: [fromInventoryId], references: [id]) - toInventory Inventory @relation("Inventory_To", fields: [toInventoryId], references: [id]) - - @@index([fromInventoryId], map: "Inventory_Transfers_fromInventoryId_fkey") - @@index([toInventoryId], map: "Inventory_Transfers_toInventoryId_fkey") - @@map("Inventory_Transfers") -} - -model InventoryTransferItem { - id Int @id @default(autoincrement()) - count Decimal @db.Decimal(10, 0) - productId Int - transferId Int - product Product @relation("InventoryTransferItem_Product", fields: [productId], references: [id]) - transfer InventoryTransfer @relation("InventoryTransfer_Items", fields: [transferId], references: [id]) - - @@index([productId], map: "Inventory_Transfer_Items_productId_fkey") - @@index([transferId], map: "Inventory_Transfer_Items_transferId_fkey") - @@map("Inventory_Transfer_Items") -} diff --git a/prisma/schema/mdm.prisma b/prisma/schema/mdm.prisma deleted file mode 100644 index 0a4aa03..0000000 --- a/prisma/schema/mdm.prisma +++ /dev/null @@ -1,12 +0,0 @@ -model Bank { - id Int @id @default(autoincrement()) - name String @db.VarChar(255) - shortName String @unique() @db.VarChar(3) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - - bankBranches BankBranch[] @relation("bank_branches") - - @@map("Banks") -} diff --git a/prisma/schema/order.prisma b/prisma/schema/order.prisma deleted file mode 100644 index 654b5d7..0000000 --- a/prisma/schema/order.prisma +++ /dev/null @@ -1,39 +0,0 @@ -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? - 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") -} - -model OrderItem { - id Int @id @default(autoincrement()) - quantity Decimal @db.Decimal(10, 0) - unitPrice Decimal @db.Decimal(15, 2) - totalAmount Decimal @db.Decimal(15, 2) - createdAt DateTime @default(now()) @db.Timestamp(0) - orderId Int - productId Int - - order Order @relation(fields: [orderId], references: [id], onUpdate: NoAction) - product Product @relation(fields: [productId], references: [id], onUpdate: NoAction) - - @@index([orderId]) - @@index([productId]) - @@map("Order_Items") -} diff --git a/prisma/schema/others.prisma b/prisma/schema/others.prisma index 10198bf..5f8bb33 100644 --- a/prisma/schema/others.prisma +++ b/prisma/schema/others.prisma @@ -1,20 +1,15 @@ model Customer { - id Int @id @default(autoincrement()) - firstName String @db.VarChar(255) - lastName String @db.VarChar(255) - email String? @db.VarChar(255) - mobileNumber String @unique @db.Char(11) - address String? @db.Text - city String? @db.VarChar(100) - state String? @db.VarChar(100) - country String? @db.VarChar(100) - isActive Boolean @default(true) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - orders Order[] @relation() - stockMovements StockMovement[] @relation() - salesInvoices SalesInvoice[] + id Int @id @default(autoincrement()) + firstName String @db.VarChar(255) + lastName String @db.VarChar(255) + email String? @db.VarChar(255) + mobileNumber String @unique @db.Char(11) + address String? @db.Text + isActive Boolean @default(true) + createdAt DateTime @default(now()) @db.Timestamp(0) + updatedAt DateTime @updatedAt @db.Timestamp(0) + deletedAt DateTime? @db.Timestamp(0) + salesInvoices SalesInvoice[] @@map("Customers") } diff --git a/prisma/schema/product.prisma b/prisma/schema/product.prisma deleted file mode 100644 index 1e2a840..0000000 --- a/prisma/schema/product.prisma +++ /dev/null @@ -1,78 +0,0 @@ -model ProductVariant { - id Int @id @default(autoincrement()) - name String @db.VarChar(255) - basePrice Decimal @db.Decimal(15, 2) - salePrice Decimal @db.Decimal(15, 2) - description String? @db.Text - barcode String? @unique() @db.VarChar(100) - imageUrl String? @db.VarChar(255) - unit String? @db.VarChar(10) - 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) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - productId Int - product Product @relation("Product_Variant", fields: [productId], references: [id], onUpdate: NoAction) - - @@index([productId], map: "Product_Variants_productId_fkey") - @@map("Product_Variants") -} - -model Product { - id Int @id @default(autoincrement()) - name String @db.VarChar(255) - description String? @db.Text - sku String? @unique() @db.VarChar(100) - barcode String? @unique() @db.VarChar(100) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - brandId Int? - categoryId Int? - salePrice Decimal @default(0.00) @db.Decimal(15, 0) - minimumStockAlertLevel Decimal @default(1.00) @db.Decimal(10, 0) - inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product") - variants ProductVariant[] @relation("Product_Variant") - brand ProductBrand? @relation("Product_Brand", fields: [brandId], references: [id], onUpdate: NoAction) - category ProductCategory? @relation("Product_Category", fields: [categoryId], references: [id], onUpdate: NoAction) - purchaseReceiptItems PurchaseReceiptItem[] @relation("Product_PurchaseReceiptItems") - stockAdjustments StockAdjustment[] @relation("Product_Stock_Adjustments") - stockBalances StockBalance[] @relation("StockBalance_Product") - stockMovements StockMovement[] @relation("StockMovement_Product") - salesInvoiceItems SalesInvoiceItem[] - stockReservations StockReservation[] - orderItems OrderItem[] - - @@index([brandId], map: "Products_brandId_fkey") - @@index([categoryId], map: "Products_categoryId_fkey") - @@map("Products") -} - -model ProductBrand { - id Int @id @default(autoincrement()) - name String @db.VarChar(100) - description String? @db.Text - imageUrl String? @db.VarChar(255) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - products Product[] @relation("Product_Brand") - - @@map("Product_brands") -} - -model ProductCategory { - id Int @id @default(autoincrement()) - name String @db.VarChar(100) - description String? @db.Text - imageUrl String? @db.VarChar(255) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - products Product[] @relation("Product_Category") - - @@map("Product_categories") -} diff --git a/prisma/schema/purchase.prisma b/prisma/schema/purchase.prisma deleted file mode 100644 index 2a7b7b3..0000000 --- a/prisma/schema/purchase.prisma +++ /dev/null @@ -1,58 +0,0 @@ -model PurchaseReceipt { - id Int @id @default(autoincrement()) - code String @unique @db.VarChar(100) - totalAmount Decimal @db.Decimal(15, 2) - paidAmount Decimal @default(0.00) @db.Decimal(15, 2) - description String? @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - status PurchaseReceiptStatus @default(UNPAID) - supplierId Int - inventoryId Int - items PurchaseReceiptItem[] @relation("PurchaseReceipt_Items") - inventory Inventory @relation(fields: [inventoryId], references: [id]) - supplier Supplier @relation(fields: [supplierId], references: [id]) - payments PurchaseReceiptPayments[] - - @@index([inventoryId], map: "Purchase_Receipts_inventoryId_fkey") - @@index([supplierId], map: "Purchase_Receipts_supplierId_fkey") - @@map("Purchase_Receipts") -} - -model PurchaseReceiptItem { - id Int @id @default(autoincrement()) - count Decimal @db.Decimal(10, 0) - unitPrice Decimal @db.Decimal(15, 2) - totalAmount Decimal @db.Decimal(15, 2) - receiptId Int - productId Int - description String? @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - product Product @relation("Product_PurchaseReceiptItems", fields: [productId], references: [id]) - receipt PurchaseReceipt @relation("PurchaseReceipt_Items", fields: [receiptId], references: [id]) - - @@index([productId], map: "Purchase_Receipt_Items_productId_fkey") - @@index([receiptId], map: "Purchase_Receipt_Items_receiptId_fkey") - @@map("Purchase_Receipt_Items") -} - -model PurchaseReceiptPayments { - id Int @id @default(autoincrement()) - amount Decimal @db.Decimal(15, 2) - paymentMethod PaymentMethodType - type PaymentType - bankAccountId Int - receiptId Int - payedAt DateTime @db.Timestamp(0) - description String? @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - - receipt PurchaseReceipt @relation(fields: [receiptId], references: [id]) - bankAccount BankAccount @relation(fields: [bankAccountId], references: [id]) - inventoryBankAccount InventoryBankAccount? @relation(fields: [inventoryBankAccountInventoryId, inventoryBankAccountBankAccountId], references: [inventoryId, bankAccountId]) - inventoryBankAccountInventoryId Int? - inventoryBankAccountBankAccountId Int? - - @@index([receiptId], map: "Purchase_Receipt_Payments_receiptId_fkey") - @@map("Purchase_Receipt_Payments") -} diff --git a/prisma/schema/sales.prisma b/prisma/schema/sales.prisma index 2758632..f547e3f 100644 --- a/prisma/schema/sales.prisma +++ b/prisma/schema/sales.prisma @@ -6,14 +6,11 @@ model SalesInvoice { createdAt DateTime @default(now()) @db.Timestamp(0) updatedAt DateTime @updatedAt @db.Timestamp(0) customerId Int? - posAccountId Int customer Customer? @relation(fields: [customerId], references: [id]) - posAccount PosAccount @relation(fields: [posAccountId], references: [id]) items SalesInvoiceItem[] salesInvoicePayments SalesInvoicePayment[] @@index([customerId]) - @@index([posAccountId]) @@map("Sales_Invoices") } @@ -24,12 +21,13 @@ model SalesInvoiceItem { totalAmount Decimal @default(0.00) @db.Decimal(15, 2) createdAt DateTime @default(now()) @db.Timestamp(0) invoiceId Int - productId Int + goodId Int + serviceId Int invoice SalesInvoice @relation(fields: [invoiceId], references: [id]) - product Product @relation(fields: [productId], references: [id]) + good Good? @relation(fields: [goodId], references: [id]) + service Service? @relation(fields: [serviceId], references: [id]) - @@index([invoiceId]) - @@index([productId]) + @@index([invoiceId, goodId]) @@map("Sales_Invoice_Items") } diff --git a/prisma/schema/service.prisma b/prisma/schema/service.prisma new file mode 100644 index 0000000..54dba81 --- /dev/null +++ b/prisma/schema/service.prisma @@ -0,0 +1,30 @@ +model Service { + id Int @id @default(autoincrement()) + name String @db.VarChar(255) + description String? @db.Text + sku String @unique() @db.VarChar(100) + barcode String? @unique() @db.VarChar(100) + createdAt DateTime @default(now()) @db.Timestamp(0) + updatedAt DateTime @updatedAt @db.Timestamp(0) + deletedAt DateTime? @db.Timestamp(0) + categoryId Int? + baseSalePrice Decimal @default(0.00) @db.Decimal(15, 0) + category ServiceCategory? @relation(fields: [categoryId], references: [id]) + salesInvoiceItems SalesInvoiceItem[] + + @@index([categoryId]) + @@map("Services") +} + +model ServiceCategory { + id Int @id @default(autoincrement()) + name String @db.VarChar(100) + description String? @db.Text + imageUrl String? @db.VarChar(255) + createdAt DateTime @default(now()) @db.Timestamp(0) + updatedAt DateTime @updatedAt @db.Timestamp(0) + deletedAt DateTime? @db.Timestamp(0) + services Service[] + + @@map("Service_categories") +} diff --git a/prisma/schema/stock.prisma b/prisma/schema/stock.prisma deleted file mode 100644 index f4844b8..0000000 --- a/prisma/schema/stock.prisma +++ /dev/null @@ -1,87 +0,0 @@ -model StockMovement { - id Int @id @default(autoincrement()) - type MovementType - quantity Decimal @db.Decimal(10, 0) - unitPrice Decimal @db.Decimal(15, 2) - totalCost Decimal @db.Decimal(15, 2) - referenceType MovementReferenceType - referenceId String - createdAt DateTime @default(now()) @db.Timestamp(0) - productId Int - inventoryId Int - avgCost Decimal @db.Decimal(15, 2) - supplierId Int? - remainedInStock Decimal @default(0.00) @db.Decimal(10, 0) - counterInventoryId Int? - customerId Int? - counterInventory Inventory? @relation("StockMovement_CounterInventory", fields: [counterInventoryId], references: [id]) - customer Customer? @relation(fields: [customerId], references: [id]) - inventory Inventory @relation("StockMovement_Inventory", fields: [inventoryId], references: [id]) - product Product @relation("StockMovement_Product", fields: [productId], references: [id]) - supplier Supplier? @relation("StockMovement_Supplier", fields: [supplierId], references: [id]) - - @@index([inventoryId], map: "Stock_Movements_inventoryId_fkey") - @@index([productId], map: "Stock_Movements_productId_fkey") - @@index([counterInventoryId], map: "Stock_Movements_counterInventoryId_fkey") - @@index([customerId], map: "Stock_Movements_customerId_fkey") - @@index([supplierId], map: "Stock_Movements_supplierId_fkey") - @@map("Stock_Movements") -} - -model StockBalance { - quantity Decimal @default(0.000) @db.Decimal(14, 3) - totalCost Decimal @default(0.00) @db.Decimal(14, 2) - updatedAt DateTime @updatedAt @db.Timestamp(0) - avgCost Decimal @default(0.00) @db.Decimal(14, 2) - inventoryId Int - productId Int - createdAt DateTime @default(now()) @db.Timestamp(0) - id Int @id @default(autoincrement()) - inventory Inventory @relation("StockBalance_inventory", fields: [inventoryId], references: [id]) - product Product @relation("StockBalance_Product", fields: [productId], references: [id]) - - @@unique([productId, inventoryId]) - @@index([productId]) - @@index([inventoryId]) - @@map("Stock_Balance") -} - -model StockAdjustment { - id Int @id @default(autoincrement()) - adjustedQuantity Decimal @db.Decimal(10, 0) - createdAt DateTime @default(now()) @db.Timestamp(0) - productId Int - inventoryId Int - inventory Inventory @relation("Inventory_Stock_Adjustments", fields: [inventoryId], references: [id]) - product Product @relation("Product_Stock_Adjustments", fields: [productId], references: [id]) - - @@index([inventoryId], map: "Stock_Adjustments_inventoryId_fkey") - @@index([productId], map: "Stock_Adjustments_productId_fkey") - @@map("Stock_Adjustments") -} - -model StockReservation { - id Int @id @default(autoincrement()) - quantity Decimal @db.Decimal(10, 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") -} diff --git a/prisma/schema/supplier.prisma b/prisma/schema/supplier.prisma deleted file mode 100644 index 65ee074..0000000 --- a/prisma/schema/supplier.prisma +++ /dev/null @@ -1,37 +0,0 @@ -model Supplier { - id Int @id @default(autoincrement()) - firstName String @db.VarChar(255) - lastName String @db.VarChar(255) - email String? @db.VarChar(255) - mobileNumber String @unique @db.Char(11) - address String? @db.Text - city String? @db.VarChar(100) - state String? @db.VarChar(100) - country String? @db.VarChar(100) - isActive Boolean @default(true) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - stockMovements StockMovement[] @relation("StockMovement_Supplier") - receipts PurchaseReceipt[] - ledger SupplierLedger[] - - @@map("Suppliers") -} - -model SupplierLedger { - id Int @id @default(autoincrement()) - description String? @db.Text - debit Decimal @default(0) @db.Decimal(15, 2) - credit Decimal @default(0) @db.Decimal(15, 2) - balance Decimal @db.Decimal(15, 2) - sourceType LedgerSourceType - sourceId Int - createdAt DateTime @default(now()) @db.Timestamp(0) - - supplierId Int - supplier Supplier @relation(fields: [supplierId], references: [id]) - - @@index([supplierId]) - @@map("Supplier_Ledger") -} diff --git a/src/app.module.ts b/src/app.module.ts index 7001b8e..af6bd20 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -1,57 +1,25 @@ import { Module } from '@nestjs/common' import { AppController } from './app.controller' import { AppService } from './app.service' -import { AuthModule } from './auth/auth.module' -import { CustomersModule } from './customers/customers.module' -import { InventoryTransferItemsModule } from './inventory-transfer-items/inventory-transfer-items.module' -import { InventoryTransfersModule } from './inventory-transfers/inventory-transfers.module' -import { BankAccountsModule } from './modules/bank-accounts/bank-accounts.module' -import { BankBranchesModule } from './modules/bank-branches/bank-branches.module' -import { BanksModule } from './modules/banks/banks.module' -import { CardexModule } from './modules/cardex/cardex.module' -import { InventoriesModule } from './modules/inventories/inventories.module' -import { PosModule } from './modules/pos/pos.module' -import { PurchaseReceiptsModule } from './modules/purchase-receipts/purchase-receipts.module' +import { AuthModule } from './modules/auth/auth.module' +import { CustomersModule } from './modules/customers/customers.module' +import { ProductCategoriesModule } from './modules/product-categories/product-categories.module' +import { ProductsModule } from './modules/products/products.module' import { SalesInvoicesModule } from './modules/sales-invoices/sales-invoices.module' import { StatisticsModule } from './modules/statistics/statistics.module' -import { SuppliersModule } from './modules/suppliers/suppliers.module' +import { UploadsModule } from './modules/uploads/uploads.module' import { PrismaModule } from './prisma/prisma.module' -import { ProductBrandsModule } from './product-brands/product-brands.module' -import { ProductCategoriesModule } from './product-categories/product-categories.module' -import { ProductVariantsModule } from './product-variants/product-variants.module' -import { ProductsModule } from './products/products.module' -import { RolesModule } from './roles/roles.module' -import { StockAdjustmentsModule } from './stock-adjustments/stock-adjustments.module' -import { StockBalanceModule } from './stock-balance/stock-balance.module' -import { StockMovementsModule } from './stock-movements/stock-movements.module' -import { UsersModule } from './users/users.module' @Module({ imports: [ PrismaModule, - UsersModule, AuthModule, - RolesModule, ProductsModule, - ProductVariantsModule, - ProductBrandsModule, ProductCategoriesModule, - SuppliersModule, CustomersModule, - InventoriesModule, - PurchaseReceiptsModule, SalesInvoicesModule, - InventoryTransfersModule, - InventoryTransferItemsModule, - StockMovementsModule, - StockAdjustmentsModule, - StockBalanceModule, - PosModule, - CardexModule, - BanksModule, - BankBranchesModule, - BankAccountsModule, StatisticsModule, + UploadsModule, ], controllers: [AppController], providers: [AppService], diff --git a/src/generated/prisma/browser.ts b/src/generated/prisma/browser.ts index b902b31..e3dd5a1 100644 --- a/src/generated/prisma/browser.ts +++ b/src/generated/prisma/browser.ts @@ -18,80 +18,15 @@ export { Prisma } export * as $Enums from './enums.js' export * from './enums.js'; /** - * Model User + * Model Good * */ -export type User = Prisma.UserModel +export type Good = Prisma.GoodModel /** - * Model Role + * Model GoodCategory * */ -export type Role = Prisma.RoleModel -/** - * Model OtpCode - * - */ -export type OtpCode = Prisma.OtpCodeModel -/** - * Model RefreshToken - * - */ -export type RefreshToken = Prisma.RefreshTokenModel -/** - * Model BankBranch - * - */ -export type BankBranch = Prisma.BankBranchModel -/** - * Model BankAccount - * - */ -export type BankAccount = Prisma.BankAccountModel -/** - * Model BankAccountTransaction - * - */ -export type BankAccountTransaction = Prisma.BankAccountTransactionModel -/** - * Model Inventory - * - */ -export type Inventory = Prisma.InventoryModel -/** - * Model InventoryBankAccount - * - */ -export type InventoryBankAccount = Prisma.InventoryBankAccountModel -/** - * Model PosAccount - * - */ -export type PosAccount = Prisma.PosAccountModel -/** - * Model InventoryTransfer - * - */ -export type InventoryTransfer = Prisma.InventoryTransferModel -/** - * Model InventoryTransferItem - * - */ -export type InventoryTransferItem = Prisma.InventoryTransferItemModel -/** - * Model Bank - * - */ -export type Bank = Prisma.BankModel -/** - * Model Order - * - */ -export type Order = Prisma.OrderModel -/** - * Model OrderItem - * - */ -export type OrderItem = Prisma.OrderItemModel +export type GoodCategory = Prisma.GoodCategoryModel /** * Model Customer * @@ -102,41 +37,6 @@ export type Customer = Prisma.CustomerModel * */ export type TriggerLog = Prisma.TriggerLogModel -/** - * Model ProductVariant - * - */ -export type ProductVariant = Prisma.ProductVariantModel -/** - * Model Product - * - */ -export type Product = Prisma.ProductModel -/** - * Model ProductBrand - * - */ -export type ProductBrand = Prisma.ProductBrandModel -/** - * Model ProductCategory - * - */ -export type ProductCategory = Prisma.ProductCategoryModel -/** - * Model PurchaseReceipt - * - */ -export type PurchaseReceipt = Prisma.PurchaseReceiptModel -/** - * Model PurchaseReceiptItem - * - */ -export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel -/** - * Model PurchaseReceiptPayments - * - */ -export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel /** * Model SalesInvoice * @@ -153,37 +53,12 @@ export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel */ export type SalesInvoicePayment = Prisma.SalesInvoicePaymentModel /** - * Model StockMovement + * Model Service * */ -export type StockMovement = Prisma.StockMovementModel +export type Service = Prisma.ServiceModel /** - * Model StockBalance + * Model ServiceCategory * */ -export type StockBalance = Prisma.StockBalanceModel -/** - * Model StockAdjustment - * - */ -export type StockAdjustment = Prisma.StockAdjustmentModel -/** - * Model StockReservation - * - */ -export type StockReservation = Prisma.StockReservationModel -/** - * Model Supplier - * - */ -export type Supplier = Prisma.SupplierModel -/** - * Model SupplierLedger - * - */ -export type SupplierLedger = Prisma.SupplierLedgerModel -/** - * Model StockAvailableView - * - */ -export type StockAvailableView = Prisma.StockAvailableViewModel +export type ServiceCategory = Prisma.ServiceCategoryModel diff --git a/src/generated/prisma/client.ts b/src/generated/prisma/client.ts index 66206d4..6c3eb6e 100644 --- a/src/generated/prisma/client.ts +++ b/src/generated/prisma/client.ts @@ -27,8 +27,8 @@ export * from "./enums.js" * @example * ``` * const prisma = new PrismaClient() - * // Fetch zero or more Users - * const users = await prisma.user.findMany() + * // Fetch zero or more Goods + * const goods = await prisma.good.findMany() * ``` * * Read more in our [docs](https://pris.ly/d/client). @@ -38,80 +38,15 @@ export type PrismaClient = { not?: Prisma.NestedStringFilter<$PrismaModel> | string } +export type StringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + search?: string + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + export type DateTimeFilter<$PrismaModel = never> = { equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] @@ -62,6 +77,28 @@ export type DateTimeNullableFilter<$PrismaModel = never> = { not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null } +export type IntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type DecimalFilter<$PrismaModel = never> = { + equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] + notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] + lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string +} + export type SortOrderInput = { sort: Prisma.SortOrder nulls?: Prisma.NullsOrder @@ -101,6 +138,24 @@ export type StringWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedStringFilter<$PrismaModel> } +export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + search?: string + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + export type DateTimeWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] @@ -129,136 +184,20 @@ export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> } -export type StringNullableFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - search?: string - not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null -} - -export type JsonNullableFilter<$PrismaModel = never> = -| Prisma.PatchUndefined< - Prisma.Either>, Exclude>, 'path'>>, - Required> - > -| Prisma.OptionalFlat>, 'path'>> - -export type JsonNullableFilterBase<$PrismaModel = never> = { - equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter - path?: string - mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> - string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> - string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> - array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null - array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null - array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null - lt?: runtime.InputJsonValue - lte?: runtime.InputJsonValue - gt?: runtime.InputJsonValue - gte?: runtime.InputJsonValue - not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter -} - -export type StringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - search?: string - not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null +export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null _count?: Prisma.NestedIntNullableFilter<$PrismaModel> - _min?: Prisma.NestedStringNullableFilter<$PrismaModel> - _max?: Prisma.NestedStringNullableFilter<$PrismaModel> -} - -export type JsonNullableWithAggregatesFilter<$PrismaModel = never> = -| Prisma.PatchUndefined< - Prisma.Either>, Exclude>, 'path'>>, - Required> - > -| Prisma.OptionalFlat>, 'path'>> - -export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = { - equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter - path?: string - mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> - string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> - string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> - array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null - array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null - array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null - lt?: runtime.InputJsonValue - lte?: runtime.InputJsonValue - gt?: runtime.InputJsonValue - gte?: runtime.InputJsonValue - not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter - _count?: Prisma.NestedIntNullableFilter<$PrismaModel> - _min?: Prisma.NestedJsonNullableFilter<$PrismaModel> - _max?: Prisma.NestedJsonNullableFilter<$PrismaModel> -} - -export type BoolFilter<$PrismaModel = never> = { - equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> - not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean -} - -export type BoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> - not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedBoolFilter<$PrismaModel> - _max?: Prisma.NestedBoolFilter<$PrismaModel> -} - -export type EnumBankAccountTransactionTypeFilter<$PrismaModel = never> = { - equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel> - in?: $Enums.BankAccountTransactionType[] - notIn?: $Enums.BankAccountTransactionType[] - not?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> | $Enums.BankAccountTransactionType -} - -export type DecimalFilter<$PrismaModel = never> = { - equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] - notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] - lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type EnumBankTransactionRefTypeFilter<$PrismaModel = never> = { - equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel> - in?: $Enums.BankTransactionRefType[] - notIn?: $Enums.BankTransactionRefType[] - not?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> | $Enums.BankTransactionRefType -} - -export type EnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel> - in?: $Enums.BankAccountTransactionType[] - notIn?: $Enums.BankAccountTransactionType[] - not?: Prisma.NestedEnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankAccountTransactionType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> + _avg?: Prisma.NestedFloatNullableFilter<$PrismaModel> + _sum?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedIntNullableFilter<$PrismaModel> + _max?: Prisma.NestedIntNullableFilter<$PrismaModel> } export type DecimalWithAggregatesFilter<$PrismaModel = never> = { @@ -277,102 +216,17 @@ export type DecimalWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedDecimalFilter<$PrismaModel> } -export type EnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel> - in?: $Enums.BankTransactionRefType[] - notIn?: $Enums.BankTransactionRefType[] - not?: Prisma.NestedEnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankTransactionRefType +export type BoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type BoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> -} - -export type EnumOrderStatusFilter<$PrismaModel = never> = { - equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel> - in?: $Enums.OrderStatus[] - notIn?: $Enums.OrderStatus[] - not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus -} - -export type IntNullableFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | Prisma.IntFieldRefInput<$PrismaModel> - lte?: number | Prisma.IntFieldRefInput<$PrismaModel> - gt?: number | Prisma.IntFieldRefInput<$PrismaModel> - gte?: number | Prisma.IntFieldRefInput<$PrismaModel> - not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null -} - -export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel> - in?: $Enums.OrderStatus[] - notIn?: $Enums.OrderStatus[] - not?: Prisma.NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> - _max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> -} - -export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | Prisma.IntFieldRefInput<$PrismaModel> - lte?: number | Prisma.IntFieldRefInput<$PrismaModel> - gt?: number | Prisma.IntFieldRefInput<$PrismaModel> - gte?: number | Prisma.IntFieldRefInput<$PrismaModel> - not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null - _count?: Prisma.NestedIntNullableFilter<$PrismaModel> - _avg?: Prisma.NestedFloatNullableFilter<$PrismaModel> - _sum?: Prisma.NestedIntNullableFilter<$PrismaModel> - _min?: Prisma.NestedIntNullableFilter<$PrismaModel> - _max?: Prisma.NestedIntNullableFilter<$PrismaModel> -} - -export type DecimalNullableFilter<$PrismaModel = never> = { - equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null - in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null - notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null - lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null - in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null - notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null - lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - _count?: Prisma.NestedIntNullableFilter<$PrismaModel> - _avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel> - _sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel> - _min?: Prisma.NestedDecimalNullableFilter<$PrismaModel> - _max?: Prisma.NestedDecimalNullableFilter<$PrismaModel> -} - -export type EnumPurchaseReceiptStatusFilter<$PrismaModel = never> = { - equals?: $Enums.PurchaseReceiptStatus | Prisma.EnumPurchaseReceiptStatusFieldRefInput<$PrismaModel> - in?: $Enums.PurchaseReceiptStatus[] - notIn?: $Enums.PurchaseReceiptStatus[] - not?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel> | $Enums.PurchaseReceiptStatus -} - -export type EnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.PurchaseReceiptStatus | Prisma.EnumPurchaseReceiptStatusFieldRefInput<$PrismaModel> - in?: $Enums.PurchaseReceiptStatus[] - notIn?: $Enums.PurchaseReceiptStatus[] - not?: Prisma.NestedEnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseReceiptStatus - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel> - _max?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> } export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = { @@ -382,13 +236,6 @@ export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = { not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType } -export type EnumPaymentTypeFilter<$PrismaModel = never> = { - equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel> - in?: $Enums.PaymentType[] - notIn?: $Enums.PaymentType[] - not?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> | $Enums.PaymentType -} - export type EnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel> in?: $Enums.PaymentMethodType[] @@ -399,67 +246,6 @@ export type EnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> } -export type EnumPaymentTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel> - in?: $Enums.PaymentType[] - notIn?: $Enums.PaymentType[] - not?: Prisma.NestedEnumPaymentTypeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> -} - -export type EnumMovementTypeFilter<$PrismaModel = never> = { - equals?: $Enums.MovementType | Prisma.EnumMovementTypeFieldRefInput<$PrismaModel> - in?: $Enums.MovementType[] - notIn?: $Enums.MovementType[] - not?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel> | $Enums.MovementType -} - -export type EnumMovementReferenceTypeFilter<$PrismaModel = never> = { - equals?: $Enums.MovementReferenceType | Prisma.EnumMovementReferenceTypeFieldRefInput<$PrismaModel> - in?: $Enums.MovementReferenceType[] - notIn?: $Enums.MovementReferenceType[] - not?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> | $Enums.MovementReferenceType -} - -export type EnumMovementTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.MovementType | Prisma.EnumMovementTypeFieldRefInput<$PrismaModel> - in?: $Enums.MovementType[] - notIn?: $Enums.MovementType[] - not?: Prisma.NestedEnumMovementTypeWithAggregatesFilter<$PrismaModel> | $Enums.MovementType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel> -} - -export type EnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.MovementReferenceType | Prisma.EnumMovementReferenceTypeFieldRefInput<$PrismaModel> - in?: $Enums.MovementReferenceType[] - notIn?: $Enums.MovementReferenceType[] - not?: Prisma.NestedEnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel> | $Enums.MovementReferenceType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> -} - -export type EnumLedgerSourceTypeFilter<$PrismaModel = never> = { - equals?: $Enums.LedgerSourceType | Prisma.EnumLedgerSourceTypeFieldRefInput<$PrismaModel> - in?: $Enums.LedgerSourceType[] - notIn?: $Enums.LedgerSourceType[] - not?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel> | $Enums.LedgerSourceType -} - -export type EnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.LedgerSourceType | Prisma.EnumLedgerSourceTypeFieldRefInput<$PrismaModel> - in?: $Enums.LedgerSourceType[] - notIn?: $Enums.LedgerSourceType[] - not?: Prisma.NestedEnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel> | $Enums.LedgerSourceType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel> -} - export type NestedIntFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> in?: number[] @@ -486,6 +272,21 @@ export type NestedStringFilter<$PrismaModel = never> = { not?: Prisma.NestedStringFilter<$PrismaModel> | string } +export type NestedStringNullableFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + search?: string + not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null +} + export type NestedDateTimeFilter<$PrismaModel = never> = { equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] @@ -508,6 +309,28 @@ export type NestedDateTimeNullableFilter<$PrismaModel = never> = { not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null } +export type NestedIntNullableFilter<$PrismaModel = never> = { + equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null + in?: number[] | null + notIn?: number[] | null + lt?: number | Prisma.IntFieldRefInput<$PrismaModel> + lte?: number | Prisma.IntFieldRefInput<$PrismaModel> + gt?: number | Prisma.IntFieldRefInput<$PrismaModel> + gte?: number | Prisma.IntFieldRefInput<$PrismaModel> + not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null +} + +export type NestedDecimalFilter<$PrismaModel = never> = { + equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] + notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] + lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string +} + export type NestedIntWithAggregatesFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> in?: number[] @@ -553,6 +376,24 @@ export type NestedStringWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedStringFilter<$PrismaModel> } +export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { + equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null + in?: string[] | null + notIn?: string[] | null + lt?: string | Prisma.StringFieldRefInput<$PrismaModel> + lte?: string | Prisma.StringFieldRefInput<$PrismaModel> + gt?: string | Prisma.StringFieldRefInput<$PrismaModel> + gte?: string | Prisma.StringFieldRefInput<$PrismaModel> + contains?: string | Prisma.StringFieldRefInput<$PrismaModel> + startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> + search?: string + not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null + _count?: Prisma.NestedIntNullableFilter<$PrismaModel> + _min?: Prisma.NestedStringNullableFilter<$PrismaModel> + _max?: Prisma.NestedStringNullableFilter<$PrismaModel> +} + export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = { equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> in?: Date[] | string[] @@ -581,165 +422,6 @@ export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> } -export type NestedIntNullableFilter<$PrismaModel = never> = { - equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null - in?: number[] | null - notIn?: number[] | null - lt?: number | Prisma.IntFieldRefInput<$PrismaModel> - lte?: number | Prisma.IntFieldRefInput<$PrismaModel> - gt?: number | Prisma.IntFieldRefInput<$PrismaModel> - gte?: number | Prisma.IntFieldRefInput<$PrismaModel> - not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null -} - -export type NestedStringNullableFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - search?: string - not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null -} - -export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null - in?: string[] | null - notIn?: string[] | null - lt?: string | Prisma.StringFieldRefInput<$PrismaModel> - lte?: string | Prisma.StringFieldRefInput<$PrismaModel> - gt?: string | Prisma.StringFieldRefInput<$PrismaModel> - gte?: string | Prisma.StringFieldRefInput<$PrismaModel> - contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel> - search?: string - not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null - _count?: Prisma.NestedIntNullableFilter<$PrismaModel> - _min?: Prisma.NestedStringNullableFilter<$PrismaModel> - _max?: Prisma.NestedStringNullableFilter<$PrismaModel> -} - -export type NestedJsonNullableFilter<$PrismaModel = never> = -| Prisma.PatchUndefined< - Prisma.Either>, Exclude>, 'path'>>, - Required> - > -| Prisma.OptionalFlat>, 'path'>> - -export type NestedJsonNullableFilterBase<$PrismaModel = never> = { - equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter - path?: string - mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel> - string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel> - string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel> - string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel> - array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null - array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null - array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null - lt?: runtime.InputJsonValue - lte?: runtime.InputJsonValue - gt?: runtime.InputJsonValue - gte?: runtime.InputJsonValue - not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter -} - -export type NestedBoolFilter<$PrismaModel = never> = { - equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> - not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean -} - -export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { - equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> - not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedBoolFilter<$PrismaModel> - _max?: Prisma.NestedBoolFilter<$PrismaModel> -} - -export type NestedEnumBankAccountTransactionTypeFilter<$PrismaModel = never> = { - equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel> - in?: $Enums.BankAccountTransactionType[] - notIn?: $Enums.BankAccountTransactionType[] - not?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> | $Enums.BankAccountTransactionType -} - -export type NestedDecimalFilter<$PrismaModel = never> = { - equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] - notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] - lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type NestedEnumBankTransactionRefTypeFilter<$PrismaModel = never> = { - equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel> - in?: $Enums.BankTransactionRefType[] - notIn?: $Enums.BankTransactionRefType[] - not?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> | $Enums.BankTransactionRefType -} - -export type NestedEnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel> - in?: $Enums.BankAccountTransactionType[] - notIn?: $Enums.BankAccountTransactionType[] - not?: Prisma.NestedEnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankAccountTransactionType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> -} - -export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = { - equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] - notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] - lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string - _count?: Prisma.NestedIntFilter<$PrismaModel> - _avg?: Prisma.NestedDecimalFilter<$PrismaModel> - _sum?: Prisma.NestedDecimalFilter<$PrismaModel> - _min?: Prisma.NestedDecimalFilter<$PrismaModel> - _max?: Prisma.NestedDecimalFilter<$PrismaModel> -} - -export type NestedEnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel> - in?: $Enums.BankTransactionRefType[] - notIn?: $Enums.BankTransactionRefType[] - not?: Prisma.NestedEnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankTransactionRefType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> -} - -export type NestedEnumOrderStatusFilter<$PrismaModel = never> = { - equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel> - in?: $Enums.OrderStatus[] - notIn?: $Enums.OrderStatus[] - not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus -} - -export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel> - in?: $Enums.OrderStatus[] - notIn?: $Enums.OrderStatus[] - not?: Prisma.NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> - _max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> -} - export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null in?: number[] | null @@ -767,48 +449,33 @@ export type NestedFloatNullableFilter<$PrismaModel = never> = { not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null } -export type NestedDecimalNullableFilter<$PrismaModel = never> = { - equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null - in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null - notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null +export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = { + equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> + in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] + notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = { - equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null - in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null - notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null - lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> - not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - _count?: Prisma.NestedIntNullableFilter<$PrismaModel> - _avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel> - _sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel> - _min?: Prisma.NestedDecimalNullableFilter<$PrismaModel> - _max?: Prisma.NestedDecimalNullableFilter<$PrismaModel> -} - -export type NestedEnumPurchaseReceiptStatusFilter<$PrismaModel = never> = { - equals?: $Enums.PurchaseReceiptStatus | Prisma.EnumPurchaseReceiptStatusFieldRefInput<$PrismaModel> - in?: $Enums.PurchaseReceiptStatus[] - notIn?: $Enums.PurchaseReceiptStatus[] - not?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel> | $Enums.PurchaseReceiptStatus -} - -export type NestedEnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.PurchaseReceiptStatus | Prisma.EnumPurchaseReceiptStatusFieldRefInput<$PrismaModel> - in?: $Enums.PurchaseReceiptStatus[] - notIn?: $Enums.PurchaseReceiptStatus[] - not?: Prisma.NestedEnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseReceiptStatus + not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel> - _max?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel> + _avg?: Prisma.NestedDecimalFilter<$PrismaModel> + _sum?: Prisma.NestedDecimalFilter<$PrismaModel> + _min?: Prisma.NestedDecimalFilter<$PrismaModel> + _max?: Prisma.NestedDecimalFilter<$PrismaModel> +} + +export type NestedBoolFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean +} + +export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = { + equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> + not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean + _count?: Prisma.NestedIntFilter<$PrismaModel> + _min?: Prisma.NestedBoolFilter<$PrismaModel> + _max?: Prisma.NestedBoolFilter<$PrismaModel> } export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = { @@ -818,13 +485,6 @@ export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = { not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType } -export type NestedEnumPaymentTypeFilter<$PrismaModel = never> = { - equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel> - in?: $Enums.PaymentType[] - notIn?: $Enums.PaymentType[] - not?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> | $Enums.PaymentType -} - export type NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = { equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel> in?: $Enums.PaymentMethodType[] @@ -835,65 +495,4 @@ export type NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never _max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> } -export type NestedEnumPaymentTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel> - in?: $Enums.PaymentType[] - notIn?: $Enums.PaymentType[] - not?: Prisma.NestedEnumPaymentTypeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> -} - -export type NestedEnumMovementTypeFilter<$PrismaModel = never> = { - equals?: $Enums.MovementType | Prisma.EnumMovementTypeFieldRefInput<$PrismaModel> - in?: $Enums.MovementType[] - notIn?: $Enums.MovementType[] - not?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel> | $Enums.MovementType -} - -export type NestedEnumMovementReferenceTypeFilter<$PrismaModel = never> = { - equals?: $Enums.MovementReferenceType | Prisma.EnumMovementReferenceTypeFieldRefInput<$PrismaModel> - in?: $Enums.MovementReferenceType[] - notIn?: $Enums.MovementReferenceType[] - not?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> | $Enums.MovementReferenceType -} - -export type NestedEnumMovementTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.MovementType | Prisma.EnumMovementTypeFieldRefInput<$PrismaModel> - in?: $Enums.MovementType[] - notIn?: $Enums.MovementType[] - not?: Prisma.NestedEnumMovementTypeWithAggregatesFilter<$PrismaModel> | $Enums.MovementType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel> -} - -export type NestedEnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.MovementReferenceType | Prisma.EnumMovementReferenceTypeFieldRefInput<$PrismaModel> - in?: $Enums.MovementReferenceType[] - notIn?: $Enums.MovementReferenceType[] - not?: Prisma.NestedEnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel> | $Enums.MovementReferenceType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> -} - -export type NestedEnumLedgerSourceTypeFilter<$PrismaModel = never> = { - equals?: $Enums.LedgerSourceType | Prisma.EnumLedgerSourceTypeFieldRefInput<$PrismaModel> - in?: $Enums.LedgerSourceType[] - notIn?: $Enums.LedgerSourceType[] - not?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel> | $Enums.LedgerSourceType -} - -export type NestedEnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.LedgerSourceType | Prisma.EnumLedgerSourceTypeFieldRefInput<$PrismaModel> - in?: $Enums.LedgerSourceType[] - notIn?: $Enums.LedgerSourceType[] - not?: Prisma.NestedEnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel> | $Enums.LedgerSourceType - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel> - _max?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel> -} - diff --git a/src/generated/prisma/enums.ts b/src/generated/prisma/enums.ts index 050874c..e4246fd 100644 --- a/src/generated/prisma/enums.ts +++ b/src/generated/prisma/enums.ts @@ -9,35 +9,6 @@ * 🟢 You can import this file directly. */ -export const OrderStatus = { - PENDING: 'PENDING', - REJECTED: 'REJECTED', - CANCELED: 'CANCELED', - DONE: 'DONE' -} as const - -export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus] - - -export const MovementType = { - IN: 'IN', - OUT: 'OUT', - ADJUST: 'ADJUST' -} as const - -export type MovementType = (typeof MovementType)[keyof typeof MovementType] - - -export const MovementReferenceType = { - PURCHASE: 'PURCHASE', - SALES: 'SALES', - ADJUSTMENT: 'ADJUSTMENT', - INVENTORY_TRANSFER: 'INVENTORY_TRANSFER' -} as const - -export type MovementReferenceType = (typeof MovementReferenceType)[keyof typeof MovementReferenceType] - - export const PaymentMethodType = { CASH: 'CASH', CARD: 'CARD', @@ -49,24 +20,6 @@ export const PaymentMethodType = { export type PaymentMethodType = (typeof PaymentMethodType)[keyof typeof PaymentMethodType] -export const LedgerSourceType = { - PURCHASE: 'PURCHASE', - PAYMENT: 'PAYMENT', - ADJUSTMENT: 'ADJUSTMENT', - REFUND: 'REFUND' -} as const - -export type LedgerSourceType = (typeof LedgerSourceType)[keyof typeof LedgerSourceType] - - -export const PaymentType = { - PAYMENT: 'PAYMENT', - REFUND: 'REFUND' -} as const - -export type PaymentType = (typeof PaymentType)[keyof typeof PaymentType] - - export const PurchaseReceiptStatus = { UNPAID: 'UNPAID', PARTIALLY_PAID: 'PARTIALLY_PAID', @@ -74,23 +27,3 @@ export const PurchaseReceiptStatus = { } as const export type PurchaseReceiptStatus = (typeof PurchaseReceiptStatus)[keyof typeof PurchaseReceiptStatus] - - -export const BankAccountTransactionType = { - DEPOSIT: 'DEPOSIT', - WITHDRAWAL: 'WITHDRAWAL' -} as const - -export type BankAccountTransactionType = (typeof BankAccountTransactionType)[keyof typeof BankAccountTransactionType] - - -export const BankTransactionRefType = { - PURCHASE_PAYMENT: 'PURCHASE_PAYMENT', - PURCHASE_REFUND: 'PURCHASE_REFUND', - POS_SALE: 'POS_SALE', - POS_REFUND: 'POS_REFUND', - BANK_TRANSFER: 'BANK_TRANSFER', - MANUAL_ADJUSTMENT: 'MANUAL_ADJUSTMENT' -} as const - -export type BankTransactionRefType = (typeof BankTransactionRefType)[keyof typeof BankTransactionRefType] diff --git a/src/generated/prisma/internal/class.ts b/src/generated/prisma/internal/class.ts index 6e99380..b942944 100644 --- a/src/generated/prisma/internal/class.ts +++ b/src/generated/prisma/internal/class.ts @@ -22,7 +22,7 @@ const config: runtime.GetPrismaClientConfig = { "clientVersion": "7.2.0", "engineVersion": "0c8ef2ce45c83248ab3df073180d5eda9e8be7a3", "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 purchaseReceiptPayments PurchaseReceiptPayments[]\n bankAccountTransactions BankAccountTransaction[]\n\n @@map(\"Bank_Accounts\")\n}\n\nmodel BankAccountTransaction {\n id Int @id @default(autoincrement())\n bankAccountId Int\n type BankAccountTransactionType\n amount Decimal @db.Decimal(15, 2)\n balanceAfter Decimal @db.Decimal(15, 2)\n referenceId Int\n referenceType BankTransactionRefType\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n\n bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])\n\n @@index([bankAccountId])\n @@map(\"Bank_Account_Transactions\")\n}\n\nenum OrderStatus {\n PENDING\n REJECTED\n CANCELED\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\nenum BankAccountTransactionType {\n DEPOSIT\n WITHDRAWAL\n}\n\nenum BankTransactionRefType {\n PURCHASE_PAYMENT\n PURCHASE_REFUND\n POS_SALE\n POS_REFUND\n BANK_TRANSFER\n MANUAL_ADJUSTMENT\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 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 stockReservations StockReservation[]\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 purchaseReceiptPayments PurchaseReceiptPayments[]\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 salesInvoices SalesInvoice[]\n orders Order[]\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 Order {\n id Int @id @default(autoincrement())\n orderNumber String @unique @db.VarChar(100)\n status OrderStatus @default(PENDING)\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 posAccountId Int\n\n customer Customer? @relation(fields: [customerId], references: [id], onUpdate: NoAction)\n posAccount PosAccount @relation(fields: [posAccountId], references: [id], onUpdate: NoAction)\n\n orderItems OrderItem[]\n stockReservations StockReservation[]\n\n @@index([posAccountId])\n @@index([customerId])\n @@map(\"Orders\")\n}\n\nmodel OrderItem {\n id Int @id @default(autoincrement())\n quantity Decimal @db.Decimal(10, 0)\n unitPrice Decimal @db.Decimal(15, 2)\n totalAmount Decimal @db.Decimal(15, 2)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n orderId Int\n productId Int\n\n order Order @relation(fields: [orderId], references: [id], onUpdate: NoAction)\n product Product @relation(fields: [productId], references: [id], onUpdate: NoAction)\n\n @@index([orderId])\n @@index([productId])\n @@map(\"Order_Items\")\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()\n stockMovements StockMovement[] @relation()\n salesInvoices SalesInvoice[]\n\n @@map(\"Customers\")\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() @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() @db.VarChar(100)\n barcode String? @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 minimumStockAlertLevel Decimal @default(1.00) @db.Decimal(10, 0)\n inventoryTransferItems InventoryTransferItem[] @relation(\"InventoryTransferItem_Product\")\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 stockAdjustments StockAdjustment[] @relation(\"Product_Stock_Adjustments\")\n stockBalances StockBalance[] @relation(\"StockBalance_Product\")\n stockMovements StockMovement[] @relation(\"StockMovement_Product\")\n salesInvoiceItems SalesInvoiceItem[]\n stockReservations StockReservation[]\n orderItems OrderItem[]\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 unitPrice Decimal @db.Decimal(15, 2)\n totalAmount 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 bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])\n inventoryBankAccount InventoryBankAccount? @relation(fields: [inventoryBankAccountInventoryId, inventoryBankAccountBankAccountId], references: [inventoryId, bankAccountId])\n inventoryBankAccountInventoryId Int?\n inventoryBankAccountBankAccountId Int?\n\n @@index([receiptId], map: \"Purchase_Receipt_Payments_receiptId_fkey\")\n @@map(\"Purchase_Receipt_Payments\")\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 posAccountId Int\n customer Customer? @relation(fields: [customerId], references: [id])\n posAccount PosAccount @relation(fields: [posAccountId], references: [id])\n items SalesInvoiceItem[]\n salesInvoicePayments SalesInvoicePayment[]\n\n @@index([customerId])\n @@index([posAccountId])\n @@map(\"Sales_Invoices\")\n}\n\nmodel SalesInvoiceItem {\n id Int @id @default(autoincrement())\n count Decimal @db.Decimal(10, 0)\n unitPrice Decimal @default(0.00) @db.Decimal(15, 2)\n totalAmount Decimal @default(0.00) @db.Decimal(15, 2)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n invoiceId Int\n productId Int\n invoice SalesInvoice @relation(fields: [invoiceId], references: [id])\n product Product @relation(fields: [productId], references: [id])\n\n @@index([invoiceId])\n @@index([productId])\n @@map(\"Sales_Invoice_Items\")\n}\n\nmodel SalesInvoicePayment {\n id Int @id @default(autoincrement())\n invoiceId Int\n amount Decimal @db.Decimal(15, 2)\n paymentMethod PaymentMethodType\n paidAt DateTime\n createdAt DateTime @default(now())\n\n invoice SalesInvoice @relation(fields: [invoiceId], references: [id])\n\n @@index([invoiceId])\n @@map(\"Sales_Invoice_Payments\")\n}\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../../src/generated/prisma\"\n moduleFormat = \"cjs\"\n previewFeatures = [\"views\"]\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 unitPrice 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(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 StockReservation {\n id Int @id @default(autoincrement())\n quantity Decimal @db.Decimal(10, 0)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n productId Int\n inventoryId Int\n orderId Int\n inventory Inventory @relation(fields: [inventoryId], references: [id])\n product Product @relation(fields: [productId], references: [id])\n order Order @relation(fields: [orderId], references: [id], onDelete: Cascade)\n\n @@index([inventoryId])\n @@index([productId])\n @@map(\"Stock_Reservations\")\n}\n\nview StockAvailableView {\n productId Int\n inventoryId Int\n physicalQuantity Decimal @db.Decimal(10, 0)\n reservedQuantity Decimal @db.Decimal(10, 0)\n availableQuantity Decimal @db.Decimal(10, 0)\n\n @@map(\"Stock_Available_View\")\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", + "inlineSchema": "enum PaymentMethodType {\n CASH\n CARD\n BANK\n CHECK\n OTHER\n}\n\nenum PurchaseReceiptStatus {\n UNPAID\n PARTIALLY_PAID\n PAID\n}\n\nmodel Good {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n description String? @db.Text\n sku String @db.VarChar(100)\n localSku String @unique() @db.VarChar(100)\n barcode String? @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 categoryId Int?\n baseSalePrice Decimal @default(0.00) @db.Decimal(15, 0)\n category GoodCategory? @relation(fields: [categoryId], references: [id])\n salesInvoiceItems SalesInvoiceItem[]\n\n @@index([categoryId])\n @@map(\"Goods\")\n}\n\nmodel GoodCategory {\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 goods Good[]\n\n @@map(\"Good_categories\")\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 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 salesInvoices SalesInvoice[]\n\n @@map(\"Customers\")\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 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 customer Customer? @relation(fields: [customerId], references: [id])\n items SalesInvoiceItem[]\n salesInvoicePayments SalesInvoicePayment[]\n\n @@index([customerId])\n @@map(\"Sales_Invoices\")\n}\n\nmodel SalesInvoiceItem {\n id Int @id @default(autoincrement())\n count Decimal @db.Decimal(10, 0)\n unitPrice Decimal @default(0.00) @db.Decimal(15, 2)\n totalAmount Decimal @default(0.00) @db.Decimal(15, 2)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n invoiceId Int\n goodId Int\n serviceId Int\n invoice SalesInvoice @relation(fields: [invoiceId], references: [id])\n good Good? @relation(fields: [goodId], references: [id])\n service Service? @relation(fields: [serviceId], references: [id])\n\n @@index([invoiceId, goodId])\n @@map(\"Sales_Invoice_Items\")\n}\n\nmodel SalesInvoicePayment {\n id Int @id @default(autoincrement())\n invoiceId Int\n amount Decimal @db.Decimal(15, 2)\n paymentMethod PaymentMethodType\n paidAt DateTime\n createdAt DateTime @default(now())\n\n invoice SalesInvoice @relation(fields: [invoiceId], references: [id])\n\n @@index([invoiceId])\n @@map(\"Sales_Invoice_Payments\")\n}\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../../src/generated/prisma\"\n moduleFormat = \"cjs\"\n previewFeatures = [\"views\"]\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel Service {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n description String? @db.Text\n sku String @unique() @db.VarChar(100)\n barcode String? @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 categoryId Int?\n baseSalePrice Decimal @default(0.00) @db.Decimal(15, 0)\n category ServiceCategory? @relation(fields: [categoryId], references: [id])\n salesInvoiceItems SalesInvoiceItem[]\n\n @@index([categoryId])\n @@map(\"Services\")\n}\n\nmodel ServiceCategory {\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 services Service[]\n\n @@map(\"Service_categories\")\n}\n", "runtimeDataModel": { "models": {}, "enums": {}, @@ -30,7 +30,7 @@ const config: runtime.GetPrismaClientConfig = { } } -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\"},{\"name\":\"purchaseReceiptPayments\",\"kind\":\"object\",\"type\":\"PurchaseReceiptPayments\",\"relationName\":\"BankAccountToPurchaseReceiptPayments\"},{\"name\":\"bankAccountTransactions\",\"kind\":\"object\",\"type\":\"BankAccountTransaction\",\"relationName\":\"BankAccountToBankAccountTransaction\"}],\"dbName\":\"Bank_Accounts\"},\"BankAccountTransaction\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bankAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"BankAccountTransactionType\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"balanceAfter\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"referenceId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"referenceType\",\"kind\":\"enum\",\"type\":\"BankTransactionRefType\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bankAccount\",\"kind\":\"object\",\"type\":\"BankAccount\",\"relationName\":\"BankAccountToBankAccountTransaction\"}],\"dbName\":\"Bank_Account_Transactions\"},\"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\":\"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\"},{\"name\":\"stockReservations\",\"kind\":\"object\",\"type\":\"StockReservation\",\"relationName\":\"InventoryToStockReservation\"}],\"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\"},{\"name\":\"purchaseReceiptPayments\",\"kind\":\"object\",\"type\":\"PurchaseReceiptPayments\",\"relationName\":\"InventoryBankAccountToPurchaseReceiptPayments\"}],\"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\"},{\"name\":\"salesInvoices\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"PosAccountToSalesInvoice\"},{\"name\":\"orders\",\"kind\":\"object\",\"type\":\"Order\",\"relationName\":\"OrderToPosAccount\"}],\"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\"},\"Order\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"orderNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"OrderStatus\"},{\"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\":\"posAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"CustomerToOrder\"},{\"name\":\"posAccount\",\"kind\":\"object\",\"type\":\"PosAccount\",\"relationName\":\"OrderToPosAccount\"},{\"name\":\"orderItems\",\"kind\":\"object\",\"type\":\"OrderItem\",\"relationName\":\"OrderToOrderItem\"},{\"name\":\"stockReservations\",\"kind\":\"object\",\"type\":\"StockReservation\",\"relationName\":\"OrderToStockReservation\"}],\"dbName\":\"Orders\"},\"OrderItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"unitPrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"orderId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"order\",\"kind\":\"object\",\"type\":\"Order\",\"relationName\":\"OrderToOrderItem\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"OrderItemToProduct\"}],\"dbName\":\"Order_Items\"},\"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\":\"CustomerToOrder\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"CustomerToStockMovement\"},{\"name\":\"salesInvoices\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"CustomerToSalesInvoice\"}],\"dbName\":\"Customers\"},\"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\":\"minimumStockAlertLevel\",\"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\":\"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\"},{\"name\":\"salesInvoiceItems\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"ProductToSalesInvoiceItem\"},{\"name\":\"stockReservations\",\"kind\":\"object\",\"type\":\"StockReservation\",\"relationName\":\"ProductToStockReservation\"},{\"name\":\"orderItems\",\"kind\":\"object\",\"type\":\"OrderItem\",\"relationName\":\"OrderItemToProduct\"}],\"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\":\"unitPrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalAmount\",\"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\"},{\"name\":\"bankAccount\",\"kind\":\"object\",\"type\":\"BankAccount\",\"relationName\":\"BankAccountToPurchaseReceiptPayments\"},{\"name\":\"inventoryBankAccount\",\"kind\":\"object\",\"type\":\"InventoryBankAccount\",\"relationName\":\"InventoryBankAccountToPurchaseReceiptPayments\"},{\"name\":\"inventoryBankAccountInventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryBankAccountBankAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"}],\"dbName\":\"Purchase_Receipt_Payments\"},\"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\":\"posAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"CustomerToSalesInvoice\"},{\"name\":\"posAccount\",\"kind\":\"object\",\"type\":\"PosAccount\",\"relationName\":\"PosAccountToSalesInvoice\"},{\"name\":\"items\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"SalesInvoiceToSalesInvoiceItem\"},{\"name\":\"salesInvoicePayments\",\"kind\":\"object\",\"type\":\"SalesInvoicePayment\",\"relationName\":\"SalesInvoiceToSalesInvoicePayment\"}],\"dbName\":\"Sales_Invoices\"},\"SalesInvoiceItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"unitPrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalAmount\",\"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\":\"SalesInvoiceToSalesInvoiceItem\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"ProductToSalesInvoiceItem\"}],\"dbName\":\"Sales_Invoice_Items\"},\"SalesInvoicePayment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"invoiceId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"paymentMethod\",\"kind\":\"enum\",\"type\":\"PaymentMethodType\"},{\"name\":\"paidAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"invoice\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"SalesInvoiceToSalesInvoicePayment\"}],\"dbName\":\"Sales_Invoice_Payments\"},\"StockMovement\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"MovementType\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"unitPrice\",\"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\":\"CustomerToStockMovement\"},{\"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\"},\"StockReservation\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"orderId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"InventoryToStockReservation\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"ProductToStockReservation\"},{\"name\":\"order\",\"kind\":\"object\",\"type\":\"Order\",\"relationName\":\"OrderToStockReservation\"}],\"dbName\":\"Stock_Reservations\"},\"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\"},\"StockAvailableView\":{\"fields\":[{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"physicalQuantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"reservedQuantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"availableQuantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"}],\"dbName\":\"Stock_Available_View\"}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"Good\":{\"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\":\"localSku\",\"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\":\"categoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"baseSalePrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"category\",\"kind\":\"object\",\"type\":\"GoodCategory\",\"relationName\":\"GoodToGoodCategory\"},{\"name\":\"salesInvoiceItems\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"GoodToSalesInvoiceItem\"}],\"dbName\":\"Goods\"},\"GoodCategory\":{\"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\":\"goods\",\"kind\":\"object\",\"type\":\"Good\",\"relationName\":\"GoodToGoodCategory\"}],\"dbName\":\"Good_categories\"},\"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\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"salesInvoices\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"CustomerToSalesInvoice\"}],\"dbName\":\"Customers\"},\"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\"},\"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\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"CustomerToSalesInvoice\"},{\"name\":\"items\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"SalesInvoiceToSalesInvoiceItem\"},{\"name\":\"salesInvoicePayments\",\"kind\":\"object\",\"type\":\"SalesInvoicePayment\",\"relationName\":\"SalesInvoiceToSalesInvoicePayment\"}],\"dbName\":\"Sales_Invoices\"},\"SalesInvoiceItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"unitPrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"invoiceId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"goodId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"serviceId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"invoice\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"SalesInvoiceToSalesInvoiceItem\"},{\"name\":\"good\",\"kind\":\"object\",\"type\":\"Good\",\"relationName\":\"GoodToSalesInvoiceItem\"},{\"name\":\"service\",\"kind\":\"object\",\"type\":\"Service\",\"relationName\":\"SalesInvoiceItemToService\"}],\"dbName\":\"Sales_Invoice_Items\"},\"SalesInvoicePayment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"invoiceId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"amount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"paymentMethod\",\"kind\":\"enum\",\"type\":\"PaymentMethodType\"},{\"name\":\"paidAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"invoice\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"SalesInvoiceToSalesInvoicePayment\"}],\"dbName\":\"Sales_Invoice_Payments\"},\"Service\":{\"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\":\"categoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"baseSalePrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"category\",\"kind\":\"object\",\"type\":\"ServiceCategory\",\"relationName\":\"ServiceToServiceCategory\"},{\"name\":\"salesInvoiceItems\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"SalesInvoiceItemToService\"}],\"dbName\":\"Services\"},\"ServiceCategory\":{\"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\":\"services\",\"kind\":\"object\",\"type\":\"Service\",\"relationName\":\"ServiceToServiceCategory\"}],\"dbName\":\"Service_categories\"}},\"enums\":{},\"types\":{}}") async function decodeBase64AsWasm(wasmBase64: string): Promise { const { Buffer } = await import('node:buffer') @@ -60,8 +60,8 @@ export interface PrismaClientConstructor { * @example * ``` * const prisma = new PrismaClient() - * // Fetch zero or more Users - * const users = await prisma.user.findMany() + * // Fetch zero or more Goods + * const goods = await prisma.good.findMany() * ``` * * Read more in our [docs](https://pris.ly/d/client). @@ -82,8 +82,8 @@ export interface PrismaClientConstructor { * @example * ``` * const prisma = new PrismaClient() - * // Fetch zero or more Users - * const users = await prisma.user.findMany() + * // Fetch zero or more Goods + * const goods = await prisma.good.findMany() * ``` * * Read more in our [docs](https://pris.ly/d/client). @@ -177,154 +177,24 @@ export interface PrismaClient< }>> /** - * `prisma.user`: Exposes CRUD operations for the **User** model. + * `prisma.good`: Exposes CRUD operations for the **Good** model. * Example usage: * ```ts - * // Fetch zero or more Users - * const users = await prisma.user.findMany() + * // Fetch zero or more Goods + * const goods = await prisma.good.findMany() * ``` */ - get user(): Prisma.UserDelegate; + get good(): Prisma.GoodDelegate; /** - * `prisma.role`: Exposes CRUD operations for the **Role** model. + * `prisma.goodCategory`: Exposes CRUD operations for the **GoodCategory** model. * Example usage: * ```ts - * // Fetch zero or more Roles - * const roles = await prisma.role.findMany() + * // Fetch zero or more GoodCategories + * const goodCategories = await prisma.goodCategory.findMany() * ``` */ - get role(): Prisma.RoleDelegate; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `prisma.bankAccountTransaction`: Exposes CRUD operations for the **BankAccountTransaction** model. - * Example usage: - * ```ts - * // Fetch zero or more BankAccountTransactions - * const bankAccountTransactions = await prisma.bankAccountTransaction.findMany() - * ``` - */ - get bankAccountTransaction(): Prisma.BankAccountTransactionDelegate; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `prisma.orderItem`: Exposes CRUD operations for the **OrderItem** model. - * Example usage: - * ```ts - * // Fetch zero or more OrderItems - * const orderItems = await prisma.orderItem.findMany() - * ``` - */ - get orderItem(): Prisma.OrderItemDelegate; + get goodCategory(): Prisma.GoodCategoryDelegate; /** * `prisma.customer`: Exposes CRUD operations for the **Customer** model. @@ -346,76 +216,6 @@ export interface PrismaClient< */ get triggerLog(): Prisma.TriggerLogDelegate; - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `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; - - /** - * `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; - /** * `prisma.salesInvoice`: Exposes CRUD operations for the **SalesInvoice** model. * Example usage: @@ -447,74 +247,24 @@ export interface PrismaClient< get salesInvoicePayment(): Prisma.SalesInvoicePaymentDelegate; /** - * `prisma.stockMovement`: Exposes CRUD operations for the **StockMovement** model. + * `prisma.service`: Exposes CRUD operations for the **Service** model. * Example usage: * ```ts - * // Fetch zero or more StockMovements - * const stockMovements = await prisma.stockMovement.findMany() + * // Fetch zero or more Services + * const services = await prisma.service.findMany() * ``` */ - get stockMovement(): Prisma.StockMovementDelegate; + get service(): Prisma.ServiceDelegate; /** - * `prisma.stockBalance`: Exposes CRUD operations for the **StockBalance** model. + * `prisma.serviceCategory`: Exposes CRUD operations for the **ServiceCategory** model. * Example usage: * ```ts - * // Fetch zero or more StockBalances - * const stockBalances = await prisma.stockBalance.findMany() + * // Fetch zero or more ServiceCategories + * const serviceCategories = await prisma.serviceCategory.findMany() * ``` */ - get stockBalance(): Prisma.StockBalanceDelegate; - - /** - * `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; - - /** - * `prisma.stockReservation`: Exposes CRUD operations for the **StockReservation** model. - * Example usage: - * ```ts - * // Fetch zero or more StockReservations - * const stockReservations = await prisma.stockReservation.findMany() - * ``` - */ - get stockReservation(): Prisma.StockReservationDelegate; - - /** - * `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; - - /** - * `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; - - /** - * `prisma.stockAvailableView`: Exposes CRUD operations for the **StockAvailableView** model. - * Example usage: - * ```ts - * // Fetch zero or more StockAvailableViews - * const stockAvailableViews = await prisma.stockAvailableView.findMany() - * ``` - */ - get stockAvailableView(): Prisma.StockAvailableViewDelegate; + get serviceCategory(): Prisma.ServiceCategoryDelegate; } export function getPrismaClientClass(): PrismaClientConstructor { diff --git a/src/generated/prisma/internal/prismaNamespace.ts b/src/generated/prisma/internal/prismaNamespace.ts index 9974b65..f05a271 100644 --- a/src/generated/prisma/internal/prismaNamespace.ts +++ b/src/generated/prisma/internal/prismaNamespace.ts @@ -384,40 +384,15 @@ type FieldRefInputType = Model extends never ? never : FieldRe export const ModelName = { - User: 'User', - Role: 'Role', - OtpCode: 'OtpCode', - RefreshToken: 'RefreshToken', - BankBranch: 'BankBranch', - BankAccount: 'BankAccount', - BankAccountTransaction: 'BankAccountTransaction', - Inventory: 'Inventory', - InventoryBankAccount: 'InventoryBankAccount', - PosAccount: 'PosAccount', - InventoryTransfer: 'InventoryTransfer', - InventoryTransferItem: 'InventoryTransferItem', - Bank: 'Bank', - Order: 'Order', - OrderItem: 'OrderItem', + Good: 'Good', + GoodCategory: 'GoodCategory', Customer: 'Customer', TriggerLog: 'TriggerLog', - ProductVariant: 'ProductVariant', - Product: 'Product', - ProductBrand: 'ProductBrand', - ProductCategory: 'ProductCategory', - PurchaseReceipt: 'PurchaseReceipt', - PurchaseReceiptItem: 'PurchaseReceiptItem', - PurchaseReceiptPayments: 'PurchaseReceiptPayments', SalesInvoice: 'SalesInvoice', SalesInvoiceItem: 'SalesInvoiceItem', SalesInvoicePayment: 'SalesInvoicePayment', - StockMovement: 'StockMovement', - StockBalance: 'StockBalance', - StockAdjustment: 'StockAdjustment', - StockReservation: 'StockReservation', - Supplier: 'Supplier', - SupplierLedger: 'SupplierLedger', - StockAvailableView: 'StockAvailableView' + Service: 'Service', + ServiceCategory: 'ServiceCategory' } as const export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -433,997 +408,139 @@ export type TypeMap - fields: Prisma.UserFieldRefs + Good: { + payload: Prisma.$GoodPayload + fields: Prisma.GoodFieldRefs operations: { findUnique: { - args: Prisma.UserFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.GoodFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.UserFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findFirst: { - args: Prisma.UserFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.GoodFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.UserFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findMany: { - args: Prisma.UserFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] + args: Prisma.GoodFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] } create: { - args: Prisma.UserCreateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodCreateArgs + result: runtime.Types.Utils.PayloadToResult } createMany: { - args: Prisma.UserCreateManyArgs + args: Prisma.GoodCreateManyArgs result: BatchPayload } delete: { - args: Prisma.UserDeleteArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodDeleteArgs + result: runtime.Types.Utils.PayloadToResult } update: { - args: Prisma.UserUpdateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodUpdateArgs + result: runtime.Types.Utils.PayloadToResult } deleteMany: { - args: Prisma.UserDeleteManyArgs + args: Prisma.GoodDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.UserUpdateManyArgs + args: Prisma.GoodUpdateManyArgs result: BatchPayload } upsert: { - args: Prisma.UserUpsertArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodUpsertArgs + result: runtime.Types.Utils.PayloadToResult } aggregate: { - args: Prisma.UserAggregateArgs - result: runtime.Types.Utils.Optional + args: Prisma.GoodAggregateArgs + result: runtime.Types.Utils.Optional } groupBy: { - args: Prisma.UserGroupByArgs - result: runtime.Types.Utils.Optional[] + args: Prisma.GoodGroupByArgs + result: runtime.Types.Utils.Optional[] } count: { - args: Prisma.UserCountArgs - result: runtime.Types.Utils.Optional | number + args: Prisma.GoodCountArgs + result: runtime.Types.Utils.Optional | number } } } - Role: { - payload: Prisma.$RolePayload - fields: Prisma.RoleFieldRefs + GoodCategory: { + payload: Prisma.$GoodCategoryPayload + fields: Prisma.GoodCategoryFieldRefs operations: { findUnique: { - args: Prisma.RoleFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.GoodCategoryFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.RoleFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodCategoryFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findFirst: { - args: Prisma.RoleFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.GoodCategoryFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.RoleFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodCategoryFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findMany: { - args: Prisma.RoleFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] + args: Prisma.GoodCategoryFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] } create: { - args: Prisma.RoleCreateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodCategoryCreateArgs + result: runtime.Types.Utils.PayloadToResult } createMany: { - args: Prisma.RoleCreateManyArgs + args: Prisma.GoodCategoryCreateManyArgs result: BatchPayload } delete: { - args: Prisma.RoleDeleteArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodCategoryDeleteArgs + result: runtime.Types.Utils.PayloadToResult } update: { - args: Prisma.RoleUpdateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodCategoryUpdateArgs + result: runtime.Types.Utils.PayloadToResult } deleteMany: { - args: Prisma.RoleDeleteManyArgs + args: Prisma.GoodCategoryDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.RoleUpdateManyArgs + args: Prisma.GoodCategoryUpdateManyArgs result: BatchPayload } upsert: { - args: Prisma.RoleUpsertArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.GoodCategoryUpsertArgs + result: runtime.Types.Utils.PayloadToResult } aggregate: { - args: Prisma.RoleAggregateArgs - result: runtime.Types.Utils.Optional + args: Prisma.GoodCategoryAggregateArgs + result: runtime.Types.Utils.Optional } groupBy: { - args: Prisma.RoleGroupByArgs - result: runtime.Types.Utils.Optional[] + args: Prisma.GoodCategoryGroupByArgs + result: runtime.Types.Utils.Optional[] } count: { - args: Prisma.RoleCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - OtpCode: { - payload: Prisma.$OtpCodePayload - fields: Prisma.OtpCodeFieldRefs - operations: { - findUnique: { - args: Prisma.OtpCodeFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.OtpCodeFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.OtpCodeFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.OtpCodeFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.OtpCodeFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.OtpCodeCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.OtpCodeCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.OtpCodeDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.OtpCodeUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.OtpCodeDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.OtpCodeUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.OtpCodeUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.OtpCodeAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.OtpCodeGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.OtpCodeCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - RefreshToken: { - payload: Prisma.$RefreshTokenPayload - fields: Prisma.RefreshTokenFieldRefs - operations: { - findUnique: { - args: Prisma.RefreshTokenFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.RefreshTokenFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.RefreshTokenFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.RefreshTokenFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.RefreshTokenFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.RefreshTokenCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.RefreshTokenCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.RefreshTokenDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.RefreshTokenUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.RefreshTokenDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.RefreshTokenUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.RefreshTokenUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.RefreshTokenAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.RefreshTokenGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.RefreshTokenCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - BankBranch: { - payload: Prisma.$BankBranchPayload - fields: Prisma.BankBranchFieldRefs - operations: { - findUnique: { - args: Prisma.BankBranchFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.BankBranchFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.BankBranchFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.BankBranchFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.BankBranchFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.BankBranchCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.BankBranchCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.BankBranchDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.BankBranchUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.BankBranchDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.BankBranchUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.BankBranchUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.BankBranchAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.BankBranchGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.BankBranchCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - BankAccount: { - payload: Prisma.$BankAccountPayload - fields: Prisma.BankAccountFieldRefs - operations: { - findUnique: { - args: Prisma.BankAccountFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.BankAccountFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.BankAccountFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.BankAccountFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.BankAccountFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.BankAccountCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.BankAccountCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.BankAccountDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.BankAccountUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.BankAccountDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.BankAccountUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.BankAccountUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.BankAccountAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.BankAccountGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.BankAccountCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - BankAccountTransaction: { - payload: Prisma.$BankAccountTransactionPayload - fields: Prisma.BankAccountTransactionFieldRefs - operations: { - findUnique: { - args: Prisma.BankAccountTransactionFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.BankAccountTransactionFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.BankAccountTransactionFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.BankAccountTransactionFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.BankAccountTransactionFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.BankAccountTransactionCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.BankAccountTransactionCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.BankAccountTransactionDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.BankAccountTransactionUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.BankAccountTransactionDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.BankAccountTransactionUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.BankAccountTransactionUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.BankAccountTransactionAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.BankAccountTransactionGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.BankAccountTransactionCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - Inventory: { - payload: Prisma.$InventoryPayload - fields: Prisma.InventoryFieldRefs - operations: { - findUnique: { - args: Prisma.InventoryFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.InventoryFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.InventoryFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.InventoryFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.InventoryFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.InventoryCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.InventoryCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.InventoryDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.InventoryUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.InventoryDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.InventoryUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.InventoryUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.InventoryAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.InventoryGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.InventoryCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - InventoryBankAccount: { - payload: Prisma.$InventoryBankAccountPayload - fields: Prisma.InventoryBankAccountFieldRefs - operations: { - findUnique: { - args: Prisma.InventoryBankAccountFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.InventoryBankAccountFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.InventoryBankAccountFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.InventoryBankAccountFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.InventoryBankAccountFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.InventoryBankAccountCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.InventoryBankAccountCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.InventoryBankAccountDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.InventoryBankAccountUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.InventoryBankAccountDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.InventoryBankAccountUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.InventoryBankAccountUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.InventoryBankAccountAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.InventoryBankAccountGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.InventoryBankAccountCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - PosAccount: { - payload: Prisma.$PosAccountPayload - fields: Prisma.PosAccountFieldRefs - operations: { - findUnique: { - args: Prisma.PosAccountFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.PosAccountFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.PosAccountFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.PosAccountFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.PosAccountFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.PosAccountCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.PosAccountCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.PosAccountDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.PosAccountUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.PosAccountDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.PosAccountUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.PosAccountUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.PosAccountAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.PosAccountGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.PosAccountCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - InventoryTransfer: { - payload: Prisma.$InventoryTransferPayload - fields: Prisma.InventoryTransferFieldRefs - operations: { - findUnique: { - args: Prisma.InventoryTransferFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.InventoryTransferFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.InventoryTransferFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.InventoryTransferFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.InventoryTransferFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.InventoryTransferCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.InventoryTransferCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.InventoryTransferDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.InventoryTransferUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.InventoryTransferDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.InventoryTransferUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.InventoryTransferUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.InventoryTransferAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.InventoryTransferGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.InventoryTransferCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - InventoryTransferItem: { - payload: Prisma.$InventoryTransferItemPayload - fields: Prisma.InventoryTransferItemFieldRefs - operations: { - findUnique: { - args: Prisma.InventoryTransferItemFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.InventoryTransferItemFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.InventoryTransferItemFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.InventoryTransferItemFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.InventoryTransferItemFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.InventoryTransferItemCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.InventoryTransferItemCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.InventoryTransferItemDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.InventoryTransferItemUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.InventoryTransferItemDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.InventoryTransferItemUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.InventoryTransferItemUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.InventoryTransferItemAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.InventoryTransferItemGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.InventoryTransferItemCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - Bank: { - payload: Prisma.$BankPayload - fields: Prisma.BankFieldRefs - operations: { - findUnique: { - args: Prisma.BankFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.BankFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.BankFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.BankFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.BankFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.BankCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.BankCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.BankDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.BankUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.BankDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.BankUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.BankUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.BankAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.BankGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.BankCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - Order: { - payload: Prisma.$OrderPayload - fields: Prisma.OrderFieldRefs - operations: { - findUnique: { - args: Prisma.OrderFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.OrderFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.OrderFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.OrderFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.OrderFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.OrderCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.OrderCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.OrderDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.OrderUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.OrderDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.OrderUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.OrderUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.OrderAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.OrderGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.OrderCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - OrderItem: { - payload: Prisma.$OrderItemPayload - fields: Prisma.OrderItemFieldRefs - operations: { - findUnique: { - args: Prisma.OrderItemFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.OrderItemFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.OrderItemFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.OrderItemFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.OrderItemFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.OrderItemCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.OrderItemCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.OrderItemDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.OrderItemUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.OrderItemDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.OrderItemUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.OrderItemUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.OrderItemAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.OrderItemGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.OrderItemCountArgs - result: runtime.Types.Utils.Optional | number + args: Prisma.GoodCategoryCountArgs + result: runtime.Types.Utils.Optional | number } } } @@ -1559,468 +676,6 @@ export type TypeMap - fields: Prisma.ProductVariantFieldRefs - operations: { - findUnique: { - args: Prisma.ProductVariantFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ProductVariantFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.ProductVariantFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ProductVariantFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.ProductVariantFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.ProductVariantCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.ProductVariantCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.ProductVariantDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.ProductVariantUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ProductVariantDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.ProductVariantUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.ProductVariantUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.ProductVariantAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.ProductVariantGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.ProductVariantCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - Product: { - payload: Prisma.$ProductPayload - fields: Prisma.ProductFieldRefs - operations: { - findUnique: { - args: Prisma.ProductFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ProductFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.ProductFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ProductFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.ProductFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.ProductCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.ProductCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.ProductDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.ProductUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ProductDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.ProductUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.ProductUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.ProductAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.ProductGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.ProductCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - ProductBrand: { - payload: Prisma.$ProductBrandPayload - fields: Prisma.ProductBrandFieldRefs - operations: { - findUnique: { - args: Prisma.ProductBrandFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ProductBrandFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.ProductBrandFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ProductBrandFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.ProductBrandFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.ProductBrandCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.ProductBrandCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.ProductBrandDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.ProductBrandUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ProductBrandDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.ProductBrandUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.ProductBrandUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.ProductBrandAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.ProductBrandGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.ProductBrandCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - ProductCategory: { - payload: Prisma.$ProductCategoryPayload - fields: Prisma.ProductCategoryFieldRefs - operations: { - findUnique: { - args: Prisma.ProductCategoryFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ProductCategoryFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.ProductCategoryFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ProductCategoryFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.ProductCategoryFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.ProductCategoryCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.ProductCategoryCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.ProductCategoryDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.ProductCategoryUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ProductCategoryDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.ProductCategoryUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.ProductCategoryUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.ProductCategoryAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.ProductCategoryGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.ProductCategoryCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - PurchaseReceipt: { - payload: Prisma.$PurchaseReceiptPayload - fields: Prisma.PurchaseReceiptFieldRefs - operations: { - findUnique: { - args: Prisma.PurchaseReceiptFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.PurchaseReceiptFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.PurchaseReceiptFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.PurchaseReceiptFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.PurchaseReceiptFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.PurchaseReceiptCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.PurchaseReceiptCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.PurchaseReceiptDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.PurchaseReceiptUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.PurchaseReceiptDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.PurchaseReceiptUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.PurchaseReceiptUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.PurchaseReceiptAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.PurchaseReceiptGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.PurchaseReceiptCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - PurchaseReceiptItem: { - payload: Prisma.$PurchaseReceiptItemPayload - fields: Prisma.PurchaseReceiptItemFieldRefs - operations: { - findUnique: { - args: Prisma.PurchaseReceiptItemFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.PurchaseReceiptItemFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.PurchaseReceiptItemFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.PurchaseReceiptItemFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.PurchaseReceiptItemFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.PurchaseReceiptItemCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.PurchaseReceiptItemCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.PurchaseReceiptItemDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.PurchaseReceiptItemUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.PurchaseReceiptItemDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.PurchaseReceiptItemUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.PurchaseReceiptItemUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.PurchaseReceiptItemAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.PurchaseReceiptItemGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.PurchaseReceiptItemCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - PurchaseReceiptPayments: { - payload: Prisma.$PurchaseReceiptPaymentsPayload - fields: Prisma.PurchaseReceiptPaymentsFieldRefs - operations: { - findUnique: { - args: Prisma.PurchaseReceiptPaymentsFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.PurchaseReceiptPaymentsFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.PurchaseReceiptPaymentsFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.PurchaseReceiptPaymentsFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.PurchaseReceiptPaymentsFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.PurchaseReceiptPaymentsCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.PurchaseReceiptPaymentsCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.PurchaseReceiptPaymentsDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.PurchaseReceiptPaymentsUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.PurchaseReceiptPaymentsDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.PurchaseReceiptPaymentsUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.PurchaseReceiptPaymentsUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.PurchaseReceiptPaymentsAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.PurchaseReceiptPaymentsGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.PurchaseReceiptPaymentsCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } SalesInvoice: { payload: Prisma.$SalesInvoicePayload fields: Prisma.SalesInvoiceFieldRefs @@ -2219,429 +874,135 @@ export type TypeMap - fields: Prisma.StockMovementFieldRefs + Service: { + payload: Prisma.$ServicePayload + fields: Prisma.ServiceFieldRefs operations: { findUnique: { - args: Prisma.StockMovementFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.ServiceFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.StockMovementFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findFirst: { - args: Prisma.StockMovementFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.ServiceFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.StockMovementFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findMany: { - args: Prisma.StockMovementFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] + args: Prisma.ServiceFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] } create: { - args: Prisma.StockMovementCreateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceCreateArgs + result: runtime.Types.Utils.PayloadToResult } createMany: { - args: Prisma.StockMovementCreateManyArgs + args: Prisma.ServiceCreateManyArgs result: BatchPayload } delete: { - args: Prisma.StockMovementDeleteArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceDeleteArgs + result: runtime.Types.Utils.PayloadToResult } update: { - args: Prisma.StockMovementUpdateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceUpdateArgs + result: runtime.Types.Utils.PayloadToResult } deleteMany: { - args: Prisma.StockMovementDeleteManyArgs + args: Prisma.ServiceDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.StockMovementUpdateManyArgs + args: Prisma.ServiceUpdateManyArgs result: BatchPayload } upsert: { - args: Prisma.StockMovementUpsertArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceUpsertArgs + result: runtime.Types.Utils.PayloadToResult } aggregate: { - args: Prisma.StockMovementAggregateArgs - result: runtime.Types.Utils.Optional + args: Prisma.ServiceAggregateArgs + result: runtime.Types.Utils.Optional } groupBy: { - args: Prisma.StockMovementGroupByArgs - result: runtime.Types.Utils.Optional[] + args: Prisma.ServiceGroupByArgs + result: runtime.Types.Utils.Optional[] } count: { - args: Prisma.StockMovementCountArgs - result: runtime.Types.Utils.Optional | number + args: Prisma.ServiceCountArgs + result: runtime.Types.Utils.Optional | number } } } - StockBalance: { - payload: Prisma.$StockBalancePayload - fields: Prisma.StockBalanceFieldRefs + ServiceCategory: { + payload: Prisma.$ServiceCategoryPayload + fields: Prisma.ServiceCategoryFieldRefs operations: { findUnique: { - args: Prisma.StockBalanceFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.ServiceCategoryFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.StockBalanceFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceCategoryFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findFirst: { - args: Prisma.StockBalanceFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.ServiceCategoryFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.StockBalanceFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceCategoryFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findMany: { - args: Prisma.StockBalanceFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] + args: Prisma.ServiceCategoryFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] } create: { - args: Prisma.StockBalanceCreateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceCategoryCreateArgs + result: runtime.Types.Utils.PayloadToResult } createMany: { - args: Prisma.StockBalanceCreateManyArgs + args: Prisma.ServiceCategoryCreateManyArgs result: BatchPayload } delete: { - args: Prisma.StockBalanceDeleteArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceCategoryDeleteArgs + result: runtime.Types.Utils.PayloadToResult } update: { - args: Prisma.StockBalanceUpdateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceCategoryUpdateArgs + result: runtime.Types.Utils.PayloadToResult } deleteMany: { - args: Prisma.StockBalanceDeleteManyArgs + args: Prisma.ServiceCategoryDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.StockBalanceUpdateManyArgs + args: Prisma.ServiceCategoryUpdateManyArgs result: BatchPayload } upsert: { - args: Prisma.StockBalanceUpsertArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.ServiceCategoryUpsertArgs + result: runtime.Types.Utils.PayloadToResult } aggregate: { - args: Prisma.StockBalanceAggregateArgs - result: runtime.Types.Utils.Optional + args: Prisma.ServiceCategoryAggregateArgs + result: runtime.Types.Utils.Optional } groupBy: { - args: Prisma.StockBalanceGroupByArgs - result: runtime.Types.Utils.Optional[] + args: Prisma.ServiceCategoryGroupByArgs + result: runtime.Types.Utils.Optional[] } count: { - args: Prisma.StockBalanceCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - StockAdjustment: { - payload: Prisma.$StockAdjustmentPayload - fields: Prisma.StockAdjustmentFieldRefs - operations: { - findUnique: { - args: Prisma.StockAdjustmentFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.StockAdjustmentFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.StockAdjustmentFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.StockAdjustmentFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.StockAdjustmentFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.StockAdjustmentCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.StockAdjustmentCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.StockAdjustmentDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.StockAdjustmentUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.StockAdjustmentDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.StockAdjustmentUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.StockAdjustmentUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.StockAdjustmentAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.StockAdjustmentGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.StockAdjustmentCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - StockReservation: { - payload: Prisma.$StockReservationPayload - fields: Prisma.StockReservationFieldRefs - operations: { - findUnique: { - args: Prisma.StockReservationFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.StockReservationFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.StockReservationFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.StockReservationFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.StockReservationFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.StockReservationCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.StockReservationCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.StockReservationDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.StockReservationUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.StockReservationDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.StockReservationUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.StockReservationUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.StockReservationAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.StockReservationGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.StockReservationCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - Supplier: { - payload: Prisma.$SupplierPayload - fields: Prisma.SupplierFieldRefs - operations: { - findUnique: { - args: Prisma.SupplierFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.SupplierFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.SupplierFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.SupplierFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.SupplierFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.SupplierCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.SupplierCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.SupplierDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.SupplierUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.SupplierDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.SupplierUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.SupplierUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.SupplierAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.SupplierGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.SupplierCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - SupplierLedger: { - payload: Prisma.$SupplierLedgerPayload - fields: Prisma.SupplierLedgerFieldRefs - operations: { - findUnique: { - args: Prisma.SupplierLedgerFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.SupplierLedgerFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.SupplierLedgerFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.SupplierLedgerFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.SupplierLedgerFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.SupplierLedgerCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.SupplierLedgerCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.SupplierLedgerDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.SupplierLedgerUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.SupplierLedgerDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.SupplierLedgerUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.SupplierLedgerUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.SupplierLedgerAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.SupplierLedgerGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.SupplierLedgerCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - StockAvailableView: { - payload: Prisma.$StockAvailableViewPayload - fields: Prisma.StockAvailableViewFieldRefs - operations: { - findFirst: { - args: Prisma.StockAvailableViewFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.StockAvailableViewFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.StockAvailableViewFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - aggregate: { - args: Prisma.StockAvailableViewAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.StockAvailableViewGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.StockAvailableViewCountArgs - result: runtime.Types.Utils.Optional | number + args: Prisma.ServiceCategoryCountArgs + result: runtime.Types.Utils.Optional | number } } } @@ -2684,200 +1045,34 @@ export const TransactionIsolationLevel = runtime.makeStrictEnum({ export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] -export const UserScalarFieldEnum = { - id: 'id', - mobileNumber: 'mobileNumber', - password: 'password', - firstName: 'firstName', - lastName: 'lastName', - roleId: 'roleId', - createdAt: 'createdAt', - deletedAt: 'deletedAt', - updatedAt: 'updatedAt' -} as const - -export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] - - -export const RoleScalarFieldEnum = { +export const GoodScalarFieldEnum = { id: 'id', name: 'name', description: 'description', - permissions: 'permissions', + sku: 'sku', + localSku: 'localSku', + barcode: 'barcode', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + deletedAt: 'deletedAt', + categoryId: 'categoryId', + baseSalePrice: 'baseSalePrice' +} as const + +export type GoodScalarFieldEnum = (typeof GoodScalarFieldEnum)[keyof typeof GoodScalarFieldEnum] + + +export const GoodCategoryScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + imageUrl: 'imageUrl', createdAt: 'createdAt', updatedAt: 'updatedAt', deletedAt: 'deletedAt' } as const -export type RoleScalarFieldEnum = (typeof RoleScalarFieldEnum)[keyof typeof RoleScalarFieldEnum] - - -export const OtpCodeScalarFieldEnum = { - id: 'id', - mobileNumber: 'mobileNumber', - code: 'code', - used: 'used', - expiresAt: 'expiresAt', - createdAt: 'createdAt' -} as const - -export type OtpCodeScalarFieldEnum = (typeof OtpCodeScalarFieldEnum)[keyof typeof OtpCodeScalarFieldEnum] - - -export const RefreshTokenScalarFieldEnum = { - id: 'id', - tokenHash: 'tokenHash', - userId: 'userId', - revoked: 'revoked', - expiresAt: 'expiresAt', - createdAt: 'createdAt' -} as const - -export type RefreshTokenScalarFieldEnum = (typeof RefreshTokenScalarFieldEnum)[keyof typeof RefreshTokenScalarFieldEnum] - - -export const BankBranchScalarFieldEnum = { - id: 'id', - name: 'name', - code: 'code', - address: 'address', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - bankId: 'bankId' -} as const - -export type BankBranchScalarFieldEnum = (typeof BankBranchScalarFieldEnum)[keyof typeof BankBranchScalarFieldEnum] - - -export const BankAccountScalarFieldEnum = { - id: 'id', - accountNumber: 'accountNumber', - cardNumber: 'cardNumber', - name: 'name', - iban: 'iban', - branchId: 'branchId', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type BankAccountScalarFieldEnum = (typeof BankAccountScalarFieldEnum)[keyof typeof BankAccountScalarFieldEnum] - - -export const BankAccountTransactionScalarFieldEnum = { - id: 'id', - bankAccountId: 'bankAccountId', - type: 'type', - amount: 'amount', - balanceAfter: 'balanceAfter', - referenceId: 'referenceId', - referenceType: 'referenceType', - description: 'description', - createdAt: 'createdAt' -} as const - -export type BankAccountTransactionScalarFieldEnum = (typeof BankAccountTransactionScalarFieldEnum)[keyof typeof BankAccountTransactionScalarFieldEnum] - - -export const InventoryScalarFieldEnum = { - id: 'id', - name: 'name', - location: 'location', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - isPointOfSale: 'isPointOfSale' -} as const - -export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum] - - -export const InventoryBankAccountScalarFieldEnum = { - inventoryId: 'inventoryId', - bankAccountId: 'bankAccountId' -} as const - -export type InventoryBankAccountScalarFieldEnum = (typeof InventoryBankAccountScalarFieldEnum)[keyof typeof InventoryBankAccountScalarFieldEnum] - - -export const PosAccountScalarFieldEnum = { - id: 'id', - name: 'name', - code: 'code', - description: 'description', - bankAccountId: 'bankAccountId', - inventoryId: 'inventoryId', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type PosAccountScalarFieldEnum = (typeof PosAccountScalarFieldEnum)[keyof typeof PosAccountScalarFieldEnum] - - -export const InventoryTransferScalarFieldEnum = { - id: 'id', - code: 'code', - description: 'description', - createdAt: 'createdAt', - fromInventoryId: 'fromInventoryId', - toInventoryId: 'toInventoryId' -} as const - -export type InventoryTransferScalarFieldEnum = (typeof InventoryTransferScalarFieldEnum)[keyof typeof InventoryTransferScalarFieldEnum] - - -export const InventoryTransferItemScalarFieldEnum = { - id: 'id', - count: 'count', - productId: 'productId', - transferId: 'transferId' -} as const - -export type InventoryTransferItemScalarFieldEnum = (typeof InventoryTransferItemScalarFieldEnum)[keyof typeof InventoryTransferItemScalarFieldEnum] - - -export const BankScalarFieldEnum = { - id: 'id', - name: 'name', - shortName: 'shortName', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type BankScalarFieldEnum = (typeof BankScalarFieldEnum)[keyof typeof BankScalarFieldEnum] - - -export const OrderScalarFieldEnum = { - id: 'id', - orderNumber: 'orderNumber', - status: 'status', - totalAmount: 'totalAmount', - description: 'description', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - customerId: 'customerId', - posAccountId: 'posAccountId' -} as const - -export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] - - -export const OrderItemScalarFieldEnum = { - id: 'id', - quantity: 'quantity', - unitPrice: 'unitPrice', - totalAmount: 'totalAmount', - createdAt: 'createdAt', - orderId: 'orderId', - productId: 'productId' -} as const - -export type OrderItemScalarFieldEnum = (typeof OrderItemScalarFieldEnum)[keyof typeof OrderItemScalarFieldEnum] +export type GoodCategoryScalarFieldEnum = (typeof GoodCategoryScalarFieldEnum)[keyof typeof GoodCategoryScalarFieldEnum] export const CustomerScalarFieldEnum = { @@ -2887,9 +1082,6 @@ export const CustomerScalarFieldEnum = { email: 'email', mobileNumber: 'mobileNumber', address: 'address', - city: 'city', - state: 'state', - country: 'country', isActive: 'isActive', createdAt: 'createdAt', updatedAt: 'updatedAt', @@ -2909,119 +1101,6 @@ export const TriggerLogScalarFieldEnum = { export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum] -export const ProductVariantScalarFieldEnum = { - id: 'id', - name: 'name', - basePrice: 'basePrice', - salePrice: 'salePrice', - description: 'description', - barcode: 'barcode', - imageUrl: 'imageUrl', - unit: 'unit', - quantity: 'quantity', - alertQuantity: 'alertQuantity', - isActive: 'isActive', - isFeatured: 'isFeatured', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - productId: 'productId' -} as const - -export type ProductVariantScalarFieldEnum = (typeof ProductVariantScalarFieldEnum)[keyof typeof ProductVariantScalarFieldEnum] - - -export const ProductScalarFieldEnum = { - id: 'id', - name: 'name', - description: 'description', - sku: 'sku', - barcode: 'barcode', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - brandId: 'brandId', - categoryId: 'categoryId', - salePrice: 'salePrice', - minimumStockAlertLevel: 'minimumStockAlertLevel' -} as const - -export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] - - -export const ProductBrandScalarFieldEnum = { - id: 'id', - name: 'name', - description: 'description', - imageUrl: 'imageUrl', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type ProductBrandScalarFieldEnum = (typeof ProductBrandScalarFieldEnum)[keyof typeof ProductBrandScalarFieldEnum] - - -export const ProductCategoryScalarFieldEnum = { - id: 'id', - name: 'name', - description: 'description', - imageUrl: 'imageUrl', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum] - - -export const PurchaseReceiptScalarFieldEnum = { - id: 'id', - code: 'code', - totalAmount: 'totalAmount', - paidAmount: 'paidAmount', - description: 'description', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - status: 'status', - supplierId: 'supplierId', - inventoryId: 'inventoryId' -} as const - -export type PurchaseReceiptScalarFieldEnum = (typeof PurchaseReceiptScalarFieldEnum)[keyof typeof PurchaseReceiptScalarFieldEnum] - - -export const PurchaseReceiptItemScalarFieldEnum = { - id: 'id', - count: 'count', - unitPrice: 'unitPrice', - totalAmount: 'totalAmount', - receiptId: 'receiptId', - productId: 'productId', - description: 'description', - createdAt: 'createdAt' -} as const - -export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum] - - -export const PurchaseReceiptPaymentsScalarFieldEnum = { - id: 'id', - amount: 'amount', - paymentMethod: 'paymentMethod', - type: 'type', - bankAccountId: 'bankAccountId', - receiptId: 'receiptId', - payedAt: 'payedAt', - description: 'description', - createdAt: 'createdAt', - inventoryBankAccountInventoryId: 'inventoryBankAccountInventoryId', - inventoryBankAccountBankAccountId: 'inventoryBankAccountBankAccountId' -} as const - -export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum] - - export const SalesInvoiceScalarFieldEnum = { id: 'id', code: 'code', @@ -3029,8 +1108,7 @@ export const SalesInvoiceScalarFieldEnum = { description: 'description', createdAt: 'createdAt', updatedAt: 'updatedAt', - customerId: 'customerId', - posAccountId: 'posAccountId' + customerId: 'customerId' } as const export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum] @@ -3043,7 +1121,8 @@ export const SalesInvoiceItemScalarFieldEnum = { totalAmount: 'totalAmount', createdAt: 'createdAt', invoiceId: 'invoiceId', - productId: 'productId' + goodId: 'goodId', + serviceId: 'serviceId' } as const export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum] @@ -3061,107 +1140,33 @@ export const SalesInvoicePaymentScalarFieldEnum = { export type SalesInvoicePaymentScalarFieldEnum = (typeof SalesInvoicePaymentScalarFieldEnum)[keyof typeof SalesInvoicePaymentScalarFieldEnum] -export const StockMovementScalarFieldEnum = { +export const ServiceScalarFieldEnum = { id: 'id', - type: 'type', - quantity: 'quantity', - unitPrice: 'unitPrice', - totalCost: 'totalCost', - referenceType: 'referenceType', - referenceId: 'referenceId', + name: 'name', + description: 'description', + sku: 'sku', + barcode: 'barcode', createdAt: 'createdAt', - productId: 'productId', - inventoryId: 'inventoryId', - avgCost: 'avgCost', - supplierId: 'supplierId', - remainedInStock: 'remainedInStock', - counterInventoryId: 'counterInventoryId', - customerId: 'customerId' -} as const - -export type StockMovementScalarFieldEnum = (typeof StockMovementScalarFieldEnum)[keyof typeof StockMovementScalarFieldEnum] - - -export const StockBalanceScalarFieldEnum = { - quantity: 'quantity', - totalCost: 'totalCost', updatedAt: 'updatedAt', - avgCost: 'avgCost', - inventoryId: 'inventoryId', - productId: 'productId', - createdAt: 'createdAt', - id: 'id' + deletedAt: 'deletedAt', + categoryId: 'categoryId', + baseSalePrice: 'baseSalePrice' } as const -export type StockBalanceScalarFieldEnum = (typeof StockBalanceScalarFieldEnum)[keyof typeof StockBalanceScalarFieldEnum] +export type ServiceScalarFieldEnum = (typeof ServiceScalarFieldEnum)[keyof typeof ServiceScalarFieldEnum] -export const StockAdjustmentScalarFieldEnum = { +export const ServiceCategoryScalarFieldEnum = { id: 'id', - adjustedQuantity: 'adjustedQuantity', - createdAt: 'createdAt', - productId: 'productId', - inventoryId: 'inventoryId' -} as const - -export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum] - - -export const StockReservationScalarFieldEnum = { - id: 'id', - quantity: 'quantity', - createdAt: 'createdAt', - productId: 'productId', - inventoryId: 'inventoryId', - orderId: 'orderId' -} as const - -export type StockReservationScalarFieldEnum = (typeof StockReservationScalarFieldEnum)[keyof typeof StockReservationScalarFieldEnum] - - -export const SupplierScalarFieldEnum = { - id: 'id', - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country', - isActive: 'isActive', + name: 'name', + description: 'description', + imageUrl: 'imageUrl', createdAt: 'createdAt', updatedAt: 'updatedAt', deletedAt: 'deletedAt' } as const -export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum] - - -export const SupplierLedgerScalarFieldEnum = { - id: 'id', - description: 'description', - debit: 'debit', - credit: 'credit', - balance: 'balance', - sourceType: 'sourceType', - sourceId: 'sourceId', - createdAt: 'createdAt', - supplierId: 'supplierId' -} as const - -export type SupplierLedgerScalarFieldEnum = (typeof SupplierLedgerScalarFieldEnum)[keyof typeof SupplierLedgerScalarFieldEnum] - - -export const StockAvailableViewScalarFieldEnum = { - productId: 'productId', - inventoryId: 'inventoryId', - physicalQuantity: 'physicalQuantity', - reservedQuantity: 'reservedQuantity', - availableQuantity: 'availableQuantity' -} as const - -export type StockAvailableViewScalarFieldEnum = (typeof StockAvailableViewScalarFieldEnum)[keyof typeof StockAvailableViewScalarFieldEnum] +export type ServiceCategoryScalarFieldEnum = (typeof ServiceCategoryScalarFieldEnum)[keyof typeof ServiceCategoryScalarFieldEnum] export const SortOrder = { @@ -3172,14 +1177,6 @@ export const SortOrder = { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] -export const NullableJsonNullValueInput = { - DbNull: DbNull, - JsonNull: JsonNull -} as const - -export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] - - export const NullsOrder = { first: 'first', last: 'last' @@ -3188,121 +1185,24 @@ export const NullsOrder = { export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] -export const UserOrderByRelevanceFieldEnum = { - mobileNumber: 'mobileNumber', - password: 'password', - firstName: 'firstName', - lastName: 'lastName' -} as const - -export type UserOrderByRelevanceFieldEnum = (typeof UserOrderByRelevanceFieldEnum)[keyof typeof UserOrderByRelevanceFieldEnum] - - -export const JsonNullValueFilter = { - DbNull: DbNull, - JsonNull: JsonNull, - AnyNull: AnyNull -} as const - -export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] - - -export const QueryMode = { - default: 'default', - insensitive: 'insensitive' -} as const - -export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] - - -export const RoleOrderByRelevanceFieldEnum = { +export const GoodOrderByRelevanceFieldEnum = { name: 'name', - description: 'description' + description: 'description', + sku: 'sku', + localSku: 'localSku', + barcode: 'barcode' } as const -export type RoleOrderByRelevanceFieldEnum = (typeof RoleOrderByRelevanceFieldEnum)[keyof typeof RoleOrderByRelevanceFieldEnum] +export type GoodOrderByRelevanceFieldEnum = (typeof GoodOrderByRelevanceFieldEnum)[keyof typeof GoodOrderByRelevanceFieldEnum] -export const OtpCodeOrderByRelevanceFieldEnum = { - mobileNumber: 'mobileNumber', - code: 'code' -} as const - -export type OtpCodeOrderByRelevanceFieldEnum = (typeof OtpCodeOrderByRelevanceFieldEnum)[keyof typeof OtpCodeOrderByRelevanceFieldEnum] - - -export const RefreshTokenOrderByRelevanceFieldEnum = { - tokenHash: 'tokenHash' -} as const - -export type RefreshTokenOrderByRelevanceFieldEnum = (typeof RefreshTokenOrderByRelevanceFieldEnum)[keyof typeof RefreshTokenOrderByRelevanceFieldEnum] - - -export const BankBranchOrderByRelevanceFieldEnum = { +export const GoodCategoryOrderByRelevanceFieldEnum = { name: 'name', - code: 'code', - address: 'address' + description: 'description', + imageUrl: 'imageUrl' } as const -export type BankBranchOrderByRelevanceFieldEnum = (typeof BankBranchOrderByRelevanceFieldEnum)[keyof typeof BankBranchOrderByRelevanceFieldEnum] - - -export const BankAccountOrderByRelevanceFieldEnum = { - accountNumber: 'accountNumber', - cardNumber: 'cardNumber', - name: 'name', - iban: 'iban' -} as const - -export type BankAccountOrderByRelevanceFieldEnum = (typeof BankAccountOrderByRelevanceFieldEnum)[keyof typeof BankAccountOrderByRelevanceFieldEnum] - - -export const BankAccountTransactionOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type BankAccountTransactionOrderByRelevanceFieldEnum = (typeof BankAccountTransactionOrderByRelevanceFieldEnum)[keyof typeof BankAccountTransactionOrderByRelevanceFieldEnum] - - -export const InventoryOrderByRelevanceFieldEnum = { - name: 'name', - location: 'location' -} as const - -export type InventoryOrderByRelevanceFieldEnum = (typeof InventoryOrderByRelevanceFieldEnum)[keyof typeof InventoryOrderByRelevanceFieldEnum] - - -export const PosAccountOrderByRelevanceFieldEnum = { - name: 'name', - code: 'code', - description: 'description' -} as const - -export type PosAccountOrderByRelevanceFieldEnum = (typeof PosAccountOrderByRelevanceFieldEnum)[keyof typeof PosAccountOrderByRelevanceFieldEnum] - - -export const InventoryTransferOrderByRelevanceFieldEnum = { - code: 'code', - description: 'description' -} as const - -export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum] - - -export const BankOrderByRelevanceFieldEnum = { - name: 'name', - shortName: 'shortName' -} as const - -export type BankOrderByRelevanceFieldEnum = (typeof BankOrderByRelevanceFieldEnum)[keyof typeof BankOrderByRelevanceFieldEnum] - - -export const OrderOrderByRelevanceFieldEnum = { - orderNumber: 'orderNumber', - description: 'description' -} as const - -export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum] +export type GoodCategoryOrderByRelevanceFieldEnum = (typeof GoodCategoryOrderByRelevanceFieldEnum)[keyof typeof GoodCategoryOrderByRelevanceFieldEnum] export const CustomerOrderByRelevanceFieldEnum = { @@ -3310,10 +1210,7 @@ export const CustomerOrderByRelevanceFieldEnum = { lastName: 'lastName', email: 'email', mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country' + address: 'address' } as const export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum] @@ -3327,67 +1224,6 @@ export const TriggerLogOrderByRelevanceFieldEnum = { export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum] -export const ProductVariantOrderByRelevanceFieldEnum = { - name: 'name', - description: 'description', - barcode: 'barcode', - imageUrl: 'imageUrl', - unit: 'unit' -} as const - -export type ProductVariantOrderByRelevanceFieldEnum = (typeof ProductVariantOrderByRelevanceFieldEnum)[keyof typeof ProductVariantOrderByRelevanceFieldEnum] - - -export const ProductOrderByRelevanceFieldEnum = { - name: 'name', - description: 'description', - sku: 'sku', - barcode: 'barcode' -} as const - -export type ProductOrderByRelevanceFieldEnum = (typeof ProductOrderByRelevanceFieldEnum)[keyof typeof ProductOrderByRelevanceFieldEnum] - - -export const ProductBrandOrderByRelevanceFieldEnum = { - name: 'name', - description: 'description', - imageUrl: 'imageUrl' -} as const - -export type ProductBrandOrderByRelevanceFieldEnum = (typeof ProductBrandOrderByRelevanceFieldEnum)[keyof typeof ProductBrandOrderByRelevanceFieldEnum] - - -export const ProductCategoryOrderByRelevanceFieldEnum = { - name: 'name', - description: 'description', - imageUrl: 'imageUrl' -} as const - -export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum] - - -export const PurchaseReceiptOrderByRelevanceFieldEnum = { - code: 'code', - description: 'description' -} as const - -export type PurchaseReceiptOrderByRelevanceFieldEnum = (typeof PurchaseReceiptOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptOrderByRelevanceFieldEnum] - - -export const PurchaseReceiptItemOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type PurchaseReceiptItemOrderByRelevanceFieldEnum = (typeof PurchaseReceiptItemOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptItemOrderByRelevanceFieldEnum] - - -export const PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = (typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum] - - export const SalesInvoiceOrderByRelevanceFieldEnum = { code: 'code', description: 'description' @@ -3396,32 +1232,23 @@ export const SalesInvoiceOrderByRelevanceFieldEnum = { export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum] -export const StockMovementOrderByRelevanceFieldEnum = { - referenceId: 'referenceId' +export const ServiceOrderByRelevanceFieldEnum = { + name: 'name', + description: 'description', + sku: 'sku', + barcode: 'barcode' } as const -export type StockMovementOrderByRelevanceFieldEnum = (typeof StockMovementOrderByRelevanceFieldEnum)[keyof typeof StockMovementOrderByRelevanceFieldEnum] +export type ServiceOrderByRelevanceFieldEnum = (typeof ServiceOrderByRelevanceFieldEnum)[keyof typeof ServiceOrderByRelevanceFieldEnum] -export const SupplierOrderByRelevanceFieldEnum = { - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country' +export const ServiceCategoryOrderByRelevanceFieldEnum = { + name: 'name', + description: 'description', + imageUrl: 'imageUrl' } as const -export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum] - - -export const SupplierLedgerOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type SupplierLedgerOrderByRelevanceFieldEnum = (typeof SupplierLedgerOrderByRelevanceFieldEnum)[keyof typeof SupplierLedgerOrderByRelevanceFieldEnum] +export type ServiceCategoryOrderByRelevanceFieldEnum = (typeof ServiceCategoryOrderByRelevanceFieldEnum)[keyof typeof ServiceCategoryOrderByRelevanceFieldEnum] @@ -3452,16 +1279,9 @@ export type DateTimeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel /** - * Reference to a field of type 'Json' + * Reference to a field of type 'Decimal' */ -export type JsonFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Json'> - - - -/** - * Reference to a field of type 'QueryMode' - */ -export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'QueryMode'> +export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'> @@ -3472,41 +1292,6 @@ export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, -/** - * Reference to a field of type 'BankAccountTransactionType' - */ -export type EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BankAccountTransactionType'> - - - -/** - * Reference to a field of type 'Decimal' - */ -export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Decimal'> - - - -/** - * Reference to a field of type 'BankTransactionRefType' - */ -export type EnumBankTransactionRefTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'BankTransactionRefType'> - - - -/** - * Reference to a field of type 'OrderStatus' - */ -export type EnumOrderStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'OrderStatus'> - - - -/** - * Reference to a field of type 'PurchaseReceiptStatus' - */ -export type EnumPurchaseReceiptStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PurchaseReceiptStatus'> - - - /** * Reference to a field of type 'PaymentMethodType' */ @@ -3514,34 +1299,6 @@ export type EnumPaymentMethodTypeFieldRefInput<$PrismaModel> = FieldRefInputType -/** - * Reference to a field of type 'PaymentType' - */ -export type EnumPaymentTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'PaymentType'> - - - -/** - * Reference to a field of type 'MovementType' - */ -export type EnumMovementTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MovementType'> - - - -/** - * Reference to a field of type 'MovementReferenceType' - */ -export type EnumMovementReferenceTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'MovementReferenceType'> - - - -/** - * Reference to a field of type 'LedgerSourceType' - */ -export type EnumLedgerSourceTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'LedgerSourceType'> - - - /** * Reference to a field of type 'Float' */ @@ -3643,40 +1400,15 @@ export type PrismaClientOptions = ({ comments?: runtime.SqlCommenterPlugin[] } export type GlobalOmitConfig = { - user?: Prisma.UserOmit - role?: Prisma.RoleOmit - otpCode?: Prisma.OtpCodeOmit - refreshToken?: Prisma.RefreshTokenOmit - bankBranch?: Prisma.BankBranchOmit - bankAccount?: Prisma.BankAccountOmit - bankAccountTransaction?: Prisma.BankAccountTransactionOmit - inventory?: Prisma.InventoryOmit - inventoryBankAccount?: Prisma.InventoryBankAccountOmit - posAccount?: Prisma.PosAccountOmit - inventoryTransfer?: Prisma.InventoryTransferOmit - inventoryTransferItem?: Prisma.InventoryTransferItemOmit - bank?: Prisma.BankOmit - order?: Prisma.OrderOmit - orderItem?: Prisma.OrderItemOmit + good?: Prisma.GoodOmit + goodCategory?: Prisma.GoodCategoryOmit customer?: Prisma.CustomerOmit triggerLog?: Prisma.TriggerLogOmit - productVariant?: Prisma.ProductVariantOmit - product?: Prisma.ProductOmit - productBrand?: Prisma.ProductBrandOmit - productCategory?: Prisma.ProductCategoryOmit - purchaseReceipt?: Prisma.PurchaseReceiptOmit - purchaseReceiptItem?: Prisma.PurchaseReceiptItemOmit - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOmit salesInvoice?: Prisma.SalesInvoiceOmit salesInvoiceItem?: Prisma.SalesInvoiceItemOmit salesInvoicePayment?: Prisma.SalesInvoicePaymentOmit - stockMovement?: Prisma.StockMovementOmit - stockBalance?: Prisma.StockBalanceOmit - stockAdjustment?: Prisma.StockAdjustmentOmit - stockReservation?: Prisma.StockReservationOmit - supplier?: Prisma.SupplierOmit - supplierLedger?: Prisma.SupplierLedgerOmit - stockAvailableView?: Prisma.StockAvailableViewOmit + service?: Prisma.ServiceOmit + serviceCategory?: Prisma.ServiceCategoryOmit } /* Types for Logging */ diff --git a/src/generated/prisma/internal/prismaNamespaceBrowser.ts b/src/generated/prisma/internal/prismaNamespaceBrowser.ts index 9bb2be8..3335cfa 100644 --- a/src/generated/prisma/internal/prismaNamespaceBrowser.ts +++ b/src/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -51,40 +51,15 @@ export const AnyNull = runtime.AnyNull export const ModelName = { - User: 'User', - Role: 'Role', - OtpCode: 'OtpCode', - RefreshToken: 'RefreshToken', - BankBranch: 'BankBranch', - BankAccount: 'BankAccount', - BankAccountTransaction: 'BankAccountTransaction', - Inventory: 'Inventory', - InventoryBankAccount: 'InventoryBankAccount', - PosAccount: 'PosAccount', - InventoryTransfer: 'InventoryTransfer', - InventoryTransferItem: 'InventoryTransferItem', - Bank: 'Bank', - Order: 'Order', - OrderItem: 'OrderItem', + Good: 'Good', + GoodCategory: 'GoodCategory', Customer: 'Customer', TriggerLog: 'TriggerLog', - ProductVariant: 'ProductVariant', - Product: 'Product', - ProductBrand: 'ProductBrand', - ProductCategory: 'ProductCategory', - PurchaseReceipt: 'PurchaseReceipt', - PurchaseReceiptItem: 'PurchaseReceiptItem', - PurchaseReceiptPayments: 'PurchaseReceiptPayments', SalesInvoice: 'SalesInvoice', SalesInvoiceItem: 'SalesInvoiceItem', SalesInvoicePayment: 'SalesInvoicePayment', - StockMovement: 'StockMovement', - StockBalance: 'StockBalance', - StockAdjustment: 'StockAdjustment', - StockReservation: 'StockReservation', - Supplier: 'Supplier', - SupplierLedger: 'SupplierLedger', - StockAvailableView: 'StockAvailableView' + Service: 'Service', + ServiceCategory: 'ServiceCategory' } as const export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -103,200 +78,34 @@ export const TransactionIsolationLevel = { export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel] -export const UserScalarFieldEnum = { - id: 'id', - mobileNumber: 'mobileNumber', - password: 'password', - firstName: 'firstName', - lastName: 'lastName', - roleId: 'roleId', - createdAt: 'createdAt', - deletedAt: 'deletedAt', - updatedAt: 'updatedAt' -} as const - -export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum] - - -export const RoleScalarFieldEnum = { +export const GoodScalarFieldEnum = { id: 'id', name: 'name', description: 'description', - permissions: 'permissions', + sku: 'sku', + localSku: 'localSku', + barcode: 'barcode', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + deletedAt: 'deletedAt', + categoryId: 'categoryId', + baseSalePrice: 'baseSalePrice' +} as const + +export type GoodScalarFieldEnum = (typeof GoodScalarFieldEnum)[keyof typeof GoodScalarFieldEnum] + + +export const GoodCategoryScalarFieldEnum = { + id: 'id', + name: 'name', + description: 'description', + imageUrl: 'imageUrl', createdAt: 'createdAt', updatedAt: 'updatedAt', deletedAt: 'deletedAt' } as const -export type RoleScalarFieldEnum = (typeof RoleScalarFieldEnum)[keyof typeof RoleScalarFieldEnum] - - -export const OtpCodeScalarFieldEnum = { - id: 'id', - mobileNumber: 'mobileNumber', - code: 'code', - used: 'used', - expiresAt: 'expiresAt', - createdAt: 'createdAt' -} as const - -export type OtpCodeScalarFieldEnum = (typeof OtpCodeScalarFieldEnum)[keyof typeof OtpCodeScalarFieldEnum] - - -export const RefreshTokenScalarFieldEnum = { - id: 'id', - tokenHash: 'tokenHash', - userId: 'userId', - revoked: 'revoked', - expiresAt: 'expiresAt', - createdAt: 'createdAt' -} as const - -export type RefreshTokenScalarFieldEnum = (typeof RefreshTokenScalarFieldEnum)[keyof typeof RefreshTokenScalarFieldEnum] - - -export const BankBranchScalarFieldEnum = { - id: 'id', - name: 'name', - code: 'code', - address: 'address', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - bankId: 'bankId' -} as const - -export type BankBranchScalarFieldEnum = (typeof BankBranchScalarFieldEnum)[keyof typeof BankBranchScalarFieldEnum] - - -export const BankAccountScalarFieldEnum = { - id: 'id', - accountNumber: 'accountNumber', - cardNumber: 'cardNumber', - name: 'name', - iban: 'iban', - branchId: 'branchId', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type BankAccountScalarFieldEnum = (typeof BankAccountScalarFieldEnum)[keyof typeof BankAccountScalarFieldEnum] - - -export const BankAccountTransactionScalarFieldEnum = { - id: 'id', - bankAccountId: 'bankAccountId', - type: 'type', - amount: 'amount', - balanceAfter: 'balanceAfter', - referenceId: 'referenceId', - referenceType: 'referenceType', - description: 'description', - createdAt: 'createdAt' -} as const - -export type BankAccountTransactionScalarFieldEnum = (typeof BankAccountTransactionScalarFieldEnum)[keyof typeof BankAccountTransactionScalarFieldEnum] - - -export const InventoryScalarFieldEnum = { - id: 'id', - name: 'name', - location: 'location', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - isPointOfSale: 'isPointOfSale' -} as const - -export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum] - - -export const InventoryBankAccountScalarFieldEnum = { - inventoryId: 'inventoryId', - bankAccountId: 'bankAccountId' -} as const - -export type InventoryBankAccountScalarFieldEnum = (typeof InventoryBankAccountScalarFieldEnum)[keyof typeof InventoryBankAccountScalarFieldEnum] - - -export const PosAccountScalarFieldEnum = { - id: 'id', - name: 'name', - code: 'code', - description: 'description', - bankAccountId: 'bankAccountId', - inventoryId: 'inventoryId', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type PosAccountScalarFieldEnum = (typeof PosAccountScalarFieldEnum)[keyof typeof PosAccountScalarFieldEnum] - - -export const InventoryTransferScalarFieldEnum = { - id: 'id', - code: 'code', - description: 'description', - createdAt: 'createdAt', - fromInventoryId: 'fromInventoryId', - toInventoryId: 'toInventoryId' -} as const - -export type InventoryTransferScalarFieldEnum = (typeof InventoryTransferScalarFieldEnum)[keyof typeof InventoryTransferScalarFieldEnum] - - -export const InventoryTransferItemScalarFieldEnum = { - id: 'id', - count: 'count', - productId: 'productId', - transferId: 'transferId' -} as const - -export type InventoryTransferItemScalarFieldEnum = (typeof InventoryTransferItemScalarFieldEnum)[keyof typeof InventoryTransferItemScalarFieldEnum] - - -export const BankScalarFieldEnum = { - id: 'id', - name: 'name', - shortName: 'shortName', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type BankScalarFieldEnum = (typeof BankScalarFieldEnum)[keyof typeof BankScalarFieldEnum] - - -export const OrderScalarFieldEnum = { - id: 'id', - orderNumber: 'orderNumber', - status: 'status', - totalAmount: 'totalAmount', - description: 'description', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - customerId: 'customerId', - posAccountId: 'posAccountId' -} as const - -export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] - - -export const OrderItemScalarFieldEnum = { - id: 'id', - quantity: 'quantity', - unitPrice: 'unitPrice', - totalAmount: 'totalAmount', - createdAt: 'createdAt', - orderId: 'orderId', - productId: 'productId' -} as const - -export type OrderItemScalarFieldEnum = (typeof OrderItemScalarFieldEnum)[keyof typeof OrderItemScalarFieldEnum] +export type GoodCategoryScalarFieldEnum = (typeof GoodCategoryScalarFieldEnum)[keyof typeof GoodCategoryScalarFieldEnum] export const CustomerScalarFieldEnum = { @@ -306,9 +115,6 @@ export const CustomerScalarFieldEnum = { email: 'email', mobileNumber: 'mobileNumber', address: 'address', - city: 'city', - state: 'state', - country: 'country', isActive: 'isActive', createdAt: 'createdAt', updatedAt: 'updatedAt', @@ -328,119 +134,6 @@ export const TriggerLogScalarFieldEnum = { export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum] -export const ProductVariantScalarFieldEnum = { - id: 'id', - name: 'name', - basePrice: 'basePrice', - salePrice: 'salePrice', - description: 'description', - barcode: 'barcode', - imageUrl: 'imageUrl', - unit: 'unit', - quantity: 'quantity', - alertQuantity: 'alertQuantity', - isActive: 'isActive', - isFeatured: 'isFeatured', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - productId: 'productId' -} as const - -export type ProductVariantScalarFieldEnum = (typeof ProductVariantScalarFieldEnum)[keyof typeof ProductVariantScalarFieldEnum] - - -export const ProductScalarFieldEnum = { - id: 'id', - name: 'name', - description: 'description', - sku: 'sku', - barcode: 'barcode', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - brandId: 'brandId', - categoryId: 'categoryId', - salePrice: 'salePrice', - minimumStockAlertLevel: 'minimumStockAlertLevel' -} as const - -export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] - - -export const ProductBrandScalarFieldEnum = { - id: 'id', - name: 'name', - description: 'description', - imageUrl: 'imageUrl', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type ProductBrandScalarFieldEnum = (typeof ProductBrandScalarFieldEnum)[keyof typeof ProductBrandScalarFieldEnum] - - -export const ProductCategoryScalarFieldEnum = { - id: 'id', - name: 'name', - description: 'description', - imageUrl: 'imageUrl', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum] - - -export const PurchaseReceiptScalarFieldEnum = { - id: 'id', - code: 'code', - totalAmount: 'totalAmount', - paidAmount: 'paidAmount', - description: 'description', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - status: 'status', - supplierId: 'supplierId', - inventoryId: 'inventoryId' -} as const - -export type PurchaseReceiptScalarFieldEnum = (typeof PurchaseReceiptScalarFieldEnum)[keyof typeof PurchaseReceiptScalarFieldEnum] - - -export const PurchaseReceiptItemScalarFieldEnum = { - id: 'id', - count: 'count', - unitPrice: 'unitPrice', - totalAmount: 'totalAmount', - receiptId: 'receiptId', - productId: 'productId', - description: 'description', - createdAt: 'createdAt' -} as const - -export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum] - - -export const PurchaseReceiptPaymentsScalarFieldEnum = { - id: 'id', - amount: 'amount', - paymentMethod: 'paymentMethod', - type: 'type', - bankAccountId: 'bankAccountId', - receiptId: 'receiptId', - payedAt: 'payedAt', - description: 'description', - createdAt: 'createdAt', - inventoryBankAccountInventoryId: 'inventoryBankAccountInventoryId', - inventoryBankAccountBankAccountId: 'inventoryBankAccountBankAccountId' -} as const - -export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum] - - export const SalesInvoiceScalarFieldEnum = { id: 'id', code: 'code', @@ -448,8 +141,7 @@ export const SalesInvoiceScalarFieldEnum = { description: 'description', createdAt: 'createdAt', updatedAt: 'updatedAt', - customerId: 'customerId', - posAccountId: 'posAccountId' + customerId: 'customerId' } as const export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum] @@ -462,7 +154,8 @@ export const SalesInvoiceItemScalarFieldEnum = { totalAmount: 'totalAmount', createdAt: 'createdAt', invoiceId: 'invoiceId', - productId: 'productId' + goodId: 'goodId', + serviceId: 'serviceId' } as const export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum] @@ -480,107 +173,33 @@ export const SalesInvoicePaymentScalarFieldEnum = { export type SalesInvoicePaymentScalarFieldEnum = (typeof SalesInvoicePaymentScalarFieldEnum)[keyof typeof SalesInvoicePaymentScalarFieldEnum] -export const StockMovementScalarFieldEnum = { +export const ServiceScalarFieldEnum = { id: 'id', - type: 'type', - quantity: 'quantity', - unitPrice: 'unitPrice', - totalCost: 'totalCost', - referenceType: 'referenceType', - referenceId: 'referenceId', + name: 'name', + description: 'description', + sku: 'sku', + barcode: 'barcode', createdAt: 'createdAt', - productId: 'productId', - inventoryId: 'inventoryId', - avgCost: 'avgCost', - supplierId: 'supplierId', - remainedInStock: 'remainedInStock', - counterInventoryId: 'counterInventoryId', - customerId: 'customerId' -} as const - -export type StockMovementScalarFieldEnum = (typeof StockMovementScalarFieldEnum)[keyof typeof StockMovementScalarFieldEnum] - - -export const StockBalanceScalarFieldEnum = { - quantity: 'quantity', - totalCost: 'totalCost', updatedAt: 'updatedAt', - avgCost: 'avgCost', - inventoryId: 'inventoryId', - productId: 'productId', - createdAt: 'createdAt', - id: 'id' + deletedAt: 'deletedAt', + categoryId: 'categoryId', + baseSalePrice: 'baseSalePrice' } as const -export type StockBalanceScalarFieldEnum = (typeof StockBalanceScalarFieldEnum)[keyof typeof StockBalanceScalarFieldEnum] +export type ServiceScalarFieldEnum = (typeof ServiceScalarFieldEnum)[keyof typeof ServiceScalarFieldEnum] -export const StockAdjustmentScalarFieldEnum = { +export const ServiceCategoryScalarFieldEnum = { id: 'id', - adjustedQuantity: 'adjustedQuantity', - createdAt: 'createdAt', - productId: 'productId', - inventoryId: 'inventoryId' -} as const - -export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum] - - -export const StockReservationScalarFieldEnum = { - id: 'id', - quantity: 'quantity', - createdAt: 'createdAt', - productId: 'productId', - inventoryId: 'inventoryId', - orderId: 'orderId' -} as const - -export type StockReservationScalarFieldEnum = (typeof StockReservationScalarFieldEnum)[keyof typeof StockReservationScalarFieldEnum] - - -export const SupplierScalarFieldEnum = { - id: 'id', - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country', - isActive: 'isActive', + name: 'name', + description: 'description', + imageUrl: 'imageUrl', createdAt: 'createdAt', updatedAt: 'updatedAt', deletedAt: 'deletedAt' } as const -export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum] - - -export const SupplierLedgerScalarFieldEnum = { - id: 'id', - description: 'description', - debit: 'debit', - credit: 'credit', - balance: 'balance', - sourceType: 'sourceType', - sourceId: 'sourceId', - createdAt: 'createdAt', - supplierId: 'supplierId' -} as const - -export type SupplierLedgerScalarFieldEnum = (typeof SupplierLedgerScalarFieldEnum)[keyof typeof SupplierLedgerScalarFieldEnum] - - -export const StockAvailableViewScalarFieldEnum = { - productId: 'productId', - inventoryId: 'inventoryId', - physicalQuantity: 'physicalQuantity', - reservedQuantity: 'reservedQuantity', - availableQuantity: 'availableQuantity' -} as const - -export type StockAvailableViewScalarFieldEnum = (typeof StockAvailableViewScalarFieldEnum)[keyof typeof StockAvailableViewScalarFieldEnum] +export type ServiceCategoryScalarFieldEnum = (typeof ServiceCategoryScalarFieldEnum)[keyof typeof ServiceCategoryScalarFieldEnum] export const SortOrder = { @@ -591,14 +210,6 @@ export const SortOrder = { export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder] -export const NullableJsonNullValueInput = { - DbNull: 'DbNull', - JsonNull: 'JsonNull' -} as const - -export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput] - - export const NullsOrder = { first: 'first', last: 'last' @@ -607,121 +218,24 @@ export const NullsOrder = { export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder] -export const UserOrderByRelevanceFieldEnum = { - mobileNumber: 'mobileNumber', - password: 'password', - firstName: 'firstName', - lastName: 'lastName' -} as const - -export type UserOrderByRelevanceFieldEnum = (typeof UserOrderByRelevanceFieldEnum)[keyof typeof UserOrderByRelevanceFieldEnum] - - -export const JsonNullValueFilter = { - DbNull: 'DbNull', - JsonNull: 'JsonNull', - AnyNull: 'AnyNull' -} as const - -export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter] - - -export const QueryMode = { - default: 'default', - insensitive: 'insensitive' -} as const - -export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode] - - -export const RoleOrderByRelevanceFieldEnum = { +export const GoodOrderByRelevanceFieldEnum = { name: 'name', - description: 'description' + description: 'description', + sku: 'sku', + localSku: 'localSku', + barcode: 'barcode' } as const -export type RoleOrderByRelevanceFieldEnum = (typeof RoleOrderByRelevanceFieldEnum)[keyof typeof RoleOrderByRelevanceFieldEnum] +export type GoodOrderByRelevanceFieldEnum = (typeof GoodOrderByRelevanceFieldEnum)[keyof typeof GoodOrderByRelevanceFieldEnum] -export const OtpCodeOrderByRelevanceFieldEnum = { - mobileNumber: 'mobileNumber', - code: 'code' -} as const - -export type OtpCodeOrderByRelevanceFieldEnum = (typeof OtpCodeOrderByRelevanceFieldEnum)[keyof typeof OtpCodeOrderByRelevanceFieldEnum] - - -export const RefreshTokenOrderByRelevanceFieldEnum = { - tokenHash: 'tokenHash' -} as const - -export type RefreshTokenOrderByRelevanceFieldEnum = (typeof RefreshTokenOrderByRelevanceFieldEnum)[keyof typeof RefreshTokenOrderByRelevanceFieldEnum] - - -export const BankBranchOrderByRelevanceFieldEnum = { +export const GoodCategoryOrderByRelevanceFieldEnum = { name: 'name', - code: 'code', - address: 'address' + description: 'description', + imageUrl: 'imageUrl' } as const -export type BankBranchOrderByRelevanceFieldEnum = (typeof BankBranchOrderByRelevanceFieldEnum)[keyof typeof BankBranchOrderByRelevanceFieldEnum] - - -export const BankAccountOrderByRelevanceFieldEnum = { - accountNumber: 'accountNumber', - cardNumber: 'cardNumber', - name: 'name', - iban: 'iban' -} as const - -export type BankAccountOrderByRelevanceFieldEnum = (typeof BankAccountOrderByRelevanceFieldEnum)[keyof typeof BankAccountOrderByRelevanceFieldEnum] - - -export const BankAccountTransactionOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type BankAccountTransactionOrderByRelevanceFieldEnum = (typeof BankAccountTransactionOrderByRelevanceFieldEnum)[keyof typeof BankAccountTransactionOrderByRelevanceFieldEnum] - - -export const InventoryOrderByRelevanceFieldEnum = { - name: 'name', - location: 'location' -} as const - -export type InventoryOrderByRelevanceFieldEnum = (typeof InventoryOrderByRelevanceFieldEnum)[keyof typeof InventoryOrderByRelevanceFieldEnum] - - -export const PosAccountOrderByRelevanceFieldEnum = { - name: 'name', - code: 'code', - description: 'description' -} as const - -export type PosAccountOrderByRelevanceFieldEnum = (typeof PosAccountOrderByRelevanceFieldEnum)[keyof typeof PosAccountOrderByRelevanceFieldEnum] - - -export const InventoryTransferOrderByRelevanceFieldEnum = { - code: 'code', - description: 'description' -} as const - -export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum] - - -export const BankOrderByRelevanceFieldEnum = { - name: 'name', - shortName: 'shortName' -} as const - -export type BankOrderByRelevanceFieldEnum = (typeof BankOrderByRelevanceFieldEnum)[keyof typeof BankOrderByRelevanceFieldEnum] - - -export const OrderOrderByRelevanceFieldEnum = { - orderNumber: 'orderNumber', - description: 'description' -} as const - -export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum] +export type GoodCategoryOrderByRelevanceFieldEnum = (typeof GoodCategoryOrderByRelevanceFieldEnum)[keyof typeof GoodCategoryOrderByRelevanceFieldEnum] export const CustomerOrderByRelevanceFieldEnum = { @@ -729,10 +243,7 @@ export const CustomerOrderByRelevanceFieldEnum = { lastName: 'lastName', email: 'email', mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country' + address: 'address' } as const export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum] @@ -746,67 +257,6 @@ export const TriggerLogOrderByRelevanceFieldEnum = { export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum] -export const ProductVariantOrderByRelevanceFieldEnum = { - name: 'name', - description: 'description', - barcode: 'barcode', - imageUrl: 'imageUrl', - unit: 'unit' -} as const - -export type ProductVariantOrderByRelevanceFieldEnum = (typeof ProductVariantOrderByRelevanceFieldEnum)[keyof typeof ProductVariantOrderByRelevanceFieldEnum] - - -export const ProductOrderByRelevanceFieldEnum = { - name: 'name', - description: 'description', - sku: 'sku', - barcode: 'barcode' -} as const - -export type ProductOrderByRelevanceFieldEnum = (typeof ProductOrderByRelevanceFieldEnum)[keyof typeof ProductOrderByRelevanceFieldEnum] - - -export const ProductBrandOrderByRelevanceFieldEnum = { - name: 'name', - description: 'description', - imageUrl: 'imageUrl' -} as const - -export type ProductBrandOrderByRelevanceFieldEnum = (typeof ProductBrandOrderByRelevanceFieldEnum)[keyof typeof ProductBrandOrderByRelevanceFieldEnum] - - -export const ProductCategoryOrderByRelevanceFieldEnum = { - name: 'name', - description: 'description', - imageUrl: 'imageUrl' -} as const - -export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum] - - -export const PurchaseReceiptOrderByRelevanceFieldEnum = { - code: 'code', - description: 'description' -} as const - -export type PurchaseReceiptOrderByRelevanceFieldEnum = (typeof PurchaseReceiptOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptOrderByRelevanceFieldEnum] - - -export const PurchaseReceiptItemOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type PurchaseReceiptItemOrderByRelevanceFieldEnum = (typeof PurchaseReceiptItemOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptItemOrderByRelevanceFieldEnum] - - -export const PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = (typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum] - - export const SalesInvoiceOrderByRelevanceFieldEnum = { code: 'code', description: 'description' @@ -815,30 +265,21 @@ export const SalesInvoiceOrderByRelevanceFieldEnum = { export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum] -export const StockMovementOrderByRelevanceFieldEnum = { - referenceId: 'referenceId' +export const ServiceOrderByRelevanceFieldEnum = { + name: 'name', + description: 'description', + sku: 'sku', + barcode: 'barcode' } as const -export type StockMovementOrderByRelevanceFieldEnum = (typeof StockMovementOrderByRelevanceFieldEnum)[keyof typeof StockMovementOrderByRelevanceFieldEnum] +export type ServiceOrderByRelevanceFieldEnum = (typeof ServiceOrderByRelevanceFieldEnum)[keyof typeof ServiceOrderByRelevanceFieldEnum] -export const SupplierOrderByRelevanceFieldEnum = { - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country' +export const ServiceCategoryOrderByRelevanceFieldEnum = { + name: 'name', + description: 'description', + imageUrl: 'imageUrl' } as const -export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum] - - -export const SupplierLedgerOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type SupplierLedgerOrderByRelevanceFieldEnum = (typeof SupplierLedgerOrderByRelevanceFieldEnum)[keyof typeof SupplierLedgerOrderByRelevanceFieldEnum] +export type ServiceCategoryOrderByRelevanceFieldEnum = (typeof ServiceCategoryOrderByRelevanceFieldEnum)[keyof typeof ServiceCategoryOrderByRelevanceFieldEnum] diff --git a/src/generated/prisma/models.ts b/src/generated/prisma/models.ts index d7eb658..9268e0f 100644 --- a/src/generated/prisma/models.ts +++ b/src/generated/prisma/models.ts @@ -8,38 +8,13 @@ * * 🟢 You can import this file directly. */ -export type * from './models/User.js' -export type * from './models/Role.js' -export type * from './models/OtpCode.js' -export type * from './models/RefreshToken.js' -export type * from './models/BankBranch.js' -export type * from './models/BankAccount.js' -export type * from './models/BankAccountTransaction.js' -export type * from './models/Inventory.js' -export type * from './models/InventoryBankAccount.js' -export type * from './models/PosAccount.js' -export type * from './models/InventoryTransfer.js' -export type * from './models/InventoryTransferItem.js' -export type * from './models/Bank.js' -export type * from './models/Order.js' -export type * from './models/OrderItem.js' +export type * from './models/Good.js' +export type * from './models/GoodCategory.js' export type * from './models/Customer.js' export type * from './models/TriggerLog.js' -export type * from './models/ProductVariant.js' -export type * from './models/Product.js' -export type * from './models/ProductBrand.js' -export type * from './models/ProductCategory.js' -export type * from './models/PurchaseReceipt.js' -export type * from './models/PurchaseReceiptItem.js' -export type * from './models/PurchaseReceiptPayments.js' export type * from './models/SalesInvoice.js' export type * from './models/SalesInvoiceItem.js' export type * from './models/SalesInvoicePayment.js' -export type * from './models/StockMovement.js' -export type * from './models/StockBalance.js' -export type * from './models/StockAdjustment.js' -export type * from './models/StockReservation.js' -export type * from './models/Supplier.js' -export type * from './models/SupplierLedger.js' -export type * from './models/StockAvailableView.js' +export type * from './models/Service.js' +export type * from './models/ServiceCategory.js' export type * from './commonInputTypes.js' \ No newline at end of file diff --git a/src/generated/prisma/models/Bank.ts b/src/generated/prisma/models/Bank.ts deleted file mode 100644 index 0a03c9f..0000000 --- a/src/generated/prisma/models/Bank.ts +++ /dev/null @@ -1,1283 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `Bank` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model Bank - * - */ -export type BankModel = runtime.Types.Result.DefaultSelection - -export type AggregateBank = { - _count: BankCountAggregateOutputType | null - _avg: BankAvgAggregateOutputType | null - _sum: BankSumAggregateOutputType | null - _min: BankMinAggregateOutputType | null - _max: BankMaxAggregateOutputType | null -} - -export type BankAvgAggregateOutputType = { - id: number | null -} - -export type BankSumAggregateOutputType = { - id: number | null -} - -export type BankMinAggregateOutputType = { - id: number | null - name: string | null - shortName: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type BankMaxAggregateOutputType = { - id: number | null - name: string | null - shortName: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type BankCountAggregateOutputType = { - id: number - name: number - shortName: number - createdAt: number - updatedAt: number - deletedAt: number - _all: number -} - - -export type BankAvgAggregateInputType = { - id?: true -} - -export type BankSumAggregateInputType = { - id?: true -} - -export type BankMinAggregateInputType = { - id?: true - name?: true - shortName?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type BankMaxAggregateInputType = { - id?: true - name?: true - shortName?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type BankCountAggregateInputType = { - id?: true - name?: true - shortName?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - _all?: true -} - -export type BankAggregateArgs = { - /** - * Filter which Bank to aggregate. - */ - where?: Prisma.BankWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Banks to fetch. - */ - orderBy?: Prisma.BankOrderByWithRelationInput | Prisma.BankOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.BankWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Banks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Banks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Banks - **/ - _count?: true | BankCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: BankAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: BankSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: BankMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: BankMaxAggregateInputType -} - -export type GetBankAggregateType = { - [P in keyof T & keyof AggregateBank]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type BankGroupByArgs = { - where?: Prisma.BankWhereInput - orderBy?: Prisma.BankOrderByWithAggregationInput | Prisma.BankOrderByWithAggregationInput[] - by: Prisma.BankScalarFieldEnum[] | Prisma.BankScalarFieldEnum - having?: Prisma.BankScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: BankCountAggregateInputType | true - _avg?: BankAvgAggregateInputType - _sum?: BankSumAggregateInputType - _min?: BankMinAggregateInputType - _max?: BankMaxAggregateInputType -} - -export type BankGroupByOutputType = { - id: number - name: string - shortName: string - createdAt: Date - updatedAt: Date - deletedAt: Date | null - _count: BankCountAggregateOutputType | null - _avg: BankAvgAggregateOutputType | null - _sum: BankSumAggregateOutputType | null - _min: BankMinAggregateOutputType | null - _max: BankMaxAggregateOutputType | null -} - -type GetBankGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof BankGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type BankWhereInput = { - AND?: Prisma.BankWhereInput | Prisma.BankWhereInput[] - OR?: Prisma.BankWhereInput[] - NOT?: Prisma.BankWhereInput | Prisma.BankWhereInput[] - id?: Prisma.IntFilter<"Bank"> | number - name?: Prisma.StringFilter<"Bank"> | string - shortName?: Prisma.StringFilter<"Bank"> | string - createdAt?: Prisma.DateTimeFilter<"Bank"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Bank"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Bank"> | Date | string | null - bankBranches?: Prisma.BankBranchListRelationFilter -} - -export type BankOrderByWithRelationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - shortName?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - bankBranches?: Prisma.BankBranchOrderByRelationAggregateInput - _relevance?: Prisma.BankOrderByRelevanceInput -} - -export type BankWhereUniqueInput = Prisma.AtLeast<{ - id?: number - shortName?: string - AND?: Prisma.BankWhereInput | Prisma.BankWhereInput[] - OR?: Prisma.BankWhereInput[] - NOT?: Prisma.BankWhereInput | Prisma.BankWhereInput[] - name?: Prisma.StringFilter<"Bank"> | string - createdAt?: Prisma.DateTimeFilter<"Bank"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Bank"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Bank"> | Date | string | null - bankBranches?: Prisma.BankBranchListRelationFilter -}, "id" | "shortName"> - -export type BankOrderByWithAggregationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - shortName?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.BankCountOrderByAggregateInput - _avg?: Prisma.BankAvgOrderByAggregateInput - _max?: Prisma.BankMaxOrderByAggregateInput - _min?: Prisma.BankMinOrderByAggregateInput - _sum?: Prisma.BankSumOrderByAggregateInput -} - -export type BankScalarWhereWithAggregatesInput = { - AND?: Prisma.BankScalarWhereWithAggregatesInput | Prisma.BankScalarWhereWithAggregatesInput[] - OR?: Prisma.BankScalarWhereWithAggregatesInput[] - NOT?: Prisma.BankScalarWhereWithAggregatesInput | Prisma.BankScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"Bank"> | number - name?: Prisma.StringWithAggregatesFilter<"Bank"> | string - shortName?: Prisma.StringWithAggregatesFilter<"Bank"> | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Bank"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Bank"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Bank"> | Date | string | null -} - -export type BankCreateInput = { - name: string - shortName: string - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - bankBranches?: Prisma.BankBranchCreateNestedManyWithoutBankInput -} - -export type BankUncheckedCreateInput = { - id?: number - name: string - shortName: string - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - bankBranches?: Prisma.BankBranchUncheckedCreateNestedManyWithoutBankInput -} - -export type BankUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - shortName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - bankBranches?: Prisma.BankBranchUpdateManyWithoutBankNestedInput -} - -export type BankUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - shortName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - bankBranches?: Prisma.BankBranchUncheckedUpdateManyWithoutBankNestedInput -} - -export type BankCreateManyInput = { - id?: number - name: string - shortName: string - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type BankUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - shortName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type BankUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - shortName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type BankScalarRelationFilter = { - is?: Prisma.BankWhereInput - isNot?: Prisma.BankWhereInput -} - -export type BankOrderByRelevanceInput = { - fields: Prisma.BankOrderByRelevanceFieldEnum | Prisma.BankOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type BankCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - shortName?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type BankAvgOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type BankMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - shortName?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type BankMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - shortName?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type BankSumOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type BankCreateNestedOneWithoutBankBranchesInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankCreateOrConnectWithoutBankBranchesInput - connect?: Prisma.BankWhereUniqueInput -} - -export type BankUpdateOneRequiredWithoutBankBranchesNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankCreateOrConnectWithoutBankBranchesInput - upsert?: Prisma.BankUpsertWithoutBankBranchesInput - connect?: Prisma.BankWhereUniqueInput - update?: Prisma.XOR, Prisma.BankUncheckedUpdateWithoutBankBranchesInput> -} - -export type BankCreateWithoutBankBranchesInput = { - name: string - shortName: string - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type BankUncheckedCreateWithoutBankBranchesInput = { - id?: number - name: string - shortName: string - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type BankCreateOrConnectWithoutBankBranchesInput = { - where: Prisma.BankWhereUniqueInput - create: Prisma.XOR -} - -export type BankUpsertWithoutBankBranchesInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.BankWhereInput -} - -export type BankUpdateToOneWithWhereWithoutBankBranchesInput = { - where?: Prisma.BankWhereInput - data: Prisma.XOR -} - -export type BankUpdateWithoutBankBranchesInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - shortName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type BankUncheckedUpdateWithoutBankBranchesInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - shortName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - - -/** - * Count Type BankCountOutputType - */ - -export type BankCountOutputType = { - bankBranches: number -} - -export type BankCountOutputTypeSelect = { - bankBranches?: boolean | BankCountOutputTypeCountBankBranchesArgs -} - -/** - * BankCountOutputType without action - */ -export type BankCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the BankCountOutputType - */ - select?: Prisma.BankCountOutputTypeSelect | null -} - -/** - * BankCountOutputType without action - */ -export type BankCountOutputTypeCountBankBranchesArgs = { - where?: Prisma.BankBranchWhereInput -} - - -export type BankSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - shortName?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - bankBranches?: boolean | Prisma.Bank$bankBranchesArgs - _count?: boolean | Prisma.BankCountOutputTypeDefaultArgs -}, ExtArgs["result"]["bank"]> - - - -export type BankSelectScalar = { - id?: boolean - name?: boolean - shortName?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean -} - -export type BankOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "shortName" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["bank"]> -export type BankInclude = { - bankBranches?: boolean | Prisma.Bank$bankBranchesArgs - _count?: boolean | Prisma.BankCountOutputTypeDefaultArgs -} - -export type $BankPayload = { - name: "Bank" - objects: { - bankBranches: Prisma.$BankBranchPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - shortName: string - createdAt: Date - updatedAt: Date - deletedAt: Date | null - }, ExtArgs["result"]["bank"]> - composites: {} -} - -export type BankGetPayload = runtime.Types.Result.GetResult - -export type BankCountArgs = - Omit & { - select?: BankCountAggregateInputType | true - } - -export interface BankDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Bank'], meta: { name: 'Bank' } } - /** - * Find zero or one Bank that matches the filter. - * @param {BankFindUniqueArgs} args - Arguments to find a Bank - * @example - * // Get one Bank - * const bank = await prisma.bank.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__BankClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Bank that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {BankFindUniqueOrThrowArgs} args - Arguments to find a Bank - * @example - * // Get one Bank - * const bank = await prisma.bank.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__BankClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Bank that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankFindFirstArgs} args - Arguments to find a Bank - * @example - * // Get one Bank - * const bank = await prisma.bank.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__BankClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Bank that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankFindFirstOrThrowArgs} args - Arguments to find a Bank - * @example - * // Get one Bank - * const bank = await prisma.bank.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__BankClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Banks that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Banks - * const banks = await prisma.bank.findMany() - * - * // Get first 10 Banks - * const banks = await prisma.bank.findMany({ take: 10 }) - * - * // Only select the `id` - * const bankWithIdOnly = await prisma.bank.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Bank. - * @param {BankCreateArgs} args - Arguments to create a Bank. - * @example - * // Create one Bank - * const Bank = await prisma.bank.create({ - * data: { - * // ... data to create a Bank - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__BankClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Banks. - * @param {BankCreateManyArgs} args - Arguments to create many Banks. - * @example - * // Create many Banks - * const bank = await prisma.bank.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a Bank. - * @param {BankDeleteArgs} args - Arguments to delete one Bank. - * @example - * // Delete one Bank - * const Bank = await prisma.bank.delete({ - * where: { - * // ... filter to delete one Bank - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__BankClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Bank. - * @param {BankUpdateArgs} args - Arguments to update one Bank. - * @example - * // Update one Bank - * const bank = await prisma.bank.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__BankClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Banks. - * @param {BankDeleteManyArgs} args - Arguments to filter Banks to delete. - * @example - * // Delete a few Banks - * const { count } = await prisma.bank.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Banks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Banks - * const bank = await prisma.bank.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Bank. - * @param {BankUpsertArgs} args - Arguments to update or create a Bank. - * @example - * // Update or create a Bank - * const bank = await prisma.bank.upsert({ - * create: { - * // ... data to create a Bank - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Bank we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__BankClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Banks. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankCountArgs} args - Arguments to filter Banks to count. - * @example - * // Count the number of Banks - * const count = await prisma.bank.count({ - * where: { - * // ... the filter for the Banks we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Bank. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by Bank. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends BankGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: BankGroupByArgs['orderBy'] } - : { orderBy?: BankGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetBankGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Bank model - */ -readonly fields: BankFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for Bank. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__BankClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - bankBranches = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the Bank model - */ -export interface BankFieldRefs { - readonly id: Prisma.FieldRef<"Bank", 'Int'> - readonly name: Prisma.FieldRef<"Bank", 'String'> - readonly shortName: Prisma.FieldRef<"Bank", 'String'> - readonly createdAt: Prisma.FieldRef<"Bank", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Bank", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"Bank", 'DateTime'> -} - - -// Custom InputTypes -/** - * Bank findUnique - */ -export type BankFindUniqueArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null - /** - * Filter, which Bank to fetch. - */ - where: Prisma.BankWhereUniqueInput -} - -/** - * Bank findUniqueOrThrow - */ -export type BankFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null - /** - * Filter, which Bank to fetch. - */ - where: Prisma.BankWhereUniqueInput -} - -/** - * Bank findFirst - */ -export type BankFindFirstArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null - /** - * Filter, which Bank to fetch. - */ - where?: Prisma.BankWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Banks to fetch. - */ - orderBy?: Prisma.BankOrderByWithRelationInput | Prisma.BankOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Banks. - */ - cursor?: Prisma.BankWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Banks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Banks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Banks. - */ - distinct?: Prisma.BankScalarFieldEnum | Prisma.BankScalarFieldEnum[] -} - -/** - * Bank findFirstOrThrow - */ -export type BankFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null - /** - * Filter, which Bank to fetch. - */ - where?: Prisma.BankWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Banks to fetch. - */ - orderBy?: Prisma.BankOrderByWithRelationInput | Prisma.BankOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Banks. - */ - cursor?: Prisma.BankWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Banks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Banks. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Banks. - */ - distinct?: Prisma.BankScalarFieldEnum | Prisma.BankScalarFieldEnum[] -} - -/** - * Bank findMany - */ -export type BankFindManyArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null - /** - * Filter, which Banks to fetch. - */ - where?: Prisma.BankWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Banks to fetch. - */ - orderBy?: Prisma.BankOrderByWithRelationInput | Prisma.BankOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Banks. - */ - cursor?: Prisma.BankWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Banks from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Banks. - */ - skip?: number - distinct?: Prisma.BankScalarFieldEnum | Prisma.BankScalarFieldEnum[] -} - -/** - * Bank create - */ -export type BankCreateArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null - /** - * The data needed to create a Bank. - */ - data: Prisma.XOR -} - -/** - * Bank createMany - */ -export type BankCreateManyArgs = { - /** - * The data used to create many Banks. - */ - data: Prisma.BankCreateManyInput | Prisma.BankCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Bank update - */ -export type BankUpdateArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null - /** - * The data needed to update a Bank. - */ - data: Prisma.XOR - /** - * Choose, which Bank to update. - */ - where: Prisma.BankWhereUniqueInput -} - -/** - * Bank updateMany - */ -export type BankUpdateManyArgs = { - /** - * The data used to update Banks. - */ - data: Prisma.XOR - /** - * Filter which Banks to update - */ - where?: Prisma.BankWhereInput - /** - * Limit how many Banks to update. - */ - limit?: number -} - -/** - * Bank upsert - */ -export type BankUpsertArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null - /** - * The filter to search for the Bank to update in case it exists. - */ - where: Prisma.BankWhereUniqueInput - /** - * In case the Bank found by the `where` argument doesn't exist, create a new Bank with this data. - */ - create: Prisma.XOR - /** - * In case the Bank was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * Bank delete - */ -export type BankDeleteArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null - /** - * Filter which Bank to delete. - */ - where: Prisma.BankWhereUniqueInput -} - -/** - * Bank deleteMany - */ -export type BankDeleteManyArgs = { - /** - * Filter which Banks to delete - */ - where?: Prisma.BankWhereInput - /** - * Limit how many Banks to delete. - */ - limit?: number -} - -/** - * Bank.bankBranches - */ -export type Bank$bankBranchesArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - where?: Prisma.BankBranchWhereInput - orderBy?: Prisma.BankBranchOrderByWithRelationInput | Prisma.BankBranchOrderByWithRelationInput[] - cursor?: Prisma.BankBranchWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.BankBranchScalarFieldEnum | Prisma.BankBranchScalarFieldEnum[] -} - -/** - * Bank without action - */ -export type BankDefaultArgs = { - /** - * Select specific fields to fetch from the Bank - */ - select?: Prisma.BankSelect | null - /** - * Omit specific fields from the Bank - */ - omit?: Prisma.BankOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankInclude | null -} diff --git a/src/generated/prisma/models/BankAccount.ts b/src/generated/prisma/models/BankAccount.ts deleted file mode 100644 index 4dd80e8..0000000 --- a/src/generated/prisma/models/BankAccount.ts +++ /dev/null @@ -1,1818 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `BankAccount` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model BankAccount - * - */ -export type BankAccountModel = runtime.Types.Result.DefaultSelection - -export type AggregateBankAccount = { - _count: BankAccountCountAggregateOutputType | null - _avg: BankAccountAvgAggregateOutputType | null - _sum: BankAccountSumAggregateOutputType | null - _min: BankAccountMinAggregateOutputType | null - _max: BankAccountMaxAggregateOutputType | null -} - -export type BankAccountAvgAggregateOutputType = { - id: number | null - branchId: number | null -} - -export type BankAccountSumAggregateOutputType = { - id: number | null - branchId: number | null -} - -export type BankAccountMinAggregateOutputType = { - id: number | null - accountNumber: string | null - cardNumber: string | null - name: string | null - iban: string | null - branchId: number | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type BankAccountMaxAggregateOutputType = { - id: number | null - accountNumber: string | null - cardNumber: string | null - name: string | null - iban: string | null - branchId: number | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type BankAccountCountAggregateOutputType = { - id: number - accountNumber: number - cardNumber: number - name: number - iban: number - branchId: number - createdAt: number - updatedAt: number - deletedAt: number - _all: number -} - - -export type BankAccountAvgAggregateInputType = { - id?: true - branchId?: true -} - -export type BankAccountSumAggregateInputType = { - id?: true - branchId?: true -} - -export type BankAccountMinAggregateInputType = { - id?: true - accountNumber?: true - cardNumber?: true - name?: true - iban?: true - branchId?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type BankAccountMaxAggregateInputType = { - id?: true - accountNumber?: true - cardNumber?: true - name?: true - iban?: true - branchId?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type BankAccountCountAggregateInputType = { - id?: true - accountNumber?: true - cardNumber?: true - name?: true - iban?: true - branchId?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - _all?: true -} - -export type BankAccountAggregateArgs = { - /** - * Filter which BankAccount to aggregate. - */ - where?: Prisma.BankAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankAccounts to fetch. - */ - orderBy?: Prisma.BankAccountOrderByWithRelationInput | Prisma.BankAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.BankAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankAccounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned BankAccounts - **/ - _count?: true | BankAccountCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: BankAccountAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: BankAccountSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: BankAccountMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: BankAccountMaxAggregateInputType -} - -export type GetBankAccountAggregateType = { - [P in keyof T & keyof AggregateBankAccount]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type BankAccountGroupByArgs = { - where?: Prisma.BankAccountWhereInput - orderBy?: Prisma.BankAccountOrderByWithAggregationInput | Prisma.BankAccountOrderByWithAggregationInput[] - by: Prisma.BankAccountScalarFieldEnum[] | Prisma.BankAccountScalarFieldEnum - having?: Prisma.BankAccountScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: BankAccountCountAggregateInputType | true - _avg?: BankAccountAvgAggregateInputType - _sum?: BankAccountSumAggregateInputType - _min?: BankAccountMinAggregateInputType - _max?: BankAccountMaxAggregateInputType -} - -export type BankAccountGroupByOutputType = { - id: number - accountNumber: string | null - cardNumber: string | null - name: string - iban: string | null - branchId: number - createdAt: Date - updatedAt: Date - deletedAt: Date | null - _count: BankAccountCountAggregateOutputType | null - _avg: BankAccountAvgAggregateOutputType | null - _sum: BankAccountSumAggregateOutputType | null - _min: BankAccountMinAggregateOutputType | null - _max: BankAccountMaxAggregateOutputType | null -} - -type GetBankAccountGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof BankAccountGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type BankAccountWhereInput = { - AND?: Prisma.BankAccountWhereInput | Prisma.BankAccountWhereInput[] - OR?: Prisma.BankAccountWhereInput[] - NOT?: Prisma.BankAccountWhereInput | Prisma.BankAccountWhereInput[] - id?: Prisma.IntFilter<"BankAccount"> | number - accountNumber?: Prisma.StringNullableFilter<"BankAccount"> | string | null - cardNumber?: Prisma.StringNullableFilter<"BankAccount"> | string | null - name?: Prisma.StringFilter<"BankAccount"> | string - iban?: Prisma.StringNullableFilter<"BankAccount"> | string | null - branchId?: Prisma.IntFilter<"BankAccount"> | number - createdAt?: Prisma.DateTimeFilter<"BankAccount"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"BankAccount"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"BankAccount"> | Date | string | null - branch?: Prisma.XOR - inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter - bankAccountTransactions?: Prisma.BankAccountTransactionListRelationFilter -} - -export type BankAccountOrderByWithRelationInput = { - id?: Prisma.SortOrder - accountNumber?: Prisma.SortOrderInput | Prisma.SortOrder - cardNumber?: Prisma.SortOrderInput | Prisma.SortOrder - name?: Prisma.SortOrder - iban?: Prisma.SortOrderInput | Prisma.SortOrder - branchId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - branch?: Prisma.BankBranchOrderByWithRelationInput - inventoryBankAccounts?: Prisma.InventoryBankAccountOrderByRelationAggregateInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput - bankAccountTransactions?: Prisma.BankAccountTransactionOrderByRelationAggregateInput - _relevance?: Prisma.BankAccountOrderByRelevanceInput -} - -export type BankAccountWhereUniqueInput = Prisma.AtLeast<{ - id?: number - accountNumber?: string - cardNumber?: string - iban?: string - AND?: Prisma.BankAccountWhereInput | Prisma.BankAccountWhereInput[] - OR?: Prisma.BankAccountWhereInput[] - NOT?: Prisma.BankAccountWhereInput | Prisma.BankAccountWhereInput[] - name?: Prisma.StringFilter<"BankAccount"> | string - branchId?: Prisma.IntFilter<"BankAccount"> | number - createdAt?: Prisma.DateTimeFilter<"BankAccount"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"BankAccount"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"BankAccount"> | Date | string | null - branch?: Prisma.XOR - inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter - bankAccountTransactions?: Prisma.BankAccountTransactionListRelationFilter -}, "id" | "accountNumber" | "cardNumber" | "iban"> - -export type BankAccountOrderByWithAggregationInput = { - id?: Prisma.SortOrder - accountNumber?: Prisma.SortOrderInput | Prisma.SortOrder - cardNumber?: Prisma.SortOrderInput | Prisma.SortOrder - name?: Prisma.SortOrder - iban?: Prisma.SortOrderInput | Prisma.SortOrder - branchId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.BankAccountCountOrderByAggregateInput - _avg?: Prisma.BankAccountAvgOrderByAggregateInput - _max?: Prisma.BankAccountMaxOrderByAggregateInput - _min?: Prisma.BankAccountMinOrderByAggregateInput - _sum?: Prisma.BankAccountSumOrderByAggregateInput -} - -export type BankAccountScalarWhereWithAggregatesInput = { - AND?: Prisma.BankAccountScalarWhereWithAggregatesInput | Prisma.BankAccountScalarWhereWithAggregatesInput[] - OR?: Prisma.BankAccountScalarWhereWithAggregatesInput[] - NOT?: Prisma.BankAccountScalarWhereWithAggregatesInput | Prisma.BankAccountScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"BankAccount"> | number - accountNumber?: Prisma.StringNullableWithAggregatesFilter<"BankAccount"> | string | null - cardNumber?: Prisma.StringNullableWithAggregatesFilter<"BankAccount"> | string | null - name?: Prisma.StringWithAggregatesFilter<"BankAccount"> | string - iban?: Prisma.StringNullableWithAggregatesFilter<"BankAccount"> | string | null - branchId?: Prisma.IntWithAggregatesFilter<"BankAccount"> | number - createdAt?: Prisma.DateTimeWithAggregatesFilter<"BankAccount"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"BankAccount"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"BankAccount"> | Date | string | null -} - -export type BankAccountCreateInput = { - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput - bankAccountTransactions?: Prisma.BankAccountTransactionCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountUncheckedCreateInput = { - id?: number - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - branchId: number - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput - bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountUpdateInput = { - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput - bankAccountTransactions?: Prisma.BankAccountTransactionUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - branchId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput - bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountCreateManyInput = { - id?: number - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - branchId: number - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type BankAccountUpdateManyMutationInput = { - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type BankAccountUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - branchId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type BankAccountListRelationFilter = { - every?: Prisma.BankAccountWhereInput - some?: Prisma.BankAccountWhereInput - none?: Prisma.BankAccountWhereInput -} - -export type BankAccountOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type BankAccountOrderByRelevanceInput = { - fields: Prisma.BankAccountOrderByRelevanceFieldEnum | Prisma.BankAccountOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type BankAccountCountOrderByAggregateInput = { - id?: Prisma.SortOrder - accountNumber?: Prisma.SortOrder - cardNumber?: Prisma.SortOrder - name?: Prisma.SortOrder - iban?: Prisma.SortOrder - branchId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type BankAccountAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - branchId?: Prisma.SortOrder -} - -export type BankAccountMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - accountNumber?: Prisma.SortOrder - cardNumber?: Prisma.SortOrder - name?: Prisma.SortOrder - iban?: Prisma.SortOrder - branchId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type BankAccountMinOrderByAggregateInput = { - id?: Prisma.SortOrder - accountNumber?: Prisma.SortOrder - cardNumber?: Prisma.SortOrder - name?: Prisma.SortOrder - iban?: Prisma.SortOrder - branchId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type BankAccountSumOrderByAggregateInput = { - id?: Prisma.SortOrder - branchId?: Prisma.SortOrder -} - -export type BankAccountScalarRelationFilter = { - is?: Prisma.BankAccountWhereInput - isNot?: Prisma.BankAccountWhereInput -} - -export type BankAccountCreateNestedManyWithoutBranchInput = { - create?: Prisma.XOR | Prisma.BankAccountCreateWithoutBranchInput[] | Prisma.BankAccountUncheckedCreateWithoutBranchInput[] - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBranchInput | Prisma.BankAccountCreateOrConnectWithoutBranchInput[] - createMany?: Prisma.BankAccountCreateManyBranchInputEnvelope - connect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] -} - -export type BankAccountUncheckedCreateNestedManyWithoutBranchInput = { - create?: Prisma.XOR | Prisma.BankAccountCreateWithoutBranchInput[] | Prisma.BankAccountUncheckedCreateWithoutBranchInput[] - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBranchInput | Prisma.BankAccountCreateOrConnectWithoutBranchInput[] - createMany?: Prisma.BankAccountCreateManyBranchInputEnvelope - connect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] -} - -export type BankAccountUpdateManyWithoutBranchNestedInput = { - create?: Prisma.XOR | Prisma.BankAccountCreateWithoutBranchInput[] | Prisma.BankAccountUncheckedCreateWithoutBranchInput[] - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBranchInput | Prisma.BankAccountCreateOrConnectWithoutBranchInput[] - upsert?: Prisma.BankAccountUpsertWithWhereUniqueWithoutBranchInput | Prisma.BankAccountUpsertWithWhereUniqueWithoutBranchInput[] - createMany?: Prisma.BankAccountCreateManyBranchInputEnvelope - set?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] - disconnect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] - delete?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] - connect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] - update?: Prisma.BankAccountUpdateWithWhereUniqueWithoutBranchInput | Prisma.BankAccountUpdateWithWhereUniqueWithoutBranchInput[] - updateMany?: Prisma.BankAccountUpdateManyWithWhereWithoutBranchInput | Prisma.BankAccountUpdateManyWithWhereWithoutBranchInput[] - deleteMany?: Prisma.BankAccountScalarWhereInput | Prisma.BankAccountScalarWhereInput[] -} - -export type BankAccountUncheckedUpdateManyWithoutBranchNestedInput = { - create?: Prisma.XOR | Prisma.BankAccountCreateWithoutBranchInput[] | Prisma.BankAccountUncheckedCreateWithoutBranchInput[] - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBranchInput | Prisma.BankAccountCreateOrConnectWithoutBranchInput[] - upsert?: Prisma.BankAccountUpsertWithWhereUniqueWithoutBranchInput | Prisma.BankAccountUpsertWithWhereUniqueWithoutBranchInput[] - createMany?: Prisma.BankAccountCreateManyBranchInputEnvelope - set?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] - disconnect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] - delete?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] - connect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] - update?: Prisma.BankAccountUpdateWithWhereUniqueWithoutBranchInput | Prisma.BankAccountUpdateWithWhereUniqueWithoutBranchInput[] - updateMany?: Prisma.BankAccountUpdateManyWithWhereWithoutBranchInput | Prisma.BankAccountUpdateManyWithWhereWithoutBranchInput[] - deleteMany?: Prisma.BankAccountScalarWhereInput | Prisma.BankAccountScalarWhereInput[] -} - -export type BankAccountCreateNestedOneWithoutBankAccountTransactionsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBankAccountTransactionsInput - connect?: Prisma.BankAccountWhereUniqueInput -} - -export type BankAccountUpdateOneRequiredWithoutBankAccountTransactionsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBankAccountTransactionsInput - upsert?: Prisma.BankAccountUpsertWithoutBankAccountTransactionsInput - connect?: Prisma.BankAccountWhereUniqueInput - update?: Prisma.XOR, Prisma.BankAccountUncheckedUpdateWithoutBankAccountTransactionsInput> -} - -export type BankAccountCreateNestedOneWithoutInventoryBankAccountsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutInventoryBankAccountsInput - connect?: Prisma.BankAccountWhereUniqueInput -} - -export type BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutInventoryBankAccountsInput - upsert?: Prisma.BankAccountUpsertWithoutInventoryBankAccountsInput - connect?: Prisma.BankAccountWhereUniqueInput - update?: Prisma.XOR, Prisma.BankAccountUncheckedUpdateWithoutInventoryBankAccountsInput> -} - -export type BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput - connect?: Prisma.BankAccountWhereUniqueInput -} - -export type BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput - upsert?: Prisma.BankAccountUpsertWithoutPurchaseReceiptPaymentsInput - connect?: Prisma.BankAccountWhereUniqueInput - update?: Prisma.XOR, Prisma.BankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput> -} - -export type BankAccountCreateWithoutBranchInput = { - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput - bankAccountTransactions?: Prisma.BankAccountTransactionCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountUncheckedCreateWithoutBranchInput = { - id?: number - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput - bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountCreateOrConnectWithoutBranchInput = { - where: Prisma.BankAccountWhereUniqueInput - create: Prisma.XOR -} - -export type BankAccountCreateManyBranchInputEnvelope = { - data: Prisma.BankAccountCreateManyBranchInput | Prisma.BankAccountCreateManyBranchInput[] - skipDuplicates?: boolean -} - -export type BankAccountUpsertWithWhereUniqueWithoutBranchInput = { - where: Prisma.BankAccountWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type BankAccountUpdateWithWhereUniqueWithoutBranchInput = { - where: Prisma.BankAccountWhereUniqueInput - data: Prisma.XOR -} - -export type BankAccountUpdateManyWithWhereWithoutBranchInput = { - where: Prisma.BankAccountScalarWhereInput - data: Prisma.XOR -} - -export type BankAccountScalarWhereInput = { - AND?: Prisma.BankAccountScalarWhereInput | Prisma.BankAccountScalarWhereInput[] - OR?: Prisma.BankAccountScalarWhereInput[] - NOT?: Prisma.BankAccountScalarWhereInput | Prisma.BankAccountScalarWhereInput[] - id?: Prisma.IntFilter<"BankAccount"> | number - accountNumber?: Prisma.StringNullableFilter<"BankAccount"> | string | null - cardNumber?: Prisma.StringNullableFilter<"BankAccount"> | string | null - name?: Prisma.StringFilter<"BankAccount"> | string - iban?: Prisma.StringNullableFilter<"BankAccount"> | string | null - branchId?: Prisma.IntFilter<"BankAccount"> | number - createdAt?: Prisma.DateTimeFilter<"BankAccount"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"BankAccount"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"BankAccount"> | Date | string | null -} - -export type BankAccountCreateWithoutBankAccountTransactionsInput = { - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountUncheckedCreateWithoutBankAccountTransactionsInput = { - id?: number - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - branchId: number - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountCreateOrConnectWithoutBankAccountTransactionsInput = { - where: Prisma.BankAccountWhereUniqueInput - create: Prisma.XOR -} - -export type BankAccountUpsertWithoutBankAccountTransactionsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.BankAccountWhereInput -} - -export type BankAccountUpdateToOneWithWhereWithoutBankAccountTransactionsInput = { - where?: Prisma.BankAccountWhereInput - data: Prisma.XOR -} - -export type BankAccountUpdateWithoutBankAccountTransactionsInput = { - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountUncheckedUpdateWithoutBankAccountTransactionsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - branchId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountCreateWithoutInventoryBankAccountsInput = { - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput - bankAccountTransactions?: Prisma.BankAccountTransactionCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountUncheckedCreateWithoutInventoryBankAccountsInput = { - id?: number - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - branchId: number - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput - bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountCreateOrConnectWithoutInventoryBankAccountsInput = { - where: Prisma.BankAccountWhereUniqueInput - create: Prisma.XOR -} - -export type BankAccountUpsertWithoutInventoryBankAccountsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.BankAccountWhereInput -} - -export type BankAccountUpdateToOneWithWhereWithoutInventoryBankAccountsInput = { - where?: Prisma.BankAccountWhereInput - data: Prisma.XOR -} - -export type BankAccountUpdateWithoutInventoryBankAccountsInput = { - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput - bankAccountTransactions?: Prisma.BankAccountTransactionUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountUncheckedUpdateWithoutInventoryBankAccountsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - branchId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput - bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountCreateWithoutPurchaseReceiptPaymentsInput = { - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput - bankAccountTransactions?: Prisma.BankAccountTransactionCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput = { - id?: number - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - branchId: number - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput - bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput -} - -export type BankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput = { - where: Prisma.BankAccountWhereUniqueInput - create: Prisma.XOR -} - -export type BankAccountUpsertWithoutPurchaseReceiptPaymentsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.BankAccountWhereInput -} - -export type BankAccountUpdateToOneWithWhereWithoutPurchaseReceiptPaymentsInput = { - where?: Prisma.BankAccountWhereInput - data: Prisma.XOR -} - -export type BankAccountUpdateWithoutPurchaseReceiptPaymentsInput = { - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput - bankAccountTransactions?: Prisma.BankAccountTransactionUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - branchId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput - bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountCreateManyBranchInput = { - id?: number - accountNumber?: string | null - cardNumber?: string | null - name: string - iban?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type BankAccountUpdateWithoutBranchInput = { - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput - bankAccountTransactions?: Prisma.BankAccountTransactionUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountUncheckedUpdateWithoutBranchInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput - bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput -} - -export type BankAccountUncheckedUpdateManyWithoutBranchInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - name?: Prisma.StringFieldUpdateOperationsInput | string - iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - - -/** - * Count Type BankAccountCountOutputType - */ - -export type BankAccountCountOutputType = { - inventoryBankAccounts: number - purchaseReceiptPayments: number - bankAccountTransactions: number -} - -export type BankAccountCountOutputTypeSelect = { - inventoryBankAccounts?: boolean | BankAccountCountOutputTypeCountInventoryBankAccountsArgs - purchaseReceiptPayments?: boolean | BankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs - bankAccountTransactions?: boolean | BankAccountCountOutputTypeCountBankAccountTransactionsArgs -} - -/** - * BankAccountCountOutputType without action - */ -export type BankAccountCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the BankAccountCountOutputType - */ - select?: Prisma.BankAccountCountOutputTypeSelect | null -} - -/** - * BankAccountCountOutputType without action - */ -export type BankAccountCountOutputTypeCountInventoryBankAccountsArgs = { - where?: Prisma.InventoryBankAccountWhereInput -} - -/** - * BankAccountCountOutputType without action - */ -export type BankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs = { - where?: Prisma.PurchaseReceiptPaymentsWhereInput -} - -/** - * BankAccountCountOutputType without action - */ -export type BankAccountCountOutputTypeCountBankAccountTransactionsArgs = { - where?: Prisma.BankAccountTransactionWhereInput -} - - -export type BankAccountSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - accountNumber?: boolean - cardNumber?: boolean - name?: boolean - iban?: boolean - branchId?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - branch?: boolean | Prisma.BankBranchDefaultArgs - inventoryBankAccounts?: boolean | Prisma.BankAccount$inventoryBankAccountsArgs - purchaseReceiptPayments?: boolean | Prisma.BankAccount$purchaseReceiptPaymentsArgs - bankAccountTransactions?: boolean | Prisma.BankAccount$bankAccountTransactionsArgs - _count?: boolean | Prisma.BankAccountCountOutputTypeDefaultArgs -}, ExtArgs["result"]["bankAccount"]> - - - -export type BankAccountSelectScalar = { - id?: boolean - accountNumber?: boolean - cardNumber?: boolean - name?: boolean - iban?: boolean - branchId?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean -} - -export type BankAccountOmit = runtime.Types.Extensions.GetOmit<"id" | "accountNumber" | "cardNumber" | "name" | "iban" | "branchId" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["bankAccount"]> -export type BankAccountInclude = { - branch?: boolean | Prisma.BankBranchDefaultArgs - inventoryBankAccounts?: boolean | Prisma.BankAccount$inventoryBankAccountsArgs - purchaseReceiptPayments?: boolean | Prisma.BankAccount$purchaseReceiptPaymentsArgs - bankAccountTransactions?: boolean | Prisma.BankAccount$bankAccountTransactionsArgs - _count?: boolean | Prisma.BankAccountCountOutputTypeDefaultArgs -} - -export type $BankAccountPayload = { - name: "BankAccount" - objects: { - branch: Prisma.$BankBranchPayload - inventoryBankAccounts: Prisma.$InventoryBankAccountPayload[] - purchaseReceiptPayments: Prisma.$PurchaseReceiptPaymentsPayload[] - bankAccountTransactions: Prisma.$BankAccountTransactionPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - accountNumber: string | null - cardNumber: string | null - name: string - iban: string | null - branchId: number - createdAt: Date - updatedAt: Date - deletedAt: Date | null - }, ExtArgs["result"]["bankAccount"]> - composites: {} -} - -export type BankAccountGetPayload = runtime.Types.Result.GetResult - -export type BankAccountCountArgs = - Omit & { - select?: BankAccountCountAggregateInputType | true - } - -export interface BankAccountDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['BankAccount'], meta: { name: 'BankAccount' } } - /** - * Find zero or one BankAccount that matches the filter. - * @param {BankAccountFindUniqueArgs} args - Arguments to find a BankAccount - * @example - * // Get one BankAccount - * const bankAccount = await prisma.bankAccount.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one BankAccount that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {BankAccountFindUniqueOrThrowArgs} args - Arguments to find a BankAccount - * @example - * // Get one BankAccount - * const bankAccount = await prisma.bankAccount.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first BankAccount that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountFindFirstArgs} args - Arguments to find a BankAccount - * @example - * // Get one BankAccount - * const bankAccount = await prisma.bankAccount.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__BankAccountClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first BankAccount that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountFindFirstOrThrowArgs} args - Arguments to find a BankAccount - * @example - * // Get one BankAccount - * const bankAccount = await prisma.bankAccount.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__BankAccountClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more BankAccounts that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all BankAccounts - * const bankAccounts = await prisma.bankAccount.findMany() - * - * // Get first 10 BankAccounts - * const bankAccounts = await prisma.bankAccount.findMany({ take: 10 }) - * - * // Only select the `id` - * const bankAccountWithIdOnly = await prisma.bankAccount.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a BankAccount. - * @param {BankAccountCreateArgs} args - Arguments to create a BankAccount. - * @example - * // Create one BankAccount - * const BankAccount = await prisma.bankAccount.create({ - * data: { - * // ... data to create a BankAccount - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many BankAccounts. - * @param {BankAccountCreateManyArgs} args - Arguments to create many BankAccounts. - * @example - * // Create many BankAccounts - * const bankAccount = await prisma.bankAccount.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a BankAccount. - * @param {BankAccountDeleteArgs} args - Arguments to delete one BankAccount. - * @example - * // Delete one BankAccount - * const BankAccount = await prisma.bankAccount.delete({ - * where: { - * // ... filter to delete one BankAccount - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one BankAccount. - * @param {BankAccountUpdateArgs} args - Arguments to update one BankAccount. - * @example - * // Update one BankAccount - * const bankAccount = await prisma.bankAccount.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more BankAccounts. - * @param {BankAccountDeleteManyArgs} args - Arguments to filter BankAccounts to delete. - * @example - * // Delete a few BankAccounts - * const { count } = await prisma.bankAccount.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more BankAccounts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many BankAccounts - * const bankAccount = await prisma.bankAccount.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one BankAccount. - * @param {BankAccountUpsertArgs} args - Arguments to update or create a BankAccount. - * @example - * // Update or create a BankAccount - * const bankAccount = await prisma.bankAccount.upsert({ - * create: { - * // ... data to create a BankAccount - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the BankAccount we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of BankAccounts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountCountArgs} args - Arguments to filter BankAccounts to count. - * @example - * // Count the number of BankAccounts - * const count = await prisma.bankAccount.count({ - * where: { - * // ... the filter for the BankAccounts we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a BankAccount. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by BankAccount. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends BankAccountGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: BankAccountGroupByArgs['orderBy'] } - : { orderBy?: BankAccountGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetBankAccountGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the BankAccount model - */ -readonly fields: BankAccountFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for BankAccount. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__BankAccountClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - branch = {}>(args?: Prisma.Subset>): Prisma.Prisma__BankBranchClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - inventoryBankAccounts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - purchaseReceiptPayments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - bankAccountTransactions = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the BankAccount model - */ -export interface BankAccountFieldRefs { - readonly id: Prisma.FieldRef<"BankAccount", 'Int'> - readonly accountNumber: Prisma.FieldRef<"BankAccount", 'String'> - readonly cardNumber: Prisma.FieldRef<"BankAccount", 'String'> - readonly name: Prisma.FieldRef<"BankAccount", 'String'> - readonly iban: Prisma.FieldRef<"BankAccount", 'String'> - readonly branchId: Prisma.FieldRef<"BankAccount", 'Int'> - readonly createdAt: Prisma.FieldRef<"BankAccount", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"BankAccount", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"BankAccount", 'DateTime'> -} - - -// Custom InputTypes -/** - * BankAccount findUnique - */ -export type BankAccountFindUniqueArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - /** - * Filter, which BankAccount to fetch. - */ - where: Prisma.BankAccountWhereUniqueInput -} - -/** - * BankAccount findUniqueOrThrow - */ -export type BankAccountFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - /** - * Filter, which BankAccount to fetch. - */ - where: Prisma.BankAccountWhereUniqueInput -} - -/** - * BankAccount findFirst - */ -export type BankAccountFindFirstArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - /** - * Filter, which BankAccount to fetch. - */ - where?: Prisma.BankAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankAccounts to fetch. - */ - orderBy?: Prisma.BankAccountOrderByWithRelationInput | Prisma.BankAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for BankAccounts. - */ - cursor?: Prisma.BankAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankAccounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of BankAccounts. - */ - distinct?: Prisma.BankAccountScalarFieldEnum | Prisma.BankAccountScalarFieldEnum[] -} - -/** - * BankAccount findFirstOrThrow - */ -export type BankAccountFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - /** - * Filter, which BankAccount to fetch. - */ - where?: Prisma.BankAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankAccounts to fetch. - */ - orderBy?: Prisma.BankAccountOrderByWithRelationInput | Prisma.BankAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for BankAccounts. - */ - cursor?: Prisma.BankAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankAccounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of BankAccounts. - */ - distinct?: Prisma.BankAccountScalarFieldEnum | Prisma.BankAccountScalarFieldEnum[] -} - -/** - * BankAccount findMany - */ -export type BankAccountFindManyArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - /** - * Filter, which BankAccounts to fetch. - */ - where?: Prisma.BankAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankAccounts to fetch. - */ - orderBy?: Prisma.BankAccountOrderByWithRelationInput | Prisma.BankAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing BankAccounts. - */ - cursor?: Prisma.BankAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankAccounts. - */ - skip?: number - distinct?: Prisma.BankAccountScalarFieldEnum | Prisma.BankAccountScalarFieldEnum[] -} - -/** - * BankAccount create - */ -export type BankAccountCreateArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - /** - * The data needed to create a BankAccount. - */ - data: Prisma.XOR -} - -/** - * BankAccount createMany - */ -export type BankAccountCreateManyArgs = { - /** - * The data used to create many BankAccounts. - */ - data: Prisma.BankAccountCreateManyInput | Prisma.BankAccountCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * BankAccount update - */ -export type BankAccountUpdateArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - /** - * The data needed to update a BankAccount. - */ - data: Prisma.XOR - /** - * Choose, which BankAccount to update. - */ - where: Prisma.BankAccountWhereUniqueInput -} - -/** - * BankAccount updateMany - */ -export type BankAccountUpdateManyArgs = { - /** - * The data used to update BankAccounts. - */ - data: Prisma.XOR - /** - * Filter which BankAccounts to update - */ - where?: Prisma.BankAccountWhereInput - /** - * Limit how many BankAccounts to update. - */ - limit?: number -} - -/** - * BankAccount upsert - */ -export type BankAccountUpsertArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - /** - * The filter to search for the BankAccount to update in case it exists. - */ - where: Prisma.BankAccountWhereUniqueInput - /** - * In case the BankAccount found by the `where` argument doesn't exist, create a new BankAccount with this data. - */ - create: Prisma.XOR - /** - * In case the BankAccount was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * BankAccount delete - */ -export type BankAccountDeleteArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - /** - * Filter which BankAccount to delete. - */ - where: Prisma.BankAccountWhereUniqueInput -} - -/** - * BankAccount deleteMany - */ -export type BankAccountDeleteManyArgs = { - /** - * Filter which BankAccounts to delete - */ - where?: Prisma.BankAccountWhereInput - /** - * Limit how many BankAccounts to delete. - */ - limit?: number -} - -/** - * BankAccount.inventoryBankAccounts - */ -export type BankAccount$inventoryBankAccountsArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - where?: Prisma.InventoryBankAccountWhereInput - orderBy?: Prisma.InventoryBankAccountOrderByWithRelationInput | Prisma.InventoryBankAccountOrderByWithRelationInput[] - cursor?: Prisma.InventoryBankAccountWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.InventoryBankAccountScalarFieldEnum | Prisma.InventoryBankAccountScalarFieldEnum[] -} - -/** - * BankAccount.purchaseReceiptPayments - */ -export type BankAccount$purchaseReceiptPaymentsArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - where?: Prisma.PurchaseReceiptPaymentsWhereInput - orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput | Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput[] - cursor?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[] -} - -/** - * BankAccount.bankAccountTransactions - */ -export type BankAccount$bankAccountTransactionsArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - where?: Prisma.BankAccountTransactionWhereInput - orderBy?: Prisma.BankAccountTransactionOrderByWithRelationInput | Prisma.BankAccountTransactionOrderByWithRelationInput[] - cursor?: Prisma.BankAccountTransactionWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.BankAccountTransactionScalarFieldEnum | Prisma.BankAccountTransactionScalarFieldEnum[] -} - -/** - * BankAccount without action - */ -export type BankAccountDefaultArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null -} diff --git a/src/generated/prisma/models/BankAccountTransaction.ts b/src/generated/prisma/models/BankAccountTransaction.ts deleted file mode 100644 index bdc3137..0000000 --- a/src/generated/prisma/models/BankAccountTransaction.ts +++ /dev/null @@ -1,1429 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `BankAccountTransaction` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model BankAccountTransaction - * - */ -export type BankAccountTransactionModel = runtime.Types.Result.DefaultSelection - -export type AggregateBankAccountTransaction = { - _count: BankAccountTransactionCountAggregateOutputType | null - _avg: BankAccountTransactionAvgAggregateOutputType | null - _sum: BankAccountTransactionSumAggregateOutputType | null - _min: BankAccountTransactionMinAggregateOutputType | null - _max: BankAccountTransactionMaxAggregateOutputType | null -} - -export type BankAccountTransactionAvgAggregateOutputType = { - id: number | null - bankAccountId: number | null - amount: runtime.Decimal | null - balanceAfter: runtime.Decimal | null - referenceId: number | null -} - -export type BankAccountTransactionSumAggregateOutputType = { - id: number | null - bankAccountId: number | null - amount: runtime.Decimal | null - balanceAfter: runtime.Decimal | null - referenceId: number | null -} - -export type BankAccountTransactionMinAggregateOutputType = { - id: number | null - bankAccountId: number | null - type: $Enums.BankAccountTransactionType | null - amount: runtime.Decimal | null - balanceAfter: runtime.Decimal | null - referenceId: number | null - referenceType: $Enums.BankTransactionRefType | null - description: string | null - createdAt: Date | null -} - -export type BankAccountTransactionMaxAggregateOutputType = { - id: number | null - bankAccountId: number | null - type: $Enums.BankAccountTransactionType | null - amount: runtime.Decimal | null - balanceAfter: runtime.Decimal | null - referenceId: number | null - referenceType: $Enums.BankTransactionRefType | null - description: string | null - createdAt: Date | null -} - -export type BankAccountTransactionCountAggregateOutputType = { - id: number - bankAccountId: number - type: number - amount: number - balanceAfter: number - referenceId: number - referenceType: number - description: number - createdAt: number - _all: number -} - - -export type BankAccountTransactionAvgAggregateInputType = { - id?: true - bankAccountId?: true - amount?: true - balanceAfter?: true - referenceId?: true -} - -export type BankAccountTransactionSumAggregateInputType = { - id?: true - bankAccountId?: true - amount?: true - balanceAfter?: true - referenceId?: true -} - -export type BankAccountTransactionMinAggregateInputType = { - id?: true - bankAccountId?: true - type?: true - amount?: true - balanceAfter?: true - referenceId?: true - referenceType?: true - description?: true - createdAt?: true -} - -export type BankAccountTransactionMaxAggregateInputType = { - id?: true - bankAccountId?: true - type?: true - amount?: true - balanceAfter?: true - referenceId?: true - referenceType?: true - description?: true - createdAt?: true -} - -export type BankAccountTransactionCountAggregateInputType = { - id?: true - bankAccountId?: true - type?: true - amount?: true - balanceAfter?: true - referenceId?: true - referenceType?: true - description?: true - createdAt?: true - _all?: true -} - -export type BankAccountTransactionAggregateArgs = { - /** - * Filter which BankAccountTransaction to aggregate. - */ - where?: Prisma.BankAccountTransactionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankAccountTransactions to fetch. - */ - orderBy?: Prisma.BankAccountTransactionOrderByWithRelationInput | Prisma.BankAccountTransactionOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.BankAccountTransactionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankAccountTransactions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankAccountTransactions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned BankAccountTransactions - **/ - _count?: true | BankAccountTransactionCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: BankAccountTransactionAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: BankAccountTransactionSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: BankAccountTransactionMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: BankAccountTransactionMaxAggregateInputType -} - -export type GetBankAccountTransactionAggregateType = { - [P in keyof T & keyof AggregateBankAccountTransaction]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type BankAccountTransactionGroupByArgs = { - where?: Prisma.BankAccountTransactionWhereInput - orderBy?: Prisma.BankAccountTransactionOrderByWithAggregationInput | Prisma.BankAccountTransactionOrderByWithAggregationInput[] - by: Prisma.BankAccountTransactionScalarFieldEnum[] | Prisma.BankAccountTransactionScalarFieldEnum - having?: Prisma.BankAccountTransactionScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: BankAccountTransactionCountAggregateInputType | true - _avg?: BankAccountTransactionAvgAggregateInputType - _sum?: BankAccountTransactionSumAggregateInputType - _min?: BankAccountTransactionMinAggregateInputType - _max?: BankAccountTransactionMaxAggregateInputType -} - -export type BankAccountTransactionGroupByOutputType = { - id: number - bankAccountId: number - type: $Enums.BankAccountTransactionType - amount: runtime.Decimal - balanceAfter: runtime.Decimal - referenceId: number - referenceType: $Enums.BankTransactionRefType - description: string | null - createdAt: Date - _count: BankAccountTransactionCountAggregateOutputType | null - _avg: BankAccountTransactionAvgAggregateOutputType | null - _sum: BankAccountTransactionSumAggregateOutputType | null - _min: BankAccountTransactionMinAggregateOutputType | null - _max: BankAccountTransactionMaxAggregateOutputType | null -} - -type GetBankAccountTransactionGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof BankAccountTransactionGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type BankAccountTransactionWhereInput = { - AND?: Prisma.BankAccountTransactionWhereInput | Prisma.BankAccountTransactionWhereInput[] - OR?: Prisma.BankAccountTransactionWhereInput[] - NOT?: Prisma.BankAccountTransactionWhereInput | Prisma.BankAccountTransactionWhereInput[] - id?: Prisma.IntFilter<"BankAccountTransaction"> | number - bankAccountId?: Prisma.IntFilter<"BankAccountTransaction"> | number - type?: Prisma.EnumBankAccountTransactionTypeFilter<"BankAccountTransaction"> | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFilter<"BankAccountTransaction"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFilter<"BankAccountTransaction"> | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFilter<"BankAccountTransaction"> | number - referenceType?: Prisma.EnumBankTransactionRefTypeFilter<"BankAccountTransaction"> | $Enums.BankTransactionRefType - description?: Prisma.StringNullableFilter<"BankAccountTransaction"> | string | null - createdAt?: Prisma.DateTimeFilter<"BankAccountTransaction"> | Date | string - bankAccount?: Prisma.XOR -} - -export type BankAccountTransactionOrderByWithRelationInput = { - id?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - type?: Prisma.SortOrder - amount?: Prisma.SortOrder - balanceAfter?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - bankAccount?: Prisma.BankAccountOrderByWithRelationInput - _relevance?: Prisma.BankAccountTransactionOrderByRelevanceInput -} - -export type BankAccountTransactionWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.BankAccountTransactionWhereInput | Prisma.BankAccountTransactionWhereInput[] - OR?: Prisma.BankAccountTransactionWhereInput[] - NOT?: Prisma.BankAccountTransactionWhereInput | Prisma.BankAccountTransactionWhereInput[] - bankAccountId?: Prisma.IntFilter<"BankAccountTransaction"> | number - type?: Prisma.EnumBankAccountTransactionTypeFilter<"BankAccountTransaction"> | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFilter<"BankAccountTransaction"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFilter<"BankAccountTransaction"> | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFilter<"BankAccountTransaction"> | number - referenceType?: Prisma.EnumBankTransactionRefTypeFilter<"BankAccountTransaction"> | $Enums.BankTransactionRefType - description?: Prisma.StringNullableFilter<"BankAccountTransaction"> | string | null - createdAt?: Prisma.DateTimeFilter<"BankAccountTransaction"> | Date | string - bankAccount?: Prisma.XOR -}, "id"> - -export type BankAccountTransactionOrderByWithAggregationInput = { - id?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - type?: Prisma.SortOrder - amount?: Prisma.SortOrder - balanceAfter?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - _count?: Prisma.BankAccountTransactionCountOrderByAggregateInput - _avg?: Prisma.BankAccountTransactionAvgOrderByAggregateInput - _max?: Prisma.BankAccountTransactionMaxOrderByAggregateInput - _min?: Prisma.BankAccountTransactionMinOrderByAggregateInput - _sum?: Prisma.BankAccountTransactionSumOrderByAggregateInput -} - -export type BankAccountTransactionScalarWhereWithAggregatesInput = { - AND?: Prisma.BankAccountTransactionScalarWhereWithAggregatesInput | Prisma.BankAccountTransactionScalarWhereWithAggregatesInput[] - OR?: Prisma.BankAccountTransactionScalarWhereWithAggregatesInput[] - NOT?: Prisma.BankAccountTransactionScalarWhereWithAggregatesInput | Prisma.BankAccountTransactionScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"BankAccountTransaction"> | number - bankAccountId?: Prisma.IntWithAggregatesFilter<"BankAccountTransaction"> | number - type?: Prisma.EnumBankAccountTransactionTypeWithAggregatesFilter<"BankAccountTransaction"> | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalWithAggregatesFilter<"BankAccountTransaction"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalWithAggregatesFilter<"BankAccountTransaction"> | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntWithAggregatesFilter<"BankAccountTransaction"> | number - referenceType?: Prisma.EnumBankTransactionRefTypeWithAggregatesFilter<"BankAccountTransaction"> | $Enums.BankTransactionRefType - description?: Prisma.StringNullableWithAggregatesFilter<"BankAccountTransaction"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"BankAccountTransaction"> | Date | string -} - -export type BankAccountTransactionCreateInput = { - type: $Enums.BankAccountTransactionType - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId: number - referenceType: $Enums.BankTransactionRefType - description?: string | null - createdAt?: Date | string - bankAccount: Prisma.BankAccountCreateNestedOneWithoutBankAccountTransactionsInput -} - -export type BankAccountTransactionUncheckedCreateInput = { - id?: number - bankAccountId: number - type: $Enums.BankAccountTransactionType - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId: number - referenceType: $Enums.BankTransactionRefType - description?: string | null - createdAt?: Date | string -} - -export type BankAccountTransactionUpdateInput = { - type?: Prisma.EnumBankAccountTransactionTypeFieldUpdateOperationsInput | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFieldUpdateOperationsInput | number - referenceType?: Prisma.EnumBankTransactionRefTypeFieldUpdateOperationsInput | $Enums.BankTransactionRefType - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutBankAccountTransactionsNestedInput -} - -export type BankAccountTransactionUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumBankAccountTransactionTypeFieldUpdateOperationsInput | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFieldUpdateOperationsInput | number - referenceType?: Prisma.EnumBankTransactionRefTypeFieldUpdateOperationsInput | $Enums.BankTransactionRefType - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type BankAccountTransactionCreateManyInput = { - id?: number - bankAccountId: number - type: $Enums.BankAccountTransactionType - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId: number - referenceType: $Enums.BankTransactionRefType - description?: string | null - createdAt?: Date | string -} - -export type BankAccountTransactionUpdateManyMutationInput = { - type?: Prisma.EnumBankAccountTransactionTypeFieldUpdateOperationsInput | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFieldUpdateOperationsInput | number - referenceType?: Prisma.EnumBankTransactionRefTypeFieldUpdateOperationsInput | $Enums.BankTransactionRefType - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type BankAccountTransactionUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumBankAccountTransactionTypeFieldUpdateOperationsInput | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFieldUpdateOperationsInput | number - referenceType?: Prisma.EnumBankTransactionRefTypeFieldUpdateOperationsInput | $Enums.BankTransactionRefType - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type BankAccountTransactionListRelationFilter = { - every?: Prisma.BankAccountTransactionWhereInput - some?: Prisma.BankAccountTransactionWhereInput - none?: Prisma.BankAccountTransactionWhereInput -} - -export type BankAccountTransactionOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type BankAccountTransactionOrderByRelevanceInput = { - fields: Prisma.BankAccountTransactionOrderByRelevanceFieldEnum | Prisma.BankAccountTransactionOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type BankAccountTransactionCountOrderByAggregateInput = { - id?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - type?: Prisma.SortOrder - amount?: Prisma.SortOrder - balanceAfter?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type BankAccountTransactionAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - amount?: Prisma.SortOrder - balanceAfter?: Prisma.SortOrder - referenceId?: Prisma.SortOrder -} - -export type BankAccountTransactionMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - type?: Prisma.SortOrder - amount?: Prisma.SortOrder - balanceAfter?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type BankAccountTransactionMinOrderByAggregateInput = { - id?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - type?: Prisma.SortOrder - amount?: Prisma.SortOrder - balanceAfter?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type BankAccountTransactionSumOrderByAggregateInput = { - id?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - amount?: Prisma.SortOrder - balanceAfter?: Prisma.SortOrder - referenceId?: Prisma.SortOrder -} - -export type BankAccountTransactionCreateNestedManyWithoutBankAccountInput = { - create?: Prisma.XOR | Prisma.BankAccountTransactionCreateWithoutBankAccountInput[] | Prisma.BankAccountTransactionUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.BankAccountTransactionCreateOrConnectWithoutBankAccountInput | Prisma.BankAccountTransactionCreateOrConnectWithoutBankAccountInput[] - createMany?: Prisma.BankAccountTransactionCreateManyBankAccountInputEnvelope - connect?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] -} - -export type BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput = { - create?: Prisma.XOR | Prisma.BankAccountTransactionCreateWithoutBankAccountInput[] | Prisma.BankAccountTransactionUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.BankAccountTransactionCreateOrConnectWithoutBankAccountInput | Prisma.BankAccountTransactionCreateOrConnectWithoutBankAccountInput[] - createMany?: Prisma.BankAccountTransactionCreateManyBankAccountInputEnvelope - connect?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] -} - -export type BankAccountTransactionUpdateManyWithoutBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.BankAccountTransactionCreateWithoutBankAccountInput[] | Prisma.BankAccountTransactionUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.BankAccountTransactionCreateOrConnectWithoutBankAccountInput | Prisma.BankAccountTransactionCreateOrConnectWithoutBankAccountInput[] - upsert?: Prisma.BankAccountTransactionUpsertWithWhereUniqueWithoutBankAccountInput | Prisma.BankAccountTransactionUpsertWithWhereUniqueWithoutBankAccountInput[] - createMany?: Prisma.BankAccountTransactionCreateManyBankAccountInputEnvelope - set?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] - disconnect?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] - delete?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] - connect?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] - update?: Prisma.BankAccountTransactionUpdateWithWhereUniqueWithoutBankAccountInput | Prisma.BankAccountTransactionUpdateWithWhereUniqueWithoutBankAccountInput[] - updateMany?: Prisma.BankAccountTransactionUpdateManyWithWhereWithoutBankAccountInput | Prisma.BankAccountTransactionUpdateManyWithWhereWithoutBankAccountInput[] - deleteMany?: Prisma.BankAccountTransactionScalarWhereInput | Prisma.BankAccountTransactionScalarWhereInput[] -} - -export type BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.BankAccountTransactionCreateWithoutBankAccountInput[] | Prisma.BankAccountTransactionUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.BankAccountTransactionCreateOrConnectWithoutBankAccountInput | Prisma.BankAccountTransactionCreateOrConnectWithoutBankAccountInput[] - upsert?: Prisma.BankAccountTransactionUpsertWithWhereUniqueWithoutBankAccountInput | Prisma.BankAccountTransactionUpsertWithWhereUniqueWithoutBankAccountInput[] - createMany?: Prisma.BankAccountTransactionCreateManyBankAccountInputEnvelope - set?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] - disconnect?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] - delete?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] - connect?: Prisma.BankAccountTransactionWhereUniqueInput | Prisma.BankAccountTransactionWhereUniqueInput[] - update?: Prisma.BankAccountTransactionUpdateWithWhereUniqueWithoutBankAccountInput | Prisma.BankAccountTransactionUpdateWithWhereUniqueWithoutBankAccountInput[] - updateMany?: Prisma.BankAccountTransactionUpdateManyWithWhereWithoutBankAccountInput | Prisma.BankAccountTransactionUpdateManyWithWhereWithoutBankAccountInput[] - deleteMany?: Prisma.BankAccountTransactionScalarWhereInput | Prisma.BankAccountTransactionScalarWhereInput[] -} - -export type EnumBankAccountTransactionTypeFieldUpdateOperationsInput = { - set?: $Enums.BankAccountTransactionType -} - -export type DecimalFieldUpdateOperationsInput = { - set?: runtime.Decimal | runtime.DecimalJsLike | number | string - increment?: runtime.Decimal | runtime.DecimalJsLike | number | string - decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string - multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string - divide?: runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type EnumBankTransactionRefTypeFieldUpdateOperationsInput = { - set?: $Enums.BankTransactionRefType -} - -export type BankAccountTransactionCreateWithoutBankAccountInput = { - type: $Enums.BankAccountTransactionType - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId: number - referenceType: $Enums.BankTransactionRefType - description?: string | null - createdAt?: Date | string -} - -export type BankAccountTransactionUncheckedCreateWithoutBankAccountInput = { - id?: number - type: $Enums.BankAccountTransactionType - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId: number - referenceType: $Enums.BankTransactionRefType - description?: string | null - createdAt?: Date | string -} - -export type BankAccountTransactionCreateOrConnectWithoutBankAccountInput = { - where: Prisma.BankAccountTransactionWhereUniqueInput - create: Prisma.XOR -} - -export type BankAccountTransactionCreateManyBankAccountInputEnvelope = { - data: Prisma.BankAccountTransactionCreateManyBankAccountInput | Prisma.BankAccountTransactionCreateManyBankAccountInput[] - skipDuplicates?: boolean -} - -export type BankAccountTransactionUpsertWithWhereUniqueWithoutBankAccountInput = { - where: Prisma.BankAccountTransactionWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type BankAccountTransactionUpdateWithWhereUniqueWithoutBankAccountInput = { - where: Prisma.BankAccountTransactionWhereUniqueInput - data: Prisma.XOR -} - -export type BankAccountTransactionUpdateManyWithWhereWithoutBankAccountInput = { - where: Prisma.BankAccountTransactionScalarWhereInput - data: Prisma.XOR -} - -export type BankAccountTransactionScalarWhereInput = { - AND?: Prisma.BankAccountTransactionScalarWhereInput | Prisma.BankAccountTransactionScalarWhereInput[] - OR?: Prisma.BankAccountTransactionScalarWhereInput[] - NOT?: Prisma.BankAccountTransactionScalarWhereInput | Prisma.BankAccountTransactionScalarWhereInput[] - id?: Prisma.IntFilter<"BankAccountTransaction"> | number - bankAccountId?: Prisma.IntFilter<"BankAccountTransaction"> | number - type?: Prisma.EnumBankAccountTransactionTypeFilter<"BankAccountTransaction"> | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFilter<"BankAccountTransaction"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFilter<"BankAccountTransaction"> | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFilter<"BankAccountTransaction"> | number - referenceType?: Prisma.EnumBankTransactionRefTypeFilter<"BankAccountTransaction"> | $Enums.BankTransactionRefType - description?: Prisma.StringNullableFilter<"BankAccountTransaction"> | string | null - createdAt?: Prisma.DateTimeFilter<"BankAccountTransaction"> | Date | string -} - -export type BankAccountTransactionCreateManyBankAccountInput = { - id?: number - type: $Enums.BankAccountTransactionType - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId: number - referenceType: $Enums.BankTransactionRefType - description?: string | null - createdAt?: Date | string -} - -export type BankAccountTransactionUpdateWithoutBankAccountInput = { - type?: Prisma.EnumBankAccountTransactionTypeFieldUpdateOperationsInput | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFieldUpdateOperationsInput | number - referenceType?: Prisma.EnumBankTransactionRefTypeFieldUpdateOperationsInput | $Enums.BankTransactionRefType - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type BankAccountTransactionUncheckedUpdateWithoutBankAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumBankAccountTransactionTypeFieldUpdateOperationsInput | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFieldUpdateOperationsInput | number - referenceType?: Prisma.EnumBankTransactionRefTypeFieldUpdateOperationsInput | $Enums.BankTransactionRefType - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type BankAccountTransactionUncheckedUpdateManyWithoutBankAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumBankAccountTransactionTypeFieldUpdateOperationsInput | $Enums.BankAccountTransactionType - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balanceAfter?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceId?: Prisma.IntFieldUpdateOperationsInput | number - referenceType?: Prisma.EnumBankTransactionRefTypeFieldUpdateOperationsInput | $Enums.BankTransactionRefType - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - - - -export type BankAccountTransactionSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - bankAccountId?: boolean - type?: boolean - amount?: boolean - balanceAfter?: boolean - referenceId?: boolean - referenceType?: boolean - description?: boolean - createdAt?: boolean - bankAccount?: boolean | Prisma.BankAccountDefaultArgs -}, ExtArgs["result"]["bankAccountTransaction"]> - - - -export type BankAccountTransactionSelectScalar = { - id?: boolean - bankAccountId?: boolean - type?: boolean - amount?: boolean - balanceAfter?: boolean - referenceId?: boolean - referenceType?: boolean - description?: boolean - createdAt?: boolean -} - -export type BankAccountTransactionOmit = runtime.Types.Extensions.GetOmit<"id" | "bankAccountId" | "type" | "amount" | "balanceAfter" | "referenceId" | "referenceType" | "description" | "createdAt", ExtArgs["result"]["bankAccountTransaction"]> -export type BankAccountTransactionInclude = { - bankAccount?: boolean | Prisma.BankAccountDefaultArgs -} - -export type $BankAccountTransactionPayload = { - name: "BankAccountTransaction" - objects: { - bankAccount: Prisma.$BankAccountPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - bankAccountId: number - type: $Enums.BankAccountTransactionType - amount: runtime.Decimal - balanceAfter: runtime.Decimal - referenceId: number - referenceType: $Enums.BankTransactionRefType - description: string | null - createdAt: Date - }, ExtArgs["result"]["bankAccountTransaction"]> - composites: {} -} - -export type BankAccountTransactionGetPayload = runtime.Types.Result.GetResult - -export type BankAccountTransactionCountArgs = - Omit & { - select?: BankAccountTransactionCountAggregateInputType | true - } - -export interface BankAccountTransactionDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['BankAccountTransaction'], meta: { name: 'BankAccountTransaction' } } - /** - * Find zero or one BankAccountTransaction that matches the filter. - * @param {BankAccountTransactionFindUniqueArgs} args - Arguments to find a BankAccountTransaction - * @example - * // Get one BankAccountTransaction - * const bankAccountTransaction = await prisma.bankAccountTransaction.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountTransactionClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one BankAccountTransaction that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {BankAccountTransactionFindUniqueOrThrowArgs} args - Arguments to find a BankAccountTransaction - * @example - * // Get one BankAccountTransaction - * const bankAccountTransaction = await prisma.bankAccountTransaction.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountTransactionClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first BankAccountTransaction that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountTransactionFindFirstArgs} args - Arguments to find a BankAccountTransaction - * @example - * // Get one BankAccountTransaction - * const bankAccountTransaction = await prisma.bankAccountTransaction.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__BankAccountTransactionClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first BankAccountTransaction that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountTransactionFindFirstOrThrowArgs} args - Arguments to find a BankAccountTransaction - * @example - * // Get one BankAccountTransaction - * const bankAccountTransaction = await prisma.bankAccountTransaction.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__BankAccountTransactionClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more BankAccountTransactions that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountTransactionFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all BankAccountTransactions - * const bankAccountTransactions = await prisma.bankAccountTransaction.findMany() - * - * // Get first 10 BankAccountTransactions - * const bankAccountTransactions = await prisma.bankAccountTransaction.findMany({ take: 10 }) - * - * // Only select the `id` - * const bankAccountTransactionWithIdOnly = await prisma.bankAccountTransaction.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a BankAccountTransaction. - * @param {BankAccountTransactionCreateArgs} args - Arguments to create a BankAccountTransaction. - * @example - * // Create one BankAccountTransaction - * const BankAccountTransaction = await prisma.bankAccountTransaction.create({ - * data: { - * // ... data to create a BankAccountTransaction - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountTransactionClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many BankAccountTransactions. - * @param {BankAccountTransactionCreateManyArgs} args - Arguments to create many BankAccountTransactions. - * @example - * // Create many BankAccountTransactions - * const bankAccountTransaction = await prisma.bankAccountTransaction.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a BankAccountTransaction. - * @param {BankAccountTransactionDeleteArgs} args - Arguments to delete one BankAccountTransaction. - * @example - * // Delete one BankAccountTransaction - * const BankAccountTransaction = await prisma.bankAccountTransaction.delete({ - * where: { - * // ... filter to delete one BankAccountTransaction - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountTransactionClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one BankAccountTransaction. - * @param {BankAccountTransactionUpdateArgs} args - Arguments to update one BankAccountTransaction. - * @example - * // Update one BankAccountTransaction - * const bankAccountTransaction = await prisma.bankAccountTransaction.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountTransactionClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more BankAccountTransactions. - * @param {BankAccountTransactionDeleteManyArgs} args - Arguments to filter BankAccountTransactions to delete. - * @example - * // Delete a few BankAccountTransactions - * const { count } = await prisma.bankAccountTransaction.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more BankAccountTransactions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountTransactionUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many BankAccountTransactions - * const bankAccountTransaction = await prisma.bankAccountTransaction.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one BankAccountTransaction. - * @param {BankAccountTransactionUpsertArgs} args - Arguments to update or create a BankAccountTransaction. - * @example - * // Update or create a BankAccountTransaction - * const bankAccountTransaction = await prisma.bankAccountTransaction.upsert({ - * create: { - * // ... data to create a BankAccountTransaction - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the BankAccountTransaction we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__BankAccountTransactionClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of BankAccountTransactions. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountTransactionCountArgs} args - Arguments to filter BankAccountTransactions to count. - * @example - * // Count the number of BankAccountTransactions - * const count = await prisma.bankAccountTransaction.count({ - * where: { - * // ... the filter for the BankAccountTransactions we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a BankAccountTransaction. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountTransactionAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by BankAccountTransaction. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankAccountTransactionGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends BankAccountTransactionGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: BankAccountTransactionGroupByArgs['orderBy'] } - : { orderBy?: BankAccountTransactionGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetBankAccountTransactionGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the BankAccountTransaction model - */ -readonly fields: BankAccountTransactionFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for BankAccountTransaction. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__BankAccountTransactionClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - bankAccount = {}>(args?: Prisma.Subset>): Prisma.Prisma__BankAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the BankAccountTransaction model - */ -export interface BankAccountTransactionFieldRefs { - readonly id: Prisma.FieldRef<"BankAccountTransaction", 'Int'> - readonly bankAccountId: Prisma.FieldRef<"BankAccountTransaction", 'Int'> - readonly type: Prisma.FieldRef<"BankAccountTransaction", 'BankAccountTransactionType'> - readonly amount: Prisma.FieldRef<"BankAccountTransaction", 'Decimal'> - readonly balanceAfter: Prisma.FieldRef<"BankAccountTransaction", 'Decimal'> - readonly referenceId: Prisma.FieldRef<"BankAccountTransaction", 'Int'> - readonly referenceType: Prisma.FieldRef<"BankAccountTransaction", 'BankTransactionRefType'> - readonly description: Prisma.FieldRef<"BankAccountTransaction", 'String'> - readonly createdAt: Prisma.FieldRef<"BankAccountTransaction", 'DateTime'> -} - - -// Custom InputTypes -/** - * BankAccountTransaction findUnique - */ -export type BankAccountTransactionFindUniqueArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - /** - * Filter, which BankAccountTransaction to fetch. - */ - where: Prisma.BankAccountTransactionWhereUniqueInput -} - -/** - * BankAccountTransaction findUniqueOrThrow - */ -export type BankAccountTransactionFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - /** - * Filter, which BankAccountTransaction to fetch. - */ - where: Prisma.BankAccountTransactionWhereUniqueInput -} - -/** - * BankAccountTransaction findFirst - */ -export type BankAccountTransactionFindFirstArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - /** - * Filter, which BankAccountTransaction to fetch. - */ - where?: Prisma.BankAccountTransactionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankAccountTransactions to fetch. - */ - orderBy?: Prisma.BankAccountTransactionOrderByWithRelationInput | Prisma.BankAccountTransactionOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for BankAccountTransactions. - */ - cursor?: Prisma.BankAccountTransactionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankAccountTransactions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankAccountTransactions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of BankAccountTransactions. - */ - distinct?: Prisma.BankAccountTransactionScalarFieldEnum | Prisma.BankAccountTransactionScalarFieldEnum[] -} - -/** - * BankAccountTransaction findFirstOrThrow - */ -export type BankAccountTransactionFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - /** - * Filter, which BankAccountTransaction to fetch. - */ - where?: Prisma.BankAccountTransactionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankAccountTransactions to fetch. - */ - orderBy?: Prisma.BankAccountTransactionOrderByWithRelationInput | Prisma.BankAccountTransactionOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for BankAccountTransactions. - */ - cursor?: Prisma.BankAccountTransactionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankAccountTransactions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankAccountTransactions. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of BankAccountTransactions. - */ - distinct?: Prisma.BankAccountTransactionScalarFieldEnum | Prisma.BankAccountTransactionScalarFieldEnum[] -} - -/** - * BankAccountTransaction findMany - */ -export type BankAccountTransactionFindManyArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - /** - * Filter, which BankAccountTransactions to fetch. - */ - where?: Prisma.BankAccountTransactionWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankAccountTransactions to fetch. - */ - orderBy?: Prisma.BankAccountTransactionOrderByWithRelationInput | Prisma.BankAccountTransactionOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing BankAccountTransactions. - */ - cursor?: Prisma.BankAccountTransactionWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankAccountTransactions from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankAccountTransactions. - */ - skip?: number - distinct?: Prisma.BankAccountTransactionScalarFieldEnum | Prisma.BankAccountTransactionScalarFieldEnum[] -} - -/** - * BankAccountTransaction create - */ -export type BankAccountTransactionCreateArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - /** - * The data needed to create a BankAccountTransaction. - */ - data: Prisma.XOR -} - -/** - * BankAccountTransaction createMany - */ -export type BankAccountTransactionCreateManyArgs = { - /** - * The data used to create many BankAccountTransactions. - */ - data: Prisma.BankAccountTransactionCreateManyInput | Prisma.BankAccountTransactionCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * BankAccountTransaction update - */ -export type BankAccountTransactionUpdateArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - /** - * The data needed to update a BankAccountTransaction. - */ - data: Prisma.XOR - /** - * Choose, which BankAccountTransaction to update. - */ - where: Prisma.BankAccountTransactionWhereUniqueInput -} - -/** - * BankAccountTransaction updateMany - */ -export type BankAccountTransactionUpdateManyArgs = { - /** - * The data used to update BankAccountTransactions. - */ - data: Prisma.XOR - /** - * Filter which BankAccountTransactions to update - */ - where?: Prisma.BankAccountTransactionWhereInput - /** - * Limit how many BankAccountTransactions to update. - */ - limit?: number -} - -/** - * BankAccountTransaction upsert - */ -export type BankAccountTransactionUpsertArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - /** - * The filter to search for the BankAccountTransaction to update in case it exists. - */ - where: Prisma.BankAccountTransactionWhereUniqueInput - /** - * In case the BankAccountTransaction found by the `where` argument doesn't exist, create a new BankAccountTransaction with this data. - */ - create: Prisma.XOR - /** - * In case the BankAccountTransaction was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * BankAccountTransaction delete - */ -export type BankAccountTransactionDeleteArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null - /** - * Filter which BankAccountTransaction to delete. - */ - where: Prisma.BankAccountTransactionWhereUniqueInput -} - -/** - * BankAccountTransaction deleteMany - */ -export type BankAccountTransactionDeleteManyArgs = { - /** - * Filter which BankAccountTransactions to delete - */ - where?: Prisma.BankAccountTransactionWhereInput - /** - * Limit how many BankAccountTransactions to delete. - */ - limit?: number -} - -/** - * BankAccountTransaction without action - */ -export type BankAccountTransactionDefaultArgs = { - /** - * Select specific fields to fetch from the BankAccountTransaction - */ - select?: Prisma.BankAccountTransactionSelect | null - /** - * Omit specific fields from the BankAccountTransaction - */ - omit?: Prisma.BankAccountTransactionOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountTransactionInclude | null -} diff --git a/src/generated/prisma/models/BankBranch.ts b/src/generated/prisma/models/BankBranch.ts deleted file mode 100644 index 0cc1a06..0000000 --- a/src/generated/prisma/models/BankBranch.ts +++ /dev/null @@ -1,1509 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `BankBranch` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model BankBranch - * - */ -export type BankBranchModel = runtime.Types.Result.DefaultSelection - -export type AggregateBankBranch = { - _count: BankBranchCountAggregateOutputType | null - _avg: BankBranchAvgAggregateOutputType | null - _sum: BankBranchSumAggregateOutputType | null - _min: BankBranchMinAggregateOutputType | null - _max: BankBranchMaxAggregateOutputType | null -} - -export type BankBranchAvgAggregateOutputType = { - id: number | null - bankId: number | null -} - -export type BankBranchSumAggregateOutputType = { - id: number | null - bankId: number | null -} - -export type BankBranchMinAggregateOutputType = { - id: number | null - name: string | null - code: string | null - address: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - bankId: number | null -} - -export type BankBranchMaxAggregateOutputType = { - id: number | null - name: string | null - code: string | null - address: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - bankId: number | null -} - -export type BankBranchCountAggregateOutputType = { - id: number - name: number - code: number - address: number - createdAt: number - updatedAt: number - deletedAt: number - bankId: number - _all: number -} - - -export type BankBranchAvgAggregateInputType = { - id?: true - bankId?: true -} - -export type BankBranchSumAggregateInputType = { - id?: true - bankId?: true -} - -export type BankBranchMinAggregateInputType = { - id?: true - name?: true - code?: true - address?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - bankId?: true -} - -export type BankBranchMaxAggregateInputType = { - id?: true - name?: true - code?: true - address?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - bankId?: true -} - -export type BankBranchCountAggregateInputType = { - id?: true - name?: true - code?: true - address?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - bankId?: true - _all?: true -} - -export type BankBranchAggregateArgs = { - /** - * Filter which BankBranch to aggregate. - */ - where?: Prisma.BankBranchWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankBranches to fetch. - */ - orderBy?: Prisma.BankBranchOrderByWithRelationInput | Prisma.BankBranchOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.BankBranchWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankBranches from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankBranches. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned BankBranches - **/ - _count?: true | BankBranchCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: BankBranchAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: BankBranchSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: BankBranchMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: BankBranchMaxAggregateInputType -} - -export type GetBankBranchAggregateType = { - [P in keyof T & keyof AggregateBankBranch]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type BankBranchGroupByArgs = { - where?: Prisma.BankBranchWhereInput - orderBy?: Prisma.BankBranchOrderByWithAggregationInput | Prisma.BankBranchOrderByWithAggregationInput[] - by: Prisma.BankBranchScalarFieldEnum[] | Prisma.BankBranchScalarFieldEnum - having?: Prisma.BankBranchScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: BankBranchCountAggregateInputType | true - _avg?: BankBranchAvgAggregateInputType - _sum?: BankBranchSumAggregateInputType - _min?: BankBranchMinAggregateInputType - _max?: BankBranchMaxAggregateInputType -} - -export type BankBranchGroupByOutputType = { - id: number - name: string - code: string - address: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - bankId: number - _count: BankBranchCountAggregateOutputType | null - _avg: BankBranchAvgAggregateOutputType | null - _sum: BankBranchSumAggregateOutputType | null - _min: BankBranchMinAggregateOutputType | null - _max: BankBranchMaxAggregateOutputType | null -} - -type GetBankBranchGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof BankBranchGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type BankBranchWhereInput = { - AND?: Prisma.BankBranchWhereInput | Prisma.BankBranchWhereInput[] - OR?: Prisma.BankBranchWhereInput[] - NOT?: Prisma.BankBranchWhereInput | Prisma.BankBranchWhereInput[] - id?: Prisma.IntFilter<"BankBranch"> | number - name?: Prisma.StringFilter<"BankBranch"> | string - code?: Prisma.StringFilter<"BankBranch"> | string - address?: Prisma.StringNullableFilter<"BankBranch"> | string | null - createdAt?: Prisma.DateTimeFilter<"BankBranch"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"BankBranch"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"BankBranch"> | Date | string | null - bankId?: Prisma.IntFilter<"BankBranch"> | number - bank?: Prisma.XOR - bankAccounts?: Prisma.BankAccountListRelationFilter -} - -export type BankBranchOrderByWithRelationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - address?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - bankId?: Prisma.SortOrder - bank?: Prisma.BankOrderByWithRelationInput - bankAccounts?: Prisma.BankAccountOrderByRelationAggregateInput - _relevance?: Prisma.BankBranchOrderByRelevanceInput -} - -export type BankBranchWhereUniqueInput = Prisma.AtLeast<{ - id?: number - code?: string - AND?: Prisma.BankBranchWhereInput | Prisma.BankBranchWhereInput[] - OR?: Prisma.BankBranchWhereInput[] - NOT?: Prisma.BankBranchWhereInput | Prisma.BankBranchWhereInput[] - name?: Prisma.StringFilter<"BankBranch"> | string - address?: Prisma.StringNullableFilter<"BankBranch"> | string | null - createdAt?: Prisma.DateTimeFilter<"BankBranch"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"BankBranch"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"BankBranch"> | Date | string | null - bankId?: Prisma.IntFilter<"BankBranch"> | number - bank?: Prisma.XOR - bankAccounts?: Prisma.BankAccountListRelationFilter -}, "id" | "code"> - -export type BankBranchOrderByWithAggregationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - address?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - bankId?: Prisma.SortOrder - _count?: Prisma.BankBranchCountOrderByAggregateInput - _avg?: Prisma.BankBranchAvgOrderByAggregateInput - _max?: Prisma.BankBranchMaxOrderByAggregateInput - _min?: Prisma.BankBranchMinOrderByAggregateInput - _sum?: Prisma.BankBranchSumOrderByAggregateInput -} - -export type BankBranchScalarWhereWithAggregatesInput = { - AND?: Prisma.BankBranchScalarWhereWithAggregatesInput | Prisma.BankBranchScalarWhereWithAggregatesInput[] - OR?: Prisma.BankBranchScalarWhereWithAggregatesInput[] - NOT?: Prisma.BankBranchScalarWhereWithAggregatesInput | Prisma.BankBranchScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"BankBranch"> | number - name?: Prisma.StringWithAggregatesFilter<"BankBranch"> | string - code?: Prisma.StringWithAggregatesFilter<"BankBranch"> | string - address?: Prisma.StringNullableWithAggregatesFilter<"BankBranch"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"BankBranch"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"BankBranch"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"BankBranch"> | Date | string | null - bankId?: Prisma.IntWithAggregatesFilter<"BankBranch"> | number -} - -export type BankBranchCreateInput = { - name: string - code: string - address?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - bank: Prisma.BankCreateNestedOneWithoutBankBranchesInput - bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutBranchInput -} - -export type BankBranchUncheckedCreateInput = { - id?: number - name: string - code: string - address?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - bankId: number - bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutBranchInput -} - -export type BankBranchUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - bank?: Prisma.BankUpdateOneRequiredWithoutBankBranchesNestedInput - bankAccounts?: Prisma.BankAccountUpdateManyWithoutBranchNestedInput -} - -export type BankBranchUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - bankId?: Prisma.IntFieldUpdateOperationsInput | number - bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutBranchNestedInput -} - -export type BankBranchCreateManyInput = { - id?: number - name: string - code: string - address?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - bankId: number -} - -export type BankBranchUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type BankBranchUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - bankId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type BankBranchOrderByRelevanceInput = { - fields: Prisma.BankBranchOrderByRelevanceFieldEnum | Prisma.BankBranchOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type BankBranchCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - address?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - bankId?: Prisma.SortOrder -} - -export type BankBranchAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - bankId?: Prisma.SortOrder -} - -export type BankBranchMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - address?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - bankId?: Prisma.SortOrder -} - -export type BankBranchMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - address?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - bankId?: Prisma.SortOrder -} - -export type BankBranchSumOrderByAggregateInput = { - id?: Prisma.SortOrder - bankId?: Prisma.SortOrder -} - -export type BankBranchScalarRelationFilter = { - is?: Prisma.BankBranchWhereInput - isNot?: Prisma.BankBranchWhereInput -} - -export type BankBranchListRelationFilter = { - every?: Prisma.BankBranchWhereInput - some?: Prisma.BankBranchWhereInput - none?: Prisma.BankBranchWhereInput -} - -export type BankBranchOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type BankBranchCreateNestedOneWithoutBankAccountsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankBranchCreateOrConnectWithoutBankAccountsInput - connect?: Prisma.BankBranchWhereUniqueInput -} - -export type BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.BankBranchCreateOrConnectWithoutBankAccountsInput - upsert?: Prisma.BankBranchUpsertWithoutBankAccountsInput - connect?: Prisma.BankBranchWhereUniqueInput - update?: Prisma.XOR, Prisma.BankBranchUncheckedUpdateWithoutBankAccountsInput> -} - -export type BankBranchCreateNestedManyWithoutBankInput = { - create?: Prisma.XOR | Prisma.BankBranchCreateWithoutBankInput[] | Prisma.BankBranchUncheckedCreateWithoutBankInput[] - connectOrCreate?: Prisma.BankBranchCreateOrConnectWithoutBankInput | Prisma.BankBranchCreateOrConnectWithoutBankInput[] - createMany?: Prisma.BankBranchCreateManyBankInputEnvelope - connect?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] -} - -export type BankBranchUncheckedCreateNestedManyWithoutBankInput = { - create?: Prisma.XOR | Prisma.BankBranchCreateWithoutBankInput[] | Prisma.BankBranchUncheckedCreateWithoutBankInput[] - connectOrCreate?: Prisma.BankBranchCreateOrConnectWithoutBankInput | Prisma.BankBranchCreateOrConnectWithoutBankInput[] - createMany?: Prisma.BankBranchCreateManyBankInputEnvelope - connect?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] -} - -export type BankBranchUpdateManyWithoutBankNestedInput = { - create?: Prisma.XOR | Prisma.BankBranchCreateWithoutBankInput[] | Prisma.BankBranchUncheckedCreateWithoutBankInput[] - connectOrCreate?: Prisma.BankBranchCreateOrConnectWithoutBankInput | Prisma.BankBranchCreateOrConnectWithoutBankInput[] - upsert?: Prisma.BankBranchUpsertWithWhereUniqueWithoutBankInput | Prisma.BankBranchUpsertWithWhereUniqueWithoutBankInput[] - createMany?: Prisma.BankBranchCreateManyBankInputEnvelope - set?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] - disconnect?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] - delete?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] - connect?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] - update?: Prisma.BankBranchUpdateWithWhereUniqueWithoutBankInput | Prisma.BankBranchUpdateWithWhereUniqueWithoutBankInput[] - updateMany?: Prisma.BankBranchUpdateManyWithWhereWithoutBankInput | Prisma.BankBranchUpdateManyWithWhereWithoutBankInput[] - deleteMany?: Prisma.BankBranchScalarWhereInput | Prisma.BankBranchScalarWhereInput[] -} - -export type BankBranchUncheckedUpdateManyWithoutBankNestedInput = { - create?: Prisma.XOR | Prisma.BankBranchCreateWithoutBankInput[] | Prisma.BankBranchUncheckedCreateWithoutBankInput[] - connectOrCreate?: Prisma.BankBranchCreateOrConnectWithoutBankInput | Prisma.BankBranchCreateOrConnectWithoutBankInput[] - upsert?: Prisma.BankBranchUpsertWithWhereUniqueWithoutBankInput | Prisma.BankBranchUpsertWithWhereUniqueWithoutBankInput[] - createMany?: Prisma.BankBranchCreateManyBankInputEnvelope - set?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] - disconnect?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] - delete?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] - connect?: Prisma.BankBranchWhereUniqueInput | Prisma.BankBranchWhereUniqueInput[] - update?: Prisma.BankBranchUpdateWithWhereUniqueWithoutBankInput | Prisma.BankBranchUpdateWithWhereUniqueWithoutBankInput[] - updateMany?: Prisma.BankBranchUpdateManyWithWhereWithoutBankInput | Prisma.BankBranchUpdateManyWithWhereWithoutBankInput[] - deleteMany?: Prisma.BankBranchScalarWhereInput | Prisma.BankBranchScalarWhereInput[] -} - -export type BankBranchCreateWithoutBankAccountsInput = { - name: string - code: string - address?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - bank: Prisma.BankCreateNestedOneWithoutBankBranchesInput -} - -export type BankBranchUncheckedCreateWithoutBankAccountsInput = { - id?: number - name: string - code: string - address?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - bankId: number -} - -export type BankBranchCreateOrConnectWithoutBankAccountsInput = { - where: Prisma.BankBranchWhereUniqueInput - create: Prisma.XOR -} - -export type BankBranchUpsertWithoutBankAccountsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.BankBranchWhereInput -} - -export type BankBranchUpdateToOneWithWhereWithoutBankAccountsInput = { - where?: Prisma.BankBranchWhereInput - data: Prisma.XOR -} - -export type BankBranchUpdateWithoutBankAccountsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - bank?: Prisma.BankUpdateOneRequiredWithoutBankBranchesNestedInput -} - -export type BankBranchUncheckedUpdateWithoutBankAccountsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - bankId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type BankBranchCreateWithoutBankInput = { - name: string - code: string - address?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutBranchInput -} - -export type BankBranchUncheckedCreateWithoutBankInput = { - id?: number - name: string - code: string - address?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutBranchInput -} - -export type BankBranchCreateOrConnectWithoutBankInput = { - where: Prisma.BankBranchWhereUniqueInput - create: Prisma.XOR -} - -export type BankBranchCreateManyBankInputEnvelope = { - data: Prisma.BankBranchCreateManyBankInput | Prisma.BankBranchCreateManyBankInput[] - skipDuplicates?: boolean -} - -export type BankBranchUpsertWithWhereUniqueWithoutBankInput = { - where: Prisma.BankBranchWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type BankBranchUpdateWithWhereUniqueWithoutBankInput = { - where: Prisma.BankBranchWhereUniqueInput - data: Prisma.XOR -} - -export type BankBranchUpdateManyWithWhereWithoutBankInput = { - where: Prisma.BankBranchScalarWhereInput - data: Prisma.XOR -} - -export type BankBranchScalarWhereInput = { - AND?: Prisma.BankBranchScalarWhereInput | Prisma.BankBranchScalarWhereInput[] - OR?: Prisma.BankBranchScalarWhereInput[] - NOT?: Prisma.BankBranchScalarWhereInput | Prisma.BankBranchScalarWhereInput[] - id?: Prisma.IntFilter<"BankBranch"> | number - name?: Prisma.StringFilter<"BankBranch"> | string - code?: Prisma.StringFilter<"BankBranch"> | string - address?: Prisma.StringNullableFilter<"BankBranch"> | string | null - createdAt?: Prisma.DateTimeFilter<"BankBranch"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"BankBranch"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"BankBranch"> | Date | string | null - bankId?: Prisma.IntFilter<"BankBranch"> | number -} - -export type BankBranchCreateManyBankInput = { - id?: number - name: string - code: string - address?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type BankBranchUpdateWithoutBankInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - bankAccounts?: Prisma.BankAccountUpdateManyWithoutBranchNestedInput -} - -export type BankBranchUncheckedUpdateWithoutBankInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutBranchNestedInput -} - -export type BankBranchUncheckedUpdateManyWithoutBankInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - - -/** - * Count Type BankBranchCountOutputType - */ - -export type BankBranchCountOutputType = { - bankAccounts: number -} - -export type BankBranchCountOutputTypeSelect = { - bankAccounts?: boolean | BankBranchCountOutputTypeCountBankAccountsArgs -} - -/** - * BankBranchCountOutputType without action - */ -export type BankBranchCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the BankBranchCountOutputType - */ - select?: Prisma.BankBranchCountOutputTypeSelect | null -} - -/** - * BankBranchCountOutputType without action - */ -export type BankBranchCountOutputTypeCountBankAccountsArgs = { - where?: Prisma.BankAccountWhereInput -} - - -export type BankBranchSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - code?: boolean - address?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - bankId?: boolean - bank?: boolean | Prisma.BankDefaultArgs - bankAccounts?: boolean | Prisma.BankBranch$bankAccountsArgs - _count?: boolean | Prisma.BankBranchCountOutputTypeDefaultArgs -}, ExtArgs["result"]["bankBranch"]> - - - -export type BankBranchSelectScalar = { - id?: boolean - name?: boolean - code?: boolean - address?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - bankId?: boolean -} - -export type BankBranchOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "code" | "address" | "createdAt" | "updatedAt" | "deletedAt" | "bankId", ExtArgs["result"]["bankBranch"]> -export type BankBranchInclude = { - bank?: boolean | Prisma.BankDefaultArgs - bankAccounts?: boolean | Prisma.BankBranch$bankAccountsArgs - _count?: boolean | Prisma.BankBranchCountOutputTypeDefaultArgs -} - -export type $BankBranchPayload = { - name: "BankBranch" - objects: { - bank: Prisma.$BankPayload - bankAccounts: Prisma.$BankAccountPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - code: string - address: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - bankId: number - }, ExtArgs["result"]["bankBranch"]> - composites: {} -} - -export type BankBranchGetPayload = runtime.Types.Result.GetResult - -export type BankBranchCountArgs = - Omit & { - select?: BankBranchCountAggregateInputType | true - } - -export interface BankBranchDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['BankBranch'], meta: { name: 'BankBranch' } } - /** - * Find zero or one BankBranch that matches the filter. - * @param {BankBranchFindUniqueArgs} args - Arguments to find a BankBranch - * @example - * // Get one BankBranch - * const bankBranch = await prisma.bankBranch.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__BankBranchClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one BankBranch that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {BankBranchFindUniqueOrThrowArgs} args - Arguments to find a BankBranch - * @example - * // Get one BankBranch - * const bankBranch = await prisma.bankBranch.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__BankBranchClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first BankBranch that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankBranchFindFirstArgs} args - Arguments to find a BankBranch - * @example - * // Get one BankBranch - * const bankBranch = await prisma.bankBranch.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__BankBranchClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first BankBranch that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankBranchFindFirstOrThrowArgs} args - Arguments to find a BankBranch - * @example - * // Get one BankBranch - * const bankBranch = await prisma.bankBranch.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__BankBranchClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more BankBranches that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankBranchFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all BankBranches - * const bankBranches = await prisma.bankBranch.findMany() - * - * // Get first 10 BankBranches - * const bankBranches = await prisma.bankBranch.findMany({ take: 10 }) - * - * // Only select the `id` - * const bankBranchWithIdOnly = await prisma.bankBranch.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a BankBranch. - * @param {BankBranchCreateArgs} args - Arguments to create a BankBranch. - * @example - * // Create one BankBranch - * const BankBranch = await prisma.bankBranch.create({ - * data: { - * // ... data to create a BankBranch - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__BankBranchClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many BankBranches. - * @param {BankBranchCreateManyArgs} args - Arguments to create many BankBranches. - * @example - * // Create many BankBranches - * const bankBranch = await prisma.bankBranch.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a BankBranch. - * @param {BankBranchDeleteArgs} args - Arguments to delete one BankBranch. - * @example - * // Delete one BankBranch - * const BankBranch = await prisma.bankBranch.delete({ - * where: { - * // ... filter to delete one BankBranch - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__BankBranchClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one BankBranch. - * @param {BankBranchUpdateArgs} args - Arguments to update one BankBranch. - * @example - * // Update one BankBranch - * const bankBranch = await prisma.bankBranch.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__BankBranchClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more BankBranches. - * @param {BankBranchDeleteManyArgs} args - Arguments to filter BankBranches to delete. - * @example - * // Delete a few BankBranches - * const { count } = await prisma.bankBranch.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more BankBranches. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankBranchUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many BankBranches - * const bankBranch = await prisma.bankBranch.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one BankBranch. - * @param {BankBranchUpsertArgs} args - Arguments to update or create a BankBranch. - * @example - * // Update or create a BankBranch - * const bankBranch = await prisma.bankBranch.upsert({ - * create: { - * // ... data to create a BankBranch - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the BankBranch we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__BankBranchClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of BankBranches. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankBranchCountArgs} args - Arguments to filter BankBranches to count. - * @example - * // Count the number of BankBranches - * const count = await prisma.bankBranch.count({ - * where: { - * // ... the filter for the BankBranches we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a BankBranch. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankBranchAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by BankBranch. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {BankBranchGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends BankBranchGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: BankBranchGroupByArgs['orderBy'] } - : { orderBy?: BankBranchGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetBankBranchGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the BankBranch model - */ -readonly fields: BankBranchFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for BankBranch. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__BankBranchClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - bank = {}>(args?: Prisma.Subset>): Prisma.Prisma__BankClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - bankAccounts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the BankBranch model - */ -export interface BankBranchFieldRefs { - readonly id: Prisma.FieldRef<"BankBranch", 'Int'> - readonly name: Prisma.FieldRef<"BankBranch", 'String'> - readonly code: Prisma.FieldRef<"BankBranch", 'String'> - readonly address: Prisma.FieldRef<"BankBranch", 'String'> - readonly createdAt: Prisma.FieldRef<"BankBranch", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"BankBranch", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"BankBranch", 'DateTime'> - readonly bankId: Prisma.FieldRef<"BankBranch", 'Int'> -} - - -// Custom InputTypes -/** - * BankBranch findUnique - */ -export type BankBranchFindUniqueArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - /** - * Filter, which BankBranch to fetch. - */ - where: Prisma.BankBranchWhereUniqueInput -} - -/** - * BankBranch findUniqueOrThrow - */ -export type BankBranchFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - /** - * Filter, which BankBranch to fetch. - */ - where: Prisma.BankBranchWhereUniqueInput -} - -/** - * BankBranch findFirst - */ -export type BankBranchFindFirstArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - /** - * Filter, which BankBranch to fetch. - */ - where?: Prisma.BankBranchWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankBranches to fetch. - */ - orderBy?: Prisma.BankBranchOrderByWithRelationInput | Prisma.BankBranchOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for BankBranches. - */ - cursor?: Prisma.BankBranchWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankBranches from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankBranches. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of BankBranches. - */ - distinct?: Prisma.BankBranchScalarFieldEnum | Prisma.BankBranchScalarFieldEnum[] -} - -/** - * BankBranch findFirstOrThrow - */ -export type BankBranchFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - /** - * Filter, which BankBranch to fetch. - */ - where?: Prisma.BankBranchWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankBranches to fetch. - */ - orderBy?: Prisma.BankBranchOrderByWithRelationInput | Prisma.BankBranchOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for BankBranches. - */ - cursor?: Prisma.BankBranchWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankBranches from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankBranches. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of BankBranches. - */ - distinct?: Prisma.BankBranchScalarFieldEnum | Prisma.BankBranchScalarFieldEnum[] -} - -/** - * BankBranch findMany - */ -export type BankBranchFindManyArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - /** - * Filter, which BankBranches to fetch. - */ - where?: Prisma.BankBranchWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of BankBranches to fetch. - */ - orderBy?: Prisma.BankBranchOrderByWithRelationInput | Prisma.BankBranchOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing BankBranches. - */ - cursor?: Prisma.BankBranchWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` BankBranches from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` BankBranches. - */ - skip?: number - distinct?: Prisma.BankBranchScalarFieldEnum | Prisma.BankBranchScalarFieldEnum[] -} - -/** - * BankBranch create - */ -export type BankBranchCreateArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - /** - * The data needed to create a BankBranch. - */ - data: Prisma.XOR -} - -/** - * BankBranch createMany - */ -export type BankBranchCreateManyArgs = { - /** - * The data used to create many BankBranches. - */ - data: Prisma.BankBranchCreateManyInput | Prisma.BankBranchCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * BankBranch update - */ -export type BankBranchUpdateArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - /** - * The data needed to update a BankBranch. - */ - data: Prisma.XOR - /** - * Choose, which BankBranch to update. - */ - where: Prisma.BankBranchWhereUniqueInput -} - -/** - * BankBranch updateMany - */ -export type BankBranchUpdateManyArgs = { - /** - * The data used to update BankBranches. - */ - data: Prisma.XOR - /** - * Filter which BankBranches to update - */ - where?: Prisma.BankBranchWhereInput - /** - * Limit how many BankBranches to update. - */ - limit?: number -} - -/** - * BankBranch upsert - */ -export type BankBranchUpsertArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - /** - * The filter to search for the BankBranch to update in case it exists. - */ - where: Prisma.BankBranchWhereUniqueInput - /** - * In case the BankBranch found by the `where` argument doesn't exist, create a new BankBranch with this data. - */ - create: Prisma.XOR - /** - * In case the BankBranch was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * BankBranch delete - */ -export type BankBranchDeleteArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null - /** - * Filter which BankBranch to delete. - */ - where: Prisma.BankBranchWhereUniqueInput -} - -/** - * BankBranch deleteMany - */ -export type BankBranchDeleteManyArgs = { - /** - * Filter which BankBranches to delete - */ - where?: Prisma.BankBranchWhereInput - /** - * Limit how many BankBranches to delete. - */ - limit?: number -} - -/** - * BankBranch.bankAccounts - */ -export type BankBranch$bankAccountsArgs = { - /** - * Select specific fields to fetch from the BankAccount - */ - select?: Prisma.BankAccountSelect | null - /** - * Omit specific fields from the BankAccount - */ - omit?: Prisma.BankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankAccountInclude | null - where?: Prisma.BankAccountWhereInput - orderBy?: Prisma.BankAccountOrderByWithRelationInput | Prisma.BankAccountOrderByWithRelationInput[] - cursor?: Prisma.BankAccountWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.BankAccountScalarFieldEnum | Prisma.BankAccountScalarFieldEnum[] -} - -/** - * BankBranch without action - */ -export type BankBranchDefaultArgs = { - /** - * Select specific fields to fetch from the BankBranch - */ - select?: Prisma.BankBranchSelect | null - /** - * Omit specific fields from the BankBranch - */ - omit?: Prisma.BankBranchOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.BankBranchInclude | null -} diff --git a/src/generated/prisma/models/Customer.ts b/src/generated/prisma/models/Customer.ts index e398623..01d1faa 100644 --- a/src/generated/prisma/models/Customer.ts +++ b/src/generated/prisma/models/Customer.ts @@ -41,9 +41,6 @@ export type CustomerMinAggregateOutputType = { email: string | null mobileNumber: string | null address: string | null - city: string | null - state: string | null - country: string | null isActive: boolean | null createdAt: Date | null updatedAt: Date | null @@ -57,9 +54,6 @@ export type CustomerMaxAggregateOutputType = { email: string | null mobileNumber: string | null address: string | null - city: string | null - state: string | null - country: string | null isActive: boolean | null createdAt: Date | null updatedAt: Date | null @@ -73,9 +67,6 @@ export type CustomerCountAggregateOutputType = { email: number mobileNumber: number address: number - city: number - state: number - country: number isActive: number createdAt: number updatedAt: number @@ -99,9 +90,6 @@ export type CustomerMinAggregateInputType = { email?: true mobileNumber?: true address?: true - city?: true - state?: true - country?: true isActive?: true createdAt?: true updatedAt?: true @@ -115,9 +103,6 @@ export type CustomerMaxAggregateInputType = { email?: true mobileNumber?: true address?: true - city?: true - state?: true - country?: true isActive?: true createdAt?: true updatedAt?: true @@ -131,9 +116,6 @@ export type CustomerCountAggregateInputType = { email?: true mobileNumber?: true address?: true - city?: true - state?: true - country?: true isActive?: true createdAt?: true updatedAt?: true @@ -234,9 +216,6 @@ export type CustomerGroupByOutputType = { email: string | null mobileNumber: string address: string | null - city: string | null - state: string | null - country: string | null isActive: boolean createdAt: Date updatedAt: Date @@ -273,15 +252,10 @@ export type CustomerWhereInput = { email?: Prisma.StringNullableFilter<"Customer"> | string | null mobileNumber?: Prisma.StringFilter<"Customer"> | string address?: Prisma.StringNullableFilter<"Customer"> | string | null - city?: Prisma.StringNullableFilter<"Customer"> | string | null - state?: Prisma.StringNullableFilter<"Customer"> | string | null - country?: Prisma.StringNullableFilter<"Customer"> | string | null isActive?: Prisma.BoolFilter<"Customer"> | boolean createdAt?: Prisma.DateTimeFilter<"Customer"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null - orders?: Prisma.OrderListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter salesInvoices?: Prisma.SalesInvoiceListRelationFilter } @@ -292,15 +266,10 @@ export type CustomerOrderByWithRelationInput = { email?: Prisma.SortOrderInput | Prisma.SortOrder mobileNumber?: Prisma.SortOrder address?: Prisma.SortOrderInput | Prisma.SortOrder - city?: Prisma.SortOrderInput | Prisma.SortOrder - state?: Prisma.SortOrderInput | Prisma.SortOrder - country?: Prisma.SortOrderInput | Prisma.SortOrder isActive?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - orders?: Prisma.OrderOrderByRelationAggregateInput - stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput _relevance?: Prisma.CustomerOrderByRelevanceInput } @@ -315,15 +284,10 @@ export type CustomerWhereUniqueInput = Prisma.AtLeast<{ lastName?: Prisma.StringFilter<"Customer"> | string email?: Prisma.StringNullableFilter<"Customer"> | string | null address?: Prisma.StringNullableFilter<"Customer"> | string | null - city?: Prisma.StringNullableFilter<"Customer"> | string | null - state?: Prisma.StringNullableFilter<"Customer"> | string | null - country?: Prisma.StringNullableFilter<"Customer"> | string | null isActive?: Prisma.BoolFilter<"Customer"> | boolean createdAt?: Prisma.DateTimeFilter<"Customer"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null - orders?: Prisma.OrderListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter salesInvoices?: Prisma.SalesInvoiceListRelationFilter }, "id" | "mobileNumber"> @@ -334,9 +298,6 @@ export type CustomerOrderByWithAggregationInput = { email?: Prisma.SortOrderInput | Prisma.SortOrder mobileNumber?: Prisma.SortOrder address?: Prisma.SortOrderInput | Prisma.SortOrder - city?: Prisma.SortOrderInput | Prisma.SortOrder - state?: Prisma.SortOrderInput | Prisma.SortOrder - country?: Prisma.SortOrderInput | Prisma.SortOrder isActive?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder @@ -358,9 +319,6 @@ export type CustomerScalarWhereWithAggregatesInput = { email?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null mobileNumber?: Prisma.StringWithAggregatesFilter<"Customer"> | string address?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null - city?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null - state?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null - country?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null isActive?: Prisma.BoolWithAggregatesFilter<"Customer"> | boolean createdAt?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string @@ -373,15 +331,10 @@ export type CustomerCreateInput = { email?: string | null mobileNumber: string address?: string | null - city?: string | null - state?: string | null - country?: string | null isActive?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput } @@ -392,15 +345,10 @@ export type CustomerUncheckedCreateInput = { email?: string | null mobileNumber: string address?: string | null - city?: string | null - state?: string | null - country?: string | null isActive?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput } @@ -410,15 +358,10 @@ export type CustomerUpdateInput = { email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput } @@ -429,15 +372,10 @@ export type CustomerUncheckedUpdateInput = { email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput } @@ -448,9 +386,6 @@ export type CustomerCreateManyInput = { email?: string | null mobileNumber: string address?: string | null - city?: string | null - state?: string | null - country?: string | null isActive?: boolean createdAt?: Date | string updatedAt?: Date | string @@ -463,9 +398,6 @@ export type CustomerUpdateManyMutationInput = { email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string @@ -479,20 +411,12 @@ export type CustomerUncheckedUpdateManyInput = { email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null } -export type CustomerNullableScalarRelationFilter = { - is?: Prisma.CustomerWhereInput | null - isNot?: Prisma.CustomerWhereInput | null -} - export type CustomerOrderByRelevanceInput = { fields: Prisma.CustomerOrderByRelevanceFieldEnum | Prisma.CustomerOrderByRelevanceFieldEnum[] sort: Prisma.SortOrder @@ -506,9 +430,6 @@ export type CustomerCountOrderByAggregateInput = { email?: Prisma.SortOrder mobileNumber?: Prisma.SortOrder address?: Prisma.SortOrder - city?: Prisma.SortOrder - state?: Prisma.SortOrder - country?: Prisma.SortOrder isActive?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder @@ -526,9 +447,6 @@ export type CustomerMaxOrderByAggregateInput = { email?: Prisma.SortOrder mobileNumber?: Prisma.SortOrder address?: Prisma.SortOrder - city?: Prisma.SortOrder - state?: Prisma.SortOrder - country?: Prisma.SortOrder isActive?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder @@ -542,9 +460,6 @@ export type CustomerMinOrderByAggregateInput = { email?: Prisma.SortOrder mobileNumber?: Prisma.SortOrder address?: Prisma.SortOrder - city?: Prisma.SortOrder - state?: Prisma.SortOrder - country?: Prisma.SortOrder isActive?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder @@ -555,20 +470,13 @@ export type CustomerSumOrderByAggregateInput = { id?: Prisma.SortOrder } -export type CustomerCreateNestedOneWithoutOrdersInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput - connect?: Prisma.CustomerWhereUniqueInput +export type CustomerNullableScalarRelationFilter = { + is?: Prisma.CustomerWhereInput | null + isNot?: Prisma.CustomerWhereInput | null } -export type CustomerUpdateOneWithoutOrdersNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput - upsert?: Prisma.CustomerUpsertWithoutOrdersInput - disconnect?: Prisma.CustomerWhereInput | boolean - delete?: Prisma.CustomerWhereInput | boolean - connect?: Prisma.CustomerWhereUniqueInput - update?: Prisma.XOR, Prisma.CustomerUncheckedUpdateWithoutOrdersInput> +export type BoolFieldUpdateOperationsInput = { + set?: boolean } export type CustomerCreateNestedOneWithoutSalesInvoicesInput = { @@ -587,123 +495,16 @@ export type CustomerUpdateOneWithoutSalesInvoicesNestedInput = { update?: Prisma.XOR, Prisma.CustomerUncheckedUpdateWithoutSalesInvoicesInput> } -export type CustomerCreateNestedOneWithoutStockMovementsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutStockMovementsInput - connect?: Prisma.CustomerWhereUniqueInput -} - -export type CustomerUpdateOneWithoutStockMovementsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutStockMovementsInput - upsert?: Prisma.CustomerUpsertWithoutStockMovementsInput - disconnect?: Prisma.CustomerWhereInput | boolean - delete?: Prisma.CustomerWhereInput | boolean - connect?: Prisma.CustomerWhereUniqueInput - update?: Prisma.XOR, Prisma.CustomerUncheckedUpdateWithoutStockMovementsInput> -} - -export type CustomerCreateWithoutOrdersInput = { - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput - salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput -} - -export type CustomerUncheckedCreateWithoutOrdersInput = { - id?: number - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput - salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput -} - -export type CustomerCreateOrConnectWithoutOrdersInput = { - where: Prisma.CustomerWhereUniqueInput - create: Prisma.XOR -} - -export type CustomerUpsertWithoutOrdersInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.CustomerWhereInput -} - -export type CustomerUpdateToOneWithWhereWithoutOrdersInput = { - where?: Prisma.CustomerWhereInput - data: Prisma.XOR -} - -export type CustomerUpdateWithoutOrdersInput = { - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput -} - -export type CustomerUncheckedUpdateWithoutOrdersInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput -} - export type CustomerCreateWithoutSalesInvoicesInput = { firstName: string lastName: string email?: string | null mobileNumber: string address?: string | null - city?: string | null - state?: string | null - country?: string | null isActive?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput } export type CustomerUncheckedCreateWithoutSalesInvoicesInput = { @@ -713,15 +514,10 @@ export type CustomerUncheckedCreateWithoutSalesInvoicesInput = { email?: string | null mobileNumber: string address?: string | null - city?: string | null - state?: string | null - country?: string | null isActive?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput } export type CustomerCreateOrConnectWithoutSalesInvoicesInput = { @@ -746,15 +542,10 @@ export type CustomerUpdateWithoutSalesInvoicesInput = { email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput } export type CustomerUncheckedUpdateWithoutSalesInvoicesInput = { @@ -764,101 +555,10 @@ export type CustomerUncheckedUpdateWithoutSalesInvoicesInput = { email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput -} - -export type CustomerCreateWithoutStockMovementsInput = { - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput - salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput -} - -export type CustomerUncheckedCreateWithoutStockMovementsInput = { - id?: number - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput - salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput -} - -export type CustomerCreateOrConnectWithoutStockMovementsInput = { - where: Prisma.CustomerWhereUniqueInput - create: Prisma.XOR -} - -export type CustomerUpsertWithoutStockMovementsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.CustomerWhereInput -} - -export type CustomerUpdateToOneWithWhereWithoutStockMovementsInput = { - where?: Prisma.CustomerWhereInput - data: Prisma.XOR -} - -export type CustomerUpdateWithoutStockMovementsInput = { - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput -} - -export type CustomerUncheckedUpdateWithoutStockMovementsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput } @@ -867,14 +567,10 @@ export type CustomerUncheckedUpdateWithoutStockMovementsInput = { */ export type CustomerCountOutputType = { - orders: number - stockMovements: number salesInvoices: number } export type CustomerCountOutputTypeSelect = { - orders?: boolean | CustomerCountOutputTypeCountOrdersArgs - stockMovements?: boolean | CustomerCountOutputTypeCountStockMovementsArgs salesInvoices?: boolean | CustomerCountOutputTypeCountSalesInvoicesArgs } @@ -888,20 +584,6 @@ export type CustomerCountOutputTypeDefaultArgs | null } -/** - * CustomerCountOutputType without action - */ -export type CustomerCountOutputTypeCountOrdersArgs = { - where?: Prisma.OrderWhereInput -} - -/** - * CustomerCountOutputType without action - */ -export type CustomerCountOutputTypeCountStockMovementsArgs = { - where?: Prisma.StockMovementWhereInput -} - /** * CustomerCountOutputType without action */ @@ -917,15 +599,10 @@ export type CustomerSelect - stockMovements?: boolean | Prisma.Customer$stockMovementsArgs salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs _count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs }, ExtArgs["result"]["customer"]> @@ -939,19 +616,14 @@ export type CustomerSelectScalar = { email?: boolean mobileNumber?: boolean address?: boolean - city?: boolean - state?: boolean - country?: boolean isActive?: boolean createdAt?: boolean updatedAt?: boolean deletedAt?: boolean } -export type CustomerOmit = runtime.Types.Extensions.GetOmit<"id" | "firstName" | "lastName" | "email" | "mobileNumber" | "address" | "city" | "state" | "country" | "isActive" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["customer"]> +export type CustomerOmit = runtime.Types.Extensions.GetOmit<"id" | "firstName" | "lastName" | "email" | "mobileNumber" | "address" | "isActive" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["customer"]> export type CustomerInclude = { - orders?: boolean | Prisma.Customer$ordersArgs - stockMovements?: boolean | Prisma.Customer$stockMovementsArgs salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs _count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs } @@ -959,8 +631,6 @@ export type CustomerInclude = { name: "Customer" objects: { - orders: Prisma.$OrderPayload[] - stockMovements: Prisma.$StockMovementPayload[] salesInvoices: Prisma.$SalesInvoicePayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ @@ -970,9 +640,6 @@ export type $CustomerPayload extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" - orders = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockMovements = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> salesInvoices = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> /** * Attaches callbacks for the resolution and/or rejection of the Promise. @@ -1355,9 +1020,6 @@ export interface CustomerFieldRefs { readonly email: Prisma.FieldRef<"Customer", 'String'> readonly mobileNumber: Prisma.FieldRef<"Customer", 'String'> readonly address: Prisma.FieldRef<"Customer", 'String'> - readonly city: Prisma.FieldRef<"Customer", 'String'> - readonly state: Prisma.FieldRef<"Customer", 'String'> - readonly country: Prisma.FieldRef<"Customer", 'String'> readonly isActive: Prisma.FieldRef<"Customer", 'Boolean'> readonly createdAt: Prisma.FieldRef<"Customer", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"Customer", 'DateTime'> @@ -1704,54 +1366,6 @@ export type CustomerDeleteManyArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - where?: Prisma.OrderWhereInput - orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] - cursor?: Prisma.OrderWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] -} - -/** - * Customer.stockMovements - */ -export type Customer$stockMovementsArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - where?: Prisma.StockMovementWhereInput - orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[] - cursor?: Prisma.StockMovementWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] -} - /** * Customer.salesInvoices */ diff --git a/src/generated/prisma/models/Good.ts b/src/generated/prisma/models/Good.ts new file mode 100644 index 0000000..9b3d58b --- /dev/null +++ b/src/generated/prisma/models/Good.ts @@ -0,0 +1,1687 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Good` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums.js" +import type * as Prisma from "../internal/prismaNamespace.js" + +/** + * Model Good + * + */ +export type GoodModel = runtime.Types.Result.DefaultSelection + +export type AggregateGood = { + _count: GoodCountAggregateOutputType | null + _avg: GoodAvgAggregateOutputType | null + _sum: GoodSumAggregateOutputType | null + _min: GoodMinAggregateOutputType | null + _max: GoodMaxAggregateOutputType | null +} + +export type GoodAvgAggregateOutputType = { + id: number | null + categoryId: number | null + baseSalePrice: runtime.Decimal | null +} + +export type GoodSumAggregateOutputType = { + id: number | null + categoryId: number | null + baseSalePrice: runtime.Decimal | null +} + +export type GoodMinAggregateOutputType = { + id: number | null + name: string | null + description: string | null + sku: string | null + localSku: string | null + barcode: string | null + createdAt: Date | null + updatedAt: Date | null + deletedAt: Date | null + categoryId: number | null + baseSalePrice: runtime.Decimal | null +} + +export type GoodMaxAggregateOutputType = { + id: number | null + name: string | null + description: string | null + sku: string | null + localSku: string | null + barcode: string | null + createdAt: Date | null + updatedAt: Date | null + deletedAt: Date | null + categoryId: number | null + baseSalePrice: runtime.Decimal | null +} + +export type GoodCountAggregateOutputType = { + id: number + name: number + description: number + sku: number + localSku: number + barcode: number + createdAt: number + updatedAt: number + deletedAt: number + categoryId: number + baseSalePrice: number + _all: number +} + + +export type GoodAvgAggregateInputType = { + id?: true + categoryId?: true + baseSalePrice?: true +} + +export type GoodSumAggregateInputType = { + id?: true + categoryId?: true + baseSalePrice?: true +} + +export type GoodMinAggregateInputType = { + id?: true + name?: true + description?: true + sku?: true + localSku?: true + barcode?: true + createdAt?: true + updatedAt?: true + deletedAt?: true + categoryId?: true + baseSalePrice?: true +} + +export type GoodMaxAggregateInputType = { + id?: true + name?: true + description?: true + sku?: true + localSku?: true + barcode?: true + createdAt?: true + updatedAt?: true + deletedAt?: true + categoryId?: true + baseSalePrice?: true +} + +export type GoodCountAggregateInputType = { + id?: true + name?: true + description?: true + sku?: true + localSku?: true + barcode?: true + createdAt?: true + updatedAt?: true + deletedAt?: true + categoryId?: true + baseSalePrice?: true + _all?: true +} + +export type GoodAggregateArgs = { + /** + * Filter which Good to aggregate. + */ + where?: Prisma.GoodWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Goods to fetch. + */ + orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.GoodWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Goods from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Goods. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Goods + **/ + _count?: true | GoodCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: GoodAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: GoodSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GoodMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GoodMaxAggregateInputType +} + +export type GetGoodAggregateType = { + [P in keyof T & keyof AggregateGood]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type GoodGroupByArgs = { + where?: Prisma.GoodWhereInput + orderBy?: Prisma.GoodOrderByWithAggregationInput | Prisma.GoodOrderByWithAggregationInput[] + by: Prisma.GoodScalarFieldEnum[] | Prisma.GoodScalarFieldEnum + having?: Prisma.GoodScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GoodCountAggregateInputType | true + _avg?: GoodAvgAggregateInputType + _sum?: GoodSumAggregateInputType + _min?: GoodMinAggregateInputType + _max?: GoodMaxAggregateInputType +} + +export type GoodGroupByOutputType = { + id: number + name: string + description: string | null + sku: string + localSku: string + barcode: string | null + createdAt: Date + updatedAt: Date + deletedAt: Date | null + categoryId: number | null + baseSalePrice: runtime.Decimal + _count: GoodCountAggregateOutputType | null + _avg: GoodAvgAggregateOutputType | null + _sum: GoodSumAggregateOutputType | null + _min: GoodMinAggregateOutputType | null + _max: GoodMaxAggregateOutputType | null +} + +type GetGoodGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof GoodGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type GoodWhereInput = { + AND?: Prisma.GoodWhereInput | Prisma.GoodWhereInput[] + OR?: Prisma.GoodWhereInput[] + NOT?: Prisma.GoodWhereInput | Prisma.GoodWhereInput[] + id?: Prisma.IntFilter<"Good"> | number + name?: Prisma.StringFilter<"Good"> | string + description?: Prisma.StringNullableFilter<"Good"> | string | null + sku?: Prisma.StringFilter<"Good"> | string + localSku?: Prisma.StringFilter<"Good"> | string + barcode?: Prisma.StringNullableFilter<"Good"> | string | null + createdAt?: Prisma.DateTimeFilter<"Good"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Good"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"Good"> | Date | string | null + categoryId?: Prisma.IntNullableFilter<"Good"> | number | null + baseSalePrice?: Prisma.DecimalFilter<"Good"> | runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.XOR | null + salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter +} + +export type GoodOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + sku?: Prisma.SortOrder + localSku?: Prisma.SortOrder + barcode?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + categoryId?: Prisma.SortOrderInput | Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder + category?: Prisma.GoodCategoryOrderByWithRelationInput + salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput + _relevance?: Prisma.GoodOrderByRelevanceInput +} + +export type GoodWhereUniqueInput = Prisma.AtLeast<{ + id?: number + localSku?: string + barcode?: string + AND?: Prisma.GoodWhereInput | Prisma.GoodWhereInput[] + OR?: Prisma.GoodWhereInput[] + NOT?: Prisma.GoodWhereInput | Prisma.GoodWhereInput[] + name?: Prisma.StringFilter<"Good"> | string + description?: Prisma.StringNullableFilter<"Good"> | string | null + sku?: Prisma.StringFilter<"Good"> | string + createdAt?: Prisma.DateTimeFilter<"Good"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Good"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"Good"> | Date | string | null + categoryId?: Prisma.IntNullableFilter<"Good"> | number | null + baseSalePrice?: Prisma.DecimalFilter<"Good"> | runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.XOR | null + salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter +}, "id" | "localSku" | "barcode"> + +export type GoodOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + sku?: Prisma.SortOrder + localSku?: Prisma.SortOrder + barcode?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + categoryId?: Prisma.SortOrderInput | Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder + _count?: Prisma.GoodCountOrderByAggregateInput + _avg?: Prisma.GoodAvgOrderByAggregateInput + _max?: Prisma.GoodMaxOrderByAggregateInput + _min?: Prisma.GoodMinOrderByAggregateInput + _sum?: Prisma.GoodSumOrderByAggregateInput +} + +export type GoodScalarWhereWithAggregatesInput = { + AND?: Prisma.GoodScalarWhereWithAggregatesInput | Prisma.GoodScalarWhereWithAggregatesInput[] + OR?: Prisma.GoodScalarWhereWithAggregatesInput[] + NOT?: Prisma.GoodScalarWhereWithAggregatesInput | Prisma.GoodScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Good"> | number + name?: Prisma.StringWithAggregatesFilter<"Good"> | string + description?: Prisma.StringNullableWithAggregatesFilter<"Good"> | string | null + sku?: Prisma.StringWithAggregatesFilter<"Good"> | string + localSku?: Prisma.StringWithAggregatesFilter<"Good"> | string + barcode?: Prisma.StringNullableWithAggregatesFilter<"Good"> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Good"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Good"> | Date | string + deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Good"> | Date | string | null + categoryId?: Prisma.IntNullableWithAggregatesFilter<"Good"> | number | null + baseSalePrice?: Prisma.DecimalWithAggregatesFilter<"Good"> | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type GoodCreateInput = { + name: string + description?: string | null + sku: string + localSku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput + salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput +} + +export type GoodUncheckedCreateInput = { + id?: number + name: string + description?: string | null + sku: string + localSku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + categoryId?: number | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput +} + +export type GoodUpdateInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + localSku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput + salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput +} + +export type GoodUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + localSku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput +} + +export type GoodCreateManyInput = { + id?: number + name: string + description?: string | null + sku: string + localSku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + categoryId?: number | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type GoodUpdateManyMutationInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + localSku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type GoodUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + localSku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type GoodOrderByRelevanceInput = { + fields: Prisma.GoodOrderByRelevanceFieldEnum | Prisma.GoodOrderByRelevanceFieldEnum[] + sort: Prisma.SortOrder + search: string +} + +export type GoodCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + sku?: Prisma.SortOrder + localSku?: Prisma.SortOrder + barcode?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type GoodAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type GoodMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + sku?: Prisma.SortOrder + localSku?: Prisma.SortOrder + barcode?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type GoodMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + sku?: Prisma.SortOrder + localSku?: Prisma.SortOrder + barcode?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type GoodSumOrderByAggregateInput = { + id?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type GoodListRelationFilter = { + every?: Prisma.GoodWhereInput + some?: Prisma.GoodWhereInput + none?: Prisma.GoodWhereInput +} + +export type GoodOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type GoodNullableScalarRelationFilter = { + is?: Prisma.GoodWhereInput | null + isNot?: Prisma.GoodWhereInput | null +} + +export type StringFieldUpdateOperationsInput = { + set?: string +} + +export type NullableStringFieldUpdateOperationsInput = { + set?: string | null +} + +export type DateTimeFieldUpdateOperationsInput = { + set?: Date | string +} + +export type NullableDateTimeFieldUpdateOperationsInput = { + set?: Date | string | null +} + +export type DecimalFieldUpdateOperationsInput = { + set?: runtime.Decimal | runtime.DecimalJsLike | number | string + increment?: runtime.Decimal | runtime.DecimalJsLike | number | string + decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string + multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string + divide?: runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type IntFieldUpdateOperationsInput = { + set?: number + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type NullableIntFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number +} + +export type GoodCreateNestedManyWithoutCategoryInput = { + create?: Prisma.XOR | Prisma.GoodCreateWithoutCategoryInput[] | Prisma.GoodUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: Prisma.GoodCreateOrConnectWithoutCategoryInput | Prisma.GoodCreateOrConnectWithoutCategoryInput[] + createMany?: Prisma.GoodCreateManyCategoryInputEnvelope + connect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] +} + +export type GoodUncheckedCreateNestedManyWithoutCategoryInput = { + create?: Prisma.XOR | Prisma.GoodCreateWithoutCategoryInput[] | Prisma.GoodUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: Prisma.GoodCreateOrConnectWithoutCategoryInput | Prisma.GoodCreateOrConnectWithoutCategoryInput[] + createMany?: Prisma.GoodCreateManyCategoryInputEnvelope + connect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] +} + +export type GoodUpdateManyWithoutCategoryNestedInput = { + create?: Prisma.XOR | Prisma.GoodCreateWithoutCategoryInput[] | Prisma.GoodUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: Prisma.GoodCreateOrConnectWithoutCategoryInput | Prisma.GoodCreateOrConnectWithoutCategoryInput[] + upsert?: Prisma.GoodUpsertWithWhereUniqueWithoutCategoryInput | Prisma.GoodUpsertWithWhereUniqueWithoutCategoryInput[] + createMany?: Prisma.GoodCreateManyCategoryInputEnvelope + set?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] + disconnect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] + delete?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] + connect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] + update?: Prisma.GoodUpdateWithWhereUniqueWithoutCategoryInput | Prisma.GoodUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: Prisma.GoodUpdateManyWithWhereWithoutCategoryInput | Prisma.GoodUpdateManyWithWhereWithoutCategoryInput[] + deleteMany?: Prisma.GoodScalarWhereInput | Prisma.GoodScalarWhereInput[] +} + +export type GoodUncheckedUpdateManyWithoutCategoryNestedInput = { + create?: Prisma.XOR | Prisma.GoodCreateWithoutCategoryInput[] | Prisma.GoodUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: Prisma.GoodCreateOrConnectWithoutCategoryInput | Prisma.GoodCreateOrConnectWithoutCategoryInput[] + upsert?: Prisma.GoodUpsertWithWhereUniqueWithoutCategoryInput | Prisma.GoodUpsertWithWhereUniqueWithoutCategoryInput[] + createMany?: Prisma.GoodCreateManyCategoryInputEnvelope + set?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] + disconnect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] + delete?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] + connect?: Prisma.GoodWhereUniqueInput | Prisma.GoodWhereUniqueInput[] + update?: Prisma.GoodUpdateWithWhereUniqueWithoutCategoryInput | Prisma.GoodUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: Prisma.GoodUpdateManyWithWhereWithoutCategoryInput | Prisma.GoodUpdateManyWithWhereWithoutCategoryInput[] + deleteMany?: Prisma.GoodScalarWhereInput | Prisma.GoodScalarWhereInput[] +} + +export type GoodCreateNestedOneWithoutSalesInvoiceItemsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GoodCreateOrConnectWithoutSalesInvoiceItemsInput + connect?: Prisma.GoodWhereUniqueInput +} + +export type GoodUpdateOneWithoutSalesInvoiceItemsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GoodCreateOrConnectWithoutSalesInvoiceItemsInput + upsert?: Prisma.GoodUpsertWithoutSalesInvoiceItemsInput + disconnect?: Prisma.GoodWhereInput | boolean + delete?: Prisma.GoodWhereInput | boolean + connect?: Prisma.GoodWhereUniqueInput + update?: Prisma.XOR, Prisma.GoodUncheckedUpdateWithoutSalesInvoiceItemsInput> +} + +export type GoodCreateWithoutCategoryInput = { + name: string + description?: string | null + sku: string + localSku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput +} + +export type GoodUncheckedCreateWithoutCategoryInput = { + id?: number + name: string + description?: string | null + sku: string + localSku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput +} + +export type GoodCreateOrConnectWithoutCategoryInput = { + where: Prisma.GoodWhereUniqueInput + create: Prisma.XOR +} + +export type GoodCreateManyCategoryInputEnvelope = { + data: Prisma.GoodCreateManyCategoryInput | Prisma.GoodCreateManyCategoryInput[] + skipDuplicates?: boolean +} + +export type GoodUpsertWithWhereUniqueWithoutCategoryInput = { + where: Prisma.GoodWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type GoodUpdateWithWhereUniqueWithoutCategoryInput = { + where: Prisma.GoodWhereUniqueInput + data: Prisma.XOR +} + +export type GoodUpdateManyWithWhereWithoutCategoryInput = { + where: Prisma.GoodScalarWhereInput + data: Prisma.XOR +} + +export type GoodScalarWhereInput = { + AND?: Prisma.GoodScalarWhereInput | Prisma.GoodScalarWhereInput[] + OR?: Prisma.GoodScalarWhereInput[] + NOT?: Prisma.GoodScalarWhereInput | Prisma.GoodScalarWhereInput[] + id?: Prisma.IntFilter<"Good"> | number + name?: Prisma.StringFilter<"Good"> | string + description?: Prisma.StringNullableFilter<"Good"> | string | null + sku?: Prisma.StringFilter<"Good"> | string + localSku?: Prisma.StringFilter<"Good"> | string + barcode?: Prisma.StringNullableFilter<"Good"> | string | null + createdAt?: Prisma.DateTimeFilter<"Good"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Good"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"Good"> | Date | string | null + categoryId?: Prisma.IntNullableFilter<"Good"> | number | null + baseSalePrice?: Prisma.DecimalFilter<"Good"> | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type GoodCreateWithoutSalesInvoiceItemsInput = { + name: string + description?: string | null + sku: string + localSku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput +} + +export type GoodUncheckedCreateWithoutSalesInvoiceItemsInput = { + id?: number + name: string + description?: string | null + sku: string + localSku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + categoryId?: number | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type GoodCreateOrConnectWithoutSalesInvoiceItemsInput = { + where: Prisma.GoodWhereUniqueInput + create: Prisma.XOR +} + +export type GoodUpsertWithoutSalesInvoiceItemsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.GoodWhereInput +} + +export type GoodUpdateToOneWithWhereWithoutSalesInvoiceItemsInput = { + where?: Prisma.GoodWhereInput + data: Prisma.XOR +} + +export type GoodUpdateWithoutSalesInvoiceItemsInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + localSku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput +} + +export type GoodUncheckedUpdateWithoutSalesInvoiceItemsInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + localSku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type GoodCreateManyCategoryInput = { + id?: number + name: string + description?: string | null + sku: string + localSku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type GoodUpdateWithoutCategoryInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + localSku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput +} + +export type GoodUncheckedUpdateWithoutCategoryInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + localSku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput +} + +export type GoodUncheckedUpdateManyWithoutCategoryInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + localSku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string +} + + +/** + * Count Type GoodCountOutputType + */ + +export type GoodCountOutputType = { + salesInvoiceItems: number +} + +export type GoodCountOutputTypeSelect = { + salesInvoiceItems?: boolean | GoodCountOutputTypeCountSalesInvoiceItemsArgs +} + +/** + * GoodCountOutputType without action + */ +export type GoodCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the GoodCountOutputType + */ + select?: Prisma.GoodCountOutputTypeSelect | null +} + +/** + * GoodCountOutputType without action + */ +export type GoodCountOutputTypeCountSalesInvoiceItemsArgs = { + where?: Prisma.SalesInvoiceItemWhereInput +} + + +export type GoodSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + sku?: boolean + localSku?: boolean + barcode?: boolean + createdAt?: boolean + updatedAt?: boolean + deletedAt?: boolean + categoryId?: boolean + baseSalePrice?: boolean + category?: boolean | Prisma.Good$categoryArgs + salesInvoiceItems?: boolean | Prisma.Good$salesInvoiceItemsArgs + _count?: boolean | Prisma.GoodCountOutputTypeDefaultArgs +}, ExtArgs["result"]["good"]> + + + +export type GoodSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + sku?: boolean + localSku?: boolean + barcode?: boolean + createdAt?: boolean + updatedAt?: boolean + deletedAt?: boolean + categoryId?: boolean + baseSalePrice?: boolean +} + +export type GoodOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "sku" | "localSku" | "barcode" | "createdAt" | "updatedAt" | "deletedAt" | "categoryId" | "baseSalePrice", ExtArgs["result"]["good"]> +export type GoodInclude = { + category?: boolean | Prisma.Good$categoryArgs + salesInvoiceItems?: boolean | Prisma.Good$salesInvoiceItemsArgs + _count?: boolean | Prisma.GoodCountOutputTypeDefaultArgs +} + +export type $GoodPayload = { + name: "Good" + objects: { + category: Prisma.$GoodCategoryPayload | null + salesInvoiceItems: Prisma.$SalesInvoiceItemPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + name: string + description: string | null + sku: string + localSku: string + barcode: string | null + createdAt: Date + updatedAt: Date + deletedAt: Date | null + categoryId: number | null + baseSalePrice: runtime.Decimal + }, ExtArgs["result"]["good"]> + composites: {} +} + +export type GoodGetPayload = runtime.Types.Result.GetResult + +export type GoodCountArgs = + Omit & { + select?: GoodCountAggregateInputType | true + } + +export interface GoodDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Good'], meta: { name: 'Good' } } + /** + * Find zero or one Good that matches the filter. + * @param {GoodFindUniqueArgs} args - Arguments to find a Good + * @example + * // Get one Good + * const good = await prisma.good.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__GoodClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Good that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GoodFindUniqueOrThrowArgs} args - Arguments to find a Good + * @example + * // Get one Good + * const good = await prisma.good.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__GoodClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Good that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodFindFirstArgs} args - Arguments to find a Good + * @example + * // Get one Good + * const good = await prisma.good.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__GoodClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Good that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodFindFirstOrThrowArgs} args - Arguments to find a Good + * @example + * // Get one Good + * const good = await prisma.good.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__GoodClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Goods that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Goods + * const goods = await prisma.good.findMany() + * + * // Get first 10 Goods + * const goods = await prisma.good.findMany({ take: 10 }) + * + * // Only select the `id` + * const goodWithIdOnly = await prisma.good.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Good. + * @param {GoodCreateArgs} args - Arguments to create a Good. + * @example + * // Create one Good + * const Good = await prisma.good.create({ + * data: { + * // ... data to create a Good + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__GoodClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Goods. + * @param {GoodCreateManyArgs} args - Arguments to create many Goods. + * @example + * // Create many Goods + * const good = await prisma.good.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Delete a Good. + * @param {GoodDeleteArgs} args - Arguments to delete one Good. + * @example + * // Delete one Good + * const Good = await prisma.good.delete({ + * where: { + * // ... filter to delete one Good + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__GoodClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Good. + * @param {GoodUpdateArgs} args - Arguments to update one Good. + * @example + * // Update one Good + * const good = await prisma.good.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__GoodClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Goods. + * @param {GoodDeleteManyArgs} args - Arguments to filter Goods to delete. + * @example + * // Delete a few Goods + * const { count } = await prisma.good.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Goods. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Goods + * const good = await prisma.good.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Good. + * @param {GoodUpsertArgs} args - Arguments to update or create a Good. + * @example + * // Update or create a Good + * const good = await prisma.good.upsert({ + * create: { + * // ... data to create a Good + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Good we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__GoodClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Goods. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodCountArgs} args - Arguments to filter Goods to count. + * @example + * // Count the number of Goods + * const count = await prisma.good.count({ + * where: { + * // ... the filter for the Goods we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Good. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Good. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends GoodGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: GoodGroupByArgs['orderBy'] } + : { orderBy?: GoodGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetGoodGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Good model + */ +readonly fields: GoodFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Good. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__GoodClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + category = {}>(args?: Prisma.Subset>): Prisma.Prisma__GoodCategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + salesInvoiceItems = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Good model + */ +export interface GoodFieldRefs { + readonly id: Prisma.FieldRef<"Good", 'Int'> + readonly name: Prisma.FieldRef<"Good", 'String'> + readonly description: Prisma.FieldRef<"Good", 'String'> + readonly sku: Prisma.FieldRef<"Good", 'String'> + readonly localSku: Prisma.FieldRef<"Good", 'String'> + readonly barcode: Prisma.FieldRef<"Good", 'String'> + readonly createdAt: Prisma.FieldRef<"Good", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"Good", 'DateTime'> + readonly deletedAt: Prisma.FieldRef<"Good", 'DateTime'> + readonly categoryId: Prisma.FieldRef<"Good", 'Int'> + readonly baseSalePrice: Prisma.FieldRef<"Good", 'Decimal'> +} + + +// Custom InputTypes +/** + * Good findUnique + */ +export type GoodFindUniqueArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + /** + * Filter, which Good to fetch. + */ + where: Prisma.GoodWhereUniqueInput +} + +/** + * Good findUniqueOrThrow + */ +export type GoodFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + /** + * Filter, which Good to fetch. + */ + where: Prisma.GoodWhereUniqueInput +} + +/** + * Good findFirst + */ +export type GoodFindFirstArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + /** + * Filter, which Good to fetch. + */ + where?: Prisma.GoodWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Goods to fetch. + */ + orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Goods. + */ + cursor?: Prisma.GoodWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Goods from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Goods. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Goods. + */ + distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[] +} + +/** + * Good findFirstOrThrow + */ +export type GoodFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + /** + * Filter, which Good to fetch. + */ + where?: Prisma.GoodWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Goods to fetch. + */ + orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Goods. + */ + cursor?: Prisma.GoodWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Goods from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Goods. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Goods. + */ + distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[] +} + +/** + * Good findMany + */ +export type GoodFindManyArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + /** + * Filter, which Goods to fetch. + */ + where?: Prisma.GoodWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Goods to fetch. + */ + orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Goods. + */ + cursor?: Prisma.GoodWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Goods from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Goods. + */ + skip?: number + distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[] +} + +/** + * Good create + */ +export type GoodCreateArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + /** + * The data needed to create a Good. + */ + data: Prisma.XOR +} + +/** + * Good createMany + */ +export type GoodCreateManyArgs = { + /** + * The data used to create many Goods. + */ + data: Prisma.GoodCreateManyInput | Prisma.GoodCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Good update + */ +export type GoodUpdateArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + /** + * The data needed to update a Good. + */ + data: Prisma.XOR + /** + * Choose, which Good to update. + */ + where: Prisma.GoodWhereUniqueInput +} + +/** + * Good updateMany + */ +export type GoodUpdateManyArgs = { + /** + * The data used to update Goods. + */ + data: Prisma.XOR + /** + * Filter which Goods to update + */ + where?: Prisma.GoodWhereInput + /** + * Limit how many Goods to update. + */ + limit?: number +} + +/** + * Good upsert + */ +export type GoodUpsertArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + /** + * The filter to search for the Good to update in case it exists. + */ + where: Prisma.GoodWhereUniqueInput + /** + * In case the Good found by the `where` argument doesn't exist, create a new Good with this data. + */ + create: Prisma.XOR + /** + * In case the Good was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Good delete + */ +export type GoodDeleteArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + /** + * Filter which Good to delete. + */ + where: Prisma.GoodWhereUniqueInput +} + +/** + * Good deleteMany + */ +export type GoodDeleteManyArgs = { + /** + * Filter which Goods to delete + */ + where?: Prisma.GoodWhereInput + /** + * Limit how many Goods to delete. + */ + limit?: number +} + +/** + * Good.category + */ +export type Good$categoryArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + where?: Prisma.GoodCategoryWhereInput +} + +/** + * Good.salesInvoiceItems + */ +export type Good$salesInvoiceItemsArgs = { + /** + * Select specific fields to fetch from the SalesInvoiceItem + */ + select?: Prisma.SalesInvoiceItemSelect | null + /** + * Omit specific fields from the SalesInvoiceItem + */ + omit?: Prisma.SalesInvoiceItemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.SalesInvoiceItemInclude | null + where?: Prisma.SalesInvoiceItemWhereInput + orderBy?: Prisma.SalesInvoiceItemOrderByWithRelationInput | Prisma.SalesInvoiceItemOrderByWithRelationInput[] + cursor?: Prisma.SalesInvoiceItemWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.SalesInvoiceItemScalarFieldEnum | Prisma.SalesInvoiceItemScalarFieldEnum[] +} + +/** + * Good without action + */ +export type GoodDefaultArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null +} diff --git a/src/generated/prisma/models/GoodCategory.ts b/src/generated/prisma/models/GoodCategory.ts new file mode 100644 index 0000000..b0531f9 --- /dev/null +++ b/src/generated/prisma/models/GoodCategory.ts @@ -0,0 +1,1315 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `GoodCategory` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums.js" +import type * as Prisma from "../internal/prismaNamespace.js" + +/** + * Model GoodCategory + * + */ +export type GoodCategoryModel = runtime.Types.Result.DefaultSelection + +export type AggregateGoodCategory = { + _count: GoodCategoryCountAggregateOutputType | null + _avg: GoodCategoryAvgAggregateOutputType | null + _sum: GoodCategorySumAggregateOutputType | null + _min: GoodCategoryMinAggregateOutputType | null + _max: GoodCategoryMaxAggregateOutputType | null +} + +export type GoodCategoryAvgAggregateOutputType = { + id: number | null +} + +export type GoodCategorySumAggregateOutputType = { + id: number | null +} + +export type GoodCategoryMinAggregateOutputType = { + id: number | null + name: string | null + description: string | null + imageUrl: string | null + createdAt: Date | null + updatedAt: Date | null + deletedAt: Date | null +} + +export type GoodCategoryMaxAggregateOutputType = { + id: number | null + name: string | null + description: string | null + imageUrl: string | null + createdAt: Date | null + updatedAt: Date | null + deletedAt: Date | null +} + +export type GoodCategoryCountAggregateOutputType = { + id: number + name: number + description: number + imageUrl: number + createdAt: number + updatedAt: number + deletedAt: number + _all: number +} + + +export type GoodCategoryAvgAggregateInputType = { + id?: true +} + +export type GoodCategorySumAggregateInputType = { + id?: true +} + +export type GoodCategoryMinAggregateInputType = { + id?: true + name?: true + description?: true + imageUrl?: true + createdAt?: true + updatedAt?: true + deletedAt?: true +} + +export type GoodCategoryMaxAggregateInputType = { + id?: true + name?: true + description?: true + imageUrl?: true + createdAt?: true + updatedAt?: true + deletedAt?: true +} + +export type GoodCategoryCountAggregateInputType = { + id?: true + name?: true + description?: true + imageUrl?: true + createdAt?: true + updatedAt?: true + deletedAt?: true + _all?: true +} + +export type GoodCategoryAggregateArgs = { + /** + * Filter which GoodCategory to aggregate. + */ + where?: Prisma.GoodCategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoodCategories to fetch. + */ + orderBy?: Prisma.GoodCategoryOrderByWithRelationInput | Prisma.GoodCategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.GoodCategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoodCategories from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` GoodCategories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned GoodCategories + **/ + _count?: true | GoodCategoryCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: GoodCategoryAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: GoodCategorySumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: GoodCategoryMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: GoodCategoryMaxAggregateInputType +} + +export type GetGoodCategoryAggregateType = { + [P in keyof T & keyof AggregateGoodCategory]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type GoodCategoryGroupByArgs = { + where?: Prisma.GoodCategoryWhereInput + orderBy?: Prisma.GoodCategoryOrderByWithAggregationInput | Prisma.GoodCategoryOrderByWithAggregationInput[] + by: Prisma.GoodCategoryScalarFieldEnum[] | Prisma.GoodCategoryScalarFieldEnum + having?: Prisma.GoodCategoryScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: GoodCategoryCountAggregateInputType | true + _avg?: GoodCategoryAvgAggregateInputType + _sum?: GoodCategorySumAggregateInputType + _min?: GoodCategoryMinAggregateInputType + _max?: GoodCategoryMaxAggregateInputType +} + +export type GoodCategoryGroupByOutputType = { + id: number + name: string + description: string | null + imageUrl: string | null + createdAt: Date + updatedAt: Date + deletedAt: Date | null + _count: GoodCategoryCountAggregateOutputType | null + _avg: GoodCategoryAvgAggregateOutputType | null + _sum: GoodCategorySumAggregateOutputType | null + _min: GoodCategoryMinAggregateOutputType | null + _max: GoodCategoryMaxAggregateOutputType | null +} + +type GetGoodCategoryGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof GoodCategoryGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type GoodCategoryWhereInput = { + AND?: Prisma.GoodCategoryWhereInput | Prisma.GoodCategoryWhereInput[] + OR?: Prisma.GoodCategoryWhereInput[] + NOT?: Prisma.GoodCategoryWhereInput | Prisma.GoodCategoryWhereInput[] + id?: Prisma.IntFilter<"GoodCategory"> | number + name?: Prisma.StringFilter<"GoodCategory"> | string + description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null + imageUrl?: Prisma.StringNullableFilter<"GoodCategory"> | string | null + createdAt?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null + goods?: Prisma.GoodListRelationFilter +} + +export type GoodCategoryOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + goods?: Prisma.GoodOrderByRelationAggregateInput + _relevance?: Prisma.GoodCategoryOrderByRelevanceInput +} + +export type GoodCategoryWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: Prisma.GoodCategoryWhereInput | Prisma.GoodCategoryWhereInput[] + OR?: Prisma.GoodCategoryWhereInput[] + NOT?: Prisma.GoodCategoryWhereInput | Prisma.GoodCategoryWhereInput[] + name?: Prisma.StringFilter<"GoodCategory"> | string + description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null + imageUrl?: Prisma.StringNullableFilter<"GoodCategory"> | string | null + createdAt?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null + goods?: Prisma.GoodListRelationFilter +}, "id"> + +export type GoodCategoryOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + _count?: Prisma.GoodCategoryCountOrderByAggregateInput + _avg?: Prisma.GoodCategoryAvgOrderByAggregateInput + _max?: Prisma.GoodCategoryMaxOrderByAggregateInput + _min?: Prisma.GoodCategoryMinOrderByAggregateInput + _sum?: Prisma.GoodCategorySumOrderByAggregateInput +} + +export type GoodCategoryScalarWhereWithAggregatesInput = { + AND?: Prisma.GoodCategoryScalarWhereWithAggregatesInput | Prisma.GoodCategoryScalarWhereWithAggregatesInput[] + OR?: Prisma.GoodCategoryScalarWhereWithAggregatesInput[] + NOT?: Prisma.GoodCategoryScalarWhereWithAggregatesInput | Prisma.GoodCategoryScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"GoodCategory"> | number + name?: Prisma.StringWithAggregatesFilter<"GoodCategory"> | string + description?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null + imageUrl?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<"GoodCategory"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"GoodCategory"> | Date | string + deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"GoodCategory"> | Date | string | null +} + +export type GoodCategoryCreateInput = { + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput +} + +export type GoodCategoryUncheckedCreateInput = { + id?: number + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + goods?: Prisma.GoodUncheckedCreateNestedManyWithoutCategoryInput +} + +export type GoodCategoryUpdateInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput +} + +export type GoodCategoryUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + goods?: Prisma.GoodUncheckedUpdateManyWithoutCategoryNestedInput +} + +export type GoodCategoryCreateManyInput = { + id?: number + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type GoodCategoryUpdateManyMutationInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type GoodCategoryUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type GoodCategoryNullableScalarRelationFilter = { + is?: Prisma.GoodCategoryWhereInput | null + isNot?: Prisma.GoodCategoryWhereInput | null +} + +export type GoodCategoryOrderByRelevanceInput = { + fields: Prisma.GoodCategoryOrderByRelevanceFieldEnum | Prisma.GoodCategoryOrderByRelevanceFieldEnum[] + sort: Prisma.SortOrder + search: string +} + +export type GoodCategoryCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + imageUrl?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder +} + +export type GoodCategoryAvgOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type GoodCategoryMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + imageUrl?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder +} + +export type GoodCategoryMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + imageUrl?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder +} + +export type GoodCategorySumOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type GoodCategoryCreateNestedOneWithoutGoodsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGoodsInput + connect?: Prisma.GoodCategoryWhereUniqueInput +} + +export type GoodCategoryUpdateOneWithoutGoodsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGoodsInput + upsert?: Prisma.GoodCategoryUpsertWithoutGoodsInput + disconnect?: Prisma.GoodCategoryWhereInput | boolean + delete?: Prisma.GoodCategoryWhereInput | boolean + connect?: Prisma.GoodCategoryWhereUniqueInput + update?: Prisma.XOR, Prisma.GoodCategoryUncheckedUpdateWithoutGoodsInput> +} + +export type GoodCategoryCreateWithoutGoodsInput = { + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type GoodCategoryUncheckedCreateWithoutGoodsInput = { + id?: number + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type GoodCategoryCreateOrConnectWithoutGoodsInput = { + where: Prisma.GoodCategoryWhereUniqueInput + create: Prisma.XOR +} + +export type GoodCategoryUpsertWithoutGoodsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.GoodCategoryWhereInput +} + +export type GoodCategoryUpdateToOneWithWhereWithoutGoodsInput = { + where?: Prisma.GoodCategoryWhereInput + data: Prisma.XOR +} + +export type GoodCategoryUpdateWithoutGoodsInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type GoodCategoryUncheckedUpdateWithoutGoodsInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + + +/** + * Count Type GoodCategoryCountOutputType + */ + +export type GoodCategoryCountOutputType = { + goods: number +} + +export type GoodCategoryCountOutputTypeSelect = { + goods?: boolean | GoodCategoryCountOutputTypeCountGoodsArgs +} + +/** + * GoodCategoryCountOutputType without action + */ +export type GoodCategoryCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the GoodCategoryCountOutputType + */ + select?: Prisma.GoodCategoryCountOutputTypeSelect | null +} + +/** + * GoodCategoryCountOutputType without action + */ +export type GoodCategoryCountOutputTypeCountGoodsArgs = { + where?: Prisma.GoodWhereInput +} + + +export type GoodCategorySelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + imageUrl?: boolean + createdAt?: boolean + updatedAt?: boolean + deletedAt?: boolean + goods?: boolean | Prisma.GoodCategory$goodsArgs + _count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs +}, ExtArgs["result"]["goodCategory"]> + + + +export type GoodCategorySelectScalar = { + id?: boolean + name?: boolean + description?: boolean + imageUrl?: boolean + createdAt?: boolean + updatedAt?: boolean + deletedAt?: boolean +} + +export type GoodCategoryOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "imageUrl" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["goodCategory"]> +export type GoodCategoryInclude = { + goods?: boolean | Prisma.GoodCategory$goodsArgs + _count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs +} + +export type $GoodCategoryPayload = { + name: "GoodCategory" + objects: { + goods: Prisma.$GoodPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + name: string + description: string | null + imageUrl: string | null + createdAt: Date + updatedAt: Date + deletedAt: Date | null + }, ExtArgs["result"]["goodCategory"]> + composites: {} +} + +export type GoodCategoryGetPayload = runtime.Types.Result.GetResult + +export type GoodCategoryCountArgs = + Omit & { + select?: GoodCategoryCountAggregateInputType | true + } + +export interface GoodCategoryDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['GoodCategory'], meta: { name: 'GoodCategory' } } + /** + * Find zero or one GoodCategory that matches the filter. + * @param {GoodCategoryFindUniqueArgs} args - Arguments to find a GoodCategory + * @example + * // Get one GoodCategory + * const goodCategory = await prisma.goodCategory.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__GoodCategoryClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one GoodCategory that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {GoodCategoryFindUniqueOrThrowArgs} args - Arguments to find a GoodCategory + * @example + * // Get one GoodCategory + * const goodCategory = await prisma.goodCategory.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__GoodCategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first GoodCategory that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodCategoryFindFirstArgs} args - Arguments to find a GoodCategory + * @example + * // Get one GoodCategory + * const goodCategory = await prisma.goodCategory.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__GoodCategoryClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first GoodCategory that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodCategoryFindFirstOrThrowArgs} args - Arguments to find a GoodCategory + * @example + * // Get one GoodCategory + * const goodCategory = await prisma.goodCategory.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__GoodCategoryClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more GoodCategories that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodCategoryFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all GoodCategories + * const goodCategories = await prisma.goodCategory.findMany() + * + * // Get first 10 GoodCategories + * const goodCategories = await prisma.goodCategory.findMany({ take: 10 }) + * + * // Only select the `id` + * const goodCategoryWithIdOnly = await prisma.goodCategory.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a GoodCategory. + * @param {GoodCategoryCreateArgs} args - Arguments to create a GoodCategory. + * @example + * // Create one GoodCategory + * const GoodCategory = await prisma.goodCategory.create({ + * data: { + * // ... data to create a GoodCategory + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__GoodCategoryClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many GoodCategories. + * @param {GoodCategoryCreateManyArgs} args - Arguments to create many GoodCategories. + * @example + * // Create many GoodCategories + * const goodCategory = await prisma.goodCategory.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Delete a GoodCategory. + * @param {GoodCategoryDeleteArgs} args - Arguments to delete one GoodCategory. + * @example + * // Delete one GoodCategory + * const GoodCategory = await prisma.goodCategory.delete({ + * where: { + * // ... filter to delete one GoodCategory + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__GoodCategoryClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one GoodCategory. + * @param {GoodCategoryUpdateArgs} args - Arguments to update one GoodCategory. + * @example + * // Update one GoodCategory + * const goodCategory = await prisma.goodCategory.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__GoodCategoryClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more GoodCategories. + * @param {GoodCategoryDeleteManyArgs} args - Arguments to filter GoodCategories to delete. + * @example + * // Delete a few GoodCategories + * const { count } = await prisma.goodCategory.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more GoodCategories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodCategoryUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many GoodCategories + * const goodCategory = await prisma.goodCategory.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one GoodCategory. + * @param {GoodCategoryUpsertArgs} args - Arguments to update or create a GoodCategory. + * @example + * // Update or create a GoodCategory + * const goodCategory = await prisma.goodCategory.upsert({ + * create: { + * // ... data to create a GoodCategory + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the GoodCategory we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__GoodCategoryClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of GoodCategories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodCategoryCountArgs} args - Arguments to filter GoodCategories to count. + * @example + * // Count the number of GoodCategories + * const count = await prisma.goodCategory.count({ + * where: { + * // ... the filter for the GoodCategories we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a GoodCategory. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodCategoryAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by GoodCategory. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {GoodCategoryGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends GoodCategoryGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: GoodCategoryGroupByArgs['orderBy'] } + : { orderBy?: GoodCategoryGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetGoodCategoryGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the GoodCategory model + */ +readonly fields: GoodCategoryFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for GoodCategory. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__GoodCategoryClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + goods = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the GoodCategory model + */ +export interface GoodCategoryFieldRefs { + readonly id: Prisma.FieldRef<"GoodCategory", 'Int'> + readonly name: Prisma.FieldRef<"GoodCategory", 'String'> + readonly description: Prisma.FieldRef<"GoodCategory", 'String'> + readonly imageUrl: Prisma.FieldRef<"GoodCategory", 'String'> + readonly createdAt: Prisma.FieldRef<"GoodCategory", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"GoodCategory", 'DateTime'> + readonly deletedAt: Prisma.FieldRef<"GoodCategory", 'DateTime'> +} + + +// Custom InputTypes +/** + * GoodCategory findUnique + */ +export type GoodCategoryFindUniqueArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + /** + * Filter, which GoodCategory to fetch. + */ + where: Prisma.GoodCategoryWhereUniqueInput +} + +/** + * GoodCategory findUniqueOrThrow + */ +export type GoodCategoryFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + /** + * Filter, which GoodCategory to fetch. + */ + where: Prisma.GoodCategoryWhereUniqueInput +} + +/** + * GoodCategory findFirst + */ +export type GoodCategoryFindFirstArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + /** + * Filter, which GoodCategory to fetch. + */ + where?: Prisma.GoodCategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoodCategories to fetch. + */ + orderBy?: Prisma.GoodCategoryOrderByWithRelationInput | Prisma.GoodCategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GoodCategories. + */ + cursor?: Prisma.GoodCategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoodCategories from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` GoodCategories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GoodCategories. + */ + distinct?: Prisma.GoodCategoryScalarFieldEnum | Prisma.GoodCategoryScalarFieldEnum[] +} + +/** + * GoodCategory findFirstOrThrow + */ +export type GoodCategoryFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + /** + * Filter, which GoodCategory to fetch. + */ + where?: Prisma.GoodCategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoodCategories to fetch. + */ + orderBy?: Prisma.GoodCategoryOrderByWithRelationInput | Prisma.GoodCategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for GoodCategories. + */ + cursor?: Prisma.GoodCategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoodCategories from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` GoodCategories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of GoodCategories. + */ + distinct?: Prisma.GoodCategoryScalarFieldEnum | Prisma.GoodCategoryScalarFieldEnum[] +} + +/** + * GoodCategory findMany + */ +export type GoodCategoryFindManyArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + /** + * Filter, which GoodCategories to fetch. + */ + where?: Prisma.GoodCategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of GoodCategories to fetch. + */ + orderBy?: Prisma.GoodCategoryOrderByWithRelationInput | Prisma.GoodCategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing GoodCategories. + */ + cursor?: Prisma.GoodCategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` GoodCategories from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` GoodCategories. + */ + skip?: number + distinct?: Prisma.GoodCategoryScalarFieldEnum | Prisma.GoodCategoryScalarFieldEnum[] +} + +/** + * GoodCategory create + */ +export type GoodCategoryCreateArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + /** + * The data needed to create a GoodCategory. + */ + data: Prisma.XOR +} + +/** + * GoodCategory createMany + */ +export type GoodCategoryCreateManyArgs = { + /** + * The data used to create many GoodCategories. + */ + data: Prisma.GoodCategoryCreateManyInput | Prisma.GoodCategoryCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * GoodCategory update + */ +export type GoodCategoryUpdateArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + /** + * The data needed to update a GoodCategory. + */ + data: Prisma.XOR + /** + * Choose, which GoodCategory to update. + */ + where: Prisma.GoodCategoryWhereUniqueInput +} + +/** + * GoodCategory updateMany + */ +export type GoodCategoryUpdateManyArgs = { + /** + * The data used to update GoodCategories. + */ + data: Prisma.XOR + /** + * Filter which GoodCategories to update + */ + where?: Prisma.GoodCategoryWhereInput + /** + * Limit how many GoodCategories to update. + */ + limit?: number +} + +/** + * GoodCategory upsert + */ +export type GoodCategoryUpsertArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + /** + * The filter to search for the GoodCategory to update in case it exists. + */ + where: Prisma.GoodCategoryWhereUniqueInput + /** + * In case the GoodCategory found by the `where` argument doesn't exist, create a new GoodCategory with this data. + */ + create: Prisma.XOR + /** + * In case the GoodCategory was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * GoodCategory delete + */ +export type GoodCategoryDeleteArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null + /** + * Filter which GoodCategory to delete. + */ + where: Prisma.GoodCategoryWhereUniqueInput +} + +/** + * GoodCategory deleteMany + */ +export type GoodCategoryDeleteManyArgs = { + /** + * Filter which GoodCategories to delete + */ + where?: Prisma.GoodCategoryWhereInput + /** + * Limit how many GoodCategories to delete. + */ + limit?: number +} + +/** + * GoodCategory.goods + */ +export type GoodCategory$goodsArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + where?: Prisma.GoodWhereInput + orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[] + cursor?: Prisma.GoodWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[] +} + +/** + * GoodCategory without action + */ +export type GoodCategoryDefaultArgs = { + /** + * Select specific fields to fetch from the GoodCategory + */ + select?: Prisma.GoodCategorySelect | null + /** + * Omit specific fields from the GoodCategory + */ + omit?: Prisma.GoodCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodCategoryInclude | null +} diff --git a/src/generated/prisma/models/Inventory.ts b/src/generated/prisma/models/Inventory.ts deleted file mode 100644 index 6693981..0000000 --- a/src/generated/prisma/models/Inventory.ts +++ /dev/null @@ -1,2566 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `Inventory` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model Inventory - * - */ -export type InventoryModel = runtime.Types.Result.DefaultSelection - -export type AggregateInventory = { - _count: InventoryCountAggregateOutputType | null - _avg: InventoryAvgAggregateOutputType | null - _sum: InventorySumAggregateOutputType | null - _min: InventoryMinAggregateOutputType | null - _max: InventoryMaxAggregateOutputType | null -} - -export type InventoryAvgAggregateOutputType = { - id: number | null -} - -export type InventorySumAggregateOutputType = { - id: number | null -} - -export type InventoryMinAggregateOutputType = { - id: number | null - name: string | null - location: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - isPointOfSale: boolean | null -} - -export type InventoryMaxAggregateOutputType = { - id: number | null - name: string | null - location: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - isPointOfSale: boolean | null -} - -export type InventoryCountAggregateOutputType = { - id: number - name: number - location: number - isActive: number - createdAt: number - updatedAt: number - deletedAt: number - isPointOfSale: number - _all: number -} - - -export type InventoryAvgAggregateInputType = { - id?: true -} - -export type InventorySumAggregateInputType = { - id?: true -} - -export type InventoryMinAggregateInputType = { - id?: true - name?: true - location?: true - isActive?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - isPointOfSale?: true -} - -export type InventoryMaxAggregateInputType = { - id?: true - name?: true - location?: true - isActive?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - isPointOfSale?: true -} - -export type InventoryCountAggregateInputType = { - id?: true - name?: true - location?: true - isActive?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - isPointOfSale?: true - _all?: true -} - -export type InventoryAggregateArgs = { - /** - * Filter which Inventory to aggregate. - */ - where?: Prisma.InventoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Inventories to fetch. - */ - orderBy?: Prisma.InventoryOrderByWithRelationInput | Prisma.InventoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.InventoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Inventories from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Inventories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Inventories - **/ - _count?: true | InventoryCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: InventoryAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: InventorySumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: InventoryMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: InventoryMaxAggregateInputType -} - -export type GetInventoryAggregateType = { - [P in keyof T & keyof AggregateInventory]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type InventoryGroupByArgs = { - where?: Prisma.InventoryWhereInput - orderBy?: Prisma.InventoryOrderByWithAggregationInput | Prisma.InventoryOrderByWithAggregationInput[] - by: Prisma.InventoryScalarFieldEnum[] | Prisma.InventoryScalarFieldEnum - having?: Prisma.InventoryScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: InventoryCountAggregateInputType | true - _avg?: InventoryAvgAggregateInputType - _sum?: InventorySumAggregateInputType - _min?: InventoryMinAggregateInputType - _max?: InventoryMaxAggregateInputType -} - -export type InventoryGroupByOutputType = { - id: number - name: string - location: string | null - isActive: boolean - createdAt: Date - updatedAt: Date - deletedAt: Date | null - isPointOfSale: boolean - _count: InventoryCountAggregateOutputType | null - _avg: InventoryAvgAggregateOutputType | null - _sum: InventorySumAggregateOutputType | null - _min: InventoryMinAggregateOutputType | null - _max: InventoryMaxAggregateOutputType | null -} - -type GetInventoryGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof InventoryGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type InventoryWhereInput = { - AND?: Prisma.InventoryWhereInput | Prisma.InventoryWhereInput[] - OR?: Prisma.InventoryWhereInput[] - NOT?: Prisma.InventoryWhereInput | Prisma.InventoryWhereInput[] - id?: Prisma.IntFilter<"Inventory"> | number - name?: Prisma.StringFilter<"Inventory"> | string - location?: Prisma.StringNullableFilter<"Inventory"> | string | null - isActive?: Prisma.BoolFilter<"Inventory"> | boolean - createdAt?: Prisma.DateTimeFilter<"Inventory"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Inventory"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Inventory"> | Date | string | null - isPointOfSale?: Prisma.BoolFilter<"Inventory"> | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter - inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter - purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter - stockAdjustments?: Prisma.StockAdjustmentListRelationFilter - stockBalances?: Prisma.StockBalanceListRelationFilter - counterStockMovements?: Prisma.StockMovementListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter - inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter - stockReservations?: Prisma.StockReservationListRelationFilter -} - -export type InventoryOrderByWithRelationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - location?: Prisma.SortOrderInput | Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder - inventoryTransfersFrom?: Prisma.InventoryTransferOrderByRelationAggregateInput - inventoryTransfersTo?: Prisma.InventoryTransferOrderByRelationAggregateInput - purchaseReceipts?: Prisma.PurchaseReceiptOrderByRelationAggregateInput - stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput - stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput - counterStockMovements?: Prisma.StockMovementOrderByRelationAggregateInput - stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput - inventoryBankAccounts?: Prisma.InventoryBankAccountOrderByRelationAggregateInput - stockReservations?: Prisma.StockReservationOrderByRelationAggregateInput - _relevance?: Prisma.InventoryOrderByRelevanceInput -} - -export type InventoryWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.InventoryWhereInput | Prisma.InventoryWhereInput[] - OR?: Prisma.InventoryWhereInput[] - NOT?: Prisma.InventoryWhereInput | Prisma.InventoryWhereInput[] - name?: Prisma.StringFilter<"Inventory"> | string - location?: Prisma.StringNullableFilter<"Inventory"> | string | null - isActive?: Prisma.BoolFilter<"Inventory"> | boolean - createdAt?: Prisma.DateTimeFilter<"Inventory"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Inventory"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Inventory"> | Date | string | null - isPointOfSale?: Prisma.BoolFilter<"Inventory"> | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter - inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter - purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter - stockAdjustments?: Prisma.StockAdjustmentListRelationFilter - stockBalances?: Prisma.StockBalanceListRelationFilter - counterStockMovements?: Prisma.StockMovementListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter - inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter - stockReservations?: Prisma.StockReservationListRelationFilter -}, "id"> - -export type InventoryOrderByWithAggregationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - location?: Prisma.SortOrderInput | Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder - _count?: Prisma.InventoryCountOrderByAggregateInput - _avg?: Prisma.InventoryAvgOrderByAggregateInput - _max?: Prisma.InventoryMaxOrderByAggregateInput - _min?: Prisma.InventoryMinOrderByAggregateInput - _sum?: Prisma.InventorySumOrderByAggregateInput -} - -export type InventoryScalarWhereWithAggregatesInput = { - AND?: Prisma.InventoryScalarWhereWithAggregatesInput | Prisma.InventoryScalarWhereWithAggregatesInput[] - OR?: Prisma.InventoryScalarWhereWithAggregatesInput[] - NOT?: Prisma.InventoryScalarWhereWithAggregatesInput | Prisma.InventoryScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"Inventory"> | number - name?: Prisma.StringWithAggregatesFilter<"Inventory"> | string - location?: Prisma.StringNullableWithAggregatesFilter<"Inventory"> | string | null - isActive?: Prisma.BoolWithAggregatesFilter<"Inventory"> | boolean - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Inventory"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Inventory"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Inventory"> | Date | string | null - isPointOfSale?: Prisma.BoolWithAggregatesFilter<"Inventory"> | boolean -} - -export type InventoryCreateInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateManyInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean -} - -export type InventoryUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean -} - -export type InventoryUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean -} - -export type InventoryOrderByRelevanceInput = { - fields: Prisma.InventoryOrderByRelevanceFieldEnum | Prisma.InventoryOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type InventoryCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - location?: Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder -} - -export type InventoryAvgOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type InventoryMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - location?: Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder -} - -export type InventoryMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - location?: Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder -} - -export type InventorySumOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type InventoryScalarRelationFilter = { - is?: Prisma.InventoryWhereInput - isNot?: Prisma.InventoryWhereInput -} - -export type InventoryNullableScalarRelationFilter = { - is?: Prisma.InventoryWhereInput | null - isNot?: Prisma.InventoryWhereInput | null -} - -export type InventoryCreateNestedOneWithoutInventoryBankAccountsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutInventoryBankAccountsInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutInventoryBankAccountsInput - upsert?: Prisma.InventoryUpsertWithoutInventoryBankAccountsInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutInventoryBankAccountsInput> -} - -export type InventoryCreateNestedOneWithoutInventoryTransfersFromInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutInventoryTransfersFromInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryCreateNestedOneWithoutInventoryTransfersToInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutInventoryTransfersToInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryUpdateOneRequiredWithoutInventoryTransfersFromNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutInventoryTransfersFromInput - upsert?: Prisma.InventoryUpsertWithoutInventoryTransfersFromInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutInventoryTransfersFromInput> -} - -export type InventoryUpdateOneRequiredWithoutInventoryTransfersToNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutInventoryTransfersToInput - upsert?: Prisma.InventoryUpsertWithoutInventoryTransfersToInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutInventoryTransfersToInput> -} - -export type InventoryCreateNestedOneWithoutPurchaseReceiptsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutPurchaseReceiptsInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutPurchaseReceiptsInput - upsert?: Prisma.InventoryUpsertWithoutPurchaseReceiptsInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutPurchaseReceiptsInput> -} - -export type InventoryCreateNestedOneWithoutCounterStockMovementsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutCounterStockMovementsInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryCreateNestedOneWithoutStockMovementsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockMovementsInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryUpdateOneWithoutCounterStockMovementsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutCounterStockMovementsInput - upsert?: Prisma.InventoryUpsertWithoutCounterStockMovementsInput - disconnect?: Prisma.InventoryWhereInput | boolean - delete?: Prisma.InventoryWhereInput | boolean - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutCounterStockMovementsInput> -} - -export type InventoryUpdateOneRequiredWithoutStockMovementsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockMovementsInput - upsert?: Prisma.InventoryUpsertWithoutStockMovementsInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutStockMovementsInput> -} - -export type InventoryCreateNestedOneWithoutStockBalancesInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockBalancesInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryUpdateOneRequiredWithoutStockBalancesNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockBalancesInput - upsert?: Prisma.InventoryUpsertWithoutStockBalancesInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutStockBalancesInput> -} - -export type InventoryCreateNestedOneWithoutStockAdjustmentsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockAdjustmentsInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryUpdateOneRequiredWithoutStockAdjustmentsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockAdjustmentsInput - upsert?: Prisma.InventoryUpsertWithoutStockAdjustmentsInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutStockAdjustmentsInput> -} - -export type InventoryCreateNestedOneWithoutStockReservationsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockReservationsInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryUpdateOneRequiredWithoutStockReservationsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockReservationsInput - upsert?: Prisma.InventoryUpsertWithoutStockReservationsInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutStockReservationsInput> -} - -export type InventoryCreateWithoutInventoryBankAccountsInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutInventoryBankAccountsInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutInventoryBankAccountsInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryUpsertWithoutInventoryBankAccountsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutInventoryBankAccountsInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutInventoryBankAccountsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutInventoryBankAccountsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutInventoryTransfersFromInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutInventoryTransfersFromInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutInventoryTransfersFromInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryCreateWithoutInventoryTransfersToInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutInventoryTransfersToInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutInventoryTransfersToInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryUpsertWithoutInventoryTransfersFromInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutInventoryTransfersFromInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutInventoryTransfersFromInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutInventoryTransfersFromInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUpsertWithoutInventoryTransfersToInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutInventoryTransfersToInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutInventoryTransfersToInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutInventoryTransfersToInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutPurchaseReceiptsInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutPurchaseReceiptsInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutPurchaseReceiptsInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryUpsertWithoutPurchaseReceiptsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutPurchaseReceiptsInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutPurchaseReceiptsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutPurchaseReceiptsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutCounterStockMovementsInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutCounterStockMovementsInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutCounterStockMovementsInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryCreateWithoutStockMovementsInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutStockMovementsInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutStockMovementsInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryUpsertWithoutCounterStockMovementsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutCounterStockMovementsInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutCounterStockMovementsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutCounterStockMovementsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUpsertWithoutStockMovementsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutStockMovementsInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutStockMovementsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutStockMovementsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutStockBalancesInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutStockBalancesInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutStockBalancesInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryUpsertWithoutStockBalancesInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutStockBalancesInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutStockBalancesInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutStockBalancesInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutStockAdjustmentsInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutStockAdjustmentsInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutStockAdjustmentsInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryUpsertWithoutStockAdjustmentsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutStockAdjustmentsInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutStockAdjustmentsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutStockAdjustmentsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutStockReservationsInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutStockReservationsInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - isPointOfSale?: boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutStockReservationsInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryUpsertWithoutStockReservationsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutStockReservationsInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutStockReservationsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutStockReservationsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput -} - - -/** - * Count Type InventoryCountOutputType - */ - -export type InventoryCountOutputType = { - inventoryTransfersFrom: number - inventoryTransfersTo: number - purchaseReceipts: number - stockAdjustments: number - stockBalances: number - counterStockMovements: number - stockMovements: number - inventoryBankAccounts: number - stockReservations: number -} - -export type InventoryCountOutputTypeSelect = { - inventoryTransfersFrom?: boolean | InventoryCountOutputTypeCountInventoryTransfersFromArgs - inventoryTransfersTo?: boolean | InventoryCountOutputTypeCountInventoryTransfersToArgs - purchaseReceipts?: boolean | InventoryCountOutputTypeCountPurchaseReceiptsArgs - stockAdjustments?: boolean | InventoryCountOutputTypeCountStockAdjustmentsArgs - stockBalances?: boolean | InventoryCountOutputTypeCountStockBalancesArgs - counterStockMovements?: boolean | InventoryCountOutputTypeCountCounterStockMovementsArgs - stockMovements?: boolean | InventoryCountOutputTypeCountStockMovementsArgs - inventoryBankAccounts?: boolean | InventoryCountOutputTypeCountInventoryBankAccountsArgs - stockReservations?: boolean | InventoryCountOutputTypeCountStockReservationsArgs -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the InventoryCountOutputType - */ - select?: Prisma.InventoryCountOutputTypeSelect | null -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeCountInventoryTransfersFromArgs = { - where?: Prisma.InventoryTransferWhereInput -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeCountInventoryTransfersToArgs = { - where?: Prisma.InventoryTransferWhereInput -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeCountPurchaseReceiptsArgs = { - where?: Prisma.PurchaseReceiptWhereInput -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeCountStockAdjustmentsArgs = { - where?: Prisma.StockAdjustmentWhereInput -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeCountStockBalancesArgs = { - where?: Prisma.StockBalanceWhereInput -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeCountCounterStockMovementsArgs = { - where?: Prisma.StockMovementWhereInput -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeCountStockMovementsArgs = { - where?: Prisma.StockMovementWhereInput -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeCountInventoryBankAccountsArgs = { - where?: Prisma.InventoryBankAccountWhereInput -} - -/** - * InventoryCountOutputType without action - */ -export type InventoryCountOutputTypeCountStockReservationsArgs = { - where?: Prisma.StockReservationWhereInput -} - - -export type InventorySelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - location?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - isPointOfSale?: boolean - inventoryTransfersFrom?: boolean | Prisma.Inventory$inventoryTransfersFromArgs - inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs - purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs - stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs - stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs - counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs - stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs - inventoryBankAccounts?: boolean | Prisma.Inventory$inventoryBankAccountsArgs - stockReservations?: boolean | Prisma.Inventory$stockReservationsArgs - _count?: boolean | Prisma.InventoryCountOutputTypeDefaultArgs -}, ExtArgs["result"]["inventory"]> - - - -export type InventorySelectScalar = { - id?: boolean - name?: boolean - location?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - isPointOfSale?: boolean -} - -export type InventoryOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "location" | "isActive" | "createdAt" | "updatedAt" | "deletedAt" | "isPointOfSale", ExtArgs["result"]["inventory"]> -export type InventoryInclude = { - inventoryTransfersFrom?: boolean | Prisma.Inventory$inventoryTransfersFromArgs - inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs - purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs - stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs - stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs - counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs - stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs - inventoryBankAccounts?: boolean | Prisma.Inventory$inventoryBankAccountsArgs - stockReservations?: boolean | Prisma.Inventory$stockReservationsArgs - _count?: boolean | Prisma.InventoryCountOutputTypeDefaultArgs -} - -export type $InventoryPayload = { - name: "Inventory" - objects: { - inventoryTransfersFrom: Prisma.$InventoryTransferPayload[] - inventoryTransfersTo: Prisma.$InventoryTransferPayload[] - purchaseReceipts: Prisma.$PurchaseReceiptPayload[] - stockAdjustments: Prisma.$StockAdjustmentPayload[] - stockBalances: Prisma.$StockBalancePayload[] - counterStockMovements: Prisma.$StockMovementPayload[] - stockMovements: Prisma.$StockMovementPayload[] - inventoryBankAccounts: Prisma.$InventoryBankAccountPayload[] - stockReservations: Prisma.$StockReservationPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - location: string | null - isActive: boolean - createdAt: Date - updatedAt: Date - deletedAt: Date | null - isPointOfSale: boolean - }, ExtArgs["result"]["inventory"]> - composites: {} -} - -export type InventoryGetPayload = runtime.Types.Result.GetResult - -export type InventoryCountArgs = - Omit & { - select?: InventoryCountAggregateInputType | true - } - -export interface InventoryDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Inventory'], meta: { name: 'Inventory' } } - /** - * Find zero or one Inventory that matches the filter. - * @param {InventoryFindUniqueArgs} args - Arguments to find a Inventory - * @example - * // Get one Inventory - * const inventory = await prisma.inventory.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Inventory that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {InventoryFindUniqueOrThrowArgs} args - Arguments to find a Inventory - * @example - * // Get one Inventory - * const inventory = await prisma.inventory.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Inventory that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryFindFirstArgs} args - Arguments to find a Inventory - * @example - * // Get one Inventory - * const inventory = await prisma.inventory.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__InventoryClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Inventory that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryFindFirstOrThrowArgs} args - Arguments to find a Inventory - * @example - * // Get one Inventory - * const inventory = await prisma.inventory.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__InventoryClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Inventories that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Inventories - * const inventories = await prisma.inventory.findMany() - * - * // Get first 10 Inventories - * const inventories = await prisma.inventory.findMany({ take: 10 }) - * - * // Only select the `id` - * const inventoryWithIdOnly = await prisma.inventory.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Inventory. - * @param {InventoryCreateArgs} args - Arguments to create a Inventory. - * @example - * // Create one Inventory - * const Inventory = await prisma.inventory.create({ - * data: { - * // ... data to create a Inventory - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Inventories. - * @param {InventoryCreateManyArgs} args - Arguments to create many Inventories. - * @example - * // Create many Inventories - * const inventory = await prisma.inventory.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a Inventory. - * @param {InventoryDeleteArgs} args - Arguments to delete one Inventory. - * @example - * // Delete one Inventory - * const Inventory = await prisma.inventory.delete({ - * where: { - * // ... filter to delete one Inventory - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Inventory. - * @param {InventoryUpdateArgs} args - Arguments to update one Inventory. - * @example - * // Update one Inventory - * const inventory = await prisma.inventory.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Inventories. - * @param {InventoryDeleteManyArgs} args - Arguments to filter Inventories to delete. - * @example - * // Delete a few Inventories - * const { count } = await prisma.inventory.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Inventories. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Inventories - * const inventory = await prisma.inventory.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Inventory. - * @param {InventoryUpsertArgs} args - Arguments to update or create a Inventory. - * @example - * // Update or create a Inventory - * const inventory = await prisma.inventory.upsert({ - * create: { - * // ... data to create a Inventory - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Inventory we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Inventories. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryCountArgs} args - Arguments to filter Inventories to count. - * @example - * // Count the number of Inventories - * const count = await prisma.inventory.count({ - * where: { - * // ... the filter for the Inventories we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Inventory. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by Inventory. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends InventoryGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: InventoryGroupByArgs['orderBy'] } - : { orderBy?: InventoryGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetInventoryGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Inventory model - */ -readonly fields: InventoryFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for Inventory. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__InventoryClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - inventoryTransfersFrom = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - inventoryTransfersTo = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - purchaseReceipts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockAdjustments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockBalances = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - counterStockMovements = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockMovements = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - inventoryBankAccounts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockReservations = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the Inventory model - */ -export interface InventoryFieldRefs { - readonly id: Prisma.FieldRef<"Inventory", 'Int'> - readonly name: Prisma.FieldRef<"Inventory", 'String'> - readonly location: Prisma.FieldRef<"Inventory", 'String'> - readonly isActive: Prisma.FieldRef<"Inventory", 'Boolean'> - readonly createdAt: Prisma.FieldRef<"Inventory", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Inventory", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"Inventory", 'DateTime'> - readonly isPointOfSale: Prisma.FieldRef<"Inventory", 'Boolean'> -} - - -// Custom InputTypes -/** - * Inventory findUnique - */ -export type InventoryFindUniqueArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - /** - * Filter, which Inventory to fetch. - */ - where: Prisma.InventoryWhereUniqueInput -} - -/** - * Inventory findUniqueOrThrow - */ -export type InventoryFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - /** - * Filter, which Inventory to fetch. - */ - where: Prisma.InventoryWhereUniqueInput -} - -/** - * Inventory findFirst - */ -export type InventoryFindFirstArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - /** - * Filter, which Inventory to fetch. - */ - where?: Prisma.InventoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Inventories to fetch. - */ - orderBy?: Prisma.InventoryOrderByWithRelationInput | Prisma.InventoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Inventories. - */ - cursor?: Prisma.InventoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Inventories from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Inventories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Inventories. - */ - distinct?: Prisma.InventoryScalarFieldEnum | Prisma.InventoryScalarFieldEnum[] -} - -/** - * Inventory findFirstOrThrow - */ -export type InventoryFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - /** - * Filter, which Inventory to fetch. - */ - where?: Prisma.InventoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Inventories to fetch. - */ - orderBy?: Prisma.InventoryOrderByWithRelationInput | Prisma.InventoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Inventories. - */ - cursor?: Prisma.InventoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Inventories from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Inventories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Inventories. - */ - distinct?: Prisma.InventoryScalarFieldEnum | Prisma.InventoryScalarFieldEnum[] -} - -/** - * Inventory findMany - */ -export type InventoryFindManyArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - /** - * Filter, which Inventories to fetch. - */ - where?: Prisma.InventoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Inventories to fetch. - */ - orderBy?: Prisma.InventoryOrderByWithRelationInput | Prisma.InventoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Inventories. - */ - cursor?: Prisma.InventoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Inventories from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Inventories. - */ - skip?: number - distinct?: Prisma.InventoryScalarFieldEnum | Prisma.InventoryScalarFieldEnum[] -} - -/** - * Inventory create - */ -export type InventoryCreateArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - /** - * The data needed to create a Inventory. - */ - data: Prisma.XOR -} - -/** - * Inventory createMany - */ -export type InventoryCreateManyArgs = { - /** - * The data used to create many Inventories. - */ - data: Prisma.InventoryCreateManyInput | Prisma.InventoryCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Inventory update - */ -export type InventoryUpdateArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - /** - * The data needed to update a Inventory. - */ - data: Prisma.XOR - /** - * Choose, which Inventory to update. - */ - where: Prisma.InventoryWhereUniqueInput -} - -/** - * Inventory updateMany - */ -export type InventoryUpdateManyArgs = { - /** - * The data used to update Inventories. - */ - data: Prisma.XOR - /** - * Filter which Inventories to update - */ - where?: Prisma.InventoryWhereInput - /** - * Limit how many Inventories to update. - */ - limit?: number -} - -/** - * Inventory upsert - */ -export type InventoryUpsertArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - /** - * The filter to search for the Inventory to update in case it exists. - */ - where: Prisma.InventoryWhereUniqueInput - /** - * In case the Inventory found by the `where` argument doesn't exist, create a new Inventory with this data. - */ - create: Prisma.XOR - /** - * In case the Inventory was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * Inventory delete - */ -export type InventoryDeleteArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - /** - * Filter which Inventory to delete. - */ - where: Prisma.InventoryWhereUniqueInput -} - -/** - * Inventory deleteMany - */ -export type InventoryDeleteManyArgs = { - /** - * Filter which Inventories to delete - */ - where?: Prisma.InventoryWhereInput - /** - * Limit how many Inventories to delete. - */ - limit?: number -} - -/** - * Inventory.inventoryTransfersFrom - */ -export type Inventory$inventoryTransfersFromArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - where?: Prisma.InventoryTransferWhereInput - orderBy?: Prisma.InventoryTransferOrderByWithRelationInput | Prisma.InventoryTransferOrderByWithRelationInput[] - cursor?: Prisma.InventoryTransferWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.InventoryTransferScalarFieldEnum | Prisma.InventoryTransferScalarFieldEnum[] -} - -/** - * Inventory.inventoryTransfersTo - */ -export type Inventory$inventoryTransfersToArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - where?: Prisma.InventoryTransferWhereInput - orderBy?: Prisma.InventoryTransferOrderByWithRelationInput | Prisma.InventoryTransferOrderByWithRelationInput[] - cursor?: Prisma.InventoryTransferWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.InventoryTransferScalarFieldEnum | Prisma.InventoryTransferScalarFieldEnum[] -} - -/** - * Inventory.purchaseReceipts - */ -export type Inventory$purchaseReceiptsArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - where?: Prisma.PurchaseReceiptWhereInput - orderBy?: Prisma.PurchaseReceiptOrderByWithRelationInput | Prisma.PurchaseReceiptOrderByWithRelationInput[] - cursor?: Prisma.PurchaseReceiptWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.PurchaseReceiptScalarFieldEnum | Prisma.PurchaseReceiptScalarFieldEnum[] -} - -/** - * Inventory.stockAdjustments - */ -export type Inventory$stockAdjustmentsArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - where?: Prisma.StockAdjustmentWhereInput - orderBy?: Prisma.StockAdjustmentOrderByWithRelationInput | Prisma.StockAdjustmentOrderByWithRelationInput[] - cursor?: Prisma.StockAdjustmentWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockAdjustmentScalarFieldEnum | Prisma.StockAdjustmentScalarFieldEnum[] -} - -/** - * Inventory.stockBalances - */ -export type Inventory$stockBalancesArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - where?: Prisma.StockBalanceWhereInput - orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[] - cursor?: Prisma.StockBalanceWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockBalanceScalarFieldEnum | Prisma.StockBalanceScalarFieldEnum[] -} - -/** - * Inventory.counterStockMovements - */ -export type Inventory$counterStockMovementsArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - where?: Prisma.StockMovementWhereInput - orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[] - cursor?: Prisma.StockMovementWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] -} - -/** - * Inventory.stockMovements - */ -export type Inventory$stockMovementsArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - where?: Prisma.StockMovementWhereInput - orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[] - cursor?: Prisma.StockMovementWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] -} - -/** - * Inventory.inventoryBankAccounts - */ -export type Inventory$inventoryBankAccountsArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - where?: Prisma.InventoryBankAccountWhereInput - orderBy?: Prisma.InventoryBankAccountOrderByWithRelationInput | Prisma.InventoryBankAccountOrderByWithRelationInput[] - cursor?: Prisma.InventoryBankAccountWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.InventoryBankAccountScalarFieldEnum | Prisma.InventoryBankAccountScalarFieldEnum[] -} - -/** - * Inventory.stockReservations - */ -export type Inventory$stockReservationsArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - where?: Prisma.StockReservationWhereInput - orderBy?: Prisma.StockReservationOrderByWithRelationInput | Prisma.StockReservationOrderByWithRelationInput[] - cursor?: Prisma.StockReservationWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockReservationScalarFieldEnum | Prisma.StockReservationScalarFieldEnum[] -} - -/** - * Inventory without action - */ -export type InventoryDefaultArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null -} diff --git a/src/generated/prisma/models/InventoryBankAccount.ts b/src/generated/prisma/models/InventoryBankAccount.ts deleted file mode 100644 index 6678fed..0000000 --- a/src/generated/prisma/models/InventoryBankAccount.ts +++ /dev/null @@ -1,1513 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `InventoryBankAccount` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model InventoryBankAccount - * - */ -export type InventoryBankAccountModel = runtime.Types.Result.DefaultSelection - -export type AggregateInventoryBankAccount = { - _count: InventoryBankAccountCountAggregateOutputType | null - _avg: InventoryBankAccountAvgAggregateOutputType | null - _sum: InventoryBankAccountSumAggregateOutputType | null - _min: InventoryBankAccountMinAggregateOutputType | null - _max: InventoryBankAccountMaxAggregateOutputType | null -} - -export type InventoryBankAccountAvgAggregateOutputType = { - inventoryId: number | null - bankAccountId: number | null -} - -export type InventoryBankAccountSumAggregateOutputType = { - inventoryId: number | null - bankAccountId: number | null -} - -export type InventoryBankAccountMinAggregateOutputType = { - inventoryId: number | null - bankAccountId: number | null -} - -export type InventoryBankAccountMaxAggregateOutputType = { - inventoryId: number | null - bankAccountId: number | null -} - -export type InventoryBankAccountCountAggregateOutputType = { - inventoryId: number - bankAccountId: number - _all: number -} - - -export type InventoryBankAccountAvgAggregateInputType = { - inventoryId?: true - bankAccountId?: true -} - -export type InventoryBankAccountSumAggregateInputType = { - inventoryId?: true - bankAccountId?: true -} - -export type InventoryBankAccountMinAggregateInputType = { - inventoryId?: true - bankAccountId?: true -} - -export type InventoryBankAccountMaxAggregateInputType = { - inventoryId?: true - bankAccountId?: true -} - -export type InventoryBankAccountCountAggregateInputType = { - inventoryId?: true - bankAccountId?: true - _all?: true -} - -export type InventoryBankAccountAggregateArgs = { - /** - * Filter which InventoryBankAccount to aggregate. - */ - where?: Prisma.InventoryBankAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryBankAccounts to fetch. - */ - orderBy?: Prisma.InventoryBankAccountOrderByWithRelationInput | Prisma.InventoryBankAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.InventoryBankAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryBankAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryBankAccounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned InventoryBankAccounts - **/ - _count?: true | InventoryBankAccountCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: InventoryBankAccountAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: InventoryBankAccountSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: InventoryBankAccountMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: InventoryBankAccountMaxAggregateInputType -} - -export type GetInventoryBankAccountAggregateType = { - [P in keyof T & keyof AggregateInventoryBankAccount]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type InventoryBankAccountGroupByArgs = { - where?: Prisma.InventoryBankAccountWhereInput - orderBy?: Prisma.InventoryBankAccountOrderByWithAggregationInput | Prisma.InventoryBankAccountOrderByWithAggregationInput[] - by: Prisma.InventoryBankAccountScalarFieldEnum[] | Prisma.InventoryBankAccountScalarFieldEnum - having?: Prisma.InventoryBankAccountScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: InventoryBankAccountCountAggregateInputType | true - _avg?: InventoryBankAccountAvgAggregateInputType - _sum?: InventoryBankAccountSumAggregateInputType - _min?: InventoryBankAccountMinAggregateInputType - _max?: InventoryBankAccountMaxAggregateInputType -} - -export type InventoryBankAccountGroupByOutputType = { - inventoryId: number - bankAccountId: number - _count: InventoryBankAccountCountAggregateOutputType | null - _avg: InventoryBankAccountAvgAggregateOutputType | null - _sum: InventoryBankAccountSumAggregateOutputType | null - _min: InventoryBankAccountMinAggregateOutputType | null - _max: InventoryBankAccountMaxAggregateOutputType | null -} - -type GetInventoryBankAccountGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof InventoryBankAccountGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type InventoryBankAccountWhereInput = { - AND?: Prisma.InventoryBankAccountWhereInput | Prisma.InventoryBankAccountWhereInput[] - OR?: Prisma.InventoryBankAccountWhereInput[] - NOT?: Prisma.InventoryBankAccountWhereInput | Prisma.InventoryBankAccountWhereInput[] - inventoryId?: Prisma.IntFilter<"InventoryBankAccount"> | number - bankAccountId?: Prisma.IntFilter<"InventoryBankAccount"> | number - inventory?: Prisma.XOR - bankAccount?: Prisma.XOR - posAccounts?: Prisma.PosAccountListRelationFilter - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter -} - -export type InventoryBankAccountOrderByWithRelationInput = { - inventoryId?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - inventory?: Prisma.InventoryOrderByWithRelationInput - bankAccount?: Prisma.BankAccountOrderByWithRelationInput - posAccounts?: Prisma.PosAccountOrderByRelationAggregateInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput -} - -export type InventoryBankAccountWhereUniqueInput = Prisma.AtLeast<{ - inventoryId_bankAccountId?: Prisma.InventoryBankAccountInventoryIdBankAccountIdCompoundUniqueInput - AND?: Prisma.InventoryBankAccountWhereInput | Prisma.InventoryBankAccountWhereInput[] - OR?: Prisma.InventoryBankAccountWhereInput[] - NOT?: Prisma.InventoryBankAccountWhereInput | Prisma.InventoryBankAccountWhereInput[] - inventoryId?: Prisma.IntFilter<"InventoryBankAccount"> | number - bankAccountId?: Prisma.IntFilter<"InventoryBankAccount"> | number - inventory?: Prisma.XOR - bankAccount?: Prisma.XOR - posAccounts?: Prisma.PosAccountListRelationFilter - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter -}, "inventoryId_bankAccountId"> - -export type InventoryBankAccountOrderByWithAggregationInput = { - inventoryId?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - _count?: Prisma.InventoryBankAccountCountOrderByAggregateInput - _avg?: Prisma.InventoryBankAccountAvgOrderByAggregateInput - _max?: Prisma.InventoryBankAccountMaxOrderByAggregateInput - _min?: Prisma.InventoryBankAccountMinOrderByAggregateInput - _sum?: Prisma.InventoryBankAccountSumOrderByAggregateInput -} - -export type InventoryBankAccountScalarWhereWithAggregatesInput = { - AND?: Prisma.InventoryBankAccountScalarWhereWithAggregatesInput | Prisma.InventoryBankAccountScalarWhereWithAggregatesInput[] - OR?: Prisma.InventoryBankAccountScalarWhereWithAggregatesInput[] - NOT?: Prisma.InventoryBankAccountScalarWhereWithAggregatesInput | Prisma.InventoryBankAccountScalarWhereWithAggregatesInput[] - inventoryId?: Prisma.IntWithAggregatesFilter<"InventoryBankAccount"> | number - bankAccountId?: Prisma.IntWithAggregatesFilter<"InventoryBankAccount"> | number -} - -export type InventoryBankAccountCreateInput = { - inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput - bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput - posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountUncheckedCreateInput = { - inventoryId: number - bankAccountId: number - posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountUpdateInput = { - inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput - bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput - posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountUncheckedUpdateInput = { - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountCreateManyInput = { - inventoryId: number - bankAccountId: number -} - -export type InventoryBankAccountUpdateManyMutationInput = { - -} - -export type InventoryBankAccountUncheckedUpdateManyInput = { - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryBankAccountListRelationFilter = { - every?: Prisma.InventoryBankAccountWhereInput - some?: Prisma.InventoryBankAccountWhereInput - none?: Prisma.InventoryBankAccountWhereInput -} - -export type InventoryBankAccountOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type InventoryBankAccountInventoryIdBankAccountIdCompoundUniqueInput = { - inventoryId: number - bankAccountId: number -} - -export type InventoryBankAccountCountOrderByAggregateInput = { - inventoryId?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder -} - -export type InventoryBankAccountAvgOrderByAggregateInput = { - inventoryId?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder -} - -export type InventoryBankAccountMaxOrderByAggregateInput = { - inventoryId?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder -} - -export type InventoryBankAccountMinOrderByAggregateInput = { - inventoryId?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder -} - -export type InventoryBankAccountSumOrderByAggregateInput = { - inventoryId?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder -} - -export type InventoryBankAccountScalarRelationFilter = { - is?: Prisma.InventoryBankAccountWhereInput - isNot?: Prisma.InventoryBankAccountWhereInput -} - -export type InventoryBankAccountNullableScalarRelationFilter = { - is?: Prisma.InventoryBankAccountWhereInput | null - isNot?: Prisma.InventoryBankAccountWhereInput | null -} - -export type InventoryBankAccountCreateNestedManyWithoutBankAccountInput = { - create?: Prisma.XOR | Prisma.InventoryBankAccountCreateWithoutBankAccountInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput | Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput[] - createMany?: Prisma.InventoryBankAccountCreateManyBankAccountInputEnvelope - connect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] -} - -export type InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput = { - create?: Prisma.XOR | Prisma.InventoryBankAccountCreateWithoutBankAccountInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput | Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput[] - createMany?: Prisma.InventoryBankAccountCreateManyBankAccountInputEnvelope - connect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] -} - -export type InventoryBankAccountUpdateManyWithoutBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.InventoryBankAccountCreateWithoutBankAccountInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput | Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput[] - upsert?: Prisma.InventoryBankAccountUpsertWithWhereUniqueWithoutBankAccountInput | Prisma.InventoryBankAccountUpsertWithWhereUniqueWithoutBankAccountInput[] - createMany?: Prisma.InventoryBankAccountCreateManyBankAccountInputEnvelope - set?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - disconnect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - delete?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - connect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - update?: Prisma.InventoryBankAccountUpdateWithWhereUniqueWithoutBankAccountInput | Prisma.InventoryBankAccountUpdateWithWhereUniqueWithoutBankAccountInput[] - updateMany?: Prisma.InventoryBankAccountUpdateManyWithWhereWithoutBankAccountInput | Prisma.InventoryBankAccountUpdateManyWithWhereWithoutBankAccountInput[] - deleteMany?: Prisma.InventoryBankAccountScalarWhereInput | Prisma.InventoryBankAccountScalarWhereInput[] -} - -export type InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.InventoryBankAccountCreateWithoutBankAccountInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput | Prisma.InventoryBankAccountCreateOrConnectWithoutBankAccountInput[] - upsert?: Prisma.InventoryBankAccountUpsertWithWhereUniqueWithoutBankAccountInput | Prisma.InventoryBankAccountUpsertWithWhereUniqueWithoutBankAccountInput[] - createMany?: Prisma.InventoryBankAccountCreateManyBankAccountInputEnvelope - set?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - disconnect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - delete?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - connect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - update?: Prisma.InventoryBankAccountUpdateWithWhereUniqueWithoutBankAccountInput | Prisma.InventoryBankAccountUpdateWithWhereUniqueWithoutBankAccountInput[] - updateMany?: Prisma.InventoryBankAccountUpdateManyWithWhereWithoutBankAccountInput | Prisma.InventoryBankAccountUpdateManyWithWhereWithoutBankAccountInput[] - deleteMany?: Prisma.InventoryBankAccountScalarWhereInput | Prisma.InventoryBankAccountScalarWhereInput[] -} - -export type InventoryBankAccountCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.InventoryBankAccountCreateWithoutInventoryInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutInventoryInput | Prisma.InventoryBankAccountCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.InventoryBankAccountCreateManyInventoryInputEnvelope - connect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] -} - -export type InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.InventoryBankAccountCreateWithoutInventoryInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutInventoryInput | Prisma.InventoryBankAccountCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.InventoryBankAccountCreateManyInventoryInputEnvelope - connect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] -} - -export type InventoryBankAccountUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.InventoryBankAccountCreateWithoutInventoryInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutInventoryInput | Prisma.InventoryBankAccountCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.InventoryBankAccountUpsertWithWhereUniqueWithoutInventoryInput | Prisma.InventoryBankAccountUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.InventoryBankAccountCreateManyInventoryInputEnvelope - set?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - disconnect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - delete?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - connect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - update?: Prisma.InventoryBankAccountUpdateWithWhereUniqueWithoutInventoryInput | Prisma.InventoryBankAccountUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.InventoryBankAccountUpdateManyWithWhereWithoutInventoryInput | Prisma.InventoryBankAccountUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.InventoryBankAccountScalarWhereInput | Prisma.InventoryBankAccountScalarWhereInput[] -} - -export type InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.InventoryBankAccountCreateWithoutInventoryInput[] | Prisma.InventoryBankAccountUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutInventoryInput | Prisma.InventoryBankAccountCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.InventoryBankAccountUpsertWithWhereUniqueWithoutInventoryInput | Prisma.InventoryBankAccountUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.InventoryBankAccountCreateManyInventoryInputEnvelope - set?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - disconnect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - delete?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - connect?: Prisma.InventoryBankAccountWhereUniqueInput | Prisma.InventoryBankAccountWhereUniqueInput[] - update?: Prisma.InventoryBankAccountUpdateWithWhereUniqueWithoutInventoryInput | Prisma.InventoryBankAccountUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.InventoryBankAccountUpdateManyWithWhereWithoutInventoryInput | Prisma.InventoryBankAccountUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.InventoryBankAccountScalarWhereInput | Prisma.InventoryBankAccountScalarWhereInput[] -} - -export type InventoryBankAccountCreateNestedOneWithoutPosAccountsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutPosAccountsInput - connect?: Prisma.InventoryBankAccountWhereUniqueInput -} - -export type InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutPosAccountsInput - upsert?: Prisma.InventoryBankAccountUpsertWithoutPosAccountsInput - connect?: Prisma.InventoryBankAccountWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryBankAccountUncheckedUpdateWithoutPosAccountsInput> -} - -export type InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput - connect?: Prisma.InventoryBankAccountWhereUniqueInput -} - -export type InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput - upsert?: Prisma.InventoryBankAccountUpsertWithoutPurchaseReceiptPaymentsInput - disconnect?: Prisma.InventoryBankAccountWhereInput | boolean - delete?: Prisma.InventoryBankAccountWhereInput | boolean - connect?: Prisma.InventoryBankAccountWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryBankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput> -} - -export type InventoryBankAccountCreateWithoutBankAccountInput = { - inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput - posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountUncheckedCreateWithoutBankAccountInput = { - inventoryId: number - posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountCreateOrConnectWithoutBankAccountInput = { - where: Prisma.InventoryBankAccountWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryBankAccountCreateManyBankAccountInputEnvelope = { - data: Prisma.InventoryBankAccountCreateManyBankAccountInput | Prisma.InventoryBankAccountCreateManyBankAccountInput[] - skipDuplicates?: boolean -} - -export type InventoryBankAccountUpsertWithWhereUniqueWithoutBankAccountInput = { - where: Prisma.InventoryBankAccountWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type InventoryBankAccountUpdateWithWhereUniqueWithoutBankAccountInput = { - where: Prisma.InventoryBankAccountWhereUniqueInput - data: Prisma.XOR -} - -export type InventoryBankAccountUpdateManyWithWhereWithoutBankAccountInput = { - where: Prisma.InventoryBankAccountScalarWhereInput - data: Prisma.XOR -} - -export type InventoryBankAccountScalarWhereInput = { - AND?: Prisma.InventoryBankAccountScalarWhereInput | Prisma.InventoryBankAccountScalarWhereInput[] - OR?: Prisma.InventoryBankAccountScalarWhereInput[] - NOT?: Prisma.InventoryBankAccountScalarWhereInput | Prisma.InventoryBankAccountScalarWhereInput[] - inventoryId?: Prisma.IntFilter<"InventoryBankAccount"> | number - bankAccountId?: Prisma.IntFilter<"InventoryBankAccount"> | number -} - -export type InventoryBankAccountCreateWithoutInventoryInput = { - bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput - posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountUncheckedCreateWithoutInventoryInput = { - bankAccountId: number - posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountCreateOrConnectWithoutInventoryInput = { - where: Prisma.InventoryBankAccountWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryBankAccountCreateManyInventoryInputEnvelope = { - data: Prisma.InventoryBankAccountCreateManyInventoryInput | Prisma.InventoryBankAccountCreateManyInventoryInput[] - skipDuplicates?: boolean -} - -export type InventoryBankAccountUpsertWithWhereUniqueWithoutInventoryInput = { - where: Prisma.InventoryBankAccountWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type InventoryBankAccountUpdateWithWhereUniqueWithoutInventoryInput = { - where: Prisma.InventoryBankAccountWhereUniqueInput - data: Prisma.XOR -} - -export type InventoryBankAccountUpdateManyWithWhereWithoutInventoryInput = { - where: Prisma.InventoryBankAccountScalarWhereInput - data: Prisma.XOR -} - -export type InventoryBankAccountCreateWithoutPosAccountsInput = { - inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput - bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountUncheckedCreateWithoutPosAccountsInput = { - inventoryId: number - bankAccountId: number - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountCreateOrConnectWithoutPosAccountsInput = { - where: Prisma.InventoryBankAccountWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryBankAccountUpsertWithoutPosAccountsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryBankAccountWhereInput -} - -export type InventoryBankAccountUpdateToOneWithWhereWithoutPosAccountsInput = { - where?: Prisma.InventoryBankAccountWhereInput - data: Prisma.XOR -} - -export type InventoryBankAccountUpdateWithoutPosAccountsInput = { - inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput - bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountUncheckedUpdateWithoutPosAccountsInput = { - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountCreateWithoutPurchaseReceiptPaymentsInput = { - inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput - bankAccount: Prisma.BankAccountCreateNestedOneWithoutInventoryBankAccountsInput - posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput = { - inventoryId: number - bankAccountId: number - posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput -} - -export type InventoryBankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput = { - where: Prisma.InventoryBankAccountWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryBankAccountUpsertWithoutPurchaseReceiptPaymentsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryBankAccountWhereInput -} - -export type InventoryBankAccountUpdateToOneWithWhereWithoutPurchaseReceiptPaymentsInput = { - where?: Prisma.InventoryBankAccountWhereInput - data: Prisma.XOR -} - -export type InventoryBankAccountUpdateWithoutPurchaseReceiptPaymentsInput = { - inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput - bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput - posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput = { - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountCreateManyBankAccountInput = { - inventoryId: number -} - -export type InventoryBankAccountUpdateWithoutBankAccountInput = { - inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput - posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountUncheckedUpdateWithoutBankAccountInput = { - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountUncheckedUpdateManyWithoutBankAccountInput = { - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryBankAccountCreateManyInventoryInput = { - bankAccountId: number -} - -export type InventoryBankAccountUpdateWithoutInventoryInput = { - bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput - posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountUncheckedUpdateWithoutInventoryInput = { - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput - purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput -} - -export type InventoryBankAccountUncheckedUpdateManyWithoutInventoryInput = { - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number -} - - -/** - * Count Type InventoryBankAccountCountOutputType - */ - -export type InventoryBankAccountCountOutputType = { - posAccounts: number - purchaseReceiptPayments: number -} - -export type InventoryBankAccountCountOutputTypeSelect = { - posAccounts?: boolean | InventoryBankAccountCountOutputTypeCountPosAccountsArgs - purchaseReceiptPayments?: boolean | InventoryBankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs -} - -/** - * InventoryBankAccountCountOutputType without action - */ -export type InventoryBankAccountCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccountCountOutputType - */ - select?: Prisma.InventoryBankAccountCountOutputTypeSelect | null -} - -/** - * InventoryBankAccountCountOutputType without action - */ -export type InventoryBankAccountCountOutputTypeCountPosAccountsArgs = { - where?: Prisma.PosAccountWhereInput -} - -/** - * InventoryBankAccountCountOutputType without action - */ -export type InventoryBankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs = { - where?: Prisma.PurchaseReceiptPaymentsWhereInput -} - - -export type InventoryBankAccountSelect = runtime.Types.Extensions.GetSelect<{ - inventoryId?: boolean - bankAccountId?: boolean - inventory?: boolean | Prisma.InventoryDefaultArgs - bankAccount?: boolean | Prisma.BankAccountDefaultArgs - posAccounts?: boolean | Prisma.InventoryBankAccount$posAccountsArgs - purchaseReceiptPayments?: boolean | Prisma.InventoryBankAccount$purchaseReceiptPaymentsArgs - _count?: boolean | Prisma.InventoryBankAccountCountOutputTypeDefaultArgs -}, ExtArgs["result"]["inventoryBankAccount"]> - - - -export type InventoryBankAccountSelectScalar = { - inventoryId?: boolean - bankAccountId?: boolean -} - -export type InventoryBankAccountOmit = runtime.Types.Extensions.GetOmit<"inventoryId" | "bankAccountId", ExtArgs["result"]["inventoryBankAccount"]> -export type InventoryBankAccountInclude = { - inventory?: boolean | Prisma.InventoryDefaultArgs - bankAccount?: boolean | Prisma.BankAccountDefaultArgs - posAccounts?: boolean | Prisma.InventoryBankAccount$posAccountsArgs - purchaseReceiptPayments?: boolean | Prisma.InventoryBankAccount$purchaseReceiptPaymentsArgs - _count?: boolean | Prisma.InventoryBankAccountCountOutputTypeDefaultArgs -} - -export type $InventoryBankAccountPayload = { - name: "InventoryBankAccount" - objects: { - inventory: Prisma.$InventoryPayload - bankAccount: Prisma.$BankAccountPayload - posAccounts: Prisma.$PosAccountPayload[] - purchaseReceiptPayments: Prisma.$PurchaseReceiptPaymentsPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - inventoryId: number - bankAccountId: number - }, ExtArgs["result"]["inventoryBankAccount"]> - composites: {} -} - -export type InventoryBankAccountGetPayload = runtime.Types.Result.GetResult - -export type InventoryBankAccountCountArgs = - Omit & { - select?: InventoryBankAccountCountAggregateInputType | true - } - -export interface InventoryBankAccountDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['InventoryBankAccount'], meta: { name: 'InventoryBankAccount' } } - /** - * Find zero or one InventoryBankAccount that matches the filter. - * @param {InventoryBankAccountFindUniqueArgs} args - Arguments to find a InventoryBankAccount - * @example - * // Get one InventoryBankAccount - * const inventoryBankAccount = await prisma.inventoryBankAccount.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryBankAccountClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one InventoryBankAccount that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {InventoryBankAccountFindUniqueOrThrowArgs} args - Arguments to find a InventoryBankAccount - * @example - * // Get one InventoryBankAccount - * const inventoryBankAccount = await prisma.inventoryBankAccount.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryBankAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first InventoryBankAccount that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryBankAccountFindFirstArgs} args - Arguments to find a InventoryBankAccount - * @example - * // Get one InventoryBankAccount - * const inventoryBankAccount = await prisma.inventoryBankAccount.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__InventoryBankAccountClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first InventoryBankAccount that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryBankAccountFindFirstOrThrowArgs} args - Arguments to find a InventoryBankAccount - * @example - * // Get one InventoryBankAccount - * const inventoryBankAccount = await prisma.inventoryBankAccount.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__InventoryBankAccountClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more InventoryBankAccounts that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryBankAccountFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all InventoryBankAccounts - * const inventoryBankAccounts = await prisma.inventoryBankAccount.findMany() - * - * // Get first 10 InventoryBankAccounts - * const inventoryBankAccounts = await prisma.inventoryBankAccount.findMany({ take: 10 }) - * - * // Only select the `inventoryId` - * const inventoryBankAccountWithInventoryIdOnly = await prisma.inventoryBankAccount.findMany({ select: { inventoryId: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a InventoryBankAccount. - * @param {InventoryBankAccountCreateArgs} args - Arguments to create a InventoryBankAccount. - * @example - * // Create one InventoryBankAccount - * const InventoryBankAccount = await prisma.inventoryBankAccount.create({ - * data: { - * // ... data to create a InventoryBankAccount - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryBankAccountClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many InventoryBankAccounts. - * @param {InventoryBankAccountCreateManyArgs} args - Arguments to create many InventoryBankAccounts. - * @example - * // Create many InventoryBankAccounts - * const inventoryBankAccount = await prisma.inventoryBankAccount.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a InventoryBankAccount. - * @param {InventoryBankAccountDeleteArgs} args - Arguments to delete one InventoryBankAccount. - * @example - * // Delete one InventoryBankAccount - * const InventoryBankAccount = await prisma.inventoryBankAccount.delete({ - * where: { - * // ... filter to delete one InventoryBankAccount - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryBankAccountClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one InventoryBankAccount. - * @param {InventoryBankAccountUpdateArgs} args - Arguments to update one InventoryBankAccount. - * @example - * // Update one InventoryBankAccount - * const inventoryBankAccount = await prisma.inventoryBankAccount.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryBankAccountClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more InventoryBankAccounts. - * @param {InventoryBankAccountDeleteManyArgs} args - Arguments to filter InventoryBankAccounts to delete. - * @example - * // Delete a few InventoryBankAccounts - * const { count } = await prisma.inventoryBankAccount.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more InventoryBankAccounts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryBankAccountUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many InventoryBankAccounts - * const inventoryBankAccount = await prisma.inventoryBankAccount.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one InventoryBankAccount. - * @param {InventoryBankAccountUpsertArgs} args - Arguments to update or create a InventoryBankAccount. - * @example - * // Update or create a InventoryBankAccount - * const inventoryBankAccount = await prisma.inventoryBankAccount.upsert({ - * create: { - * // ... data to create a InventoryBankAccount - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the InventoryBankAccount we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryBankAccountClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of InventoryBankAccounts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryBankAccountCountArgs} args - Arguments to filter InventoryBankAccounts to count. - * @example - * // Count the number of InventoryBankAccounts - * const count = await prisma.inventoryBankAccount.count({ - * where: { - * // ... the filter for the InventoryBankAccounts we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a InventoryBankAccount. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryBankAccountAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by InventoryBankAccount. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryBankAccountGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends InventoryBankAccountGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: InventoryBankAccountGroupByArgs['orderBy'] } - : { orderBy?: InventoryBankAccountGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetInventoryBankAccountGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the InventoryBankAccount model - */ -readonly fields: InventoryBankAccountFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for InventoryBankAccount. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__InventoryBankAccountClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - inventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - bankAccount = {}>(args?: Prisma.Subset>): Prisma.Prisma__BankAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - posAccounts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - purchaseReceiptPayments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the InventoryBankAccount model - */ -export interface InventoryBankAccountFieldRefs { - readonly inventoryId: Prisma.FieldRef<"InventoryBankAccount", 'Int'> - readonly bankAccountId: Prisma.FieldRef<"InventoryBankAccount", 'Int'> -} - - -// Custom InputTypes -/** - * InventoryBankAccount findUnique - */ -export type InventoryBankAccountFindUniqueArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - /** - * Filter, which InventoryBankAccount to fetch. - */ - where: Prisma.InventoryBankAccountWhereUniqueInput -} - -/** - * InventoryBankAccount findUniqueOrThrow - */ -export type InventoryBankAccountFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - /** - * Filter, which InventoryBankAccount to fetch. - */ - where: Prisma.InventoryBankAccountWhereUniqueInput -} - -/** - * InventoryBankAccount findFirst - */ -export type InventoryBankAccountFindFirstArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - /** - * Filter, which InventoryBankAccount to fetch. - */ - where?: Prisma.InventoryBankAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryBankAccounts to fetch. - */ - orderBy?: Prisma.InventoryBankAccountOrderByWithRelationInput | Prisma.InventoryBankAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for InventoryBankAccounts. - */ - cursor?: Prisma.InventoryBankAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryBankAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryBankAccounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of InventoryBankAccounts. - */ - distinct?: Prisma.InventoryBankAccountScalarFieldEnum | Prisma.InventoryBankAccountScalarFieldEnum[] -} - -/** - * InventoryBankAccount findFirstOrThrow - */ -export type InventoryBankAccountFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - /** - * Filter, which InventoryBankAccount to fetch. - */ - where?: Prisma.InventoryBankAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryBankAccounts to fetch. - */ - orderBy?: Prisma.InventoryBankAccountOrderByWithRelationInput | Prisma.InventoryBankAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for InventoryBankAccounts. - */ - cursor?: Prisma.InventoryBankAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryBankAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryBankAccounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of InventoryBankAccounts. - */ - distinct?: Prisma.InventoryBankAccountScalarFieldEnum | Prisma.InventoryBankAccountScalarFieldEnum[] -} - -/** - * InventoryBankAccount findMany - */ -export type InventoryBankAccountFindManyArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - /** - * Filter, which InventoryBankAccounts to fetch. - */ - where?: Prisma.InventoryBankAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryBankAccounts to fetch. - */ - orderBy?: Prisma.InventoryBankAccountOrderByWithRelationInput | Prisma.InventoryBankAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing InventoryBankAccounts. - */ - cursor?: Prisma.InventoryBankAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryBankAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryBankAccounts. - */ - skip?: number - distinct?: Prisma.InventoryBankAccountScalarFieldEnum | Prisma.InventoryBankAccountScalarFieldEnum[] -} - -/** - * InventoryBankAccount create - */ -export type InventoryBankAccountCreateArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - /** - * The data needed to create a InventoryBankAccount. - */ - data: Prisma.XOR -} - -/** - * InventoryBankAccount createMany - */ -export type InventoryBankAccountCreateManyArgs = { - /** - * The data used to create many InventoryBankAccounts. - */ - data: Prisma.InventoryBankAccountCreateManyInput | Prisma.InventoryBankAccountCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * InventoryBankAccount update - */ -export type InventoryBankAccountUpdateArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - /** - * The data needed to update a InventoryBankAccount. - */ - data: Prisma.XOR - /** - * Choose, which InventoryBankAccount to update. - */ - where: Prisma.InventoryBankAccountWhereUniqueInput -} - -/** - * InventoryBankAccount updateMany - */ -export type InventoryBankAccountUpdateManyArgs = { - /** - * The data used to update InventoryBankAccounts. - */ - data: Prisma.XOR - /** - * Filter which InventoryBankAccounts to update - */ - where?: Prisma.InventoryBankAccountWhereInput - /** - * Limit how many InventoryBankAccounts to update. - */ - limit?: number -} - -/** - * InventoryBankAccount upsert - */ -export type InventoryBankAccountUpsertArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - /** - * The filter to search for the InventoryBankAccount to update in case it exists. - */ - where: Prisma.InventoryBankAccountWhereUniqueInput - /** - * In case the InventoryBankAccount found by the `where` argument doesn't exist, create a new InventoryBankAccount with this data. - */ - create: Prisma.XOR - /** - * In case the InventoryBankAccount was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * InventoryBankAccount delete - */ -export type InventoryBankAccountDeleteArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - /** - * Filter which InventoryBankAccount to delete. - */ - where: Prisma.InventoryBankAccountWhereUniqueInput -} - -/** - * InventoryBankAccount deleteMany - */ -export type InventoryBankAccountDeleteManyArgs = { - /** - * Filter which InventoryBankAccounts to delete - */ - where?: Prisma.InventoryBankAccountWhereInput - /** - * Limit how many InventoryBankAccounts to delete. - */ - limit?: number -} - -/** - * InventoryBankAccount.posAccounts - */ -export type InventoryBankAccount$posAccountsArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - where?: Prisma.PosAccountWhereInput - orderBy?: Prisma.PosAccountOrderByWithRelationInput | Prisma.PosAccountOrderByWithRelationInput[] - cursor?: Prisma.PosAccountWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.PosAccountScalarFieldEnum | Prisma.PosAccountScalarFieldEnum[] -} - -/** - * InventoryBankAccount.purchaseReceiptPayments - */ -export type InventoryBankAccount$purchaseReceiptPaymentsArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - where?: Prisma.PurchaseReceiptPaymentsWhereInput - orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput | Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput[] - cursor?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[] -} - -/** - * InventoryBankAccount without action - */ -export type InventoryBankAccountDefaultArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null -} diff --git a/src/generated/prisma/models/InventoryTransfer.ts b/src/generated/prisma/models/InventoryTransfer.ts deleted file mode 100644 index 4b4730a..0000000 --- a/src/generated/prisma/models/InventoryTransfer.ts +++ /dev/null @@ -1,1565 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `InventoryTransfer` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model InventoryTransfer - * - */ -export type InventoryTransferModel = runtime.Types.Result.DefaultSelection - -export type AggregateInventoryTransfer = { - _count: InventoryTransferCountAggregateOutputType | null - _avg: InventoryTransferAvgAggregateOutputType | null - _sum: InventoryTransferSumAggregateOutputType | null - _min: InventoryTransferMinAggregateOutputType | null - _max: InventoryTransferMaxAggregateOutputType | null -} - -export type InventoryTransferAvgAggregateOutputType = { - id: number | null - fromInventoryId: number | null - toInventoryId: number | null -} - -export type InventoryTransferSumAggregateOutputType = { - id: number | null - fromInventoryId: number | null - toInventoryId: number | null -} - -export type InventoryTransferMinAggregateOutputType = { - id: number | null - code: string | null - description: string | null - createdAt: Date | null - fromInventoryId: number | null - toInventoryId: number | null -} - -export type InventoryTransferMaxAggregateOutputType = { - id: number | null - code: string | null - description: string | null - createdAt: Date | null - fromInventoryId: number | null - toInventoryId: number | null -} - -export type InventoryTransferCountAggregateOutputType = { - id: number - code: number - description: number - createdAt: number - fromInventoryId: number - toInventoryId: number - _all: number -} - - -export type InventoryTransferAvgAggregateInputType = { - id?: true - fromInventoryId?: true - toInventoryId?: true -} - -export type InventoryTransferSumAggregateInputType = { - id?: true - fromInventoryId?: true - toInventoryId?: true -} - -export type InventoryTransferMinAggregateInputType = { - id?: true - code?: true - description?: true - createdAt?: true - fromInventoryId?: true - toInventoryId?: true -} - -export type InventoryTransferMaxAggregateInputType = { - id?: true - code?: true - description?: true - createdAt?: true - fromInventoryId?: true - toInventoryId?: true -} - -export type InventoryTransferCountAggregateInputType = { - id?: true - code?: true - description?: true - createdAt?: true - fromInventoryId?: true - toInventoryId?: true - _all?: true -} - -export type InventoryTransferAggregateArgs = { - /** - * Filter which InventoryTransfer to aggregate. - */ - where?: Prisma.InventoryTransferWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryTransfers to fetch. - */ - orderBy?: Prisma.InventoryTransferOrderByWithRelationInput | Prisma.InventoryTransferOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.InventoryTransferWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryTransfers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryTransfers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned InventoryTransfers - **/ - _count?: true | InventoryTransferCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: InventoryTransferAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: InventoryTransferSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: InventoryTransferMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: InventoryTransferMaxAggregateInputType -} - -export type GetInventoryTransferAggregateType = { - [P in keyof T & keyof AggregateInventoryTransfer]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type InventoryTransferGroupByArgs = { - where?: Prisma.InventoryTransferWhereInput - orderBy?: Prisma.InventoryTransferOrderByWithAggregationInput | Prisma.InventoryTransferOrderByWithAggregationInput[] - by: Prisma.InventoryTransferScalarFieldEnum[] | Prisma.InventoryTransferScalarFieldEnum - having?: Prisma.InventoryTransferScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: InventoryTransferCountAggregateInputType | true - _avg?: InventoryTransferAvgAggregateInputType - _sum?: InventoryTransferSumAggregateInputType - _min?: InventoryTransferMinAggregateInputType - _max?: InventoryTransferMaxAggregateInputType -} - -export type InventoryTransferGroupByOutputType = { - id: number - code: string - description: string | null - createdAt: Date - fromInventoryId: number - toInventoryId: number - _count: InventoryTransferCountAggregateOutputType | null - _avg: InventoryTransferAvgAggregateOutputType | null - _sum: InventoryTransferSumAggregateOutputType | null - _min: InventoryTransferMinAggregateOutputType | null - _max: InventoryTransferMaxAggregateOutputType | null -} - -type GetInventoryTransferGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof InventoryTransferGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type InventoryTransferWhereInput = { - AND?: Prisma.InventoryTransferWhereInput | Prisma.InventoryTransferWhereInput[] - OR?: Prisma.InventoryTransferWhereInput[] - NOT?: Prisma.InventoryTransferWhereInput | Prisma.InventoryTransferWhereInput[] - id?: Prisma.IntFilter<"InventoryTransfer"> | number - code?: Prisma.StringFilter<"InventoryTransfer"> | string - description?: Prisma.StringNullableFilter<"InventoryTransfer"> | string | null - createdAt?: Prisma.DateTimeFilter<"InventoryTransfer"> | Date | string - fromInventoryId?: Prisma.IntFilter<"InventoryTransfer"> | number - toInventoryId?: Prisma.IntFilter<"InventoryTransfer"> | number - items?: Prisma.InventoryTransferItemListRelationFilter - fromInventory?: Prisma.XOR - toInventory?: Prisma.XOR -} - -export type InventoryTransferOrderByWithRelationInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - fromInventoryId?: Prisma.SortOrder - toInventoryId?: Prisma.SortOrder - items?: Prisma.InventoryTransferItemOrderByRelationAggregateInput - fromInventory?: Prisma.InventoryOrderByWithRelationInput - toInventory?: Prisma.InventoryOrderByWithRelationInput - _relevance?: Prisma.InventoryTransferOrderByRelevanceInput -} - -export type InventoryTransferWhereUniqueInput = Prisma.AtLeast<{ - id?: number - code?: string - AND?: Prisma.InventoryTransferWhereInput | Prisma.InventoryTransferWhereInput[] - OR?: Prisma.InventoryTransferWhereInput[] - NOT?: Prisma.InventoryTransferWhereInput | Prisma.InventoryTransferWhereInput[] - description?: Prisma.StringNullableFilter<"InventoryTransfer"> | string | null - createdAt?: Prisma.DateTimeFilter<"InventoryTransfer"> | Date | string - fromInventoryId?: Prisma.IntFilter<"InventoryTransfer"> | number - toInventoryId?: Prisma.IntFilter<"InventoryTransfer"> | number - items?: Prisma.InventoryTransferItemListRelationFilter - fromInventory?: Prisma.XOR - toInventory?: Prisma.XOR -}, "id" | "code"> - -export type InventoryTransferOrderByWithAggregationInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - fromInventoryId?: Prisma.SortOrder - toInventoryId?: Prisma.SortOrder - _count?: Prisma.InventoryTransferCountOrderByAggregateInput - _avg?: Prisma.InventoryTransferAvgOrderByAggregateInput - _max?: Prisma.InventoryTransferMaxOrderByAggregateInput - _min?: Prisma.InventoryTransferMinOrderByAggregateInput - _sum?: Prisma.InventoryTransferSumOrderByAggregateInput -} - -export type InventoryTransferScalarWhereWithAggregatesInput = { - AND?: Prisma.InventoryTransferScalarWhereWithAggregatesInput | Prisma.InventoryTransferScalarWhereWithAggregatesInput[] - OR?: Prisma.InventoryTransferScalarWhereWithAggregatesInput[] - NOT?: Prisma.InventoryTransferScalarWhereWithAggregatesInput | Prisma.InventoryTransferScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"InventoryTransfer"> | number - code?: Prisma.StringWithAggregatesFilter<"InventoryTransfer"> | string - description?: Prisma.StringNullableWithAggregatesFilter<"InventoryTransfer"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"InventoryTransfer"> | Date | string - fromInventoryId?: Prisma.IntWithAggregatesFilter<"InventoryTransfer"> | number - toInventoryId?: Prisma.IntWithAggregatesFilter<"InventoryTransfer"> | number -} - -export type InventoryTransferCreateInput = { - code: string - description?: string | null - createdAt?: Date | string - items?: Prisma.InventoryTransferItemCreateNestedManyWithoutTransferInput - fromInventory: Prisma.InventoryCreateNestedOneWithoutInventoryTransfersFromInput - toInventory: Prisma.InventoryCreateNestedOneWithoutInventoryTransfersToInput -} - -export type InventoryTransferUncheckedCreateInput = { - id?: number - code: string - description?: string | null - createdAt?: Date | string - fromInventoryId: number - toInventoryId: number - items?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutTransferInput -} - -export type InventoryTransferUpdateInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - items?: Prisma.InventoryTransferItemUpdateManyWithoutTransferNestedInput - fromInventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryTransfersFromNestedInput - toInventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryTransfersToNestedInput -} - -export type InventoryTransferUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fromInventoryId?: Prisma.IntFieldUpdateOperationsInput | number - toInventoryId?: Prisma.IntFieldUpdateOperationsInput | number - items?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutTransferNestedInput -} - -export type InventoryTransferCreateManyInput = { - id?: number - code: string - description?: string | null - createdAt?: Date | string - fromInventoryId: number - toInventoryId: number -} - -export type InventoryTransferUpdateManyMutationInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type InventoryTransferUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fromInventoryId?: Prisma.IntFieldUpdateOperationsInput | number - toInventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryTransferListRelationFilter = { - every?: Prisma.InventoryTransferWhereInput - some?: Prisma.InventoryTransferWhereInput - none?: Prisma.InventoryTransferWhereInput -} - -export type InventoryTransferOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type InventoryTransferOrderByRelevanceInput = { - fields: Prisma.InventoryTransferOrderByRelevanceFieldEnum | Prisma.InventoryTransferOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type InventoryTransferCountOrderByAggregateInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - fromInventoryId?: Prisma.SortOrder - toInventoryId?: Prisma.SortOrder -} - -export type InventoryTransferAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - fromInventoryId?: Prisma.SortOrder - toInventoryId?: Prisma.SortOrder -} - -export type InventoryTransferMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - fromInventoryId?: Prisma.SortOrder - toInventoryId?: Prisma.SortOrder -} - -export type InventoryTransferMinOrderByAggregateInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - fromInventoryId?: Prisma.SortOrder - toInventoryId?: Prisma.SortOrder -} - -export type InventoryTransferSumOrderByAggregateInput = { - id?: Prisma.SortOrder - fromInventoryId?: Prisma.SortOrder - toInventoryId?: Prisma.SortOrder -} - -export type InventoryTransferScalarRelationFilter = { - is?: Prisma.InventoryTransferWhereInput - isNot?: Prisma.InventoryTransferWhereInput -} - -export type InventoryTransferCreateNestedManyWithoutFromInventoryInput = { - create?: Prisma.XOR | Prisma.InventoryTransferCreateWithoutFromInventoryInput[] | Prisma.InventoryTransferUncheckedCreateWithoutFromInventoryInput[] - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutFromInventoryInput | Prisma.InventoryTransferCreateOrConnectWithoutFromInventoryInput[] - createMany?: Prisma.InventoryTransferCreateManyFromInventoryInputEnvelope - connect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] -} - -export type InventoryTransferCreateNestedManyWithoutToInventoryInput = { - create?: Prisma.XOR | Prisma.InventoryTransferCreateWithoutToInventoryInput[] | Prisma.InventoryTransferUncheckedCreateWithoutToInventoryInput[] - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutToInventoryInput | Prisma.InventoryTransferCreateOrConnectWithoutToInventoryInput[] - createMany?: Prisma.InventoryTransferCreateManyToInventoryInputEnvelope - connect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] -} - -export type InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput = { - create?: Prisma.XOR | Prisma.InventoryTransferCreateWithoutFromInventoryInput[] | Prisma.InventoryTransferUncheckedCreateWithoutFromInventoryInput[] - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutFromInventoryInput | Prisma.InventoryTransferCreateOrConnectWithoutFromInventoryInput[] - createMany?: Prisma.InventoryTransferCreateManyFromInventoryInputEnvelope - connect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] -} - -export type InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput = { - create?: Prisma.XOR | Prisma.InventoryTransferCreateWithoutToInventoryInput[] | Prisma.InventoryTransferUncheckedCreateWithoutToInventoryInput[] - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutToInventoryInput | Prisma.InventoryTransferCreateOrConnectWithoutToInventoryInput[] - createMany?: Prisma.InventoryTransferCreateManyToInventoryInputEnvelope - connect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] -} - -export type InventoryTransferUpdateManyWithoutFromInventoryNestedInput = { - create?: Prisma.XOR | Prisma.InventoryTransferCreateWithoutFromInventoryInput[] | Prisma.InventoryTransferUncheckedCreateWithoutFromInventoryInput[] - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutFromInventoryInput | Prisma.InventoryTransferCreateOrConnectWithoutFromInventoryInput[] - upsert?: Prisma.InventoryTransferUpsertWithWhereUniqueWithoutFromInventoryInput | Prisma.InventoryTransferUpsertWithWhereUniqueWithoutFromInventoryInput[] - createMany?: Prisma.InventoryTransferCreateManyFromInventoryInputEnvelope - set?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - disconnect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - delete?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - connect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - update?: Prisma.InventoryTransferUpdateWithWhereUniqueWithoutFromInventoryInput | Prisma.InventoryTransferUpdateWithWhereUniqueWithoutFromInventoryInput[] - updateMany?: Prisma.InventoryTransferUpdateManyWithWhereWithoutFromInventoryInput | Prisma.InventoryTransferUpdateManyWithWhereWithoutFromInventoryInput[] - deleteMany?: Prisma.InventoryTransferScalarWhereInput | Prisma.InventoryTransferScalarWhereInput[] -} - -export type InventoryTransferUpdateManyWithoutToInventoryNestedInput = { - create?: Prisma.XOR | Prisma.InventoryTransferCreateWithoutToInventoryInput[] | Prisma.InventoryTransferUncheckedCreateWithoutToInventoryInput[] - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutToInventoryInput | Prisma.InventoryTransferCreateOrConnectWithoutToInventoryInput[] - upsert?: Prisma.InventoryTransferUpsertWithWhereUniqueWithoutToInventoryInput | Prisma.InventoryTransferUpsertWithWhereUniqueWithoutToInventoryInput[] - createMany?: Prisma.InventoryTransferCreateManyToInventoryInputEnvelope - set?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - disconnect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - delete?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - connect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - update?: Prisma.InventoryTransferUpdateWithWhereUniqueWithoutToInventoryInput | Prisma.InventoryTransferUpdateWithWhereUniqueWithoutToInventoryInput[] - updateMany?: Prisma.InventoryTransferUpdateManyWithWhereWithoutToInventoryInput | Prisma.InventoryTransferUpdateManyWithWhereWithoutToInventoryInput[] - deleteMany?: Prisma.InventoryTransferScalarWhereInput | Prisma.InventoryTransferScalarWhereInput[] -} - -export type InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput = { - create?: Prisma.XOR | Prisma.InventoryTransferCreateWithoutFromInventoryInput[] | Prisma.InventoryTransferUncheckedCreateWithoutFromInventoryInput[] - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutFromInventoryInput | Prisma.InventoryTransferCreateOrConnectWithoutFromInventoryInput[] - upsert?: Prisma.InventoryTransferUpsertWithWhereUniqueWithoutFromInventoryInput | Prisma.InventoryTransferUpsertWithWhereUniqueWithoutFromInventoryInput[] - createMany?: Prisma.InventoryTransferCreateManyFromInventoryInputEnvelope - set?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - disconnect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - delete?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - connect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - update?: Prisma.InventoryTransferUpdateWithWhereUniqueWithoutFromInventoryInput | Prisma.InventoryTransferUpdateWithWhereUniqueWithoutFromInventoryInput[] - updateMany?: Prisma.InventoryTransferUpdateManyWithWhereWithoutFromInventoryInput | Prisma.InventoryTransferUpdateManyWithWhereWithoutFromInventoryInput[] - deleteMany?: Prisma.InventoryTransferScalarWhereInput | Prisma.InventoryTransferScalarWhereInput[] -} - -export type InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput = { - create?: Prisma.XOR | Prisma.InventoryTransferCreateWithoutToInventoryInput[] | Prisma.InventoryTransferUncheckedCreateWithoutToInventoryInput[] - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutToInventoryInput | Prisma.InventoryTransferCreateOrConnectWithoutToInventoryInput[] - upsert?: Prisma.InventoryTransferUpsertWithWhereUniqueWithoutToInventoryInput | Prisma.InventoryTransferUpsertWithWhereUniqueWithoutToInventoryInput[] - createMany?: Prisma.InventoryTransferCreateManyToInventoryInputEnvelope - set?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - disconnect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - delete?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - connect?: Prisma.InventoryTransferWhereUniqueInput | Prisma.InventoryTransferWhereUniqueInput[] - update?: Prisma.InventoryTransferUpdateWithWhereUniqueWithoutToInventoryInput | Prisma.InventoryTransferUpdateWithWhereUniqueWithoutToInventoryInput[] - updateMany?: Prisma.InventoryTransferUpdateManyWithWhereWithoutToInventoryInput | Prisma.InventoryTransferUpdateManyWithWhereWithoutToInventoryInput[] - deleteMany?: Prisma.InventoryTransferScalarWhereInput | Prisma.InventoryTransferScalarWhereInput[] -} - -export type InventoryTransferCreateNestedOneWithoutItemsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutItemsInput - connect?: Prisma.InventoryTransferWhereUniqueInput -} - -export type InventoryTransferUpdateOneRequiredWithoutItemsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryTransferCreateOrConnectWithoutItemsInput - upsert?: Prisma.InventoryTransferUpsertWithoutItemsInput - connect?: Prisma.InventoryTransferWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryTransferUncheckedUpdateWithoutItemsInput> -} - -export type InventoryTransferCreateWithoutFromInventoryInput = { - code: string - description?: string | null - createdAt?: Date | string - items?: Prisma.InventoryTransferItemCreateNestedManyWithoutTransferInput - toInventory: Prisma.InventoryCreateNestedOneWithoutInventoryTransfersToInput -} - -export type InventoryTransferUncheckedCreateWithoutFromInventoryInput = { - id?: number - code: string - description?: string | null - createdAt?: Date | string - toInventoryId: number - items?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutTransferInput -} - -export type InventoryTransferCreateOrConnectWithoutFromInventoryInput = { - where: Prisma.InventoryTransferWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryTransferCreateManyFromInventoryInputEnvelope = { - data: Prisma.InventoryTransferCreateManyFromInventoryInput | Prisma.InventoryTransferCreateManyFromInventoryInput[] - skipDuplicates?: boolean -} - -export type InventoryTransferCreateWithoutToInventoryInput = { - code: string - description?: string | null - createdAt?: Date | string - items?: Prisma.InventoryTransferItemCreateNestedManyWithoutTransferInput - fromInventory: Prisma.InventoryCreateNestedOneWithoutInventoryTransfersFromInput -} - -export type InventoryTransferUncheckedCreateWithoutToInventoryInput = { - id?: number - code: string - description?: string | null - createdAt?: Date | string - fromInventoryId: number - items?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutTransferInput -} - -export type InventoryTransferCreateOrConnectWithoutToInventoryInput = { - where: Prisma.InventoryTransferWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryTransferCreateManyToInventoryInputEnvelope = { - data: Prisma.InventoryTransferCreateManyToInventoryInput | Prisma.InventoryTransferCreateManyToInventoryInput[] - skipDuplicates?: boolean -} - -export type InventoryTransferUpsertWithWhereUniqueWithoutFromInventoryInput = { - where: Prisma.InventoryTransferWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type InventoryTransferUpdateWithWhereUniqueWithoutFromInventoryInput = { - where: Prisma.InventoryTransferWhereUniqueInput - data: Prisma.XOR -} - -export type InventoryTransferUpdateManyWithWhereWithoutFromInventoryInput = { - where: Prisma.InventoryTransferScalarWhereInput - data: Prisma.XOR -} - -export type InventoryTransferScalarWhereInput = { - AND?: Prisma.InventoryTransferScalarWhereInput | Prisma.InventoryTransferScalarWhereInput[] - OR?: Prisma.InventoryTransferScalarWhereInput[] - NOT?: Prisma.InventoryTransferScalarWhereInput | Prisma.InventoryTransferScalarWhereInput[] - id?: Prisma.IntFilter<"InventoryTransfer"> | number - code?: Prisma.StringFilter<"InventoryTransfer"> | string - description?: Prisma.StringNullableFilter<"InventoryTransfer"> | string | null - createdAt?: Prisma.DateTimeFilter<"InventoryTransfer"> | Date | string - fromInventoryId?: Prisma.IntFilter<"InventoryTransfer"> | number - toInventoryId?: Prisma.IntFilter<"InventoryTransfer"> | number -} - -export type InventoryTransferUpsertWithWhereUniqueWithoutToInventoryInput = { - where: Prisma.InventoryTransferWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type InventoryTransferUpdateWithWhereUniqueWithoutToInventoryInput = { - where: Prisma.InventoryTransferWhereUniqueInput - data: Prisma.XOR -} - -export type InventoryTransferUpdateManyWithWhereWithoutToInventoryInput = { - where: Prisma.InventoryTransferScalarWhereInput - data: Prisma.XOR -} - -export type InventoryTransferCreateWithoutItemsInput = { - code: string - description?: string | null - createdAt?: Date | string - fromInventory: Prisma.InventoryCreateNestedOneWithoutInventoryTransfersFromInput - toInventory: Prisma.InventoryCreateNestedOneWithoutInventoryTransfersToInput -} - -export type InventoryTransferUncheckedCreateWithoutItemsInput = { - id?: number - code: string - description?: string | null - createdAt?: Date | string - fromInventoryId: number - toInventoryId: number -} - -export type InventoryTransferCreateOrConnectWithoutItemsInput = { - where: Prisma.InventoryTransferWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryTransferUpsertWithoutItemsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryTransferWhereInput -} - -export type InventoryTransferUpdateToOneWithWhereWithoutItemsInput = { - where?: Prisma.InventoryTransferWhereInput - data: Prisma.XOR -} - -export type InventoryTransferUpdateWithoutItemsInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fromInventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryTransfersFromNestedInput - toInventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryTransfersToNestedInput -} - -export type InventoryTransferUncheckedUpdateWithoutItemsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fromInventoryId?: Prisma.IntFieldUpdateOperationsInput | number - toInventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryTransferCreateManyFromInventoryInput = { - id?: number - code: string - description?: string | null - createdAt?: Date | string - toInventoryId: number -} - -export type InventoryTransferCreateManyToInventoryInput = { - id?: number - code: string - description?: string | null - createdAt?: Date | string - fromInventoryId: number -} - -export type InventoryTransferUpdateWithoutFromInventoryInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - items?: Prisma.InventoryTransferItemUpdateManyWithoutTransferNestedInput - toInventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryTransfersToNestedInput -} - -export type InventoryTransferUncheckedUpdateWithoutFromInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - toInventoryId?: Prisma.IntFieldUpdateOperationsInput | number - items?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutTransferNestedInput -} - -export type InventoryTransferUncheckedUpdateManyWithoutFromInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - toInventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryTransferUpdateWithoutToInventoryInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - items?: Prisma.InventoryTransferItemUpdateManyWithoutTransferNestedInput - fromInventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryTransfersFromNestedInput -} - -export type InventoryTransferUncheckedUpdateWithoutToInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fromInventoryId?: Prisma.IntFieldUpdateOperationsInput | number - items?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutTransferNestedInput -} - -export type InventoryTransferUncheckedUpdateManyWithoutToInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - fromInventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - - -/** - * Count Type InventoryTransferCountOutputType - */ - -export type InventoryTransferCountOutputType = { - items: number -} - -export type InventoryTransferCountOutputTypeSelect = { - items?: boolean | InventoryTransferCountOutputTypeCountItemsArgs -} - -/** - * InventoryTransferCountOutputType without action - */ -export type InventoryTransferCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the InventoryTransferCountOutputType - */ - select?: Prisma.InventoryTransferCountOutputTypeSelect | null -} - -/** - * InventoryTransferCountOutputType without action - */ -export type InventoryTransferCountOutputTypeCountItemsArgs = { - where?: Prisma.InventoryTransferItemWhereInput -} - - -export type InventoryTransferSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - code?: boolean - description?: boolean - createdAt?: boolean - fromInventoryId?: boolean - toInventoryId?: boolean - items?: boolean | Prisma.InventoryTransfer$itemsArgs - fromInventory?: boolean | Prisma.InventoryDefaultArgs - toInventory?: boolean | Prisma.InventoryDefaultArgs - _count?: boolean | Prisma.InventoryTransferCountOutputTypeDefaultArgs -}, ExtArgs["result"]["inventoryTransfer"]> - - - -export type InventoryTransferSelectScalar = { - id?: boolean - code?: boolean - description?: boolean - createdAt?: boolean - fromInventoryId?: boolean - toInventoryId?: boolean -} - -export type InventoryTransferOmit = runtime.Types.Extensions.GetOmit<"id" | "code" | "description" | "createdAt" | "fromInventoryId" | "toInventoryId", ExtArgs["result"]["inventoryTransfer"]> -export type InventoryTransferInclude = { - items?: boolean | Prisma.InventoryTransfer$itemsArgs - fromInventory?: boolean | Prisma.InventoryDefaultArgs - toInventory?: boolean | Prisma.InventoryDefaultArgs - _count?: boolean | Prisma.InventoryTransferCountOutputTypeDefaultArgs -} - -export type $InventoryTransferPayload = { - name: "InventoryTransfer" - objects: { - items: Prisma.$InventoryTransferItemPayload[] - fromInventory: Prisma.$InventoryPayload - toInventory: Prisma.$InventoryPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - code: string - description: string | null - createdAt: Date - fromInventoryId: number - toInventoryId: number - }, ExtArgs["result"]["inventoryTransfer"]> - composites: {} -} - -export type InventoryTransferGetPayload = runtime.Types.Result.GetResult - -export type InventoryTransferCountArgs = - Omit & { - select?: InventoryTransferCountAggregateInputType | true - } - -export interface InventoryTransferDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['InventoryTransfer'], meta: { name: 'InventoryTransfer' } } - /** - * Find zero or one InventoryTransfer that matches the filter. - * @param {InventoryTransferFindUniqueArgs} args - Arguments to find a InventoryTransfer - * @example - * // Get one InventoryTransfer - * const inventoryTransfer = await prisma.inventoryTransfer.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one InventoryTransfer that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {InventoryTransferFindUniqueOrThrowArgs} args - Arguments to find a InventoryTransfer - * @example - * // Get one InventoryTransfer - * const inventoryTransfer = await prisma.inventoryTransfer.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first InventoryTransfer that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferFindFirstArgs} args - Arguments to find a InventoryTransfer - * @example - * // Get one InventoryTransfer - * const inventoryTransfer = await prisma.inventoryTransfer.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first InventoryTransfer that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferFindFirstOrThrowArgs} args - Arguments to find a InventoryTransfer - * @example - * // Get one InventoryTransfer - * const inventoryTransfer = await prisma.inventoryTransfer.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more InventoryTransfers that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all InventoryTransfers - * const inventoryTransfers = await prisma.inventoryTransfer.findMany() - * - * // Get first 10 InventoryTransfers - * const inventoryTransfers = await prisma.inventoryTransfer.findMany({ take: 10 }) - * - * // Only select the `id` - * const inventoryTransferWithIdOnly = await prisma.inventoryTransfer.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a InventoryTransfer. - * @param {InventoryTransferCreateArgs} args - Arguments to create a InventoryTransfer. - * @example - * // Create one InventoryTransfer - * const InventoryTransfer = await prisma.inventoryTransfer.create({ - * data: { - * // ... data to create a InventoryTransfer - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many InventoryTransfers. - * @param {InventoryTransferCreateManyArgs} args - Arguments to create many InventoryTransfers. - * @example - * // Create many InventoryTransfers - * const inventoryTransfer = await prisma.inventoryTransfer.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a InventoryTransfer. - * @param {InventoryTransferDeleteArgs} args - Arguments to delete one InventoryTransfer. - * @example - * // Delete one InventoryTransfer - * const InventoryTransfer = await prisma.inventoryTransfer.delete({ - * where: { - * // ... filter to delete one InventoryTransfer - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one InventoryTransfer. - * @param {InventoryTransferUpdateArgs} args - Arguments to update one InventoryTransfer. - * @example - * // Update one InventoryTransfer - * const inventoryTransfer = await prisma.inventoryTransfer.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more InventoryTransfers. - * @param {InventoryTransferDeleteManyArgs} args - Arguments to filter InventoryTransfers to delete. - * @example - * // Delete a few InventoryTransfers - * const { count } = await prisma.inventoryTransfer.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more InventoryTransfers. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many InventoryTransfers - * const inventoryTransfer = await prisma.inventoryTransfer.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one InventoryTransfer. - * @param {InventoryTransferUpsertArgs} args - Arguments to update or create a InventoryTransfer. - * @example - * // Update or create a InventoryTransfer - * const inventoryTransfer = await prisma.inventoryTransfer.upsert({ - * create: { - * // ... data to create a InventoryTransfer - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the InventoryTransfer we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of InventoryTransfers. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferCountArgs} args - Arguments to filter InventoryTransfers to count. - * @example - * // Count the number of InventoryTransfers - * const count = await prisma.inventoryTransfer.count({ - * where: { - * // ... the filter for the InventoryTransfers we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a InventoryTransfer. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by InventoryTransfer. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends InventoryTransferGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: InventoryTransferGroupByArgs['orderBy'] } - : { orderBy?: InventoryTransferGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetInventoryTransferGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the InventoryTransfer model - */ -readonly fields: InventoryTransferFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for InventoryTransfer. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__InventoryTransferClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - items = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - fromInventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - toInventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the InventoryTransfer model - */ -export interface InventoryTransferFieldRefs { - readonly id: Prisma.FieldRef<"InventoryTransfer", 'Int'> - readonly code: Prisma.FieldRef<"InventoryTransfer", 'String'> - readonly description: Prisma.FieldRef<"InventoryTransfer", 'String'> - readonly createdAt: Prisma.FieldRef<"InventoryTransfer", 'DateTime'> - readonly fromInventoryId: Prisma.FieldRef<"InventoryTransfer", 'Int'> - readonly toInventoryId: Prisma.FieldRef<"InventoryTransfer", 'Int'> -} - - -// Custom InputTypes -/** - * InventoryTransfer findUnique - */ -export type InventoryTransferFindUniqueArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - /** - * Filter, which InventoryTransfer to fetch. - */ - where: Prisma.InventoryTransferWhereUniqueInput -} - -/** - * InventoryTransfer findUniqueOrThrow - */ -export type InventoryTransferFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - /** - * Filter, which InventoryTransfer to fetch. - */ - where: Prisma.InventoryTransferWhereUniqueInput -} - -/** - * InventoryTransfer findFirst - */ -export type InventoryTransferFindFirstArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - /** - * Filter, which InventoryTransfer to fetch. - */ - where?: Prisma.InventoryTransferWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryTransfers to fetch. - */ - orderBy?: Prisma.InventoryTransferOrderByWithRelationInput | Prisma.InventoryTransferOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for InventoryTransfers. - */ - cursor?: Prisma.InventoryTransferWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryTransfers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryTransfers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of InventoryTransfers. - */ - distinct?: Prisma.InventoryTransferScalarFieldEnum | Prisma.InventoryTransferScalarFieldEnum[] -} - -/** - * InventoryTransfer findFirstOrThrow - */ -export type InventoryTransferFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - /** - * Filter, which InventoryTransfer to fetch. - */ - where?: Prisma.InventoryTransferWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryTransfers to fetch. - */ - orderBy?: Prisma.InventoryTransferOrderByWithRelationInput | Prisma.InventoryTransferOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for InventoryTransfers. - */ - cursor?: Prisma.InventoryTransferWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryTransfers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryTransfers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of InventoryTransfers. - */ - distinct?: Prisma.InventoryTransferScalarFieldEnum | Prisma.InventoryTransferScalarFieldEnum[] -} - -/** - * InventoryTransfer findMany - */ -export type InventoryTransferFindManyArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - /** - * Filter, which InventoryTransfers to fetch. - */ - where?: Prisma.InventoryTransferWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryTransfers to fetch. - */ - orderBy?: Prisma.InventoryTransferOrderByWithRelationInput | Prisma.InventoryTransferOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing InventoryTransfers. - */ - cursor?: Prisma.InventoryTransferWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryTransfers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryTransfers. - */ - skip?: number - distinct?: Prisma.InventoryTransferScalarFieldEnum | Prisma.InventoryTransferScalarFieldEnum[] -} - -/** - * InventoryTransfer create - */ -export type InventoryTransferCreateArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - /** - * The data needed to create a InventoryTransfer. - */ - data: Prisma.XOR -} - -/** - * InventoryTransfer createMany - */ -export type InventoryTransferCreateManyArgs = { - /** - * The data used to create many InventoryTransfers. - */ - data: Prisma.InventoryTransferCreateManyInput | Prisma.InventoryTransferCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * InventoryTransfer update - */ -export type InventoryTransferUpdateArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - /** - * The data needed to update a InventoryTransfer. - */ - data: Prisma.XOR - /** - * Choose, which InventoryTransfer to update. - */ - where: Prisma.InventoryTransferWhereUniqueInput -} - -/** - * InventoryTransfer updateMany - */ -export type InventoryTransferUpdateManyArgs = { - /** - * The data used to update InventoryTransfers. - */ - data: Prisma.XOR - /** - * Filter which InventoryTransfers to update - */ - where?: Prisma.InventoryTransferWhereInput - /** - * Limit how many InventoryTransfers to update. - */ - limit?: number -} - -/** - * InventoryTransfer upsert - */ -export type InventoryTransferUpsertArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - /** - * The filter to search for the InventoryTransfer to update in case it exists. - */ - where: Prisma.InventoryTransferWhereUniqueInput - /** - * In case the InventoryTransfer found by the `where` argument doesn't exist, create a new InventoryTransfer with this data. - */ - create: Prisma.XOR - /** - * In case the InventoryTransfer was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * InventoryTransfer delete - */ -export type InventoryTransferDeleteArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null - /** - * Filter which InventoryTransfer to delete. - */ - where: Prisma.InventoryTransferWhereUniqueInput -} - -/** - * InventoryTransfer deleteMany - */ -export type InventoryTransferDeleteManyArgs = { - /** - * Filter which InventoryTransfers to delete - */ - where?: Prisma.InventoryTransferWhereInput - /** - * Limit how many InventoryTransfers to delete. - */ - limit?: number -} - -/** - * InventoryTransfer.items - */ -export type InventoryTransfer$itemsArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - where?: Prisma.InventoryTransferItemWhereInput - orderBy?: Prisma.InventoryTransferItemOrderByWithRelationInput | Prisma.InventoryTransferItemOrderByWithRelationInput[] - cursor?: Prisma.InventoryTransferItemWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.InventoryTransferItemScalarFieldEnum | Prisma.InventoryTransferItemScalarFieldEnum[] -} - -/** - * InventoryTransfer without action - */ -export type InventoryTransferDefaultArgs = { - /** - * Select specific fields to fetch from the InventoryTransfer - */ - select?: Prisma.InventoryTransferSelect | null - /** - * Omit specific fields from the InventoryTransfer - */ - omit?: Prisma.InventoryTransferOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferInclude | null -} diff --git a/src/generated/prisma/models/InventoryTransferItem.ts b/src/generated/prisma/models/InventoryTransferItem.ts deleted file mode 100644 index fca3d58..0000000 --- a/src/generated/prisma/models/InventoryTransferItem.ts +++ /dev/null @@ -1,1343 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `InventoryTransferItem` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model InventoryTransferItem - * - */ -export type InventoryTransferItemModel = runtime.Types.Result.DefaultSelection - -export type AggregateInventoryTransferItem = { - _count: InventoryTransferItemCountAggregateOutputType | null - _avg: InventoryTransferItemAvgAggregateOutputType | null - _sum: InventoryTransferItemSumAggregateOutputType | null - _min: InventoryTransferItemMinAggregateOutputType | null - _max: InventoryTransferItemMaxAggregateOutputType | null -} - -export type InventoryTransferItemAvgAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - productId: number | null - transferId: number | null -} - -export type InventoryTransferItemSumAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - productId: number | null - transferId: number | null -} - -export type InventoryTransferItemMinAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - productId: number | null - transferId: number | null -} - -export type InventoryTransferItemMaxAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - productId: number | null - transferId: number | null -} - -export type InventoryTransferItemCountAggregateOutputType = { - id: number - count: number - productId: number - transferId: number - _all: number -} - - -export type InventoryTransferItemAvgAggregateInputType = { - id?: true - count?: true - productId?: true - transferId?: true -} - -export type InventoryTransferItemSumAggregateInputType = { - id?: true - count?: true - productId?: true - transferId?: true -} - -export type InventoryTransferItemMinAggregateInputType = { - id?: true - count?: true - productId?: true - transferId?: true -} - -export type InventoryTransferItemMaxAggregateInputType = { - id?: true - count?: true - productId?: true - transferId?: true -} - -export type InventoryTransferItemCountAggregateInputType = { - id?: true - count?: true - productId?: true - transferId?: true - _all?: true -} - -export type InventoryTransferItemAggregateArgs = { - /** - * Filter which InventoryTransferItem to aggregate. - */ - where?: Prisma.InventoryTransferItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryTransferItems to fetch. - */ - orderBy?: Prisma.InventoryTransferItemOrderByWithRelationInput | Prisma.InventoryTransferItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.InventoryTransferItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryTransferItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryTransferItems. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned InventoryTransferItems - **/ - _count?: true | InventoryTransferItemCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: InventoryTransferItemAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: InventoryTransferItemSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: InventoryTransferItemMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: InventoryTransferItemMaxAggregateInputType -} - -export type GetInventoryTransferItemAggregateType = { - [P in keyof T & keyof AggregateInventoryTransferItem]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type InventoryTransferItemGroupByArgs = { - where?: Prisma.InventoryTransferItemWhereInput - orderBy?: Prisma.InventoryTransferItemOrderByWithAggregationInput | Prisma.InventoryTransferItemOrderByWithAggregationInput[] - by: Prisma.InventoryTransferItemScalarFieldEnum[] | Prisma.InventoryTransferItemScalarFieldEnum - having?: Prisma.InventoryTransferItemScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: InventoryTransferItemCountAggregateInputType | true - _avg?: InventoryTransferItemAvgAggregateInputType - _sum?: InventoryTransferItemSumAggregateInputType - _min?: InventoryTransferItemMinAggregateInputType - _max?: InventoryTransferItemMaxAggregateInputType -} - -export type InventoryTransferItemGroupByOutputType = { - id: number - count: runtime.Decimal - productId: number - transferId: number - _count: InventoryTransferItemCountAggregateOutputType | null - _avg: InventoryTransferItemAvgAggregateOutputType | null - _sum: InventoryTransferItemSumAggregateOutputType | null - _min: InventoryTransferItemMinAggregateOutputType | null - _max: InventoryTransferItemMaxAggregateOutputType | null -} - -type GetInventoryTransferItemGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof InventoryTransferItemGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type InventoryTransferItemWhereInput = { - AND?: Prisma.InventoryTransferItemWhereInput | Prisma.InventoryTransferItemWhereInput[] - OR?: Prisma.InventoryTransferItemWhereInput[] - NOT?: Prisma.InventoryTransferItemWhereInput | Prisma.InventoryTransferItemWhereInput[] - id?: Prisma.IntFilter<"InventoryTransferItem"> | number - count?: Prisma.DecimalFilter<"InventoryTransferItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFilter<"InventoryTransferItem"> | number - transferId?: Prisma.IntFilter<"InventoryTransferItem"> | number - product?: Prisma.XOR - transfer?: Prisma.XOR -} - -export type InventoryTransferItemOrderByWithRelationInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - productId?: Prisma.SortOrder - transferId?: Prisma.SortOrder - product?: Prisma.ProductOrderByWithRelationInput - transfer?: Prisma.InventoryTransferOrderByWithRelationInput -} - -export type InventoryTransferItemWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.InventoryTransferItemWhereInput | Prisma.InventoryTransferItemWhereInput[] - OR?: Prisma.InventoryTransferItemWhereInput[] - NOT?: Prisma.InventoryTransferItemWhereInput | Prisma.InventoryTransferItemWhereInput[] - count?: Prisma.DecimalFilter<"InventoryTransferItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFilter<"InventoryTransferItem"> | number - transferId?: Prisma.IntFilter<"InventoryTransferItem"> | number - product?: Prisma.XOR - transfer?: Prisma.XOR -}, "id"> - -export type InventoryTransferItemOrderByWithAggregationInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - productId?: Prisma.SortOrder - transferId?: Prisma.SortOrder - _count?: Prisma.InventoryTransferItemCountOrderByAggregateInput - _avg?: Prisma.InventoryTransferItemAvgOrderByAggregateInput - _max?: Prisma.InventoryTransferItemMaxOrderByAggregateInput - _min?: Prisma.InventoryTransferItemMinOrderByAggregateInput - _sum?: Prisma.InventoryTransferItemSumOrderByAggregateInput -} - -export type InventoryTransferItemScalarWhereWithAggregatesInput = { - AND?: Prisma.InventoryTransferItemScalarWhereWithAggregatesInput | Prisma.InventoryTransferItemScalarWhereWithAggregatesInput[] - OR?: Prisma.InventoryTransferItemScalarWhereWithAggregatesInput[] - NOT?: Prisma.InventoryTransferItemScalarWhereWithAggregatesInput | Prisma.InventoryTransferItemScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"InventoryTransferItem"> | number - count?: Prisma.DecimalWithAggregatesFilter<"InventoryTransferItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntWithAggregatesFilter<"InventoryTransferItem"> | number - transferId?: Prisma.IntWithAggregatesFilter<"InventoryTransferItem"> | number -} - -export type InventoryTransferItemCreateInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - product: Prisma.ProductCreateNestedOneWithoutInventoryTransferItemsInput - transfer: Prisma.InventoryTransferCreateNestedOneWithoutItemsInput -} - -export type InventoryTransferItemUncheckedCreateInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - productId: number - transferId: number -} - -export type InventoryTransferItemUpdateInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - product?: Prisma.ProductUpdateOneRequiredWithoutInventoryTransferItemsNestedInput - transfer?: Prisma.InventoryTransferUpdateOneRequiredWithoutItemsNestedInput -} - -export type InventoryTransferItemUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - transferId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryTransferItemCreateManyInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - productId: number - transferId: number -} - -export type InventoryTransferItemUpdateManyMutationInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type InventoryTransferItemUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - transferId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryTransferItemListRelationFilter = { - every?: Prisma.InventoryTransferItemWhereInput - some?: Prisma.InventoryTransferItemWhereInput - none?: Prisma.InventoryTransferItemWhereInput -} - -export type InventoryTransferItemOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type InventoryTransferItemCountOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - productId?: Prisma.SortOrder - transferId?: Prisma.SortOrder -} - -export type InventoryTransferItemAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - productId?: Prisma.SortOrder - transferId?: Prisma.SortOrder -} - -export type InventoryTransferItemMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - productId?: Prisma.SortOrder - transferId?: Prisma.SortOrder -} - -export type InventoryTransferItemMinOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - productId?: Prisma.SortOrder - transferId?: Prisma.SortOrder -} - -export type InventoryTransferItemSumOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - productId?: Prisma.SortOrder - transferId?: Prisma.SortOrder -} - -export type InventoryTransferItemCreateNestedManyWithoutTransferInput = { - create?: Prisma.XOR | Prisma.InventoryTransferItemCreateWithoutTransferInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutTransferInput[] - connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput | Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput[] - createMany?: Prisma.InventoryTransferItemCreateManyTransferInputEnvelope - connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] -} - -export type InventoryTransferItemUncheckedCreateNestedManyWithoutTransferInput = { - create?: Prisma.XOR | Prisma.InventoryTransferItemCreateWithoutTransferInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutTransferInput[] - connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput | Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput[] - createMany?: Prisma.InventoryTransferItemCreateManyTransferInputEnvelope - connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] -} - -export type InventoryTransferItemUpdateManyWithoutTransferNestedInput = { - create?: Prisma.XOR | Prisma.InventoryTransferItemCreateWithoutTransferInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutTransferInput[] - connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput | Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput[] - upsert?: Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutTransferInput | Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutTransferInput[] - createMany?: Prisma.InventoryTransferItemCreateManyTransferInputEnvelope - set?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - disconnect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - delete?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - update?: Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutTransferInput | Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutTransferInput[] - updateMany?: Prisma.InventoryTransferItemUpdateManyWithWhereWithoutTransferInput | Prisma.InventoryTransferItemUpdateManyWithWhereWithoutTransferInput[] - deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[] -} - -export type InventoryTransferItemUncheckedUpdateManyWithoutTransferNestedInput = { - create?: Prisma.XOR | Prisma.InventoryTransferItemCreateWithoutTransferInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutTransferInput[] - connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput | Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput[] - upsert?: Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutTransferInput | Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutTransferInput[] - createMany?: Prisma.InventoryTransferItemCreateManyTransferInputEnvelope - set?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - disconnect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - delete?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - update?: Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutTransferInput | Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutTransferInput[] - updateMany?: Prisma.InventoryTransferItemUpdateManyWithWhereWithoutTransferInput | Prisma.InventoryTransferItemUpdateManyWithWhereWithoutTransferInput[] - deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[] -} - -export type InventoryTransferItemCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope - connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] -} - -export type InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope - connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] -} - -export type InventoryTransferItemUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[] - upsert?: Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope - set?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - disconnect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - delete?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - update?: Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput | Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[] -} - -export type InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[] - upsert?: Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope - set?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - disconnect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - delete?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[] - update?: Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput | Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[] -} - -export type InventoryTransferItemCreateWithoutTransferInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - product: Prisma.ProductCreateNestedOneWithoutInventoryTransferItemsInput -} - -export type InventoryTransferItemUncheckedCreateWithoutTransferInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - productId: number -} - -export type InventoryTransferItemCreateOrConnectWithoutTransferInput = { - where: Prisma.InventoryTransferItemWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryTransferItemCreateManyTransferInputEnvelope = { - data: Prisma.InventoryTransferItemCreateManyTransferInput | Prisma.InventoryTransferItemCreateManyTransferInput[] - skipDuplicates?: boolean -} - -export type InventoryTransferItemUpsertWithWhereUniqueWithoutTransferInput = { - where: Prisma.InventoryTransferItemWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type InventoryTransferItemUpdateWithWhereUniqueWithoutTransferInput = { - where: Prisma.InventoryTransferItemWhereUniqueInput - data: Prisma.XOR -} - -export type InventoryTransferItemUpdateManyWithWhereWithoutTransferInput = { - where: Prisma.InventoryTransferItemScalarWhereInput - data: Prisma.XOR -} - -export type InventoryTransferItemScalarWhereInput = { - AND?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[] - OR?: Prisma.InventoryTransferItemScalarWhereInput[] - NOT?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[] - id?: Prisma.IntFilter<"InventoryTransferItem"> | number - count?: Prisma.DecimalFilter<"InventoryTransferItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFilter<"InventoryTransferItem"> | number - transferId?: Prisma.IntFilter<"InventoryTransferItem"> | number -} - -export type InventoryTransferItemCreateWithoutProductInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - transfer: Prisma.InventoryTransferCreateNestedOneWithoutItemsInput -} - -export type InventoryTransferItemUncheckedCreateWithoutProductInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - transferId: number -} - -export type InventoryTransferItemCreateOrConnectWithoutProductInput = { - where: Prisma.InventoryTransferItemWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryTransferItemCreateManyProductInputEnvelope = { - data: Prisma.InventoryTransferItemCreateManyProductInput | Prisma.InventoryTransferItemCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.InventoryTransferItemWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.InventoryTransferItemWhereUniqueInput - data: Prisma.XOR -} - -export type InventoryTransferItemUpdateManyWithWhereWithoutProductInput = { - where: Prisma.InventoryTransferItemScalarWhereInput - data: Prisma.XOR -} - -export type InventoryTransferItemCreateManyTransferInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - productId: number -} - -export type InventoryTransferItemUpdateWithoutTransferInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - product?: Prisma.ProductUpdateOneRequiredWithoutInventoryTransferItemsNestedInput -} - -export type InventoryTransferItemUncheckedUpdateWithoutTransferInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryTransferItemUncheckedUpdateManyWithoutTransferInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryTransferItemCreateManyProductInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - transferId: number -} - -export type InventoryTransferItemUpdateWithoutProductInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - transfer?: Prisma.InventoryTransferUpdateOneRequiredWithoutItemsNestedInput -} - -export type InventoryTransferItemUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - transferId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type InventoryTransferItemUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - transferId?: Prisma.IntFieldUpdateOperationsInput | number -} - - - -export type InventoryTransferItemSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - count?: boolean - productId?: boolean - transferId?: boolean - product?: boolean | Prisma.ProductDefaultArgs - transfer?: boolean | Prisma.InventoryTransferDefaultArgs -}, ExtArgs["result"]["inventoryTransferItem"]> - - - -export type InventoryTransferItemSelectScalar = { - id?: boolean - count?: boolean - productId?: boolean - transferId?: boolean -} - -export type InventoryTransferItemOmit = runtime.Types.Extensions.GetOmit<"id" | "count" | "productId" | "transferId", ExtArgs["result"]["inventoryTransferItem"]> -export type InventoryTransferItemInclude = { - product?: boolean | Prisma.ProductDefaultArgs - transfer?: boolean | Prisma.InventoryTransferDefaultArgs -} - -export type $InventoryTransferItemPayload = { - name: "InventoryTransferItem" - objects: { - product: Prisma.$ProductPayload - transfer: Prisma.$InventoryTransferPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - count: runtime.Decimal - productId: number - transferId: number - }, ExtArgs["result"]["inventoryTransferItem"]> - composites: {} -} - -export type InventoryTransferItemGetPayload = runtime.Types.Result.GetResult - -export type InventoryTransferItemCountArgs = - Omit & { - select?: InventoryTransferItemCountAggregateInputType | true - } - -export interface InventoryTransferItemDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['InventoryTransferItem'], meta: { name: 'InventoryTransferItem' } } - /** - * Find zero or one InventoryTransferItem that matches the filter. - * @param {InventoryTransferItemFindUniqueArgs} args - Arguments to find a InventoryTransferItem - * @example - * // Get one InventoryTransferItem - * const inventoryTransferItem = await prisma.inventoryTransferItem.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferItemClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one InventoryTransferItem that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {InventoryTransferItemFindUniqueOrThrowArgs} args - Arguments to find a InventoryTransferItem - * @example - * // Get one InventoryTransferItem - * const inventoryTransferItem = await prisma.inventoryTransferItem.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferItemClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first InventoryTransferItem that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferItemFindFirstArgs} args - Arguments to find a InventoryTransferItem - * @example - * // Get one InventoryTransferItem - * const inventoryTransferItem = await prisma.inventoryTransferItem.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferItemClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first InventoryTransferItem that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferItemFindFirstOrThrowArgs} args - Arguments to find a InventoryTransferItem - * @example - * // Get one InventoryTransferItem - * const inventoryTransferItem = await prisma.inventoryTransferItem.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferItemClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more InventoryTransferItems that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferItemFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all InventoryTransferItems - * const inventoryTransferItems = await prisma.inventoryTransferItem.findMany() - * - * // Get first 10 InventoryTransferItems - * const inventoryTransferItems = await prisma.inventoryTransferItem.findMany({ take: 10 }) - * - * // Only select the `id` - * const inventoryTransferItemWithIdOnly = await prisma.inventoryTransferItem.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a InventoryTransferItem. - * @param {InventoryTransferItemCreateArgs} args - Arguments to create a InventoryTransferItem. - * @example - * // Create one InventoryTransferItem - * const InventoryTransferItem = await prisma.inventoryTransferItem.create({ - * data: { - * // ... data to create a InventoryTransferItem - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferItemClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many InventoryTransferItems. - * @param {InventoryTransferItemCreateManyArgs} args - Arguments to create many InventoryTransferItems. - * @example - * // Create many InventoryTransferItems - * const inventoryTransferItem = await prisma.inventoryTransferItem.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a InventoryTransferItem. - * @param {InventoryTransferItemDeleteArgs} args - Arguments to delete one InventoryTransferItem. - * @example - * // Delete one InventoryTransferItem - * const InventoryTransferItem = await prisma.inventoryTransferItem.delete({ - * where: { - * // ... filter to delete one InventoryTransferItem - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferItemClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one InventoryTransferItem. - * @param {InventoryTransferItemUpdateArgs} args - Arguments to update one InventoryTransferItem. - * @example - * // Update one InventoryTransferItem - * const inventoryTransferItem = await prisma.inventoryTransferItem.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferItemClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more InventoryTransferItems. - * @param {InventoryTransferItemDeleteManyArgs} args - Arguments to filter InventoryTransferItems to delete. - * @example - * // Delete a few InventoryTransferItems - * const { count } = await prisma.inventoryTransferItem.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more InventoryTransferItems. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferItemUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many InventoryTransferItems - * const inventoryTransferItem = await prisma.inventoryTransferItem.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one InventoryTransferItem. - * @param {InventoryTransferItemUpsertArgs} args - Arguments to update or create a InventoryTransferItem. - * @example - * // Update or create a InventoryTransferItem - * const inventoryTransferItem = await prisma.inventoryTransferItem.upsert({ - * create: { - * // ... data to create a InventoryTransferItem - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the InventoryTransferItem we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__InventoryTransferItemClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of InventoryTransferItems. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferItemCountArgs} args - Arguments to filter InventoryTransferItems to count. - * @example - * // Count the number of InventoryTransferItems - * const count = await prisma.inventoryTransferItem.count({ - * where: { - * // ... the filter for the InventoryTransferItems we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a InventoryTransferItem. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferItemAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by InventoryTransferItem. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {InventoryTransferItemGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends InventoryTransferItemGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: InventoryTransferItemGroupByArgs['orderBy'] } - : { orderBy?: InventoryTransferItemGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetInventoryTransferItemGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the InventoryTransferItem model - */ -readonly fields: InventoryTransferItemFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for InventoryTransferItem. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__InventoryTransferItemClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - transfer = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryTransferClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the InventoryTransferItem model - */ -export interface InventoryTransferItemFieldRefs { - readonly id: Prisma.FieldRef<"InventoryTransferItem", 'Int'> - readonly count: Prisma.FieldRef<"InventoryTransferItem", 'Decimal'> - readonly productId: Prisma.FieldRef<"InventoryTransferItem", 'Int'> - readonly transferId: Prisma.FieldRef<"InventoryTransferItem", 'Int'> -} - - -// Custom InputTypes -/** - * InventoryTransferItem findUnique - */ -export type InventoryTransferItemFindUniqueArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - /** - * Filter, which InventoryTransferItem to fetch. - */ - where: Prisma.InventoryTransferItemWhereUniqueInput -} - -/** - * InventoryTransferItem findUniqueOrThrow - */ -export type InventoryTransferItemFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - /** - * Filter, which InventoryTransferItem to fetch. - */ - where: Prisma.InventoryTransferItemWhereUniqueInput -} - -/** - * InventoryTransferItem findFirst - */ -export type InventoryTransferItemFindFirstArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - /** - * Filter, which InventoryTransferItem to fetch. - */ - where?: Prisma.InventoryTransferItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryTransferItems to fetch. - */ - orderBy?: Prisma.InventoryTransferItemOrderByWithRelationInput | Prisma.InventoryTransferItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for InventoryTransferItems. - */ - cursor?: Prisma.InventoryTransferItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryTransferItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryTransferItems. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of InventoryTransferItems. - */ - distinct?: Prisma.InventoryTransferItemScalarFieldEnum | Prisma.InventoryTransferItemScalarFieldEnum[] -} - -/** - * InventoryTransferItem findFirstOrThrow - */ -export type InventoryTransferItemFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - /** - * Filter, which InventoryTransferItem to fetch. - */ - where?: Prisma.InventoryTransferItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryTransferItems to fetch. - */ - orderBy?: Prisma.InventoryTransferItemOrderByWithRelationInput | Prisma.InventoryTransferItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for InventoryTransferItems. - */ - cursor?: Prisma.InventoryTransferItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryTransferItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryTransferItems. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of InventoryTransferItems. - */ - distinct?: Prisma.InventoryTransferItemScalarFieldEnum | Prisma.InventoryTransferItemScalarFieldEnum[] -} - -/** - * InventoryTransferItem findMany - */ -export type InventoryTransferItemFindManyArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - /** - * Filter, which InventoryTransferItems to fetch. - */ - where?: Prisma.InventoryTransferItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of InventoryTransferItems to fetch. - */ - orderBy?: Prisma.InventoryTransferItemOrderByWithRelationInput | Prisma.InventoryTransferItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing InventoryTransferItems. - */ - cursor?: Prisma.InventoryTransferItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` InventoryTransferItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` InventoryTransferItems. - */ - skip?: number - distinct?: Prisma.InventoryTransferItemScalarFieldEnum | Prisma.InventoryTransferItemScalarFieldEnum[] -} - -/** - * InventoryTransferItem create - */ -export type InventoryTransferItemCreateArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - /** - * The data needed to create a InventoryTransferItem. - */ - data: Prisma.XOR -} - -/** - * InventoryTransferItem createMany - */ -export type InventoryTransferItemCreateManyArgs = { - /** - * The data used to create many InventoryTransferItems. - */ - data: Prisma.InventoryTransferItemCreateManyInput | Prisma.InventoryTransferItemCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * InventoryTransferItem update - */ -export type InventoryTransferItemUpdateArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - /** - * The data needed to update a InventoryTransferItem. - */ - data: Prisma.XOR - /** - * Choose, which InventoryTransferItem to update. - */ - where: Prisma.InventoryTransferItemWhereUniqueInput -} - -/** - * InventoryTransferItem updateMany - */ -export type InventoryTransferItemUpdateManyArgs = { - /** - * The data used to update InventoryTransferItems. - */ - data: Prisma.XOR - /** - * Filter which InventoryTransferItems to update - */ - where?: Prisma.InventoryTransferItemWhereInput - /** - * Limit how many InventoryTransferItems to update. - */ - limit?: number -} - -/** - * InventoryTransferItem upsert - */ -export type InventoryTransferItemUpsertArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - /** - * The filter to search for the InventoryTransferItem to update in case it exists. - */ - where: Prisma.InventoryTransferItemWhereUniqueInput - /** - * In case the InventoryTransferItem found by the `where` argument doesn't exist, create a new InventoryTransferItem with this data. - */ - create: Prisma.XOR - /** - * In case the InventoryTransferItem was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * InventoryTransferItem delete - */ -export type InventoryTransferItemDeleteArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - /** - * Filter which InventoryTransferItem to delete. - */ - where: Prisma.InventoryTransferItemWhereUniqueInput -} - -/** - * InventoryTransferItem deleteMany - */ -export type InventoryTransferItemDeleteManyArgs = { - /** - * Filter which InventoryTransferItems to delete - */ - where?: Prisma.InventoryTransferItemWhereInput - /** - * Limit how many InventoryTransferItems to delete. - */ - limit?: number -} - -/** - * InventoryTransferItem without action - */ -export type InventoryTransferItemDefaultArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null -} diff --git a/src/generated/prisma/models/Order.ts b/src/generated/prisma/models/Order.ts deleted file mode 100644 index 4449b64..0000000 --- a/src/generated/prisma/models/Order.ts +++ /dev/null @@ -1,1914 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `Order` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model Order - * - */ -export type OrderModel = runtime.Types.Result.DefaultSelection - -export type AggregateOrder = { - _count: OrderCountAggregateOutputType | null - _avg: OrderAvgAggregateOutputType | null - _sum: OrderSumAggregateOutputType | null - _min: OrderMinAggregateOutputType | null - _max: OrderMaxAggregateOutputType | null -} - -export type OrderAvgAggregateOutputType = { - id: number | null - totalAmount: runtime.Decimal | null - customerId: number | null - posAccountId: number | null -} - -export type OrderSumAggregateOutputType = { - id: number | null - totalAmount: runtime.Decimal | null - customerId: number | null - posAccountId: number | null -} - -export type OrderMinAggregateOutputType = { - id: number | null - orderNumber: string | null - status: $Enums.OrderStatus | null - totalAmount: runtime.Decimal | null - description: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - customerId: number | null - posAccountId: number | null -} - -export type OrderMaxAggregateOutputType = { - id: number | null - orderNumber: string | null - status: $Enums.OrderStatus | null - totalAmount: runtime.Decimal | null - description: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - customerId: number | null - posAccountId: number | null -} - -export type OrderCountAggregateOutputType = { - id: number - orderNumber: number - status: number - totalAmount: number - description: number - createdAt: number - updatedAt: number - deletedAt: number - customerId: number - posAccountId: number - _all: number -} - - -export type OrderAvgAggregateInputType = { - id?: true - totalAmount?: true - customerId?: true - posAccountId?: true -} - -export type OrderSumAggregateInputType = { - id?: true - totalAmount?: true - customerId?: true - posAccountId?: true -} - -export type OrderMinAggregateInputType = { - id?: true - orderNumber?: true - status?: true - totalAmount?: true - description?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - customerId?: true - posAccountId?: true -} - -export type OrderMaxAggregateInputType = { - id?: true - orderNumber?: true - status?: true - totalAmount?: true - description?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - customerId?: true - posAccountId?: true -} - -export type OrderCountAggregateInputType = { - id?: true - orderNumber?: true - status?: true - totalAmount?: true - description?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - customerId?: true - posAccountId?: true - _all?: true -} - -export type OrderAggregateArgs = { - /** - * Filter which Order to aggregate. - */ - where?: Prisma.OrderWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Orders to fetch. - */ - orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.OrderWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Orders from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Orders. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Orders - **/ - _count?: true | OrderCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: OrderAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: OrderSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: OrderMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: OrderMaxAggregateInputType -} - -export type GetOrderAggregateType = { - [P in keyof T & keyof AggregateOrder]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type OrderGroupByArgs = { - where?: Prisma.OrderWhereInput - orderBy?: Prisma.OrderOrderByWithAggregationInput | Prisma.OrderOrderByWithAggregationInput[] - by: Prisma.OrderScalarFieldEnum[] | Prisma.OrderScalarFieldEnum - having?: Prisma.OrderScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: OrderCountAggregateInputType | true - _avg?: OrderAvgAggregateInputType - _sum?: OrderSumAggregateInputType - _min?: OrderMinAggregateInputType - _max?: OrderMaxAggregateInputType -} - -export type OrderGroupByOutputType = { - id: number - orderNumber: string - status: $Enums.OrderStatus - totalAmount: runtime.Decimal - description: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - customerId: number | null - posAccountId: number - _count: OrderCountAggregateOutputType | null - _avg: OrderAvgAggregateOutputType | null - _sum: OrderSumAggregateOutputType | null - _min: OrderMinAggregateOutputType | null - _max: OrderMaxAggregateOutputType | null -} - -type GetOrderGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof OrderGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type OrderWhereInput = { - AND?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[] - OR?: Prisma.OrderWhereInput[] - NOT?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[] - id?: Prisma.IntFilter<"Order"> | number - orderNumber?: Prisma.StringFilter<"Order"> | string - status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"Order"> | string | null - createdAt?: Prisma.DateTimeFilter<"Order"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Order"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Order"> | Date | string | null - customerId?: Prisma.IntNullableFilter<"Order"> | number | null - posAccountId?: Prisma.IntFilter<"Order"> | number - customer?: Prisma.XOR | null - posAccount?: Prisma.XOR - orderItems?: Prisma.OrderItemListRelationFilter - stockReservations?: Prisma.StockReservationListRelationFilter -} - -export type OrderOrderByWithRelationInput = { - id?: Prisma.SortOrder - orderNumber?: Prisma.SortOrder - status?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - customerId?: Prisma.SortOrderInput | Prisma.SortOrder - posAccountId?: Prisma.SortOrder - customer?: Prisma.CustomerOrderByWithRelationInput - posAccount?: Prisma.PosAccountOrderByWithRelationInput - orderItems?: Prisma.OrderItemOrderByRelationAggregateInput - stockReservations?: Prisma.StockReservationOrderByRelationAggregateInput - _relevance?: Prisma.OrderOrderByRelevanceInput -} - -export type OrderWhereUniqueInput = Prisma.AtLeast<{ - id?: number - orderNumber?: string - AND?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[] - OR?: Prisma.OrderWhereInput[] - NOT?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[] - status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"Order"> | string | null - createdAt?: Prisma.DateTimeFilter<"Order"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Order"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Order"> | Date | string | null - customerId?: Prisma.IntNullableFilter<"Order"> | number | null - posAccountId?: Prisma.IntFilter<"Order"> | number - customer?: Prisma.XOR | null - posAccount?: Prisma.XOR - orderItems?: Prisma.OrderItemListRelationFilter - stockReservations?: Prisma.StockReservationListRelationFilter -}, "id" | "orderNumber"> - -export type OrderOrderByWithAggregationInput = { - id?: Prisma.SortOrder - orderNumber?: Prisma.SortOrder - status?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - customerId?: Prisma.SortOrderInput | Prisma.SortOrder - posAccountId?: Prisma.SortOrder - _count?: Prisma.OrderCountOrderByAggregateInput - _avg?: Prisma.OrderAvgOrderByAggregateInput - _max?: Prisma.OrderMaxOrderByAggregateInput - _min?: Prisma.OrderMinOrderByAggregateInput - _sum?: Prisma.OrderSumOrderByAggregateInput -} - -export type OrderScalarWhereWithAggregatesInput = { - AND?: Prisma.OrderScalarWhereWithAggregatesInput | Prisma.OrderScalarWhereWithAggregatesInput[] - OR?: Prisma.OrderScalarWhereWithAggregatesInput[] - NOT?: Prisma.OrderScalarWhereWithAggregatesInput | Prisma.OrderScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"Order"> | number - orderNumber?: Prisma.StringWithAggregatesFilter<"Order"> | string - status?: Prisma.EnumOrderStatusWithAggregatesFilter<"Order"> | $Enums.OrderStatus - totalAmount?: Prisma.DecimalWithAggregatesFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableWithAggregatesFilter<"Order"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Order"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Order"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Order"> | Date | string | null - customerId?: Prisma.IntNullableWithAggregatesFilter<"Order"> | number | null - posAccountId?: Prisma.IntWithAggregatesFilter<"Order"> | number -} - -export type OrderCreateInput = { - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customer?: Prisma.CustomerCreateNestedOneWithoutOrdersInput - posAccount: Prisma.PosAccountCreateNestedOneWithoutOrdersInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutOrderInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutOrderInput -} - -export type OrderUncheckedCreateInput = { - id?: number - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customerId?: number | null - posAccountId: number - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutOrderInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutOrderInput -} - -export type OrderUpdateInput = { - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customer?: Prisma.CustomerUpdateOneWithoutOrdersNestedInput - posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutOrdersNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutOrderNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutOrderNestedInput -} - -export type OrderUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutOrderNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutOrderNestedInput -} - -export type OrderCreateManyInput = { - id?: number - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customerId?: number | null - posAccountId: number -} - -export type OrderUpdateManyMutationInput = { - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type OrderUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type OrderListRelationFilter = { - every?: Prisma.OrderWhereInput - some?: Prisma.OrderWhereInput - none?: Prisma.OrderWhereInput -} - -export type OrderOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type OrderOrderByRelevanceInput = { - fields: Prisma.OrderOrderByRelevanceFieldEnum | Prisma.OrderOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type OrderCountOrderByAggregateInput = { - id?: Prisma.SortOrder - orderNumber?: Prisma.SortOrder - status?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder -} - -export type OrderAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder -} - -export type OrderMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - orderNumber?: Prisma.SortOrder - status?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder -} - -export type OrderMinOrderByAggregateInput = { - id?: Prisma.SortOrder - orderNumber?: Prisma.SortOrder - status?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder -} - -export type OrderSumOrderByAggregateInput = { - id?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder -} - -export type OrderScalarRelationFilter = { - is?: Prisma.OrderWhereInput - isNot?: Prisma.OrderWhereInput -} - -export type OrderCreateNestedManyWithoutPosAccountInput = { - create?: Prisma.XOR | Prisma.OrderCreateWithoutPosAccountInput[] | Prisma.OrderUncheckedCreateWithoutPosAccountInput[] - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutPosAccountInput | Prisma.OrderCreateOrConnectWithoutPosAccountInput[] - createMany?: Prisma.OrderCreateManyPosAccountInputEnvelope - connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] -} - -export type OrderUncheckedCreateNestedManyWithoutPosAccountInput = { - create?: Prisma.XOR | Prisma.OrderCreateWithoutPosAccountInput[] | Prisma.OrderUncheckedCreateWithoutPosAccountInput[] - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutPosAccountInput | Prisma.OrderCreateOrConnectWithoutPosAccountInput[] - createMany?: Prisma.OrderCreateManyPosAccountInputEnvelope - connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] -} - -export type OrderUpdateManyWithoutPosAccountNestedInput = { - create?: Prisma.XOR | Prisma.OrderCreateWithoutPosAccountInput[] | Prisma.OrderUncheckedCreateWithoutPosAccountInput[] - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutPosAccountInput | Prisma.OrderCreateOrConnectWithoutPosAccountInput[] - upsert?: Prisma.OrderUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.OrderUpsertWithWhereUniqueWithoutPosAccountInput[] - createMany?: Prisma.OrderCreateManyPosAccountInputEnvelope - set?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - disconnect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - delete?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - update?: Prisma.OrderUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.OrderUpdateWithWhereUniqueWithoutPosAccountInput[] - updateMany?: Prisma.OrderUpdateManyWithWhereWithoutPosAccountInput | Prisma.OrderUpdateManyWithWhereWithoutPosAccountInput[] - deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] -} - -export type OrderUncheckedUpdateManyWithoutPosAccountNestedInput = { - create?: Prisma.XOR | Prisma.OrderCreateWithoutPosAccountInput[] | Prisma.OrderUncheckedCreateWithoutPosAccountInput[] - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutPosAccountInput | Prisma.OrderCreateOrConnectWithoutPosAccountInput[] - upsert?: Prisma.OrderUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.OrderUpsertWithWhereUniqueWithoutPosAccountInput[] - createMany?: Prisma.OrderCreateManyPosAccountInputEnvelope - set?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - disconnect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - delete?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - update?: Prisma.OrderUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.OrderUpdateWithWhereUniqueWithoutPosAccountInput[] - updateMany?: Prisma.OrderUpdateManyWithWhereWithoutPosAccountInput | Prisma.OrderUpdateManyWithWhereWithoutPosAccountInput[] - deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] -} - -export type EnumOrderStatusFieldUpdateOperationsInput = { - set?: $Enums.OrderStatus -} - -export type NullableIntFieldUpdateOperationsInput = { - set?: number | null - increment?: number - decrement?: number - multiply?: number - divide?: number -} - -export type OrderCreateNestedOneWithoutOrderItemsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutOrderItemsInput - connect?: Prisma.OrderWhereUniqueInput -} - -export type OrderUpdateOneRequiredWithoutOrderItemsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutOrderItemsInput - upsert?: Prisma.OrderUpsertWithoutOrderItemsInput - connect?: Prisma.OrderWhereUniqueInput - update?: Prisma.XOR, Prisma.OrderUncheckedUpdateWithoutOrderItemsInput> -} - -export type OrderCreateNestedManyWithoutCustomerInput = { - create?: Prisma.XOR | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[] - createMany?: Prisma.OrderCreateManyCustomerInputEnvelope - connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] -} - -export type OrderUncheckedCreateNestedManyWithoutCustomerInput = { - create?: Prisma.XOR | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[] - createMany?: Prisma.OrderCreateManyCustomerInputEnvelope - connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] -} - -export type OrderUpdateManyWithoutCustomerNestedInput = { - create?: Prisma.XOR | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[] - upsert?: Prisma.OrderUpsertWithWhereUniqueWithoutCustomerInput | Prisma.OrderUpsertWithWhereUniqueWithoutCustomerInput[] - createMany?: Prisma.OrderCreateManyCustomerInputEnvelope - set?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - disconnect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - delete?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - update?: Prisma.OrderUpdateWithWhereUniqueWithoutCustomerInput | Prisma.OrderUpdateWithWhereUniqueWithoutCustomerInput[] - updateMany?: Prisma.OrderUpdateManyWithWhereWithoutCustomerInput | Prisma.OrderUpdateManyWithWhereWithoutCustomerInput[] - deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] -} - -export type OrderUncheckedUpdateManyWithoutCustomerNestedInput = { - create?: Prisma.XOR | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[] - upsert?: Prisma.OrderUpsertWithWhereUniqueWithoutCustomerInput | Prisma.OrderUpsertWithWhereUniqueWithoutCustomerInput[] - createMany?: Prisma.OrderCreateManyCustomerInputEnvelope - set?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - disconnect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - delete?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - connect?: Prisma.OrderWhereUniqueInput | Prisma.OrderWhereUniqueInput[] - update?: Prisma.OrderUpdateWithWhereUniqueWithoutCustomerInput | Prisma.OrderUpdateWithWhereUniqueWithoutCustomerInput[] - updateMany?: Prisma.OrderUpdateManyWithWhereWithoutCustomerInput | Prisma.OrderUpdateManyWithWhereWithoutCustomerInput[] - deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] -} - -export type OrderCreateNestedOneWithoutStockReservationsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutStockReservationsInput - connect?: Prisma.OrderWhereUniqueInput -} - -export type OrderUpdateOneRequiredWithoutStockReservationsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.OrderCreateOrConnectWithoutStockReservationsInput - upsert?: Prisma.OrderUpsertWithoutStockReservationsInput - connect?: Prisma.OrderWhereUniqueInput - update?: Prisma.XOR, Prisma.OrderUncheckedUpdateWithoutStockReservationsInput> -} - -export type OrderCreateWithoutPosAccountInput = { - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customer?: Prisma.CustomerCreateNestedOneWithoutOrdersInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutOrderInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutOrderInput -} - -export type OrderUncheckedCreateWithoutPosAccountInput = { - id?: number - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customerId?: number | null - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutOrderInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutOrderInput -} - -export type OrderCreateOrConnectWithoutPosAccountInput = { - where: Prisma.OrderWhereUniqueInput - create: Prisma.XOR -} - -export type OrderCreateManyPosAccountInputEnvelope = { - data: Prisma.OrderCreateManyPosAccountInput | Prisma.OrderCreateManyPosAccountInput[] - skipDuplicates?: boolean -} - -export type OrderUpsertWithWhereUniqueWithoutPosAccountInput = { - where: Prisma.OrderWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type OrderUpdateWithWhereUniqueWithoutPosAccountInput = { - where: Prisma.OrderWhereUniqueInput - data: Prisma.XOR -} - -export type OrderUpdateManyWithWhereWithoutPosAccountInput = { - where: Prisma.OrderScalarWhereInput - data: Prisma.XOR -} - -export type OrderScalarWhereInput = { - AND?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] - OR?: Prisma.OrderScalarWhereInput[] - NOT?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[] - id?: Prisma.IntFilter<"Order"> | number - orderNumber?: Prisma.StringFilter<"Order"> | string - status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"Order"> | string | null - createdAt?: Prisma.DateTimeFilter<"Order"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Order"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Order"> | Date | string | null - customerId?: Prisma.IntNullableFilter<"Order"> | number | null - posAccountId?: Prisma.IntFilter<"Order"> | number -} - -export type OrderCreateWithoutOrderItemsInput = { - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customer?: Prisma.CustomerCreateNestedOneWithoutOrdersInput - posAccount: Prisma.PosAccountCreateNestedOneWithoutOrdersInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutOrderInput -} - -export type OrderUncheckedCreateWithoutOrderItemsInput = { - id?: number - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customerId?: number | null - posAccountId: number - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutOrderInput -} - -export type OrderCreateOrConnectWithoutOrderItemsInput = { - where: Prisma.OrderWhereUniqueInput - create: Prisma.XOR -} - -export type OrderUpsertWithoutOrderItemsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.OrderWhereInput -} - -export type OrderUpdateToOneWithWhereWithoutOrderItemsInput = { - where?: Prisma.OrderWhereInput - data: Prisma.XOR -} - -export type OrderUpdateWithoutOrderItemsInput = { - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customer?: Prisma.CustomerUpdateOneWithoutOrdersNestedInput - posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutOrdersNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutOrderNestedInput -} - -export type OrderUncheckedUpdateWithoutOrderItemsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutOrderNestedInput -} - -export type OrderCreateWithoutCustomerInput = { - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - posAccount: Prisma.PosAccountCreateNestedOneWithoutOrdersInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutOrderInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutOrderInput -} - -export type OrderUncheckedCreateWithoutCustomerInput = { - id?: number - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - posAccountId: number - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutOrderInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutOrderInput -} - -export type OrderCreateOrConnectWithoutCustomerInput = { - where: Prisma.OrderWhereUniqueInput - create: Prisma.XOR -} - -export type OrderCreateManyCustomerInputEnvelope = { - data: Prisma.OrderCreateManyCustomerInput | Prisma.OrderCreateManyCustomerInput[] - skipDuplicates?: boolean -} - -export type OrderUpsertWithWhereUniqueWithoutCustomerInput = { - where: Prisma.OrderWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type OrderUpdateWithWhereUniqueWithoutCustomerInput = { - where: Prisma.OrderWhereUniqueInput - data: Prisma.XOR -} - -export type OrderUpdateManyWithWhereWithoutCustomerInput = { - where: Prisma.OrderScalarWhereInput - data: Prisma.XOR -} - -export type OrderCreateWithoutStockReservationsInput = { - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customer?: Prisma.CustomerCreateNestedOneWithoutOrdersInput - posAccount: Prisma.PosAccountCreateNestedOneWithoutOrdersInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutOrderInput -} - -export type OrderUncheckedCreateWithoutStockReservationsInput = { - id?: number - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customerId?: number | null - posAccountId: number - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutOrderInput -} - -export type OrderCreateOrConnectWithoutStockReservationsInput = { - where: Prisma.OrderWhereUniqueInput - create: Prisma.XOR -} - -export type OrderUpsertWithoutStockReservationsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.OrderWhereInput -} - -export type OrderUpdateToOneWithWhereWithoutStockReservationsInput = { - where?: Prisma.OrderWhereInput - data: Prisma.XOR -} - -export type OrderUpdateWithoutStockReservationsInput = { - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customer?: Prisma.CustomerUpdateOneWithoutOrdersNestedInput - posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutOrdersNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutOrderNestedInput -} - -export type OrderUncheckedUpdateWithoutStockReservationsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutOrderNestedInput -} - -export type OrderCreateManyPosAccountInput = { - id?: number - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - customerId?: number | null -} - -export type OrderUpdateWithoutPosAccountInput = { - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customer?: Prisma.CustomerUpdateOneWithoutOrdersNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutOrderNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutOrderNestedInput -} - -export type OrderUncheckedUpdateWithoutPosAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutOrderNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutOrderNestedInput -} - -export type OrderUncheckedUpdateManyWithoutPosAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type OrderCreateManyCustomerInput = { - id?: number - orderNumber: string - status?: $Enums.OrderStatus - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - posAccountId: number -} - -export type OrderUpdateWithoutCustomerInput = { - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutOrdersNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutOrderNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutOrderNestedInput -} - -export type OrderUncheckedUpdateWithoutCustomerInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutOrderNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutOrderNestedInput -} - -export type OrderUncheckedUpdateManyWithoutCustomerInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - orderNumber?: Prisma.StringFieldUpdateOperationsInput | string - status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number -} - - -/** - * Count Type OrderCountOutputType - */ - -export type OrderCountOutputType = { - orderItems: number - stockReservations: number -} - -export type OrderCountOutputTypeSelect = { - orderItems?: boolean | OrderCountOutputTypeCountOrderItemsArgs - stockReservations?: boolean | OrderCountOutputTypeCountStockReservationsArgs -} - -/** - * OrderCountOutputType without action - */ -export type OrderCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the OrderCountOutputType - */ - select?: Prisma.OrderCountOutputTypeSelect | null -} - -/** - * OrderCountOutputType without action - */ -export type OrderCountOutputTypeCountOrderItemsArgs = { - where?: Prisma.OrderItemWhereInput -} - -/** - * OrderCountOutputType without action - */ -export type OrderCountOutputTypeCountStockReservationsArgs = { - where?: Prisma.StockReservationWhereInput -} - - -export type OrderSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - orderNumber?: boolean - status?: boolean - totalAmount?: boolean - description?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - customerId?: boolean - posAccountId?: boolean - customer?: boolean | Prisma.Order$customerArgs - posAccount?: boolean | Prisma.PosAccountDefaultArgs - orderItems?: boolean | Prisma.Order$orderItemsArgs - stockReservations?: boolean | Prisma.Order$stockReservationsArgs - _count?: boolean | Prisma.OrderCountOutputTypeDefaultArgs -}, ExtArgs["result"]["order"]> - - - -export type OrderSelectScalar = { - id?: boolean - orderNumber?: boolean - status?: boolean - totalAmount?: boolean - description?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - customerId?: boolean - posAccountId?: boolean -} - -export type OrderOmit = runtime.Types.Extensions.GetOmit<"id" | "orderNumber" | "status" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "deletedAt" | "customerId" | "posAccountId", ExtArgs["result"]["order"]> -export type OrderInclude = { - customer?: boolean | Prisma.Order$customerArgs - posAccount?: boolean | Prisma.PosAccountDefaultArgs - orderItems?: boolean | Prisma.Order$orderItemsArgs - stockReservations?: boolean | Prisma.Order$stockReservationsArgs - _count?: boolean | Prisma.OrderCountOutputTypeDefaultArgs -} - -export type $OrderPayload = { - name: "Order" - objects: { - customer: Prisma.$CustomerPayload | null - posAccount: Prisma.$PosAccountPayload - orderItems: Prisma.$OrderItemPayload[] - stockReservations: Prisma.$StockReservationPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - orderNumber: string - status: $Enums.OrderStatus - totalAmount: runtime.Decimal - description: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - customerId: number | null - posAccountId: number - }, ExtArgs["result"]["order"]> - composites: {} -} - -export type OrderGetPayload = runtime.Types.Result.GetResult - -export type OrderCountArgs = - Omit & { - select?: OrderCountAggregateInputType | true - } - -export interface OrderDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Order'], meta: { name: 'Order' } } - /** - * Find zero or one Order that matches the filter. - * @param {OrderFindUniqueArgs} args - Arguments to find a Order - * @example - * // Get one Order - * const order = await prisma.order.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Order that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {OrderFindUniqueOrThrowArgs} args - Arguments to find a Order - * @example - * // Get one Order - * const order = await prisma.order.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Order that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderFindFirstArgs} args - Arguments to find a Order - * @example - * // Get one Order - * const order = await prisma.order.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Order that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderFindFirstOrThrowArgs} args - Arguments to find a Order - * @example - * // Get one Order - * const order = await prisma.order.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Orders that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Orders - * const orders = await prisma.order.findMany() - * - * // Get first 10 Orders - * const orders = await prisma.order.findMany({ take: 10 }) - * - * // Only select the `id` - * const orderWithIdOnly = await prisma.order.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Order. - * @param {OrderCreateArgs} args - Arguments to create a Order. - * @example - * // Create one Order - * const Order = await prisma.order.create({ - * data: { - * // ... data to create a Order - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Orders. - * @param {OrderCreateManyArgs} args - Arguments to create many Orders. - * @example - * // Create many Orders - * const order = await prisma.order.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a Order. - * @param {OrderDeleteArgs} args - Arguments to delete one Order. - * @example - * // Delete one Order - * const Order = await prisma.order.delete({ - * where: { - * // ... filter to delete one Order - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Order. - * @param {OrderUpdateArgs} args - Arguments to update one Order. - * @example - * // Update one Order - * const order = await prisma.order.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Orders. - * @param {OrderDeleteManyArgs} args - Arguments to filter Orders to delete. - * @example - * // Delete a few Orders - * const { count } = await prisma.order.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Orders. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Orders - * const order = await prisma.order.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Order. - * @param {OrderUpsertArgs} args - Arguments to update or create a Order. - * @example - * // Update or create a Order - * const order = await prisma.order.upsert({ - * create: { - * // ... data to create a Order - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Order we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__OrderClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Orders. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderCountArgs} args - Arguments to filter Orders to count. - * @example - * // Count the number of Orders - * const count = await prisma.order.count({ - * where: { - * // ... the filter for the Orders we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Order. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by Order. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends OrderGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: OrderGroupByArgs['orderBy'] } - : { orderBy?: OrderGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetOrderGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Order model - */ -readonly fields: OrderFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for Order. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__OrderClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - customer = {}>(args?: Prisma.Subset>): Prisma.Prisma__CustomerClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - posAccount = {}>(args?: Prisma.Subset>): Prisma.Prisma__PosAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - orderItems = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockReservations = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the Order model - */ -export interface OrderFieldRefs { - readonly id: Prisma.FieldRef<"Order", 'Int'> - readonly orderNumber: Prisma.FieldRef<"Order", 'String'> - readonly status: Prisma.FieldRef<"Order", 'OrderStatus'> - readonly totalAmount: Prisma.FieldRef<"Order", 'Decimal'> - readonly description: Prisma.FieldRef<"Order", 'String'> - readonly createdAt: Prisma.FieldRef<"Order", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Order", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"Order", 'DateTime'> - readonly customerId: Prisma.FieldRef<"Order", 'Int'> - readonly posAccountId: Prisma.FieldRef<"Order", 'Int'> -} - - -// Custom InputTypes -/** - * Order findUnique - */ -export type OrderFindUniqueArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - /** - * Filter, which Order to fetch. - */ - where: Prisma.OrderWhereUniqueInput -} - -/** - * Order findUniqueOrThrow - */ -export type OrderFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - /** - * Filter, which Order to fetch. - */ - where: Prisma.OrderWhereUniqueInput -} - -/** - * Order findFirst - */ -export type OrderFindFirstArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - /** - * Filter, which Order to fetch. - */ - where?: Prisma.OrderWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Orders to fetch. - */ - orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Orders. - */ - cursor?: Prisma.OrderWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Orders from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Orders. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Orders. - */ - distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] -} - -/** - * Order findFirstOrThrow - */ -export type OrderFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - /** - * Filter, which Order to fetch. - */ - where?: Prisma.OrderWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Orders to fetch. - */ - orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Orders. - */ - cursor?: Prisma.OrderWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Orders from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Orders. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Orders. - */ - distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] -} - -/** - * Order findMany - */ -export type OrderFindManyArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - /** - * Filter, which Orders to fetch. - */ - where?: Prisma.OrderWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Orders to fetch. - */ - orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Orders. - */ - cursor?: Prisma.OrderWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Orders from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Orders. - */ - skip?: number - distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] -} - -/** - * Order create - */ -export type OrderCreateArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - /** - * The data needed to create a Order. - */ - data: Prisma.XOR -} - -/** - * Order createMany - */ -export type OrderCreateManyArgs = { - /** - * The data used to create many Orders. - */ - data: Prisma.OrderCreateManyInput | Prisma.OrderCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Order update - */ -export type OrderUpdateArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - /** - * The data needed to update a Order. - */ - data: Prisma.XOR - /** - * Choose, which Order to update. - */ - where: Prisma.OrderWhereUniqueInput -} - -/** - * Order updateMany - */ -export type OrderUpdateManyArgs = { - /** - * The data used to update Orders. - */ - data: Prisma.XOR - /** - * Filter which Orders to update - */ - where?: Prisma.OrderWhereInput - /** - * Limit how many Orders to update. - */ - limit?: number -} - -/** - * Order upsert - */ -export type OrderUpsertArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - /** - * The filter to search for the Order to update in case it exists. - */ - where: Prisma.OrderWhereUniqueInput - /** - * In case the Order found by the `where` argument doesn't exist, create a new Order with this data. - */ - create: Prisma.XOR - /** - * In case the Order was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * Order delete - */ -export type OrderDeleteArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - /** - * Filter which Order to delete. - */ - where: Prisma.OrderWhereUniqueInput -} - -/** - * Order deleteMany - */ -export type OrderDeleteManyArgs = { - /** - * Filter which Orders to delete - */ - where?: Prisma.OrderWhereInput - /** - * Limit how many Orders to delete. - */ - limit?: number -} - -/** - * Order.customer - */ -export type Order$customerArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: Prisma.CustomerSelect | null - /** - * Omit specific fields from the Customer - */ - omit?: Prisma.CustomerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.CustomerInclude | null - where?: Prisma.CustomerWhereInput -} - -/** - * Order.orderItems - */ -export type Order$orderItemsArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - where?: Prisma.OrderItemWhereInput - orderBy?: Prisma.OrderItemOrderByWithRelationInput | Prisma.OrderItemOrderByWithRelationInput[] - cursor?: Prisma.OrderItemWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.OrderItemScalarFieldEnum | Prisma.OrderItemScalarFieldEnum[] -} - -/** - * Order.stockReservations - */ -export type Order$stockReservationsArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - where?: Prisma.StockReservationWhereInput - orderBy?: Prisma.StockReservationOrderByWithRelationInput | Prisma.StockReservationOrderByWithRelationInput[] - cursor?: Prisma.StockReservationWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockReservationScalarFieldEnum | Prisma.StockReservationScalarFieldEnum[] -} - -/** - * Order without action - */ -export type OrderDefaultArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null -} diff --git a/src/generated/prisma/models/OrderItem.ts b/src/generated/prisma/models/OrderItem.ts deleted file mode 100644 index dc0bafd..0000000 --- a/src/generated/prisma/models/OrderItem.ts +++ /dev/null @@ -1,1472 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `OrderItem` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model OrderItem - * - */ -export type OrderItemModel = runtime.Types.Result.DefaultSelection - -export type AggregateOrderItem = { - _count: OrderItemCountAggregateOutputType | null - _avg: OrderItemAvgAggregateOutputType | null - _sum: OrderItemSumAggregateOutputType | null - _min: OrderItemMinAggregateOutputType | null - _max: OrderItemMaxAggregateOutputType | null -} - -export type OrderItemAvgAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalAmount: runtime.Decimal | null - orderId: number | null - productId: number | null -} - -export type OrderItemSumAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalAmount: runtime.Decimal | null - orderId: number | null - productId: number | null -} - -export type OrderItemMinAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalAmount: runtime.Decimal | null - createdAt: Date | null - orderId: number | null - productId: number | null -} - -export type OrderItemMaxAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalAmount: runtime.Decimal | null - createdAt: Date | null - orderId: number | null - productId: number | null -} - -export type OrderItemCountAggregateOutputType = { - id: number - quantity: number - unitPrice: number - totalAmount: number - createdAt: number - orderId: number - productId: number - _all: number -} - - -export type OrderItemAvgAggregateInputType = { - id?: true - quantity?: true - unitPrice?: true - totalAmount?: true - orderId?: true - productId?: true -} - -export type OrderItemSumAggregateInputType = { - id?: true - quantity?: true - unitPrice?: true - totalAmount?: true - orderId?: true - productId?: true -} - -export type OrderItemMinAggregateInputType = { - id?: true - quantity?: true - unitPrice?: true - totalAmount?: true - createdAt?: true - orderId?: true - productId?: true -} - -export type OrderItemMaxAggregateInputType = { - id?: true - quantity?: true - unitPrice?: true - totalAmount?: true - createdAt?: true - orderId?: true - productId?: true -} - -export type OrderItemCountAggregateInputType = { - id?: true - quantity?: true - unitPrice?: true - totalAmount?: true - createdAt?: true - orderId?: true - productId?: true - _all?: true -} - -export type OrderItemAggregateArgs = { - /** - * Filter which OrderItem to aggregate. - */ - where?: Prisma.OrderItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of OrderItems to fetch. - */ - orderBy?: Prisma.OrderItemOrderByWithRelationInput | Prisma.OrderItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.OrderItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` OrderItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` OrderItems. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned OrderItems - **/ - _count?: true | OrderItemCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: OrderItemAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: OrderItemSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: OrderItemMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: OrderItemMaxAggregateInputType -} - -export type GetOrderItemAggregateType = { - [P in keyof T & keyof AggregateOrderItem]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type OrderItemGroupByArgs = { - where?: Prisma.OrderItemWhereInput - orderBy?: Prisma.OrderItemOrderByWithAggregationInput | Prisma.OrderItemOrderByWithAggregationInput[] - by: Prisma.OrderItemScalarFieldEnum[] | Prisma.OrderItemScalarFieldEnum - having?: Prisma.OrderItemScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: OrderItemCountAggregateInputType | true - _avg?: OrderItemAvgAggregateInputType - _sum?: OrderItemSumAggregateInputType - _min?: OrderItemMinAggregateInputType - _max?: OrderItemMaxAggregateInputType -} - -export type OrderItemGroupByOutputType = { - id: number - quantity: runtime.Decimal - unitPrice: runtime.Decimal - totalAmount: runtime.Decimal - createdAt: Date - orderId: number - productId: number - _count: OrderItemCountAggregateOutputType | null - _avg: OrderItemAvgAggregateOutputType | null - _sum: OrderItemSumAggregateOutputType | null - _min: OrderItemMinAggregateOutputType | null - _max: OrderItemMaxAggregateOutputType | null -} - -type GetOrderItemGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof OrderItemGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type OrderItemWhereInput = { - AND?: Prisma.OrderItemWhereInput | Prisma.OrderItemWhereInput[] - OR?: Prisma.OrderItemWhereInput[] - NOT?: Prisma.OrderItemWhereInput | Prisma.OrderItemWhereInput[] - id?: Prisma.IntFilter<"OrderItem"> | number - quantity?: Prisma.DecimalFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"OrderItem"> | Date | string - orderId?: Prisma.IntFilter<"OrderItem"> | number - productId?: Prisma.IntFilter<"OrderItem"> | number - order?: Prisma.XOR - product?: Prisma.XOR -} - -export type OrderItemOrderByWithRelationInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - orderId?: Prisma.SortOrder - productId?: Prisma.SortOrder - order?: Prisma.OrderOrderByWithRelationInput - product?: Prisma.ProductOrderByWithRelationInput -} - -export type OrderItemWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.OrderItemWhereInput | Prisma.OrderItemWhereInput[] - OR?: Prisma.OrderItemWhereInput[] - NOT?: Prisma.OrderItemWhereInput | Prisma.OrderItemWhereInput[] - quantity?: Prisma.DecimalFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"OrderItem"> | Date | string - orderId?: Prisma.IntFilter<"OrderItem"> | number - productId?: Prisma.IntFilter<"OrderItem"> | number - order?: Prisma.XOR - product?: Prisma.XOR -}, "id"> - -export type OrderItemOrderByWithAggregationInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - orderId?: Prisma.SortOrder - productId?: Prisma.SortOrder - _count?: Prisma.OrderItemCountOrderByAggregateInput - _avg?: Prisma.OrderItemAvgOrderByAggregateInput - _max?: Prisma.OrderItemMaxOrderByAggregateInput - _min?: Prisma.OrderItemMinOrderByAggregateInput - _sum?: Prisma.OrderItemSumOrderByAggregateInput -} - -export type OrderItemScalarWhereWithAggregatesInput = { - AND?: Prisma.OrderItemScalarWhereWithAggregatesInput | Prisma.OrderItemScalarWhereWithAggregatesInput[] - OR?: Prisma.OrderItemScalarWhereWithAggregatesInput[] - NOT?: Prisma.OrderItemScalarWhereWithAggregatesInput | Prisma.OrderItemScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"OrderItem"> | number - quantity?: Prisma.DecimalWithAggregatesFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalWithAggregatesFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalWithAggregatesFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"OrderItem"> | Date | string - orderId?: Prisma.IntWithAggregatesFilter<"OrderItem"> | number - productId?: Prisma.IntWithAggregatesFilter<"OrderItem"> | number -} - -export type OrderItemCreateInput = { - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - order: Prisma.OrderCreateNestedOneWithoutOrderItemsInput - product: Prisma.ProductCreateNestedOneWithoutOrderItemsInput -} - -export type OrderItemUncheckedCreateInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - orderId: number - productId: number -} - -export type OrderItemUpdateInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - order?: Prisma.OrderUpdateOneRequiredWithoutOrderItemsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutOrderItemsNestedInput -} - -export type OrderItemUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - orderId?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type OrderItemCreateManyInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - orderId: number - productId: number -} - -export type OrderItemUpdateManyMutationInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type OrderItemUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - orderId?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type OrderItemListRelationFilter = { - every?: Prisma.OrderItemWhereInput - some?: Prisma.OrderItemWhereInput - none?: Prisma.OrderItemWhereInput -} - -export type OrderItemOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type OrderItemCountOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - orderId?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type OrderItemAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - orderId?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type OrderItemMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - orderId?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type OrderItemMinOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - orderId?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type OrderItemSumOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - orderId?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type OrderItemCreateNestedManyWithoutOrderInput = { - create?: Prisma.XOR | Prisma.OrderItemCreateWithoutOrderInput[] | Prisma.OrderItemUncheckedCreateWithoutOrderInput[] - connectOrCreate?: Prisma.OrderItemCreateOrConnectWithoutOrderInput | Prisma.OrderItemCreateOrConnectWithoutOrderInput[] - createMany?: Prisma.OrderItemCreateManyOrderInputEnvelope - connect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] -} - -export type OrderItemUncheckedCreateNestedManyWithoutOrderInput = { - create?: Prisma.XOR | Prisma.OrderItemCreateWithoutOrderInput[] | Prisma.OrderItemUncheckedCreateWithoutOrderInput[] - connectOrCreate?: Prisma.OrderItemCreateOrConnectWithoutOrderInput | Prisma.OrderItemCreateOrConnectWithoutOrderInput[] - createMany?: Prisma.OrderItemCreateManyOrderInputEnvelope - connect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] -} - -export type OrderItemUpdateManyWithoutOrderNestedInput = { - create?: Prisma.XOR | Prisma.OrderItemCreateWithoutOrderInput[] | Prisma.OrderItemUncheckedCreateWithoutOrderInput[] - connectOrCreate?: Prisma.OrderItemCreateOrConnectWithoutOrderInput | Prisma.OrderItemCreateOrConnectWithoutOrderInput[] - upsert?: Prisma.OrderItemUpsertWithWhereUniqueWithoutOrderInput | Prisma.OrderItemUpsertWithWhereUniqueWithoutOrderInput[] - createMany?: Prisma.OrderItemCreateManyOrderInputEnvelope - set?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - disconnect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - delete?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - connect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - update?: Prisma.OrderItemUpdateWithWhereUniqueWithoutOrderInput | Prisma.OrderItemUpdateWithWhereUniqueWithoutOrderInput[] - updateMany?: Prisma.OrderItemUpdateManyWithWhereWithoutOrderInput | Prisma.OrderItemUpdateManyWithWhereWithoutOrderInput[] - deleteMany?: Prisma.OrderItemScalarWhereInput | Prisma.OrderItemScalarWhereInput[] -} - -export type OrderItemUncheckedUpdateManyWithoutOrderNestedInput = { - create?: Prisma.XOR | Prisma.OrderItemCreateWithoutOrderInput[] | Prisma.OrderItemUncheckedCreateWithoutOrderInput[] - connectOrCreate?: Prisma.OrderItemCreateOrConnectWithoutOrderInput | Prisma.OrderItemCreateOrConnectWithoutOrderInput[] - upsert?: Prisma.OrderItemUpsertWithWhereUniqueWithoutOrderInput | Prisma.OrderItemUpsertWithWhereUniqueWithoutOrderInput[] - createMany?: Prisma.OrderItemCreateManyOrderInputEnvelope - set?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - disconnect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - delete?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - connect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - update?: Prisma.OrderItemUpdateWithWhereUniqueWithoutOrderInput | Prisma.OrderItemUpdateWithWhereUniqueWithoutOrderInput[] - updateMany?: Prisma.OrderItemUpdateManyWithWhereWithoutOrderInput | Prisma.OrderItemUpdateManyWithWhereWithoutOrderInput[] - deleteMany?: Prisma.OrderItemScalarWhereInput | Prisma.OrderItemScalarWhereInput[] -} - -export type OrderItemCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.OrderItemCreateWithoutProductInput[] | Prisma.OrderItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.OrderItemCreateOrConnectWithoutProductInput | Prisma.OrderItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.OrderItemCreateManyProductInputEnvelope - connect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] -} - -export type OrderItemUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.OrderItemCreateWithoutProductInput[] | Prisma.OrderItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.OrderItemCreateOrConnectWithoutProductInput | Prisma.OrderItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.OrderItemCreateManyProductInputEnvelope - connect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] -} - -export type OrderItemUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.OrderItemCreateWithoutProductInput[] | Prisma.OrderItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.OrderItemCreateOrConnectWithoutProductInput | Prisma.OrderItemCreateOrConnectWithoutProductInput[] - upsert?: Prisma.OrderItemUpsertWithWhereUniqueWithoutProductInput | Prisma.OrderItemUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.OrderItemCreateManyProductInputEnvelope - set?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - disconnect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - delete?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - connect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - update?: Prisma.OrderItemUpdateWithWhereUniqueWithoutProductInput | Prisma.OrderItemUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.OrderItemUpdateManyWithWhereWithoutProductInput | Prisma.OrderItemUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.OrderItemScalarWhereInput | Prisma.OrderItemScalarWhereInput[] -} - -export type OrderItemUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.OrderItemCreateWithoutProductInput[] | Prisma.OrderItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.OrderItemCreateOrConnectWithoutProductInput | Prisma.OrderItemCreateOrConnectWithoutProductInput[] - upsert?: Prisma.OrderItemUpsertWithWhereUniqueWithoutProductInput | Prisma.OrderItemUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.OrderItemCreateManyProductInputEnvelope - set?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - disconnect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - delete?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - connect?: Prisma.OrderItemWhereUniqueInput | Prisma.OrderItemWhereUniqueInput[] - update?: Prisma.OrderItemUpdateWithWhereUniqueWithoutProductInput | Prisma.OrderItemUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.OrderItemUpdateManyWithWhereWithoutProductInput | Prisma.OrderItemUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.OrderItemScalarWhereInput | Prisma.OrderItemScalarWhereInput[] -} - -export type OrderItemCreateWithoutOrderInput = { - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - product: Prisma.ProductCreateNestedOneWithoutOrderItemsInput -} - -export type OrderItemUncheckedCreateWithoutOrderInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number -} - -export type OrderItemCreateOrConnectWithoutOrderInput = { - where: Prisma.OrderItemWhereUniqueInput - create: Prisma.XOR -} - -export type OrderItemCreateManyOrderInputEnvelope = { - data: Prisma.OrderItemCreateManyOrderInput | Prisma.OrderItemCreateManyOrderInput[] - skipDuplicates?: boolean -} - -export type OrderItemUpsertWithWhereUniqueWithoutOrderInput = { - where: Prisma.OrderItemWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type OrderItemUpdateWithWhereUniqueWithoutOrderInput = { - where: Prisma.OrderItemWhereUniqueInput - data: Prisma.XOR -} - -export type OrderItemUpdateManyWithWhereWithoutOrderInput = { - where: Prisma.OrderItemScalarWhereInput - data: Prisma.XOR -} - -export type OrderItemScalarWhereInput = { - AND?: Prisma.OrderItemScalarWhereInput | Prisma.OrderItemScalarWhereInput[] - OR?: Prisma.OrderItemScalarWhereInput[] - NOT?: Prisma.OrderItemScalarWhereInput | Prisma.OrderItemScalarWhereInput[] - id?: Prisma.IntFilter<"OrderItem"> | number - quantity?: Prisma.DecimalFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFilter<"OrderItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"OrderItem"> | Date | string - orderId?: Prisma.IntFilter<"OrderItem"> | number - productId?: Prisma.IntFilter<"OrderItem"> | number -} - -export type OrderItemCreateWithoutProductInput = { - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - order: Prisma.OrderCreateNestedOneWithoutOrderItemsInput -} - -export type OrderItemUncheckedCreateWithoutProductInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - orderId: number -} - -export type OrderItemCreateOrConnectWithoutProductInput = { - where: Prisma.OrderItemWhereUniqueInput - create: Prisma.XOR -} - -export type OrderItemCreateManyProductInputEnvelope = { - data: Prisma.OrderItemCreateManyProductInput | Prisma.OrderItemCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type OrderItemUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.OrderItemWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type OrderItemUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.OrderItemWhereUniqueInput - data: Prisma.XOR -} - -export type OrderItemUpdateManyWithWhereWithoutProductInput = { - where: Prisma.OrderItemScalarWhereInput - data: Prisma.XOR -} - -export type OrderItemCreateManyOrderInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number -} - -export type OrderItemUpdateWithoutOrderInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - product?: Prisma.ProductUpdateOneRequiredWithoutOrderItemsNestedInput -} - -export type OrderItemUncheckedUpdateWithoutOrderInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type OrderItemUncheckedUpdateManyWithoutOrderInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type OrderItemCreateManyProductInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - orderId: number -} - -export type OrderItemUpdateWithoutProductInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - order?: Prisma.OrderUpdateOneRequiredWithoutOrderItemsNestedInput -} - -export type OrderItemUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - orderId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type OrderItemUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - orderId?: Prisma.IntFieldUpdateOperationsInput | number -} - - - -export type OrderItemSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - quantity?: boolean - unitPrice?: boolean - totalAmount?: boolean - createdAt?: boolean - orderId?: boolean - productId?: boolean - order?: boolean | Prisma.OrderDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs -}, ExtArgs["result"]["orderItem"]> - - - -export type OrderItemSelectScalar = { - id?: boolean - quantity?: boolean - unitPrice?: boolean - totalAmount?: boolean - createdAt?: boolean - orderId?: boolean - productId?: boolean -} - -export type OrderItemOmit = runtime.Types.Extensions.GetOmit<"id" | "quantity" | "unitPrice" | "totalAmount" | "createdAt" | "orderId" | "productId", ExtArgs["result"]["orderItem"]> -export type OrderItemInclude = { - order?: boolean | Prisma.OrderDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs -} - -export type $OrderItemPayload = { - name: "OrderItem" - objects: { - order: Prisma.$OrderPayload - product: Prisma.$ProductPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - quantity: runtime.Decimal - unitPrice: runtime.Decimal - totalAmount: runtime.Decimal - createdAt: Date - orderId: number - productId: number - }, ExtArgs["result"]["orderItem"]> - composites: {} -} - -export type OrderItemGetPayload = runtime.Types.Result.GetResult - -export type OrderItemCountArgs = - Omit & { - select?: OrderItemCountAggregateInputType | true - } - -export interface OrderItemDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['OrderItem'], meta: { name: 'OrderItem' } } - /** - * Find zero or one OrderItem that matches the filter. - * @param {OrderItemFindUniqueArgs} args - Arguments to find a OrderItem - * @example - * // Get one OrderItem - * const orderItem = await prisma.orderItem.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__OrderItemClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one OrderItem that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {OrderItemFindUniqueOrThrowArgs} args - Arguments to find a OrderItem - * @example - * // Get one OrderItem - * const orderItem = await prisma.orderItem.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__OrderItemClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first OrderItem that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderItemFindFirstArgs} args - Arguments to find a OrderItem - * @example - * // Get one OrderItem - * const orderItem = await prisma.orderItem.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__OrderItemClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first OrderItem that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderItemFindFirstOrThrowArgs} args - Arguments to find a OrderItem - * @example - * // Get one OrderItem - * const orderItem = await prisma.orderItem.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__OrderItemClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more OrderItems that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderItemFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all OrderItems - * const orderItems = await prisma.orderItem.findMany() - * - * // Get first 10 OrderItems - * const orderItems = await prisma.orderItem.findMany({ take: 10 }) - * - * // Only select the `id` - * const orderItemWithIdOnly = await prisma.orderItem.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a OrderItem. - * @param {OrderItemCreateArgs} args - Arguments to create a OrderItem. - * @example - * // Create one OrderItem - * const OrderItem = await prisma.orderItem.create({ - * data: { - * // ... data to create a OrderItem - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__OrderItemClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many OrderItems. - * @param {OrderItemCreateManyArgs} args - Arguments to create many OrderItems. - * @example - * // Create many OrderItems - * const orderItem = await prisma.orderItem.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a OrderItem. - * @param {OrderItemDeleteArgs} args - Arguments to delete one OrderItem. - * @example - * // Delete one OrderItem - * const OrderItem = await prisma.orderItem.delete({ - * where: { - * // ... filter to delete one OrderItem - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__OrderItemClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one OrderItem. - * @param {OrderItemUpdateArgs} args - Arguments to update one OrderItem. - * @example - * // Update one OrderItem - * const orderItem = await prisma.orderItem.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__OrderItemClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more OrderItems. - * @param {OrderItemDeleteManyArgs} args - Arguments to filter OrderItems to delete. - * @example - * // Delete a few OrderItems - * const { count } = await prisma.orderItem.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more OrderItems. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderItemUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many OrderItems - * const orderItem = await prisma.orderItem.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one OrderItem. - * @param {OrderItemUpsertArgs} args - Arguments to update or create a OrderItem. - * @example - * // Update or create a OrderItem - * const orderItem = await prisma.orderItem.upsert({ - * create: { - * // ... data to create a OrderItem - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the OrderItem we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__OrderItemClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of OrderItems. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderItemCountArgs} args - Arguments to filter OrderItems to count. - * @example - * // Count the number of OrderItems - * const count = await prisma.orderItem.count({ - * where: { - * // ... the filter for the OrderItems we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a OrderItem. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderItemAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by OrderItem. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OrderItemGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends OrderItemGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: OrderItemGroupByArgs['orderBy'] } - : { orderBy?: OrderItemGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetOrderItemGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the OrderItem model - */ -readonly fields: OrderItemFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for OrderItem. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__OrderItemClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - order = {}>(args?: Prisma.Subset>): Prisma.Prisma__OrderClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the OrderItem model - */ -export interface OrderItemFieldRefs { - readonly id: Prisma.FieldRef<"OrderItem", 'Int'> - readonly quantity: Prisma.FieldRef<"OrderItem", 'Decimal'> - readonly unitPrice: Prisma.FieldRef<"OrderItem", 'Decimal'> - readonly totalAmount: Prisma.FieldRef<"OrderItem", 'Decimal'> - readonly createdAt: Prisma.FieldRef<"OrderItem", 'DateTime'> - readonly orderId: Prisma.FieldRef<"OrderItem", 'Int'> - readonly productId: Prisma.FieldRef<"OrderItem", 'Int'> -} - - -// Custom InputTypes -/** - * OrderItem findUnique - */ -export type OrderItemFindUniqueArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - /** - * Filter, which OrderItem to fetch. - */ - where: Prisma.OrderItemWhereUniqueInput -} - -/** - * OrderItem findUniqueOrThrow - */ -export type OrderItemFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - /** - * Filter, which OrderItem to fetch. - */ - where: Prisma.OrderItemWhereUniqueInput -} - -/** - * OrderItem findFirst - */ -export type OrderItemFindFirstArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - /** - * Filter, which OrderItem to fetch. - */ - where?: Prisma.OrderItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of OrderItems to fetch. - */ - orderBy?: Prisma.OrderItemOrderByWithRelationInput | Prisma.OrderItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for OrderItems. - */ - cursor?: Prisma.OrderItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` OrderItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` OrderItems. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of OrderItems. - */ - distinct?: Prisma.OrderItemScalarFieldEnum | Prisma.OrderItemScalarFieldEnum[] -} - -/** - * OrderItem findFirstOrThrow - */ -export type OrderItemFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - /** - * Filter, which OrderItem to fetch. - */ - where?: Prisma.OrderItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of OrderItems to fetch. - */ - orderBy?: Prisma.OrderItemOrderByWithRelationInput | Prisma.OrderItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for OrderItems. - */ - cursor?: Prisma.OrderItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` OrderItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` OrderItems. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of OrderItems. - */ - distinct?: Prisma.OrderItemScalarFieldEnum | Prisma.OrderItemScalarFieldEnum[] -} - -/** - * OrderItem findMany - */ -export type OrderItemFindManyArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - /** - * Filter, which OrderItems to fetch. - */ - where?: Prisma.OrderItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of OrderItems to fetch. - */ - orderBy?: Prisma.OrderItemOrderByWithRelationInput | Prisma.OrderItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing OrderItems. - */ - cursor?: Prisma.OrderItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` OrderItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` OrderItems. - */ - skip?: number - distinct?: Prisma.OrderItemScalarFieldEnum | Prisma.OrderItemScalarFieldEnum[] -} - -/** - * OrderItem create - */ -export type OrderItemCreateArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - /** - * The data needed to create a OrderItem. - */ - data: Prisma.XOR -} - -/** - * OrderItem createMany - */ -export type OrderItemCreateManyArgs = { - /** - * The data used to create many OrderItems. - */ - data: Prisma.OrderItemCreateManyInput | Prisma.OrderItemCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * OrderItem update - */ -export type OrderItemUpdateArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - /** - * The data needed to update a OrderItem. - */ - data: Prisma.XOR - /** - * Choose, which OrderItem to update. - */ - where: Prisma.OrderItemWhereUniqueInput -} - -/** - * OrderItem updateMany - */ -export type OrderItemUpdateManyArgs = { - /** - * The data used to update OrderItems. - */ - data: Prisma.XOR - /** - * Filter which OrderItems to update - */ - where?: Prisma.OrderItemWhereInput - /** - * Limit how many OrderItems to update. - */ - limit?: number -} - -/** - * OrderItem upsert - */ -export type OrderItemUpsertArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - /** - * The filter to search for the OrderItem to update in case it exists. - */ - where: Prisma.OrderItemWhereUniqueInput - /** - * In case the OrderItem found by the `where` argument doesn't exist, create a new OrderItem with this data. - */ - create: Prisma.XOR - /** - * In case the OrderItem was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * OrderItem delete - */ -export type OrderItemDeleteArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - /** - * Filter which OrderItem to delete. - */ - where: Prisma.OrderItemWhereUniqueInput -} - -/** - * OrderItem deleteMany - */ -export type OrderItemDeleteManyArgs = { - /** - * Filter which OrderItems to delete - */ - where?: Prisma.OrderItemWhereInput - /** - * Limit how many OrderItems to delete. - */ - limit?: number -} - -/** - * OrderItem without action - */ -export type OrderItemDefaultArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null -} diff --git a/src/generated/prisma/models/OtpCode.ts b/src/generated/prisma/models/OtpCode.ts deleted file mode 100644 index bd53074..0000000 --- a/src/generated/prisma/models/OtpCode.ts +++ /dev/null @@ -1,1109 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `OtpCode` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model OtpCode - * - */ -export type OtpCodeModel = runtime.Types.Result.DefaultSelection - -export type AggregateOtpCode = { - _count: OtpCodeCountAggregateOutputType | null - _avg: OtpCodeAvgAggregateOutputType | null - _sum: OtpCodeSumAggregateOutputType | null - _min: OtpCodeMinAggregateOutputType | null - _max: OtpCodeMaxAggregateOutputType | null -} - -export type OtpCodeAvgAggregateOutputType = { - id: number | null -} - -export type OtpCodeSumAggregateOutputType = { - id: number | null -} - -export type OtpCodeMinAggregateOutputType = { - id: number | null - mobileNumber: string | null - code: string | null - used: boolean | null - expiresAt: Date | null - createdAt: Date | null -} - -export type OtpCodeMaxAggregateOutputType = { - id: number | null - mobileNumber: string | null - code: string | null - used: boolean | null - expiresAt: Date | null - createdAt: Date | null -} - -export type OtpCodeCountAggregateOutputType = { - id: number - mobileNumber: number - code: number - used: number - expiresAt: number - createdAt: number - _all: number -} - - -export type OtpCodeAvgAggregateInputType = { - id?: true -} - -export type OtpCodeSumAggregateInputType = { - id?: true -} - -export type OtpCodeMinAggregateInputType = { - id?: true - mobileNumber?: true - code?: true - used?: true - expiresAt?: true - createdAt?: true -} - -export type OtpCodeMaxAggregateInputType = { - id?: true - mobileNumber?: true - code?: true - used?: true - expiresAt?: true - createdAt?: true -} - -export type OtpCodeCountAggregateInputType = { - id?: true - mobileNumber?: true - code?: true - used?: true - expiresAt?: true - createdAt?: true - _all?: true -} - -export type OtpCodeAggregateArgs = { - /** - * Filter which OtpCode to aggregate. - */ - where?: Prisma.OtpCodeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of OtpCodes to fetch. - */ - orderBy?: Prisma.OtpCodeOrderByWithRelationInput | Prisma.OtpCodeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.OtpCodeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` OtpCodes from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` OtpCodes. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned OtpCodes - **/ - _count?: true | OtpCodeCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: OtpCodeAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: OtpCodeSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: OtpCodeMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: OtpCodeMaxAggregateInputType -} - -export type GetOtpCodeAggregateType = { - [P in keyof T & keyof AggregateOtpCode]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type OtpCodeGroupByArgs = { - where?: Prisma.OtpCodeWhereInput - orderBy?: Prisma.OtpCodeOrderByWithAggregationInput | Prisma.OtpCodeOrderByWithAggregationInput[] - by: Prisma.OtpCodeScalarFieldEnum[] | Prisma.OtpCodeScalarFieldEnum - having?: Prisma.OtpCodeScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: OtpCodeCountAggregateInputType | true - _avg?: OtpCodeAvgAggregateInputType - _sum?: OtpCodeSumAggregateInputType - _min?: OtpCodeMinAggregateInputType - _max?: OtpCodeMaxAggregateInputType -} - -export type OtpCodeGroupByOutputType = { - id: number - mobileNumber: string - code: string - used: boolean - expiresAt: Date - createdAt: Date - _count: OtpCodeCountAggregateOutputType | null - _avg: OtpCodeAvgAggregateOutputType | null - _sum: OtpCodeSumAggregateOutputType | null - _min: OtpCodeMinAggregateOutputType | null - _max: OtpCodeMaxAggregateOutputType | null -} - -type GetOtpCodeGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof OtpCodeGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type OtpCodeWhereInput = { - AND?: Prisma.OtpCodeWhereInput | Prisma.OtpCodeWhereInput[] - OR?: Prisma.OtpCodeWhereInput[] - NOT?: Prisma.OtpCodeWhereInput | Prisma.OtpCodeWhereInput[] - id?: Prisma.IntFilter<"OtpCode"> | number - mobileNumber?: Prisma.StringFilter<"OtpCode"> | string - code?: Prisma.StringFilter<"OtpCode"> | string - used?: Prisma.BoolFilter<"OtpCode"> | boolean - expiresAt?: Prisma.DateTimeFilter<"OtpCode"> | Date | string - createdAt?: Prisma.DateTimeFilter<"OtpCode"> | Date | string -} - -export type OtpCodeOrderByWithRelationInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - code?: Prisma.SortOrder - used?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - _relevance?: Prisma.OtpCodeOrderByRelevanceInput -} - -export type OtpCodeWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.OtpCodeWhereInput | Prisma.OtpCodeWhereInput[] - OR?: Prisma.OtpCodeWhereInput[] - NOT?: Prisma.OtpCodeWhereInput | Prisma.OtpCodeWhereInput[] - mobileNumber?: Prisma.StringFilter<"OtpCode"> | string - code?: Prisma.StringFilter<"OtpCode"> | string - used?: Prisma.BoolFilter<"OtpCode"> | boolean - expiresAt?: Prisma.DateTimeFilter<"OtpCode"> | Date | string - createdAt?: Prisma.DateTimeFilter<"OtpCode"> | Date | string -}, "id"> - -export type OtpCodeOrderByWithAggregationInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - code?: Prisma.SortOrder - used?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - _count?: Prisma.OtpCodeCountOrderByAggregateInput - _avg?: Prisma.OtpCodeAvgOrderByAggregateInput - _max?: Prisma.OtpCodeMaxOrderByAggregateInput - _min?: Prisma.OtpCodeMinOrderByAggregateInput - _sum?: Prisma.OtpCodeSumOrderByAggregateInput -} - -export type OtpCodeScalarWhereWithAggregatesInput = { - AND?: Prisma.OtpCodeScalarWhereWithAggregatesInput | Prisma.OtpCodeScalarWhereWithAggregatesInput[] - OR?: Prisma.OtpCodeScalarWhereWithAggregatesInput[] - NOT?: Prisma.OtpCodeScalarWhereWithAggregatesInput | Prisma.OtpCodeScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"OtpCode"> | number - mobileNumber?: Prisma.StringWithAggregatesFilter<"OtpCode"> | string - code?: Prisma.StringWithAggregatesFilter<"OtpCode"> | string - used?: Prisma.BoolWithAggregatesFilter<"OtpCode"> | boolean - expiresAt?: Prisma.DateTimeWithAggregatesFilter<"OtpCode"> | Date | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"OtpCode"> | Date | string -} - -export type OtpCodeCreateInput = { - mobileNumber: string - code: string - used?: boolean - expiresAt: Date | string - createdAt?: Date | string -} - -export type OtpCodeUncheckedCreateInput = { - id?: number - mobileNumber: string - code: string - used?: boolean - expiresAt: Date | string - createdAt?: Date | string -} - -export type OtpCodeUpdateInput = { - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - used?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type OtpCodeUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - used?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type OtpCodeCreateManyInput = { - id?: number - mobileNumber: string - code: string - used?: boolean - expiresAt: Date | string - createdAt?: Date | string -} - -export type OtpCodeUpdateManyMutationInput = { - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - used?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type OtpCodeUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - used?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type OtpCodeOrderByRelevanceInput = { - fields: Prisma.OtpCodeOrderByRelevanceFieldEnum | Prisma.OtpCodeOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type OtpCodeCountOrderByAggregateInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - code?: Prisma.SortOrder - used?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type OtpCodeAvgOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type OtpCodeMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - code?: Prisma.SortOrder - used?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type OtpCodeMinOrderByAggregateInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - code?: Prisma.SortOrder - used?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type OtpCodeSumOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type BoolFieldUpdateOperationsInput = { - set?: boolean -} - - - -export type OtpCodeSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - mobileNumber?: boolean - code?: boolean - used?: boolean - expiresAt?: boolean - createdAt?: boolean -}, ExtArgs["result"]["otpCode"]> - - - -export type OtpCodeSelectScalar = { - id?: boolean - mobileNumber?: boolean - code?: boolean - used?: boolean - expiresAt?: boolean - createdAt?: boolean -} - -export type OtpCodeOmit = runtime.Types.Extensions.GetOmit<"id" | "mobileNumber" | "code" | "used" | "expiresAt" | "createdAt", ExtArgs["result"]["otpCode"]> - -export type $OtpCodePayload = { - name: "OtpCode" - objects: {} - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - mobileNumber: string - code: string - used: boolean - expiresAt: Date - createdAt: Date - }, ExtArgs["result"]["otpCode"]> - composites: {} -} - -export type OtpCodeGetPayload = runtime.Types.Result.GetResult - -export type OtpCodeCountArgs = - Omit & { - select?: OtpCodeCountAggregateInputType | true - } - -export interface OtpCodeDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['OtpCode'], meta: { name: 'OtpCode' } } - /** - * Find zero or one OtpCode that matches the filter. - * @param {OtpCodeFindUniqueArgs} args - Arguments to find a OtpCode - * @example - * // Get one OtpCode - * const otpCode = await prisma.otpCode.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__OtpCodeClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one OtpCode that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {OtpCodeFindUniqueOrThrowArgs} args - Arguments to find a OtpCode - * @example - * // Get one OtpCode - * const otpCode = await prisma.otpCode.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__OtpCodeClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first OtpCode that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OtpCodeFindFirstArgs} args - Arguments to find a OtpCode - * @example - * // Get one OtpCode - * const otpCode = await prisma.otpCode.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__OtpCodeClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first OtpCode that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OtpCodeFindFirstOrThrowArgs} args - Arguments to find a OtpCode - * @example - * // Get one OtpCode - * const otpCode = await prisma.otpCode.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__OtpCodeClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more OtpCodes that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OtpCodeFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all OtpCodes - * const otpCodes = await prisma.otpCode.findMany() - * - * // Get first 10 OtpCodes - * const otpCodes = await prisma.otpCode.findMany({ take: 10 }) - * - * // Only select the `id` - * const otpCodeWithIdOnly = await prisma.otpCode.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a OtpCode. - * @param {OtpCodeCreateArgs} args - Arguments to create a OtpCode. - * @example - * // Create one OtpCode - * const OtpCode = await prisma.otpCode.create({ - * data: { - * // ... data to create a OtpCode - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__OtpCodeClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many OtpCodes. - * @param {OtpCodeCreateManyArgs} args - Arguments to create many OtpCodes. - * @example - * // Create many OtpCodes - * const otpCode = await prisma.otpCode.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a OtpCode. - * @param {OtpCodeDeleteArgs} args - Arguments to delete one OtpCode. - * @example - * // Delete one OtpCode - * const OtpCode = await prisma.otpCode.delete({ - * where: { - * // ... filter to delete one OtpCode - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__OtpCodeClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one OtpCode. - * @param {OtpCodeUpdateArgs} args - Arguments to update one OtpCode. - * @example - * // Update one OtpCode - * const otpCode = await prisma.otpCode.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__OtpCodeClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more OtpCodes. - * @param {OtpCodeDeleteManyArgs} args - Arguments to filter OtpCodes to delete. - * @example - * // Delete a few OtpCodes - * const { count } = await prisma.otpCode.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more OtpCodes. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OtpCodeUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many OtpCodes - * const otpCode = await prisma.otpCode.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one OtpCode. - * @param {OtpCodeUpsertArgs} args - Arguments to update or create a OtpCode. - * @example - * // Update or create a OtpCode - * const otpCode = await prisma.otpCode.upsert({ - * create: { - * // ... data to create a OtpCode - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the OtpCode we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__OtpCodeClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of OtpCodes. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OtpCodeCountArgs} args - Arguments to filter OtpCodes to count. - * @example - * // Count the number of OtpCodes - * const count = await prisma.otpCode.count({ - * where: { - * // ... the filter for the OtpCodes we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a OtpCode. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OtpCodeAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by OtpCode. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {OtpCodeGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends OtpCodeGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: OtpCodeGroupByArgs['orderBy'] } - : { orderBy?: OtpCodeGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetOtpCodeGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the OtpCode model - */ -readonly fields: OtpCodeFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for OtpCode. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__OtpCodeClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the OtpCode model - */ -export interface OtpCodeFieldRefs { - readonly id: Prisma.FieldRef<"OtpCode", 'Int'> - readonly mobileNumber: Prisma.FieldRef<"OtpCode", 'String'> - readonly code: Prisma.FieldRef<"OtpCode", 'String'> - readonly used: Prisma.FieldRef<"OtpCode", 'Boolean'> - readonly expiresAt: Prisma.FieldRef<"OtpCode", 'DateTime'> - readonly createdAt: Prisma.FieldRef<"OtpCode", 'DateTime'> -} - - -// Custom InputTypes -/** - * OtpCode findUnique - */ -export type OtpCodeFindUniqueArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null - /** - * Filter, which OtpCode to fetch. - */ - where: Prisma.OtpCodeWhereUniqueInput -} - -/** - * OtpCode findUniqueOrThrow - */ -export type OtpCodeFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null - /** - * Filter, which OtpCode to fetch. - */ - where: Prisma.OtpCodeWhereUniqueInput -} - -/** - * OtpCode findFirst - */ -export type OtpCodeFindFirstArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null - /** - * Filter, which OtpCode to fetch. - */ - where?: Prisma.OtpCodeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of OtpCodes to fetch. - */ - orderBy?: Prisma.OtpCodeOrderByWithRelationInput | Prisma.OtpCodeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for OtpCodes. - */ - cursor?: Prisma.OtpCodeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` OtpCodes from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` OtpCodes. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of OtpCodes. - */ - distinct?: Prisma.OtpCodeScalarFieldEnum | Prisma.OtpCodeScalarFieldEnum[] -} - -/** - * OtpCode findFirstOrThrow - */ -export type OtpCodeFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null - /** - * Filter, which OtpCode to fetch. - */ - where?: Prisma.OtpCodeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of OtpCodes to fetch. - */ - orderBy?: Prisma.OtpCodeOrderByWithRelationInput | Prisma.OtpCodeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for OtpCodes. - */ - cursor?: Prisma.OtpCodeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` OtpCodes from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` OtpCodes. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of OtpCodes. - */ - distinct?: Prisma.OtpCodeScalarFieldEnum | Prisma.OtpCodeScalarFieldEnum[] -} - -/** - * OtpCode findMany - */ -export type OtpCodeFindManyArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null - /** - * Filter, which OtpCodes to fetch. - */ - where?: Prisma.OtpCodeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of OtpCodes to fetch. - */ - orderBy?: Prisma.OtpCodeOrderByWithRelationInput | Prisma.OtpCodeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing OtpCodes. - */ - cursor?: Prisma.OtpCodeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` OtpCodes from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` OtpCodes. - */ - skip?: number - distinct?: Prisma.OtpCodeScalarFieldEnum | Prisma.OtpCodeScalarFieldEnum[] -} - -/** - * OtpCode create - */ -export type OtpCodeCreateArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null - /** - * The data needed to create a OtpCode. - */ - data: Prisma.XOR -} - -/** - * OtpCode createMany - */ -export type OtpCodeCreateManyArgs = { - /** - * The data used to create many OtpCodes. - */ - data: Prisma.OtpCodeCreateManyInput | Prisma.OtpCodeCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * OtpCode update - */ -export type OtpCodeUpdateArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null - /** - * The data needed to update a OtpCode. - */ - data: Prisma.XOR - /** - * Choose, which OtpCode to update. - */ - where: Prisma.OtpCodeWhereUniqueInput -} - -/** - * OtpCode updateMany - */ -export type OtpCodeUpdateManyArgs = { - /** - * The data used to update OtpCodes. - */ - data: Prisma.XOR - /** - * Filter which OtpCodes to update - */ - where?: Prisma.OtpCodeWhereInput - /** - * Limit how many OtpCodes to update. - */ - limit?: number -} - -/** - * OtpCode upsert - */ -export type OtpCodeUpsertArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null - /** - * The filter to search for the OtpCode to update in case it exists. - */ - where: Prisma.OtpCodeWhereUniqueInput - /** - * In case the OtpCode found by the `where` argument doesn't exist, create a new OtpCode with this data. - */ - create: Prisma.XOR - /** - * In case the OtpCode was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * OtpCode delete - */ -export type OtpCodeDeleteArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null - /** - * Filter which OtpCode to delete. - */ - where: Prisma.OtpCodeWhereUniqueInput -} - -/** - * OtpCode deleteMany - */ -export type OtpCodeDeleteManyArgs = { - /** - * Filter which OtpCodes to delete - */ - where?: Prisma.OtpCodeWhereInput - /** - * Limit how many OtpCodes to delete. - */ - limit?: number -} - -/** - * OtpCode without action - */ -export type OtpCodeDefaultArgs = { - /** - * Select specific fields to fetch from the OtpCode - */ - select?: Prisma.OtpCodeSelect | null - /** - * Omit specific fields from the OtpCode - */ - omit?: Prisma.OtpCodeOmit | null -} diff --git a/src/generated/prisma/models/PosAccount.ts b/src/generated/prisma/models/PosAccount.ts deleted file mode 100644 index e7616e0..0000000 --- a/src/generated/prisma/models/PosAccount.ts +++ /dev/null @@ -1,1671 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `PosAccount` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model PosAccount - * - */ -export type PosAccountModel = runtime.Types.Result.DefaultSelection - -export type AggregatePosAccount = { - _count: PosAccountCountAggregateOutputType | null - _avg: PosAccountAvgAggregateOutputType | null - _sum: PosAccountSumAggregateOutputType | null - _min: PosAccountMinAggregateOutputType | null - _max: PosAccountMaxAggregateOutputType | null -} - -export type PosAccountAvgAggregateOutputType = { - id: number | null - bankAccountId: number | null - inventoryId: number | null -} - -export type PosAccountSumAggregateOutputType = { - id: number | null - bankAccountId: number | null - inventoryId: number | null -} - -export type PosAccountMinAggregateOutputType = { - id: number | null - name: string | null - code: string | null - description: string | null - bankAccountId: number | null - inventoryId: number | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type PosAccountMaxAggregateOutputType = { - id: number | null - name: string | null - code: string | null - description: string | null - bankAccountId: number | null - inventoryId: number | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type PosAccountCountAggregateOutputType = { - id: number - name: number - code: number - description: number - bankAccountId: number - inventoryId: number - createdAt: number - updatedAt: number - deletedAt: number - _all: number -} - - -export type PosAccountAvgAggregateInputType = { - id?: true - bankAccountId?: true - inventoryId?: true -} - -export type PosAccountSumAggregateInputType = { - id?: true - bankAccountId?: true - inventoryId?: true -} - -export type PosAccountMinAggregateInputType = { - id?: true - name?: true - code?: true - description?: true - bankAccountId?: true - inventoryId?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type PosAccountMaxAggregateInputType = { - id?: true - name?: true - code?: true - description?: true - bankAccountId?: true - inventoryId?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type PosAccountCountAggregateInputType = { - id?: true - name?: true - code?: true - description?: true - bankAccountId?: true - inventoryId?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - _all?: true -} - -export type PosAccountAggregateArgs = { - /** - * Filter which PosAccount to aggregate. - */ - where?: Prisma.PosAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PosAccounts to fetch. - */ - orderBy?: Prisma.PosAccountOrderByWithRelationInput | Prisma.PosAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.PosAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PosAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PosAccounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned PosAccounts - **/ - _count?: true | PosAccountCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: PosAccountAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: PosAccountSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: PosAccountMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: PosAccountMaxAggregateInputType -} - -export type GetPosAccountAggregateType = { - [P in keyof T & keyof AggregatePosAccount]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type PosAccountGroupByArgs = { - where?: Prisma.PosAccountWhereInput - orderBy?: Prisma.PosAccountOrderByWithAggregationInput | Prisma.PosAccountOrderByWithAggregationInput[] - by: Prisma.PosAccountScalarFieldEnum[] | Prisma.PosAccountScalarFieldEnum - having?: Prisma.PosAccountScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: PosAccountCountAggregateInputType | true - _avg?: PosAccountAvgAggregateInputType - _sum?: PosAccountSumAggregateInputType - _min?: PosAccountMinAggregateInputType - _max?: PosAccountMaxAggregateInputType -} - -export type PosAccountGroupByOutputType = { - id: number - name: string - code: string - description: string | null - bankAccountId: number - inventoryId: number - createdAt: Date - updatedAt: Date - deletedAt: Date | null - _count: PosAccountCountAggregateOutputType | null - _avg: PosAccountAvgAggregateOutputType | null - _sum: PosAccountSumAggregateOutputType | null - _min: PosAccountMinAggregateOutputType | null - _max: PosAccountMaxAggregateOutputType | null -} - -type GetPosAccountGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof PosAccountGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type PosAccountWhereInput = { - AND?: Prisma.PosAccountWhereInput | Prisma.PosAccountWhereInput[] - OR?: Prisma.PosAccountWhereInput[] - NOT?: Prisma.PosAccountWhereInput | Prisma.PosAccountWhereInput[] - id?: Prisma.IntFilter<"PosAccount"> | number - name?: Prisma.StringFilter<"PosAccount"> | string - code?: Prisma.StringFilter<"PosAccount"> | string - description?: Prisma.StringNullableFilter<"PosAccount"> | string | null - bankAccountId?: Prisma.IntFilter<"PosAccount"> | number - inventoryId?: Prisma.IntFilter<"PosAccount"> | number - createdAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null - inventoryBankAccount?: Prisma.XOR - salesInvoices?: Prisma.SalesInvoiceListRelationFilter - orders?: Prisma.OrderListRelationFilter -} - -export type PosAccountOrderByWithRelationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - inventoryBankAccount?: Prisma.InventoryBankAccountOrderByWithRelationInput - salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput - orders?: Prisma.OrderOrderByRelationAggregateInput - _relevance?: Prisma.PosAccountOrderByRelevanceInput -} - -export type PosAccountWhereUniqueInput = Prisma.AtLeast<{ - id?: number - code?: string - AND?: Prisma.PosAccountWhereInput | Prisma.PosAccountWhereInput[] - OR?: Prisma.PosAccountWhereInput[] - NOT?: Prisma.PosAccountWhereInput | Prisma.PosAccountWhereInput[] - name?: Prisma.StringFilter<"PosAccount"> | string - description?: Prisma.StringNullableFilter<"PosAccount"> | string | null - bankAccountId?: Prisma.IntFilter<"PosAccount"> | number - inventoryId?: Prisma.IntFilter<"PosAccount"> | number - createdAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null - inventoryBankAccount?: Prisma.XOR - salesInvoices?: Prisma.SalesInvoiceListRelationFilter - orders?: Prisma.OrderListRelationFilter -}, "id" | "code"> - -export type PosAccountOrderByWithAggregationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.PosAccountCountOrderByAggregateInput - _avg?: Prisma.PosAccountAvgOrderByAggregateInput - _max?: Prisma.PosAccountMaxOrderByAggregateInput - _min?: Prisma.PosAccountMinOrderByAggregateInput - _sum?: Prisma.PosAccountSumOrderByAggregateInput -} - -export type PosAccountScalarWhereWithAggregatesInput = { - AND?: Prisma.PosAccountScalarWhereWithAggregatesInput | Prisma.PosAccountScalarWhereWithAggregatesInput[] - OR?: Prisma.PosAccountScalarWhereWithAggregatesInput[] - NOT?: Prisma.PosAccountScalarWhereWithAggregatesInput | Prisma.PosAccountScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"PosAccount"> | number - name?: Prisma.StringWithAggregatesFilter<"PosAccount"> | string - code?: Prisma.StringWithAggregatesFilter<"PosAccount"> | string - description?: Prisma.StringNullableWithAggregatesFilter<"PosAccount"> | string | null - bankAccountId?: Prisma.IntWithAggregatesFilter<"PosAccount"> | number - inventoryId?: Prisma.IntWithAggregatesFilter<"PosAccount"> | number - createdAt?: Prisma.DateTimeWithAggregatesFilter<"PosAccount"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"PosAccount"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"PosAccount"> | Date | string | null -} - -export type PosAccountCreateInput = { - name: string - code: string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryBankAccount: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput - salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosAccountInput - orders?: Prisma.OrderCreateNestedManyWithoutPosAccountInput -} - -export type PosAccountUncheckedCreateInput = { - id?: number - name: string - code: string - description?: string | null - bankAccountId: number - inventoryId: number - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput - orders?: Prisma.OrderUncheckedCreateNestedManyWithoutPosAccountInput -} - -export type PosAccountUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosAccountNestedInput - orders?: Prisma.OrderUpdateManyWithoutPosAccountNestedInput -} - -export type PosAccountUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput - orders?: Prisma.OrderUncheckedUpdateManyWithoutPosAccountNestedInput -} - -export type PosAccountCreateManyInput = { - id?: number - name: string - code: string - description?: string | null - bankAccountId: number - inventoryId: number - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type PosAccountUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type PosAccountUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type PosAccountListRelationFilter = { - every?: Prisma.PosAccountWhereInput - some?: Prisma.PosAccountWhereInput - none?: Prisma.PosAccountWhereInput -} - -export type PosAccountOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type PosAccountOrderByRelevanceInput = { - fields: Prisma.PosAccountOrderByRelevanceFieldEnum | Prisma.PosAccountOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type PosAccountCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type PosAccountAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type PosAccountMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type PosAccountMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - code?: Prisma.SortOrder - description?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type PosAccountSumOrderByAggregateInput = { - id?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type PosAccountScalarRelationFilter = { - is?: Prisma.PosAccountWhereInput - isNot?: Prisma.PosAccountWhereInput -} - -export type PosAccountCreateNestedManyWithoutInventoryBankAccountInput = { - create?: Prisma.XOR | Prisma.PosAccountCreateWithoutInventoryBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput[] - connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput[] - createMany?: Prisma.PosAccountCreateManyInventoryBankAccountInputEnvelope - connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] -} - -export type PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput = { - create?: Prisma.XOR | Prisma.PosAccountCreateWithoutInventoryBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput[] - connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput[] - createMany?: Prisma.PosAccountCreateManyInventoryBankAccountInputEnvelope - connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] -} - -export type PosAccountUpdateManyWithoutInventoryBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.PosAccountCreateWithoutInventoryBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput[] - connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput[] - upsert?: Prisma.PosAccountUpsertWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PosAccountUpsertWithWhereUniqueWithoutInventoryBankAccountInput[] - createMany?: Prisma.PosAccountCreateManyInventoryBankAccountInputEnvelope - set?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] - disconnect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] - delete?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] - connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] - update?: Prisma.PosAccountUpdateWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PosAccountUpdateWithWhereUniqueWithoutInventoryBankAccountInput[] - updateMany?: Prisma.PosAccountUpdateManyWithWhereWithoutInventoryBankAccountInput | Prisma.PosAccountUpdateManyWithWhereWithoutInventoryBankAccountInput[] - deleteMany?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[] -} - -export type PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.PosAccountCreateWithoutInventoryBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryBankAccountInput[] - connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutInventoryBankAccountInput[] - upsert?: Prisma.PosAccountUpsertWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PosAccountUpsertWithWhereUniqueWithoutInventoryBankAccountInput[] - createMany?: Prisma.PosAccountCreateManyInventoryBankAccountInputEnvelope - set?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] - disconnect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] - delete?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] - connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] - update?: Prisma.PosAccountUpdateWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PosAccountUpdateWithWhereUniqueWithoutInventoryBankAccountInput[] - updateMany?: Prisma.PosAccountUpdateManyWithWhereWithoutInventoryBankAccountInput | Prisma.PosAccountUpdateManyWithWhereWithoutInventoryBankAccountInput[] - deleteMany?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[] -} - -export type PosAccountCreateNestedOneWithoutOrdersInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutOrdersInput - connect?: Prisma.PosAccountWhereUniqueInput -} - -export type PosAccountUpdateOneRequiredWithoutOrdersNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutOrdersInput - upsert?: Prisma.PosAccountUpsertWithoutOrdersInput - connect?: Prisma.PosAccountWhereUniqueInput - update?: Prisma.XOR, Prisma.PosAccountUncheckedUpdateWithoutOrdersInput> -} - -export type PosAccountCreateNestedOneWithoutSalesInvoicesInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutSalesInvoicesInput - connect?: Prisma.PosAccountWhereUniqueInput -} - -export type PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutSalesInvoicesInput - upsert?: Prisma.PosAccountUpsertWithoutSalesInvoicesInput - connect?: Prisma.PosAccountWhereUniqueInput - update?: Prisma.XOR, Prisma.PosAccountUncheckedUpdateWithoutSalesInvoicesInput> -} - -export type PosAccountCreateWithoutInventoryBankAccountInput = { - name: string - code: string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosAccountInput - orders?: Prisma.OrderCreateNestedManyWithoutPosAccountInput -} - -export type PosAccountUncheckedCreateWithoutInventoryBankAccountInput = { - id?: number - name: string - code: string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput - orders?: Prisma.OrderUncheckedCreateNestedManyWithoutPosAccountInput -} - -export type PosAccountCreateOrConnectWithoutInventoryBankAccountInput = { - where: Prisma.PosAccountWhereUniqueInput - create: Prisma.XOR -} - -export type PosAccountCreateManyInventoryBankAccountInputEnvelope = { - data: Prisma.PosAccountCreateManyInventoryBankAccountInput | Prisma.PosAccountCreateManyInventoryBankAccountInput[] - skipDuplicates?: boolean -} - -export type PosAccountUpsertWithWhereUniqueWithoutInventoryBankAccountInput = { - where: Prisma.PosAccountWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type PosAccountUpdateWithWhereUniqueWithoutInventoryBankAccountInput = { - where: Prisma.PosAccountWhereUniqueInput - data: Prisma.XOR -} - -export type PosAccountUpdateManyWithWhereWithoutInventoryBankAccountInput = { - where: Prisma.PosAccountScalarWhereInput - data: Prisma.XOR -} - -export type PosAccountScalarWhereInput = { - AND?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[] - OR?: Prisma.PosAccountScalarWhereInput[] - NOT?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[] - id?: Prisma.IntFilter<"PosAccount"> | number - name?: Prisma.StringFilter<"PosAccount"> | string - code?: Prisma.StringFilter<"PosAccount"> | string - description?: Prisma.StringNullableFilter<"PosAccount"> | string | null - bankAccountId?: Prisma.IntFilter<"PosAccount"> | number - inventoryId?: Prisma.IntFilter<"PosAccount"> | number - createdAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null -} - -export type PosAccountCreateWithoutOrdersInput = { - name: string - code: string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryBankAccount: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput - salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosAccountInput -} - -export type PosAccountUncheckedCreateWithoutOrdersInput = { - id?: number - name: string - code: string - description?: string | null - bankAccountId: number - inventoryId: number - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput -} - -export type PosAccountCreateOrConnectWithoutOrdersInput = { - where: Prisma.PosAccountWhereUniqueInput - create: Prisma.XOR -} - -export type PosAccountUpsertWithoutOrdersInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.PosAccountWhereInput -} - -export type PosAccountUpdateToOneWithWhereWithoutOrdersInput = { - where?: Prisma.PosAccountWhereInput - data: Prisma.XOR -} - -export type PosAccountUpdateWithoutOrdersInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosAccountNestedInput -} - -export type PosAccountUncheckedUpdateWithoutOrdersInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput -} - -export type PosAccountCreateWithoutSalesInvoicesInput = { - name: string - code: string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryBankAccount: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput - orders?: Prisma.OrderCreateNestedManyWithoutPosAccountInput -} - -export type PosAccountUncheckedCreateWithoutSalesInvoicesInput = { - id?: number - name: string - code: string - description?: string | null - bankAccountId: number - inventoryId: number - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - orders?: Prisma.OrderUncheckedCreateNestedManyWithoutPosAccountInput -} - -export type PosAccountCreateOrConnectWithoutSalesInvoicesInput = { - where: Prisma.PosAccountWhereUniqueInput - create: Prisma.XOR -} - -export type PosAccountUpsertWithoutSalesInvoicesInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.PosAccountWhereInput -} - -export type PosAccountUpdateToOneWithWhereWithoutSalesInvoicesInput = { - where?: Prisma.PosAccountWhereInput - data: Prisma.XOR -} - -export type PosAccountUpdateWithoutSalesInvoicesInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneRequiredWithoutPosAccountsNestedInput - orders?: Prisma.OrderUpdateManyWithoutPosAccountNestedInput -} - -export type PosAccountUncheckedUpdateWithoutSalesInvoicesInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - orders?: Prisma.OrderUncheckedUpdateManyWithoutPosAccountNestedInput -} - -export type PosAccountCreateManyInventoryBankAccountInput = { - id?: number - name: string - code: string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type PosAccountUpdateWithoutInventoryBankAccountInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutPosAccountNestedInput - orders?: Prisma.OrderUpdateManyWithoutPosAccountNestedInput -} - -export type PosAccountUncheckedUpdateWithoutInventoryBankAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput - orders?: Prisma.OrderUncheckedUpdateManyWithoutPosAccountNestedInput -} - -export type PosAccountUncheckedUpdateManyWithoutInventoryBankAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - code?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - - -/** - * Count Type PosAccountCountOutputType - */ - -export type PosAccountCountOutputType = { - salesInvoices: number - orders: number -} - -export type PosAccountCountOutputTypeSelect = { - salesInvoices?: boolean | PosAccountCountOutputTypeCountSalesInvoicesArgs - orders?: boolean | PosAccountCountOutputTypeCountOrdersArgs -} - -/** - * PosAccountCountOutputType without action - */ -export type PosAccountCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the PosAccountCountOutputType - */ - select?: Prisma.PosAccountCountOutputTypeSelect | null -} - -/** - * PosAccountCountOutputType without action - */ -export type PosAccountCountOutputTypeCountSalesInvoicesArgs = { - where?: Prisma.SalesInvoiceWhereInput -} - -/** - * PosAccountCountOutputType without action - */ -export type PosAccountCountOutputTypeCountOrdersArgs = { - where?: Prisma.OrderWhereInput -} - - -export type PosAccountSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - code?: boolean - description?: boolean - bankAccountId?: boolean - inventoryId?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - inventoryBankAccount?: boolean | Prisma.InventoryBankAccountDefaultArgs - salesInvoices?: boolean | Prisma.PosAccount$salesInvoicesArgs - orders?: boolean | Prisma.PosAccount$ordersArgs - _count?: boolean | Prisma.PosAccountCountOutputTypeDefaultArgs -}, ExtArgs["result"]["posAccount"]> - - - -export type PosAccountSelectScalar = { - id?: boolean - name?: boolean - code?: boolean - description?: boolean - bankAccountId?: boolean - inventoryId?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean -} - -export type PosAccountOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "code" | "description" | "bankAccountId" | "inventoryId" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["posAccount"]> -export type PosAccountInclude = { - inventoryBankAccount?: boolean | Prisma.InventoryBankAccountDefaultArgs - salesInvoices?: boolean | Prisma.PosAccount$salesInvoicesArgs - orders?: boolean | Prisma.PosAccount$ordersArgs - _count?: boolean | Prisma.PosAccountCountOutputTypeDefaultArgs -} - -export type $PosAccountPayload = { - name: "PosAccount" - objects: { - inventoryBankAccount: Prisma.$InventoryBankAccountPayload - salesInvoices: Prisma.$SalesInvoicePayload[] - orders: Prisma.$OrderPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - code: string - description: string | null - bankAccountId: number - inventoryId: number - createdAt: Date - updatedAt: Date - deletedAt: Date | null - }, ExtArgs["result"]["posAccount"]> - composites: {} -} - -export type PosAccountGetPayload = runtime.Types.Result.GetResult - -export type PosAccountCountArgs = - Omit & { - select?: PosAccountCountAggregateInputType | true - } - -export interface PosAccountDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['PosAccount'], meta: { name: 'PosAccount' } } - /** - * Find zero or one PosAccount that matches the filter. - * @param {PosAccountFindUniqueArgs} args - Arguments to find a PosAccount - * @example - * // Get one PosAccount - * const posAccount = await prisma.posAccount.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PosAccountClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one PosAccount that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {PosAccountFindUniqueOrThrowArgs} args - Arguments to find a PosAccount - * @example - * // Get one PosAccount - * const posAccount = await prisma.posAccount.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PosAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first PosAccount that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PosAccountFindFirstArgs} args - Arguments to find a PosAccount - * @example - * // Get one PosAccount - * const posAccount = await prisma.posAccount.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PosAccountClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first PosAccount that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PosAccountFindFirstOrThrowArgs} args - Arguments to find a PosAccount - * @example - * // Get one PosAccount - * const posAccount = await prisma.posAccount.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PosAccountClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more PosAccounts that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PosAccountFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all PosAccounts - * const posAccounts = await prisma.posAccount.findMany() - * - * // Get first 10 PosAccounts - * const posAccounts = await prisma.posAccount.findMany({ take: 10 }) - * - * // Only select the `id` - * const posAccountWithIdOnly = await prisma.posAccount.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a PosAccount. - * @param {PosAccountCreateArgs} args - Arguments to create a PosAccount. - * @example - * // Create one PosAccount - * const PosAccount = await prisma.posAccount.create({ - * data: { - * // ... data to create a PosAccount - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__PosAccountClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many PosAccounts. - * @param {PosAccountCreateManyArgs} args - Arguments to create many PosAccounts. - * @example - * // Create many PosAccounts - * const posAccount = await prisma.posAccount.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a PosAccount. - * @param {PosAccountDeleteArgs} args - Arguments to delete one PosAccount. - * @example - * // Delete one PosAccount - * const PosAccount = await prisma.posAccount.delete({ - * where: { - * // ... filter to delete one PosAccount - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__PosAccountClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one PosAccount. - * @param {PosAccountUpdateArgs} args - Arguments to update one PosAccount. - * @example - * // Update one PosAccount - * const posAccount = await prisma.posAccount.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__PosAccountClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more PosAccounts. - * @param {PosAccountDeleteManyArgs} args - Arguments to filter PosAccounts to delete. - * @example - * // Delete a few PosAccounts - * const { count } = await prisma.posAccount.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more PosAccounts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PosAccountUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many PosAccounts - * const posAccount = await prisma.posAccount.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one PosAccount. - * @param {PosAccountUpsertArgs} args - Arguments to update or create a PosAccount. - * @example - * // Update or create a PosAccount - * const posAccount = await prisma.posAccount.upsert({ - * create: { - * // ... data to create a PosAccount - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the PosAccount we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PosAccountClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of PosAccounts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PosAccountCountArgs} args - Arguments to filter PosAccounts to count. - * @example - * // Count the number of PosAccounts - * const count = await prisma.posAccount.count({ - * where: { - * // ... the filter for the PosAccounts we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a PosAccount. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PosAccountAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by PosAccount. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PosAccountGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends PosAccountGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: PosAccountGroupByArgs['orderBy'] } - : { orderBy?: PosAccountGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetPosAccountGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the PosAccount model - */ -readonly fields: PosAccountFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for PosAccount. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__PosAccountClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - inventoryBankAccount = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryBankAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - salesInvoices = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - orders = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the PosAccount model - */ -export interface PosAccountFieldRefs { - readonly id: Prisma.FieldRef<"PosAccount", 'Int'> - readonly name: Prisma.FieldRef<"PosAccount", 'String'> - readonly code: Prisma.FieldRef<"PosAccount", 'String'> - readonly description: Prisma.FieldRef<"PosAccount", 'String'> - readonly bankAccountId: Prisma.FieldRef<"PosAccount", 'Int'> - readonly inventoryId: Prisma.FieldRef<"PosAccount", 'Int'> - readonly createdAt: Prisma.FieldRef<"PosAccount", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"PosAccount", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"PosAccount", 'DateTime'> -} - - -// Custom InputTypes -/** - * PosAccount findUnique - */ -export type PosAccountFindUniqueArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - /** - * Filter, which PosAccount to fetch. - */ - where: Prisma.PosAccountWhereUniqueInput -} - -/** - * PosAccount findUniqueOrThrow - */ -export type PosAccountFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - /** - * Filter, which PosAccount to fetch. - */ - where: Prisma.PosAccountWhereUniqueInput -} - -/** - * PosAccount findFirst - */ -export type PosAccountFindFirstArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - /** - * Filter, which PosAccount to fetch. - */ - where?: Prisma.PosAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PosAccounts to fetch. - */ - orderBy?: Prisma.PosAccountOrderByWithRelationInput | Prisma.PosAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PosAccounts. - */ - cursor?: Prisma.PosAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PosAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PosAccounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PosAccounts. - */ - distinct?: Prisma.PosAccountScalarFieldEnum | Prisma.PosAccountScalarFieldEnum[] -} - -/** - * PosAccount findFirstOrThrow - */ -export type PosAccountFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - /** - * Filter, which PosAccount to fetch. - */ - where?: Prisma.PosAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PosAccounts to fetch. - */ - orderBy?: Prisma.PosAccountOrderByWithRelationInput | Prisma.PosAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PosAccounts. - */ - cursor?: Prisma.PosAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PosAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PosAccounts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PosAccounts. - */ - distinct?: Prisma.PosAccountScalarFieldEnum | Prisma.PosAccountScalarFieldEnum[] -} - -/** - * PosAccount findMany - */ -export type PosAccountFindManyArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - /** - * Filter, which PosAccounts to fetch. - */ - where?: Prisma.PosAccountWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PosAccounts to fetch. - */ - orderBy?: Prisma.PosAccountOrderByWithRelationInput | Prisma.PosAccountOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing PosAccounts. - */ - cursor?: Prisma.PosAccountWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PosAccounts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PosAccounts. - */ - skip?: number - distinct?: Prisma.PosAccountScalarFieldEnum | Prisma.PosAccountScalarFieldEnum[] -} - -/** - * PosAccount create - */ -export type PosAccountCreateArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - /** - * The data needed to create a PosAccount. - */ - data: Prisma.XOR -} - -/** - * PosAccount createMany - */ -export type PosAccountCreateManyArgs = { - /** - * The data used to create many PosAccounts. - */ - data: Prisma.PosAccountCreateManyInput | Prisma.PosAccountCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * PosAccount update - */ -export type PosAccountUpdateArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - /** - * The data needed to update a PosAccount. - */ - data: Prisma.XOR - /** - * Choose, which PosAccount to update. - */ - where: Prisma.PosAccountWhereUniqueInput -} - -/** - * PosAccount updateMany - */ -export type PosAccountUpdateManyArgs = { - /** - * The data used to update PosAccounts. - */ - data: Prisma.XOR - /** - * Filter which PosAccounts to update - */ - where?: Prisma.PosAccountWhereInput - /** - * Limit how many PosAccounts to update. - */ - limit?: number -} - -/** - * PosAccount upsert - */ -export type PosAccountUpsertArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - /** - * The filter to search for the PosAccount to update in case it exists. - */ - where: Prisma.PosAccountWhereUniqueInput - /** - * In case the PosAccount found by the `where` argument doesn't exist, create a new PosAccount with this data. - */ - create: Prisma.XOR - /** - * In case the PosAccount was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * PosAccount delete - */ -export type PosAccountDeleteArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null - /** - * Filter which PosAccount to delete. - */ - where: Prisma.PosAccountWhereUniqueInput -} - -/** - * PosAccount deleteMany - */ -export type PosAccountDeleteManyArgs = { - /** - * Filter which PosAccounts to delete - */ - where?: Prisma.PosAccountWhereInput - /** - * Limit how many PosAccounts to delete. - */ - limit?: number -} - -/** - * PosAccount.salesInvoices - */ -export type PosAccount$salesInvoicesArgs = { - /** - * Select specific fields to fetch from the SalesInvoice - */ - select?: Prisma.SalesInvoiceSelect | null - /** - * Omit specific fields from the SalesInvoice - */ - omit?: Prisma.SalesInvoiceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SalesInvoiceInclude | null - where?: Prisma.SalesInvoiceWhereInput - orderBy?: Prisma.SalesInvoiceOrderByWithRelationInput | Prisma.SalesInvoiceOrderByWithRelationInput[] - cursor?: Prisma.SalesInvoiceWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.SalesInvoiceScalarFieldEnum | Prisma.SalesInvoiceScalarFieldEnum[] -} - -/** - * PosAccount.orders - */ -export type PosAccount$ordersArgs = { - /** - * Select specific fields to fetch from the Order - */ - select?: Prisma.OrderSelect | null - /** - * Omit specific fields from the Order - */ - omit?: Prisma.OrderOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderInclude | null - where?: Prisma.OrderWhereInput - orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[] - cursor?: Prisma.OrderWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[] -} - -/** - * PosAccount without action - */ -export type PosAccountDefaultArgs = { - /** - * Select specific fields to fetch from the PosAccount - */ - select?: Prisma.PosAccountSelect | null - /** - * Omit specific fields from the PosAccount - */ - omit?: Prisma.PosAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PosAccountInclude | null -} diff --git a/src/generated/prisma/models/Product.ts b/src/generated/prisma/models/Product.ts deleted file mode 100644 index 2fc6c19..0000000 --- a/src/generated/prisma/models/Product.ts +++ /dev/null @@ -1,3281 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `Product` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model Product - * - */ -export type ProductModel = runtime.Types.Result.DefaultSelection - -export type AggregateProduct = { - _count: ProductCountAggregateOutputType | null - _avg: ProductAvgAggregateOutputType | null - _sum: ProductSumAggregateOutputType | null - _min: ProductMinAggregateOutputType | null - _max: ProductMaxAggregateOutputType | null -} - -export type ProductAvgAggregateOutputType = { - id: number | null - brandId: number | null - categoryId: number | null - salePrice: runtime.Decimal | null - minimumStockAlertLevel: runtime.Decimal | null -} - -export type ProductSumAggregateOutputType = { - id: number | null - brandId: number | null - categoryId: number | null - salePrice: runtime.Decimal | null - minimumStockAlertLevel: runtime.Decimal | null -} - -export type ProductMinAggregateOutputType = { - id: number | null - name: string | null - description: string | null - sku: string | null - barcode: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - brandId: number | null - categoryId: number | null - salePrice: runtime.Decimal | null - minimumStockAlertLevel: runtime.Decimal | null -} - -export type ProductMaxAggregateOutputType = { - id: number | null - name: string | null - description: string | null - sku: string | null - barcode: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - brandId: number | null - categoryId: number | null - salePrice: runtime.Decimal | null - minimumStockAlertLevel: runtime.Decimal | null -} - -export type ProductCountAggregateOutputType = { - id: number - name: number - description: number - sku: number - barcode: number - createdAt: number - updatedAt: number - deletedAt: number - brandId: number - categoryId: number - salePrice: number - minimumStockAlertLevel: number - _all: number -} - - -export type ProductAvgAggregateInputType = { - id?: true - brandId?: true - categoryId?: true - salePrice?: true - minimumStockAlertLevel?: true -} - -export type ProductSumAggregateInputType = { - id?: true - brandId?: true - categoryId?: true - salePrice?: true - minimumStockAlertLevel?: true -} - -export type ProductMinAggregateInputType = { - id?: true - name?: true - description?: true - sku?: true - barcode?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - brandId?: true - categoryId?: true - salePrice?: true - minimumStockAlertLevel?: true -} - -export type ProductMaxAggregateInputType = { - id?: true - name?: true - description?: true - sku?: true - barcode?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - brandId?: true - categoryId?: true - salePrice?: true - minimumStockAlertLevel?: true -} - -export type ProductCountAggregateInputType = { - id?: true - name?: true - description?: true - sku?: true - barcode?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - brandId?: true - categoryId?: true - salePrice?: true - minimumStockAlertLevel?: true - _all?: true -} - -export type ProductAggregateArgs = { - /** - * Filter which Product to aggregate. - */ - where?: Prisma.ProductWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Products to fetch. - */ - orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.ProductWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Products from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Products. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Products - **/ - _count?: true | ProductCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ProductAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ProductSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ProductMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ProductMaxAggregateInputType -} - -export type GetProductAggregateType = { - [P in keyof T & keyof AggregateProduct]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type ProductGroupByArgs = { - where?: Prisma.ProductWhereInput - orderBy?: Prisma.ProductOrderByWithAggregationInput | Prisma.ProductOrderByWithAggregationInput[] - by: Prisma.ProductScalarFieldEnum[] | Prisma.ProductScalarFieldEnum - having?: Prisma.ProductScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ProductCountAggregateInputType | true - _avg?: ProductAvgAggregateInputType - _sum?: ProductSumAggregateInputType - _min?: ProductMinAggregateInputType - _max?: ProductMaxAggregateInputType -} - -export type ProductGroupByOutputType = { - id: number - name: string - description: string | null - sku: string | null - barcode: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - brandId: number | null - categoryId: number | null - salePrice: runtime.Decimal - minimumStockAlertLevel: runtime.Decimal - _count: ProductCountAggregateOutputType | null - _avg: ProductAvgAggregateOutputType | null - _sum: ProductSumAggregateOutputType | null - _min: ProductMinAggregateOutputType | null - _max: ProductMaxAggregateOutputType | null -} - -type GetProductGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof ProductGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type ProductWhereInput = { - AND?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] - OR?: Prisma.ProductWhereInput[] - NOT?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] - id?: Prisma.IntFilter<"Product"> | number - name?: Prisma.StringFilter<"Product"> | string - description?: Prisma.StringNullableFilter<"Product"> | string | null - sku?: Prisma.StringNullableFilter<"Product"> | string | null - barcode?: Prisma.StringNullableFilter<"Product"> | string | null - createdAt?: Prisma.DateTimeFilter<"Product"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Product"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Product"> | Date | string | null - brandId?: Prisma.IntNullableFilter<"Product"> | number | null - categoryId?: Prisma.IntNullableFilter<"Product"> | number | null - salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter - variants?: Prisma.ProductVariantListRelationFilter - brand?: Prisma.XOR | null - category?: Prisma.XOR | null - purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter - stockAdjustments?: Prisma.StockAdjustmentListRelationFilter - stockBalances?: Prisma.StockBalanceListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter - salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter - stockReservations?: Prisma.StockReservationListRelationFilter - orderItems?: Prisma.OrderItemListRelationFilter -} - -export type ProductOrderByWithRelationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - sku?: Prisma.SortOrderInput | Prisma.SortOrder - barcode?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - brandId?: Prisma.SortOrderInput | Prisma.SortOrder - categoryId?: Prisma.SortOrderInput | Prisma.SortOrder - salePrice?: Prisma.SortOrder - minimumStockAlertLevel?: Prisma.SortOrder - inventoryTransferItems?: Prisma.InventoryTransferItemOrderByRelationAggregateInput - variants?: Prisma.ProductVariantOrderByRelationAggregateInput - brand?: Prisma.ProductBrandOrderByWithRelationInput - category?: Prisma.ProductCategoryOrderByWithRelationInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemOrderByRelationAggregateInput - stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput - stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput - stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput - salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput - stockReservations?: Prisma.StockReservationOrderByRelationAggregateInput - orderItems?: Prisma.OrderItemOrderByRelationAggregateInput - _relevance?: Prisma.ProductOrderByRelevanceInput -} - -export type ProductWhereUniqueInput = Prisma.AtLeast<{ - id?: number - sku?: string - barcode?: string - AND?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] - OR?: Prisma.ProductWhereInput[] - NOT?: Prisma.ProductWhereInput | Prisma.ProductWhereInput[] - name?: Prisma.StringFilter<"Product"> | string - description?: Prisma.StringNullableFilter<"Product"> | string | null - createdAt?: Prisma.DateTimeFilter<"Product"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Product"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Product"> | Date | string | null - brandId?: Prisma.IntNullableFilter<"Product"> | number | null - categoryId?: Prisma.IntNullableFilter<"Product"> | number | null - salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter - variants?: Prisma.ProductVariantListRelationFilter - brand?: Prisma.XOR | null - category?: Prisma.XOR | null - purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter - stockAdjustments?: Prisma.StockAdjustmentListRelationFilter - stockBalances?: Prisma.StockBalanceListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter - salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter - stockReservations?: Prisma.StockReservationListRelationFilter - orderItems?: Prisma.OrderItemListRelationFilter -}, "id" | "sku" | "barcode"> - -export type ProductOrderByWithAggregationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - sku?: Prisma.SortOrderInput | Prisma.SortOrder - barcode?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - brandId?: Prisma.SortOrderInput | Prisma.SortOrder - categoryId?: Prisma.SortOrderInput | Prisma.SortOrder - salePrice?: Prisma.SortOrder - minimumStockAlertLevel?: Prisma.SortOrder - _count?: Prisma.ProductCountOrderByAggregateInput - _avg?: Prisma.ProductAvgOrderByAggregateInput - _max?: Prisma.ProductMaxOrderByAggregateInput - _min?: Prisma.ProductMinOrderByAggregateInput - _sum?: Prisma.ProductSumOrderByAggregateInput -} - -export type ProductScalarWhereWithAggregatesInput = { - AND?: Prisma.ProductScalarWhereWithAggregatesInput | Prisma.ProductScalarWhereWithAggregatesInput[] - OR?: Prisma.ProductScalarWhereWithAggregatesInput[] - NOT?: Prisma.ProductScalarWhereWithAggregatesInput | Prisma.ProductScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"Product"> | number - name?: Prisma.StringWithAggregatesFilter<"Product"> | string - description?: Prisma.StringNullableWithAggregatesFilter<"Product"> | string | null - sku?: Prisma.StringNullableWithAggregatesFilter<"Product"> | string | null - barcode?: Prisma.StringNullableWithAggregatesFilter<"Product"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Product"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Product"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Product"> | Date | string | null - brandId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null - categoryId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null - salePrice?: Prisma.DecimalWithAggregatesFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalWithAggregatesFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type ProductCreateInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateManyInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type ProductUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type ProductUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type ProductScalarRelationFilter = { - is?: Prisma.ProductWhereInput - isNot?: Prisma.ProductWhereInput -} - -export type ProductOrderByRelevanceInput = { - fields: Prisma.ProductOrderByRelevanceFieldEnum | Prisma.ProductOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type ProductCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - sku?: Prisma.SortOrder - barcode?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - brandId?: Prisma.SortOrder - categoryId?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - minimumStockAlertLevel?: Prisma.SortOrder -} - -export type ProductAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - brandId?: Prisma.SortOrder - categoryId?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - minimumStockAlertLevel?: Prisma.SortOrder -} - -export type ProductMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - sku?: Prisma.SortOrder - barcode?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - brandId?: Prisma.SortOrder - categoryId?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - minimumStockAlertLevel?: Prisma.SortOrder -} - -export type ProductMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - sku?: Prisma.SortOrder - barcode?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - brandId?: Prisma.SortOrder - categoryId?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - minimumStockAlertLevel?: Prisma.SortOrder -} - -export type ProductSumOrderByAggregateInput = { - id?: Prisma.SortOrder - brandId?: Prisma.SortOrder - categoryId?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - minimumStockAlertLevel?: Prisma.SortOrder -} - -export type ProductListRelationFilter = { - every?: Prisma.ProductWhereInput - some?: Prisma.ProductWhereInput - none?: Prisma.ProductWhereInput -} - -export type ProductOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type ProductCreateNestedOneWithoutInventoryTransferItemsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutInventoryTransferItemsInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutInventoryTransferItemsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutInventoryTransferItemsInput - upsert?: Prisma.ProductUpsertWithoutInventoryTransferItemsInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutInventoryTransferItemsInput> -} - -export type ProductCreateNestedOneWithoutOrderItemsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutOrderItemsInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutOrderItemsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutOrderItemsInput - upsert?: Prisma.ProductUpsertWithoutOrderItemsInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutOrderItemsInput> -} - -export type ProductCreateNestedOneWithoutVariantsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutVariantsInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutVariantsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutVariantsInput - upsert?: Prisma.ProductUpsertWithoutVariantsInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutVariantsInput> -} - -export type ProductCreateNestedManyWithoutBrandInput = { - create?: Prisma.XOR | Prisma.ProductCreateWithoutBrandInput[] | Prisma.ProductUncheckedCreateWithoutBrandInput[] - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutBrandInput | Prisma.ProductCreateOrConnectWithoutBrandInput[] - createMany?: Prisma.ProductCreateManyBrandInputEnvelope - connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] -} - -export type ProductUncheckedCreateNestedManyWithoutBrandInput = { - create?: Prisma.XOR | Prisma.ProductCreateWithoutBrandInput[] | Prisma.ProductUncheckedCreateWithoutBrandInput[] - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutBrandInput | Prisma.ProductCreateOrConnectWithoutBrandInput[] - createMany?: Prisma.ProductCreateManyBrandInputEnvelope - connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] -} - -export type ProductUpdateManyWithoutBrandNestedInput = { - create?: Prisma.XOR | Prisma.ProductCreateWithoutBrandInput[] | Prisma.ProductUncheckedCreateWithoutBrandInput[] - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutBrandInput | Prisma.ProductCreateOrConnectWithoutBrandInput[] - upsert?: Prisma.ProductUpsertWithWhereUniqueWithoutBrandInput | Prisma.ProductUpsertWithWhereUniqueWithoutBrandInput[] - createMany?: Prisma.ProductCreateManyBrandInputEnvelope - set?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - disconnect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - delete?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - update?: Prisma.ProductUpdateWithWhereUniqueWithoutBrandInput | Prisma.ProductUpdateWithWhereUniqueWithoutBrandInput[] - updateMany?: Prisma.ProductUpdateManyWithWhereWithoutBrandInput | Prisma.ProductUpdateManyWithWhereWithoutBrandInput[] - deleteMany?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] -} - -export type ProductUncheckedUpdateManyWithoutBrandNestedInput = { - create?: Prisma.XOR | Prisma.ProductCreateWithoutBrandInput[] | Prisma.ProductUncheckedCreateWithoutBrandInput[] - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutBrandInput | Prisma.ProductCreateOrConnectWithoutBrandInput[] - upsert?: Prisma.ProductUpsertWithWhereUniqueWithoutBrandInput | Prisma.ProductUpsertWithWhereUniqueWithoutBrandInput[] - createMany?: Prisma.ProductCreateManyBrandInputEnvelope - set?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - disconnect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - delete?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - update?: Prisma.ProductUpdateWithWhereUniqueWithoutBrandInput | Prisma.ProductUpdateWithWhereUniqueWithoutBrandInput[] - updateMany?: Prisma.ProductUpdateManyWithWhereWithoutBrandInput | Prisma.ProductUpdateManyWithWhereWithoutBrandInput[] - deleteMany?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] -} - -export type ProductCreateNestedManyWithoutCategoryInput = { - create?: Prisma.XOR | Prisma.ProductCreateWithoutCategoryInput[] | Prisma.ProductUncheckedCreateWithoutCategoryInput[] - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutCategoryInput | Prisma.ProductCreateOrConnectWithoutCategoryInput[] - createMany?: Prisma.ProductCreateManyCategoryInputEnvelope - connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] -} - -export type ProductUncheckedCreateNestedManyWithoutCategoryInput = { - create?: Prisma.XOR | Prisma.ProductCreateWithoutCategoryInput[] | Prisma.ProductUncheckedCreateWithoutCategoryInput[] - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutCategoryInput | Prisma.ProductCreateOrConnectWithoutCategoryInput[] - createMany?: Prisma.ProductCreateManyCategoryInputEnvelope - connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] -} - -export type ProductUpdateManyWithoutCategoryNestedInput = { - create?: Prisma.XOR | Prisma.ProductCreateWithoutCategoryInput[] | Prisma.ProductUncheckedCreateWithoutCategoryInput[] - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutCategoryInput | Prisma.ProductCreateOrConnectWithoutCategoryInput[] - upsert?: Prisma.ProductUpsertWithWhereUniqueWithoutCategoryInput | Prisma.ProductUpsertWithWhereUniqueWithoutCategoryInput[] - createMany?: Prisma.ProductCreateManyCategoryInputEnvelope - set?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - disconnect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - delete?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - update?: Prisma.ProductUpdateWithWhereUniqueWithoutCategoryInput | Prisma.ProductUpdateWithWhereUniqueWithoutCategoryInput[] - updateMany?: Prisma.ProductUpdateManyWithWhereWithoutCategoryInput | Prisma.ProductUpdateManyWithWhereWithoutCategoryInput[] - deleteMany?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] -} - -export type ProductUncheckedUpdateManyWithoutCategoryNestedInput = { - create?: Prisma.XOR | Prisma.ProductCreateWithoutCategoryInput[] | Prisma.ProductUncheckedCreateWithoutCategoryInput[] - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutCategoryInput | Prisma.ProductCreateOrConnectWithoutCategoryInput[] - upsert?: Prisma.ProductUpsertWithWhereUniqueWithoutCategoryInput | Prisma.ProductUpsertWithWhereUniqueWithoutCategoryInput[] - createMany?: Prisma.ProductCreateManyCategoryInputEnvelope - set?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - disconnect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - delete?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - connect?: Prisma.ProductWhereUniqueInput | Prisma.ProductWhereUniqueInput[] - update?: Prisma.ProductUpdateWithWhereUniqueWithoutCategoryInput | Prisma.ProductUpdateWithWhereUniqueWithoutCategoryInput[] - updateMany?: Prisma.ProductUpdateManyWithWhereWithoutCategoryInput | Prisma.ProductUpdateManyWithWhereWithoutCategoryInput[] - deleteMany?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] -} - -export type ProductCreateNestedOneWithoutPurchaseReceiptItemsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutPurchaseReceiptItemsInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutPurchaseReceiptItemsInput - upsert?: Prisma.ProductUpsertWithoutPurchaseReceiptItemsInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput> -} - -export type ProductCreateNestedOneWithoutSalesInvoiceItemsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutSalesInvoiceItemsInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutSalesInvoiceItemsInput - upsert?: Prisma.ProductUpsertWithoutSalesInvoiceItemsInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutSalesInvoiceItemsInput> -} - -export type ProductCreateNestedOneWithoutStockMovementsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockMovementsInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutStockMovementsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockMovementsInput - upsert?: Prisma.ProductUpsertWithoutStockMovementsInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutStockMovementsInput> -} - -export type ProductCreateNestedOneWithoutStockBalancesInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockBalancesInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutStockBalancesNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockBalancesInput - upsert?: Prisma.ProductUpsertWithoutStockBalancesInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutStockBalancesInput> -} - -export type ProductCreateNestedOneWithoutStockAdjustmentsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockAdjustmentsInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutStockAdjustmentsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockAdjustmentsInput - upsert?: Prisma.ProductUpsertWithoutStockAdjustmentsInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutStockAdjustmentsInput> -} - -export type ProductCreateNestedOneWithoutStockReservationsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockReservationsInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutStockReservationsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockReservationsInput - upsert?: Prisma.ProductUpsertWithoutStockReservationsInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutStockReservationsInput> -} - -export type ProductCreateWithoutInventoryTransferItemsInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutInventoryTransferItemsInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutInventoryTransferItemsInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutInventoryTransferItemsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutInventoryTransferItemsInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutInventoryTransferItemsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutInventoryTransferItemsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateWithoutOrderItemsInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutOrderItemsInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutOrderItemsInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutOrderItemsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutOrderItemsInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutOrderItemsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutOrderItemsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateWithoutVariantsInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutVariantsInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutVariantsInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutVariantsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutVariantsInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutVariantsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutVariantsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateWithoutBrandInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutBrandInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutBrandInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductCreateManyBrandInputEnvelope = { - data: Prisma.ProductCreateManyBrandInput | Prisma.ProductCreateManyBrandInput[] - skipDuplicates?: boolean -} - -export type ProductUpsertWithWhereUniqueWithoutBrandInput = { - where: Prisma.ProductWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type ProductUpdateWithWhereUniqueWithoutBrandInput = { - where: Prisma.ProductWhereUniqueInput - data: Prisma.XOR -} - -export type ProductUpdateManyWithWhereWithoutBrandInput = { - where: Prisma.ProductScalarWhereInput - data: Prisma.XOR -} - -export type ProductScalarWhereInput = { - AND?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] - OR?: Prisma.ProductScalarWhereInput[] - NOT?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] - id?: Prisma.IntFilter<"Product"> | number - name?: Prisma.StringFilter<"Product"> | string - description?: Prisma.StringNullableFilter<"Product"> | string | null - sku?: Prisma.StringNullableFilter<"Product"> | string | null - barcode?: Prisma.StringNullableFilter<"Product"> | string | null - createdAt?: Prisma.DateTimeFilter<"Product"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Product"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Product"> | Date | string | null - brandId?: Prisma.IntNullableFilter<"Product"> | number | null - categoryId?: Prisma.IntNullableFilter<"Product"> | number | null - salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type ProductCreateWithoutCategoryInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutCategoryInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutCategoryInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductCreateManyCategoryInputEnvelope = { - data: Prisma.ProductCreateManyCategoryInput | Prisma.ProductCreateManyCategoryInput[] - skipDuplicates?: boolean -} - -export type ProductUpsertWithWhereUniqueWithoutCategoryInput = { - where: Prisma.ProductWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type ProductUpdateWithWhereUniqueWithoutCategoryInput = { - where: Prisma.ProductWhereUniqueInput - data: Prisma.XOR -} - -export type ProductUpdateManyWithWhereWithoutCategoryInput = { - where: Prisma.ProductScalarWhereInput - data: Prisma.XOR -} - -export type ProductCreateWithoutPurchaseReceiptItemsInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutPurchaseReceiptItemsInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutPurchaseReceiptItemsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutPurchaseReceiptItemsInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutPurchaseReceiptItemsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateWithoutSalesInvoiceItemsInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutSalesInvoiceItemsInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutSalesInvoiceItemsInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutSalesInvoiceItemsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutSalesInvoiceItemsInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutSalesInvoiceItemsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutSalesInvoiceItemsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateWithoutStockMovementsInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutStockMovementsInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutStockMovementsInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutStockMovementsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutStockMovementsInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutStockMovementsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutStockMovementsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateWithoutStockBalancesInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutStockBalancesInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutStockBalancesInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutStockBalancesInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutStockBalancesInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutStockBalancesInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutStockBalancesInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateWithoutStockAdjustmentsInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutStockAdjustmentsInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutStockAdjustmentsInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutStockAdjustmentsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutStockAdjustmentsInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutStockAdjustmentsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateWithoutStockReservationsInput = { - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutStockReservationsInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutStockReservationsInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutStockReservationsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutStockReservationsInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutStockReservationsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutStockReservationsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductCreateManyBrandInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - categoryId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type ProductUpdateWithoutBrandInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutBrandInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateManyWithoutBrandInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type ProductCreateManyCategoryInput = { - id?: number - name: string - description?: string | null - sku?: string | null - barcode?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - brandId?: number | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type ProductUpdateWithoutCategoryInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutCategoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput - orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateManyWithoutCategoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string -} - - -/** - * Count Type ProductCountOutputType - */ - -export type ProductCountOutputType = { - inventoryTransferItems: number - variants: number - purchaseReceiptItems: number - stockAdjustments: number - stockBalances: number - stockMovements: number - salesInvoiceItems: number - stockReservations: number - orderItems: number -} - -export type ProductCountOutputTypeSelect = { - inventoryTransferItems?: boolean | ProductCountOutputTypeCountInventoryTransferItemsArgs - variants?: boolean | ProductCountOutputTypeCountVariantsArgs - purchaseReceiptItems?: boolean | ProductCountOutputTypeCountPurchaseReceiptItemsArgs - stockAdjustments?: boolean | ProductCountOutputTypeCountStockAdjustmentsArgs - stockBalances?: boolean | ProductCountOutputTypeCountStockBalancesArgs - stockMovements?: boolean | ProductCountOutputTypeCountStockMovementsArgs - salesInvoiceItems?: boolean | ProductCountOutputTypeCountSalesInvoiceItemsArgs - stockReservations?: boolean | ProductCountOutputTypeCountStockReservationsArgs - orderItems?: boolean | ProductCountOutputTypeCountOrderItemsArgs -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the ProductCountOutputType - */ - select?: Prisma.ProductCountOutputTypeSelect | null -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeCountInventoryTransferItemsArgs = { - where?: Prisma.InventoryTransferItemWhereInput -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeCountVariantsArgs = { - where?: Prisma.ProductVariantWhereInput -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeCountPurchaseReceiptItemsArgs = { - where?: Prisma.PurchaseReceiptItemWhereInput -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeCountStockAdjustmentsArgs = { - where?: Prisma.StockAdjustmentWhereInput -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeCountStockBalancesArgs = { - where?: Prisma.StockBalanceWhereInput -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeCountStockMovementsArgs = { - where?: Prisma.StockMovementWhereInput -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeCountSalesInvoiceItemsArgs = { - where?: Prisma.SalesInvoiceItemWhereInput -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeCountStockReservationsArgs = { - where?: Prisma.StockReservationWhereInput -} - -/** - * ProductCountOutputType without action - */ -export type ProductCountOutputTypeCountOrderItemsArgs = { - where?: Prisma.OrderItemWhereInput -} - - -export type ProductSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - sku?: boolean - barcode?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - brandId?: boolean - categoryId?: boolean - salePrice?: boolean - minimumStockAlertLevel?: boolean - inventoryTransferItems?: boolean | Prisma.Product$inventoryTransferItemsArgs - variants?: boolean | Prisma.Product$variantsArgs - brand?: boolean | Prisma.Product$brandArgs - category?: boolean | Prisma.Product$categoryArgs - purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs - stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs - stockBalances?: boolean | Prisma.Product$stockBalancesArgs - stockMovements?: boolean | Prisma.Product$stockMovementsArgs - salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs - stockReservations?: boolean | Prisma.Product$stockReservationsArgs - orderItems?: boolean | Prisma.Product$orderItemsArgs - _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs -}, ExtArgs["result"]["product"]> - - - -export type ProductSelectScalar = { - id?: boolean - name?: boolean - description?: boolean - sku?: boolean - barcode?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - brandId?: boolean - categoryId?: boolean - salePrice?: boolean - minimumStockAlertLevel?: boolean -} - -export type ProductOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "sku" | "barcode" | "createdAt" | "updatedAt" | "deletedAt" | "brandId" | "categoryId" | "salePrice" | "minimumStockAlertLevel", ExtArgs["result"]["product"]> -export type ProductInclude = { - inventoryTransferItems?: boolean | Prisma.Product$inventoryTransferItemsArgs - variants?: boolean | Prisma.Product$variantsArgs - brand?: boolean | Prisma.Product$brandArgs - category?: boolean | Prisma.Product$categoryArgs - purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs - stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs - stockBalances?: boolean | Prisma.Product$stockBalancesArgs - stockMovements?: boolean | Prisma.Product$stockMovementsArgs - salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs - stockReservations?: boolean | Prisma.Product$stockReservationsArgs - orderItems?: boolean | Prisma.Product$orderItemsArgs - _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs -} - -export type $ProductPayload = { - name: "Product" - objects: { - inventoryTransferItems: Prisma.$InventoryTransferItemPayload[] - variants: Prisma.$ProductVariantPayload[] - brand: Prisma.$ProductBrandPayload | null - category: Prisma.$ProductCategoryPayload | null - purchaseReceiptItems: Prisma.$PurchaseReceiptItemPayload[] - stockAdjustments: Prisma.$StockAdjustmentPayload[] - stockBalances: Prisma.$StockBalancePayload[] - stockMovements: Prisma.$StockMovementPayload[] - salesInvoiceItems: Prisma.$SalesInvoiceItemPayload[] - stockReservations: Prisma.$StockReservationPayload[] - orderItems: Prisma.$OrderItemPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - description: string | null - sku: string | null - barcode: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - brandId: number | null - categoryId: number | null - salePrice: runtime.Decimal - minimumStockAlertLevel: runtime.Decimal - }, ExtArgs["result"]["product"]> - composites: {} -} - -export type ProductGetPayload = runtime.Types.Result.GetResult - -export type ProductCountArgs = - Omit & { - select?: ProductCountAggregateInputType | true - } - -export interface ProductDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Product'], meta: { name: 'Product' } } - /** - * Find zero or one Product that matches the filter. - * @param {ProductFindUniqueArgs} args - Arguments to find a Product - * @example - * // Get one Product - * const product = await prisma.product.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Product that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ProductFindUniqueOrThrowArgs} args - Arguments to find a Product - * @example - * // Get one Product - * const product = await prisma.product.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Product that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductFindFirstArgs} args - Arguments to find a Product - * @example - * // Get one Product - * const product = await prisma.product.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Product that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductFindFirstOrThrowArgs} args - Arguments to find a Product - * @example - * // Get one Product - * const product = await prisma.product.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Products that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Products - * const products = await prisma.product.findMany() - * - * // Get first 10 Products - * const products = await prisma.product.findMany({ take: 10 }) - * - * // Only select the `id` - * const productWithIdOnly = await prisma.product.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Product. - * @param {ProductCreateArgs} args - Arguments to create a Product. - * @example - * // Create one Product - * const Product = await prisma.product.create({ - * data: { - * // ... data to create a Product - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Products. - * @param {ProductCreateManyArgs} args - Arguments to create many Products. - * @example - * // Create many Products - * const product = await prisma.product.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a Product. - * @param {ProductDeleteArgs} args - Arguments to delete one Product. - * @example - * // Delete one Product - * const Product = await prisma.product.delete({ - * where: { - * // ... filter to delete one Product - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Product. - * @param {ProductUpdateArgs} args - Arguments to update one Product. - * @example - * // Update one Product - * const product = await prisma.product.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Products. - * @param {ProductDeleteManyArgs} args - Arguments to filter Products to delete. - * @example - * // Delete a few Products - * const { count } = await prisma.product.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Products. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Products - * const product = await prisma.product.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Product. - * @param {ProductUpsertArgs} args - Arguments to update or create a Product. - * @example - * // Update or create a Product - * const product = await prisma.product.upsert({ - * create: { - * // ... data to create a Product - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Product we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ProductClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Products. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductCountArgs} args - Arguments to filter Products to count. - * @example - * // Count the number of Products - * const count = await prisma.product.count({ - * where: { - * // ... the filter for the Products we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Product. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by Product. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ProductGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: ProductGroupByArgs['orderBy'] } - : { orderBy?: ProductGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetProductGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Product model - */ -readonly fields: ProductFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for Product. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__ProductClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - inventoryTransferItems = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - variants = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - brand = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductBrandClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - category = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductCategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - purchaseReceiptItems = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockAdjustments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockBalances = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockMovements = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - salesInvoiceItems = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockReservations = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - orderItems = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the Product model - */ -export interface ProductFieldRefs { - readonly id: Prisma.FieldRef<"Product", 'Int'> - readonly name: Prisma.FieldRef<"Product", 'String'> - readonly description: Prisma.FieldRef<"Product", 'String'> - readonly sku: Prisma.FieldRef<"Product", 'String'> - readonly barcode: Prisma.FieldRef<"Product", 'String'> - readonly createdAt: Prisma.FieldRef<"Product", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Product", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"Product", 'DateTime'> - readonly brandId: Prisma.FieldRef<"Product", 'Int'> - readonly categoryId: Prisma.FieldRef<"Product", 'Int'> - readonly salePrice: Prisma.FieldRef<"Product", 'Decimal'> - readonly minimumStockAlertLevel: Prisma.FieldRef<"Product", 'Decimal'> -} - - -// Custom InputTypes -/** - * Product findUnique - */ -export type ProductFindUniqueArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - /** - * Filter, which Product to fetch. - */ - where: Prisma.ProductWhereUniqueInput -} - -/** - * Product findUniqueOrThrow - */ -export type ProductFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - /** - * Filter, which Product to fetch. - */ - where: Prisma.ProductWhereUniqueInput -} - -/** - * Product findFirst - */ -export type ProductFindFirstArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - /** - * Filter, which Product to fetch. - */ - where?: Prisma.ProductWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Products to fetch. - */ - orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Products. - */ - cursor?: Prisma.ProductWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Products from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Products. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Products. - */ - distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] -} - -/** - * Product findFirstOrThrow - */ -export type ProductFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - /** - * Filter, which Product to fetch. - */ - where?: Prisma.ProductWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Products to fetch. - */ - orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Products. - */ - cursor?: Prisma.ProductWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Products from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Products. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Products. - */ - distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] -} - -/** - * Product findMany - */ -export type ProductFindManyArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - /** - * Filter, which Products to fetch. - */ - where?: Prisma.ProductWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Products to fetch. - */ - orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Products. - */ - cursor?: Prisma.ProductWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Products from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Products. - */ - skip?: number - distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] -} - -/** - * Product create - */ -export type ProductCreateArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - /** - * The data needed to create a Product. - */ - data: Prisma.XOR -} - -/** - * Product createMany - */ -export type ProductCreateManyArgs = { - /** - * The data used to create many Products. - */ - data: Prisma.ProductCreateManyInput | Prisma.ProductCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Product update - */ -export type ProductUpdateArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - /** - * The data needed to update a Product. - */ - data: Prisma.XOR - /** - * Choose, which Product to update. - */ - where: Prisma.ProductWhereUniqueInput -} - -/** - * Product updateMany - */ -export type ProductUpdateManyArgs = { - /** - * The data used to update Products. - */ - data: Prisma.XOR - /** - * Filter which Products to update - */ - where?: Prisma.ProductWhereInput - /** - * Limit how many Products to update. - */ - limit?: number -} - -/** - * Product upsert - */ -export type ProductUpsertArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - /** - * The filter to search for the Product to update in case it exists. - */ - where: Prisma.ProductWhereUniqueInput - /** - * In case the Product found by the `where` argument doesn't exist, create a new Product with this data. - */ - create: Prisma.XOR - /** - * In case the Product was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * Product delete - */ -export type ProductDeleteArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - /** - * Filter which Product to delete. - */ - where: Prisma.ProductWhereUniqueInput -} - -/** - * Product deleteMany - */ -export type ProductDeleteManyArgs = { - /** - * Filter which Products to delete - */ - where?: Prisma.ProductWhereInput - /** - * Limit how many Products to delete. - */ - limit?: number -} - -/** - * Product.inventoryTransferItems - */ -export type Product$inventoryTransferItemsArgs = { - /** - * Select specific fields to fetch from the InventoryTransferItem - */ - select?: Prisma.InventoryTransferItemSelect | null - /** - * Omit specific fields from the InventoryTransferItem - */ - omit?: Prisma.InventoryTransferItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryTransferItemInclude | null - where?: Prisma.InventoryTransferItemWhereInput - orderBy?: Prisma.InventoryTransferItemOrderByWithRelationInput | Prisma.InventoryTransferItemOrderByWithRelationInput[] - cursor?: Prisma.InventoryTransferItemWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.InventoryTransferItemScalarFieldEnum | Prisma.InventoryTransferItemScalarFieldEnum[] -} - -/** - * Product.variants - */ -export type Product$variantsArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - where?: Prisma.ProductVariantWhereInput - orderBy?: Prisma.ProductVariantOrderByWithRelationInput | Prisma.ProductVariantOrderByWithRelationInput[] - cursor?: Prisma.ProductVariantWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.ProductVariantScalarFieldEnum | Prisma.ProductVariantScalarFieldEnum[] -} - -/** - * Product.brand - */ -export type Product$brandArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - where?: Prisma.ProductBrandWhereInput -} - -/** - * Product.category - */ -export type Product$categoryArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - where?: Prisma.ProductCategoryWhereInput -} - -/** - * Product.purchaseReceiptItems - */ -export type Product$purchaseReceiptItemsArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - where?: Prisma.PurchaseReceiptItemWhereInput - orderBy?: Prisma.PurchaseReceiptItemOrderByWithRelationInput | Prisma.PurchaseReceiptItemOrderByWithRelationInput[] - cursor?: Prisma.PurchaseReceiptItemWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.PurchaseReceiptItemScalarFieldEnum | Prisma.PurchaseReceiptItemScalarFieldEnum[] -} - -/** - * Product.stockAdjustments - */ -export type Product$stockAdjustmentsArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - where?: Prisma.StockAdjustmentWhereInput - orderBy?: Prisma.StockAdjustmentOrderByWithRelationInput | Prisma.StockAdjustmentOrderByWithRelationInput[] - cursor?: Prisma.StockAdjustmentWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockAdjustmentScalarFieldEnum | Prisma.StockAdjustmentScalarFieldEnum[] -} - -/** - * Product.stockBalances - */ -export type Product$stockBalancesArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - where?: Prisma.StockBalanceWhereInput - orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[] - cursor?: Prisma.StockBalanceWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockBalanceScalarFieldEnum | Prisma.StockBalanceScalarFieldEnum[] -} - -/** - * Product.stockMovements - */ -export type Product$stockMovementsArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - where?: Prisma.StockMovementWhereInput - orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[] - cursor?: Prisma.StockMovementWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] -} - -/** - * Product.salesInvoiceItems - */ -export type Product$salesInvoiceItemsArgs = { - /** - * Select specific fields to fetch from the SalesInvoiceItem - */ - select?: Prisma.SalesInvoiceItemSelect | null - /** - * Omit specific fields from the SalesInvoiceItem - */ - omit?: Prisma.SalesInvoiceItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SalesInvoiceItemInclude | null - where?: Prisma.SalesInvoiceItemWhereInput - orderBy?: Prisma.SalesInvoiceItemOrderByWithRelationInput | Prisma.SalesInvoiceItemOrderByWithRelationInput[] - cursor?: Prisma.SalesInvoiceItemWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.SalesInvoiceItemScalarFieldEnum | Prisma.SalesInvoiceItemScalarFieldEnum[] -} - -/** - * Product.stockReservations - */ -export type Product$stockReservationsArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - where?: Prisma.StockReservationWhereInput - orderBy?: Prisma.StockReservationOrderByWithRelationInput | Prisma.StockReservationOrderByWithRelationInput[] - cursor?: Prisma.StockReservationWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockReservationScalarFieldEnum | Prisma.StockReservationScalarFieldEnum[] -} - -/** - * Product.orderItems - */ -export type Product$orderItemsArgs = { - /** - * Select specific fields to fetch from the OrderItem - */ - select?: Prisma.OrderItemSelect | null - /** - * Omit specific fields from the OrderItem - */ - omit?: Prisma.OrderItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.OrderItemInclude | null - where?: Prisma.OrderItemWhereInput - orderBy?: Prisma.OrderItemOrderByWithRelationInput | Prisma.OrderItemOrderByWithRelationInput[] - cursor?: Prisma.OrderItemWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.OrderItemScalarFieldEnum | Prisma.OrderItemScalarFieldEnum[] -} - -/** - * Product without action - */ -export type ProductDefaultArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null -} diff --git a/src/generated/prisma/models/ProductBrand.ts b/src/generated/prisma/models/ProductBrand.ts deleted file mode 100644 index b07467f..0000000 --- a/src/generated/prisma/models/ProductBrand.ts +++ /dev/null @@ -1,1315 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `ProductBrand` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model ProductBrand - * - */ -export type ProductBrandModel = runtime.Types.Result.DefaultSelection - -export type AggregateProductBrand = { - _count: ProductBrandCountAggregateOutputType | null - _avg: ProductBrandAvgAggregateOutputType | null - _sum: ProductBrandSumAggregateOutputType | null - _min: ProductBrandMinAggregateOutputType | null - _max: ProductBrandMaxAggregateOutputType | null -} - -export type ProductBrandAvgAggregateOutputType = { - id: number | null -} - -export type ProductBrandSumAggregateOutputType = { - id: number | null -} - -export type ProductBrandMinAggregateOutputType = { - id: number | null - name: string | null - description: string | null - imageUrl: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type ProductBrandMaxAggregateOutputType = { - id: number | null - name: string | null - description: string | null - imageUrl: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type ProductBrandCountAggregateOutputType = { - id: number - name: number - description: number - imageUrl: number - createdAt: number - updatedAt: number - deletedAt: number - _all: number -} - - -export type ProductBrandAvgAggregateInputType = { - id?: true -} - -export type ProductBrandSumAggregateInputType = { - id?: true -} - -export type ProductBrandMinAggregateInputType = { - id?: true - name?: true - description?: true - imageUrl?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type ProductBrandMaxAggregateInputType = { - id?: true - name?: true - description?: true - imageUrl?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type ProductBrandCountAggregateInputType = { - id?: true - name?: true - description?: true - imageUrl?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - _all?: true -} - -export type ProductBrandAggregateArgs = { - /** - * Filter which ProductBrand to aggregate. - */ - where?: Prisma.ProductBrandWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductBrands to fetch. - */ - orderBy?: Prisma.ProductBrandOrderByWithRelationInput | Prisma.ProductBrandOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.ProductBrandWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductBrands from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductBrands. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ProductBrands - **/ - _count?: true | ProductBrandCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ProductBrandAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ProductBrandSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ProductBrandMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ProductBrandMaxAggregateInputType -} - -export type GetProductBrandAggregateType = { - [P in keyof T & keyof AggregateProductBrand]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type ProductBrandGroupByArgs = { - where?: Prisma.ProductBrandWhereInput - orderBy?: Prisma.ProductBrandOrderByWithAggregationInput | Prisma.ProductBrandOrderByWithAggregationInput[] - by: Prisma.ProductBrandScalarFieldEnum[] | Prisma.ProductBrandScalarFieldEnum - having?: Prisma.ProductBrandScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ProductBrandCountAggregateInputType | true - _avg?: ProductBrandAvgAggregateInputType - _sum?: ProductBrandSumAggregateInputType - _min?: ProductBrandMinAggregateInputType - _max?: ProductBrandMaxAggregateInputType -} - -export type ProductBrandGroupByOutputType = { - id: number - name: string - description: string | null - imageUrl: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - _count: ProductBrandCountAggregateOutputType | null - _avg: ProductBrandAvgAggregateOutputType | null - _sum: ProductBrandSumAggregateOutputType | null - _min: ProductBrandMinAggregateOutputType | null - _max: ProductBrandMaxAggregateOutputType | null -} - -type GetProductBrandGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof ProductBrandGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type ProductBrandWhereInput = { - AND?: Prisma.ProductBrandWhereInput | Prisma.ProductBrandWhereInput[] - OR?: Prisma.ProductBrandWhereInput[] - NOT?: Prisma.ProductBrandWhereInput | Prisma.ProductBrandWhereInput[] - id?: Prisma.IntFilter<"ProductBrand"> | number - name?: Prisma.StringFilter<"ProductBrand"> | string - description?: Prisma.StringNullableFilter<"ProductBrand"> | string | null - imageUrl?: Prisma.StringNullableFilter<"ProductBrand"> | string | null - createdAt?: Prisma.DateTimeFilter<"ProductBrand"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductBrand"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductBrand"> | Date | string | null - products?: Prisma.ProductListRelationFilter -} - -export type ProductBrandOrderByWithRelationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - products?: Prisma.ProductOrderByRelationAggregateInput - _relevance?: Prisma.ProductBrandOrderByRelevanceInput -} - -export type ProductBrandWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.ProductBrandWhereInput | Prisma.ProductBrandWhereInput[] - OR?: Prisma.ProductBrandWhereInput[] - NOT?: Prisma.ProductBrandWhereInput | Prisma.ProductBrandWhereInput[] - name?: Prisma.StringFilter<"ProductBrand"> | string - description?: Prisma.StringNullableFilter<"ProductBrand"> | string | null - imageUrl?: Prisma.StringNullableFilter<"ProductBrand"> | string | null - createdAt?: Prisma.DateTimeFilter<"ProductBrand"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductBrand"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductBrand"> | Date | string | null - products?: Prisma.ProductListRelationFilter -}, "id"> - -export type ProductBrandOrderByWithAggregationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.ProductBrandCountOrderByAggregateInput - _avg?: Prisma.ProductBrandAvgOrderByAggregateInput - _max?: Prisma.ProductBrandMaxOrderByAggregateInput - _min?: Prisma.ProductBrandMinOrderByAggregateInput - _sum?: Prisma.ProductBrandSumOrderByAggregateInput -} - -export type ProductBrandScalarWhereWithAggregatesInput = { - AND?: Prisma.ProductBrandScalarWhereWithAggregatesInput | Prisma.ProductBrandScalarWhereWithAggregatesInput[] - OR?: Prisma.ProductBrandScalarWhereWithAggregatesInput[] - NOT?: Prisma.ProductBrandScalarWhereWithAggregatesInput | Prisma.ProductBrandScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"ProductBrand"> | number - name?: Prisma.StringWithAggregatesFilter<"ProductBrand"> | string - description?: Prisma.StringNullableWithAggregatesFilter<"ProductBrand"> | string | null - imageUrl?: Prisma.StringNullableWithAggregatesFilter<"ProductBrand"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"ProductBrand"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ProductBrand"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ProductBrand"> | Date | string | null -} - -export type ProductBrandCreateInput = { - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - products?: Prisma.ProductCreateNestedManyWithoutBrandInput -} - -export type ProductBrandUncheckedCreateInput = { - id?: number - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - products?: Prisma.ProductUncheckedCreateNestedManyWithoutBrandInput -} - -export type ProductBrandUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - products?: Prisma.ProductUpdateManyWithoutBrandNestedInput -} - -export type ProductBrandUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - products?: Prisma.ProductUncheckedUpdateManyWithoutBrandNestedInput -} - -export type ProductBrandCreateManyInput = { - id?: number - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type ProductBrandUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductBrandUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductBrandNullableScalarRelationFilter = { - is?: Prisma.ProductBrandWhereInput | null - isNot?: Prisma.ProductBrandWhereInput | null -} - -export type ProductBrandOrderByRelevanceInput = { - fields: Prisma.ProductBrandOrderByRelevanceFieldEnum | Prisma.ProductBrandOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type ProductBrandCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - imageUrl?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type ProductBrandAvgOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type ProductBrandMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - imageUrl?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type ProductBrandMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - imageUrl?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type ProductBrandSumOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type ProductBrandCreateNestedOneWithoutProductsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductBrandCreateOrConnectWithoutProductsInput - connect?: Prisma.ProductBrandWhereUniqueInput -} - -export type ProductBrandUpdateOneWithoutProductsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductBrandCreateOrConnectWithoutProductsInput - upsert?: Prisma.ProductBrandUpsertWithoutProductsInput - disconnect?: Prisma.ProductBrandWhereInput | boolean - delete?: Prisma.ProductBrandWhereInput | boolean - connect?: Prisma.ProductBrandWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductBrandUncheckedUpdateWithoutProductsInput> -} - -export type ProductBrandCreateWithoutProductsInput = { - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type ProductBrandUncheckedCreateWithoutProductsInput = { - id?: number - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type ProductBrandCreateOrConnectWithoutProductsInput = { - where: Prisma.ProductBrandWhereUniqueInput - create: Prisma.XOR -} - -export type ProductBrandUpsertWithoutProductsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductBrandWhereInput -} - -export type ProductBrandUpdateToOneWithWhereWithoutProductsInput = { - where?: Prisma.ProductBrandWhereInput - data: Prisma.XOR -} - -export type ProductBrandUpdateWithoutProductsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductBrandUncheckedUpdateWithoutProductsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - - -/** - * Count Type ProductBrandCountOutputType - */ - -export type ProductBrandCountOutputType = { - products: number -} - -export type ProductBrandCountOutputTypeSelect = { - products?: boolean | ProductBrandCountOutputTypeCountProductsArgs -} - -/** - * ProductBrandCountOutputType without action - */ -export type ProductBrandCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the ProductBrandCountOutputType - */ - select?: Prisma.ProductBrandCountOutputTypeSelect | null -} - -/** - * ProductBrandCountOutputType without action - */ -export type ProductBrandCountOutputTypeCountProductsArgs = { - where?: Prisma.ProductWhereInput -} - - -export type ProductBrandSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - imageUrl?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - products?: boolean | Prisma.ProductBrand$productsArgs - _count?: boolean | Prisma.ProductBrandCountOutputTypeDefaultArgs -}, ExtArgs["result"]["productBrand"]> - - - -export type ProductBrandSelectScalar = { - id?: boolean - name?: boolean - description?: boolean - imageUrl?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean -} - -export type ProductBrandOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "imageUrl" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["productBrand"]> -export type ProductBrandInclude = { - products?: boolean | Prisma.ProductBrand$productsArgs - _count?: boolean | Prisma.ProductBrandCountOutputTypeDefaultArgs -} - -export type $ProductBrandPayload = { - name: "ProductBrand" - objects: { - products: Prisma.$ProductPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - description: string | null - imageUrl: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - }, ExtArgs["result"]["productBrand"]> - composites: {} -} - -export type ProductBrandGetPayload = runtime.Types.Result.GetResult - -export type ProductBrandCountArgs = - Omit & { - select?: ProductBrandCountAggregateInputType | true - } - -export interface ProductBrandDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ProductBrand'], meta: { name: 'ProductBrand' } } - /** - * Find zero or one ProductBrand that matches the filter. - * @param {ProductBrandFindUniqueArgs} args - Arguments to find a ProductBrand - * @example - * // Get one ProductBrand - * const productBrand = await prisma.productBrand.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ProductBrandClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one ProductBrand that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ProductBrandFindUniqueOrThrowArgs} args - Arguments to find a ProductBrand - * @example - * // Get one ProductBrand - * const productBrand = await prisma.productBrand.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ProductBrandClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ProductBrand that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductBrandFindFirstArgs} args - Arguments to find a ProductBrand - * @example - * // Get one ProductBrand - * const productBrand = await prisma.productBrand.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductBrandClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ProductBrand that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductBrandFindFirstOrThrowArgs} args - Arguments to find a ProductBrand - * @example - * // Get one ProductBrand - * const productBrand = await prisma.productBrand.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductBrandClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more ProductBrands that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductBrandFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all ProductBrands - * const productBrands = await prisma.productBrand.findMany() - * - * // Get first 10 ProductBrands - * const productBrands = await prisma.productBrand.findMany({ take: 10 }) - * - * // Only select the `id` - * const productBrandWithIdOnly = await prisma.productBrand.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a ProductBrand. - * @param {ProductBrandCreateArgs} args - Arguments to create a ProductBrand. - * @example - * // Create one ProductBrand - * const ProductBrand = await prisma.productBrand.create({ - * data: { - * // ... data to create a ProductBrand - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__ProductBrandClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many ProductBrands. - * @param {ProductBrandCreateManyArgs} args - Arguments to create many ProductBrands. - * @example - * // Create many ProductBrands - * const productBrand = await prisma.productBrand.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a ProductBrand. - * @param {ProductBrandDeleteArgs} args - Arguments to delete one ProductBrand. - * @example - * // Delete one ProductBrand - * const ProductBrand = await prisma.productBrand.delete({ - * where: { - * // ... filter to delete one ProductBrand - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__ProductBrandClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one ProductBrand. - * @param {ProductBrandUpdateArgs} args - Arguments to update one ProductBrand. - * @example - * // Update one ProductBrand - * const productBrand = await prisma.productBrand.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__ProductBrandClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more ProductBrands. - * @param {ProductBrandDeleteManyArgs} args - Arguments to filter ProductBrands to delete. - * @example - * // Delete a few ProductBrands - * const { count } = await prisma.productBrand.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ProductBrands. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductBrandUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ProductBrands - * const productBrand = await prisma.productBrand.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one ProductBrand. - * @param {ProductBrandUpsertArgs} args - Arguments to update or create a ProductBrand. - * @example - * // Update or create a ProductBrand - * const productBrand = await prisma.productBrand.upsert({ - * create: { - * // ... data to create a ProductBrand - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ProductBrand we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ProductBrandClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of ProductBrands. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductBrandCountArgs} args - Arguments to filter ProductBrands to count. - * @example - * // Count the number of ProductBrands - * const count = await prisma.productBrand.count({ - * where: { - * // ... the filter for the ProductBrands we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a ProductBrand. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductBrandAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by ProductBrand. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductBrandGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ProductBrandGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: ProductBrandGroupByArgs['orderBy'] } - : { orderBy?: ProductBrandGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetProductBrandGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the ProductBrand model - */ -readonly fields: ProductBrandFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for ProductBrand. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__ProductBrandClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - products = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the ProductBrand model - */ -export interface ProductBrandFieldRefs { - readonly id: Prisma.FieldRef<"ProductBrand", 'Int'> - readonly name: Prisma.FieldRef<"ProductBrand", 'String'> - readonly description: Prisma.FieldRef<"ProductBrand", 'String'> - readonly imageUrl: Prisma.FieldRef<"ProductBrand", 'String'> - readonly createdAt: Prisma.FieldRef<"ProductBrand", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"ProductBrand", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"ProductBrand", 'DateTime'> -} - - -// Custom InputTypes -/** - * ProductBrand findUnique - */ -export type ProductBrandFindUniqueArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - /** - * Filter, which ProductBrand to fetch. - */ - where: Prisma.ProductBrandWhereUniqueInput -} - -/** - * ProductBrand findUniqueOrThrow - */ -export type ProductBrandFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - /** - * Filter, which ProductBrand to fetch. - */ - where: Prisma.ProductBrandWhereUniqueInput -} - -/** - * ProductBrand findFirst - */ -export type ProductBrandFindFirstArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - /** - * Filter, which ProductBrand to fetch. - */ - where?: Prisma.ProductBrandWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductBrands to fetch. - */ - orderBy?: Prisma.ProductBrandOrderByWithRelationInput | Prisma.ProductBrandOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProductBrands. - */ - cursor?: Prisma.ProductBrandWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductBrands from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductBrands. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProductBrands. - */ - distinct?: Prisma.ProductBrandScalarFieldEnum | Prisma.ProductBrandScalarFieldEnum[] -} - -/** - * ProductBrand findFirstOrThrow - */ -export type ProductBrandFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - /** - * Filter, which ProductBrand to fetch. - */ - where?: Prisma.ProductBrandWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductBrands to fetch. - */ - orderBy?: Prisma.ProductBrandOrderByWithRelationInput | Prisma.ProductBrandOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProductBrands. - */ - cursor?: Prisma.ProductBrandWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductBrands from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductBrands. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProductBrands. - */ - distinct?: Prisma.ProductBrandScalarFieldEnum | Prisma.ProductBrandScalarFieldEnum[] -} - -/** - * ProductBrand findMany - */ -export type ProductBrandFindManyArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - /** - * Filter, which ProductBrands to fetch. - */ - where?: Prisma.ProductBrandWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductBrands to fetch. - */ - orderBy?: Prisma.ProductBrandOrderByWithRelationInput | Prisma.ProductBrandOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ProductBrands. - */ - cursor?: Prisma.ProductBrandWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductBrands from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductBrands. - */ - skip?: number - distinct?: Prisma.ProductBrandScalarFieldEnum | Prisma.ProductBrandScalarFieldEnum[] -} - -/** - * ProductBrand create - */ -export type ProductBrandCreateArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - /** - * The data needed to create a ProductBrand. - */ - data: Prisma.XOR -} - -/** - * ProductBrand createMany - */ -export type ProductBrandCreateManyArgs = { - /** - * The data used to create many ProductBrands. - */ - data: Prisma.ProductBrandCreateManyInput | Prisma.ProductBrandCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * ProductBrand update - */ -export type ProductBrandUpdateArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - /** - * The data needed to update a ProductBrand. - */ - data: Prisma.XOR - /** - * Choose, which ProductBrand to update. - */ - where: Prisma.ProductBrandWhereUniqueInput -} - -/** - * ProductBrand updateMany - */ -export type ProductBrandUpdateManyArgs = { - /** - * The data used to update ProductBrands. - */ - data: Prisma.XOR - /** - * Filter which ProductBrands to update - */ - where?: Prisma.ProductBrandWhereInput - /** - * Limit how many ProductBrands to update. - */ - limit?: number -} - -/** - * ProductBrand upsert - */ -export type ProductBrandUpsertArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - /** - * The filter to search for the ProductBrand to update in case it exists. - */ - where: Prisma.ProductBrandWhereUniqueInput - /** - * In case the ProductBrand found by the `where` argument doesn't exist, create a new ProductBrand with this data. - */ - create: Prisma.XOR - /** - * In case the ProductBrand was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * ProductBrand delete - */ -export type ProductBrandDeleteArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null - /** - * Filter which ProductBrand to delete. - */ - where: Prisma.ProductBrandWhereUniqueInput -} - -/** - * ProductBrand deleteMany - */ -export type ProductBrandDeleteManyArgs = { - /** - * Filter which ProductBrands to delete - */ - where?: Prisma.ProductBrandWhereInput - /** - * Limit how many ProductBrands to delete. - */ - limit?: number -} - -/** - * ProductBrand.products - */ -export type ProductBrand$productsArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - where?: Prisma.ProductWhereInput - orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] - cursor?: Prisma.ProductWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] -} - -/** - * ProductBrand without action - */ -export type ProductBrandDefaultArgs = { - /** - * Select specific fields to fetch from the ProductBrand - */ - select?: Prisma.ProductBrandSelect | null - /** - * Omit specific fields from the ProductBrand - */ - omit?: Prisma.ProductBrandOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductBrandInclude | null -} diff --git a/src/generated/prisma/models/ProductCategory.ts b/src/generated/prisma/models/ProductCategory.ts deleted file mode 100644 index d0a1247..0000000 --- a/src/generated/prisma/models/ProductCategory.ts +++ /dev/null @@ -1,1315 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `ProductCategory` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model ProductCategory - * - */ -export type ProductCategoryModel = runtime.Types.Result.DefaultSelection - -export type AggregateProductCategory = { - _count: ProductCategoryCountAggregateOutputType | null - _avg: ProductCategoryAvgAggregateOutputType | null - _sum: ProductCategorySumAggregateOutputType | null - _min: ProductCategoryMinAggregateOutputType | null - _max: ProductCategoryMaxAggregateOutputType | null -} - -export type ProductCategoryAvgAggregateOutputType = { - id: number | null -} - -export type ProductCategorySumAggregateOutputType = { - id: number | null -} - -export type ProductCategoryMinAggregateOutputType = { - id: number | null - name: string | null - description: string | null - imageUrl: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type ProductCategoryMaxAggregateOutputType = { - id: number | null - name: string | null - description: string | null - imageUrl: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type ProductCategoryCountAggregateOutputType = { - id: number - name: number - description: number - imageUrl: number - createdAt: number - updatedAt: number - deletedAt: number - _all: number -} - - -export type ProductCategoryAvgAggregateInputType = { - id?: true -} - -export type ProductCategorySumAggregateInputType = { - id?: true -} - -export type ProductCategoryMinAggregateInputType = { - id?: true - name?: true - description?: true - imageUrl?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type ProductCategoryMaxAggregateInputType = { - id?: true - name?: true - description?: true - imageUrl?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type ProductCategoryCountAggregateInputType = { - id?: true - name?: true - description?: true - imageUrl?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - _all?: true -} - -export type ProductCategoryAggregateArgs = { - /** - * Filter which ProductCategory to aggregate. - */ - where?: Prisma.ProductCategoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductCategories to fetch. - */ - orderBy?: Prisma.ProductCategoryOrderByWithRelationInput | Prisma.ProductCategoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.ProductCategoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductCategories from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductCategories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ProductCategories - **/ - _count?: true | ProductCategoryCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ProductCategoryAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ProductCategorySumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ProductCategoryMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ProductCategoryMaxAggregateInputType -} - -export type GetProductCategoryAggregateType = { - [P in keyof T & keyof AggregateProductCategory]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type ProductCategoryGroupByArgs = { - where?: Prisma.ProductCategoryWhereInput - orderBy?: Prisma.ProductCategoryOrderByWithAggregationInput | Prisma.ProductCategoryOrderByWithAggregationInput[] - by: Prisma.ProductCategoryScalarFieldEnum[] | Prisma.ProductCategoryScalarFieldEnum - having?: Prisma.ProductCategoryScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ProductCategoryCountAggregateInputType | true - _avg?: ProductCategoryAvgAggregateInputType - _sum?: ProductCategorySumAggregateInputType - _min?: ProductCategoryMinAggregateInputType - _max?: ProductCategoryMaxAggregateInputType -} - -export type ProductCategoryGroupByOutputType = { - id: number - name: string - description: string | null - imageUrl: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - _count: ProductCategoryCountAggregateOutputType | null - _avg: ProductCategoryAvgAggregateOutputType | null - _sum: ProductCategorySumAggregateOutputType | null - _min: ProductCategoryMinAggregateOutputType | null - _max: ProductCategoryMaxAggregateOutputType | null -} - -type GetProductCategoryGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof ProductCategoryGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type ProductCategoryWhereInput = { - AND?: Prisma.ProductCategoryWhereInput | Prisma.ProductCategoryWhereInput[] - OR?: Prisma.ProductCategoryWhereInput[] - NOT?: Prisma.ProductCategoryWhereInput | Prisma.ProductCategoryWhereInput[] - id?: Prisma.IntFilter<"ProductCategory"> | number - name?: Prisma.StringFilter<"ProductCategory"> | string - description?: Prisma.StringNullableFilter<"ProductCategory"> | string | null - imageUrl?: Prisma.StringNullableFilter<"ProductCategory"> | string | null - createdAt?: Prisma.DateTimeFilter<"ProductCategory"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductCategory"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductCategory"> | Date | string | null - products?: Prisma.ProductListRelationFilter -} - -export type ProductCategoryOrderByWithRelationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - products?: Prisma.ProductOrderByRelationAggregateInput - _relevance?: Prisma.ProductCategoryOrderByRelevanceInput -} - -export type ProductCategoryWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.ProductCategoryWhereInput | Prisma.ProductCategoryWhereInput[] - OR?: Prisma.ProductCategoryWhereInput[] - NOT?: Prisma.ProductCategoryWhereInput | Prisma.ProductCategoryWhereInput[] - name?: Prisma.StringFilter<"ProductCategory"> | string - description?: Prisma.StringNullableFilter<"ProductCategory"> | string | null - imageUrl?: Prisma.StringNullableFilter<"ProductCategory"> | string | null - createdAt?: Prisma.DateTimeFilter<"ProductCategory"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductCategory"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductCategory"> | Date | string | null - products?: Prisma.ProductListRelationFilter -}, "id"> - -export type ProductCategoryOrderByWithAggregationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.ProductCategoryCountOrderByAggregateInput - _avg?: Prisma.ProductCategoryAvgOrderByAggregateInput - _max?: Prisma.ProductCategoryMaxOrderByAggregateInput - _min?: Prisma.ProductCategoryMinOrderByAggregateInput - _sum?: Prisma.ProductCategorySumOrderByAggregateInput -} - -export type ProductCategoryScalarWhereWithAggregatesInput = { - AND?: Prisma.ProductCategoryScalarWhereWithAggregatesInput | Prisma.ProductCategoryScalarWhereWithAggregatesInput[] - OR?: Prisma.ProductCategoryScalarWhereWithAggregatesInput[] - NOT?: Prisma.ProductCategoryScalarWhereWithAggregatesInput | Prisma.ProductCategoryScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"ProductCategory"> | number - name?: Prisma.StringWithAggregatesFilter<"ProductCategory"> | string - description?: Prisma.StringNullableWithAggregatesFilter<"ProductCategory"> | string | null - imageUrl?: Prisma.StringNullableWithAggregatesFilter<"ProductCategory"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"ProductCategory"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ProductCategory"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ProductCategory"> | Date | string | null -} - -export type ProductCategoryCreateInput = { - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - products?: Prisma.ProductCreateNestedManyWithoutCategoryInput -} - -export type ProductCategoryUncheckedCreateInput = { - id?: number - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - products?: Prisma.ProductUncheckedCreateNestedManyWithoutCategoryInput -} - -export type ProductCategoryUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - products?: Prisma.ProductUpdateManyWithoutCategoryNestedInput -} - -export type ProductCategoryUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - products?: Prisma.ProductUncheckedUpdateManyWithoutCategoryNestedInput -} - -export type ProductCategoryCreateManyInput = { - id?: number - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type ProductCategoryUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductCategoryUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductCategoryNullableScalarRelationFilter = { - is?: Prisma.ProductCategoryWhereInput | null - isNot?: Prisma.ProductCategoryWhereInput | null -} - -export type ProductCategoryOrderByRelevanceInput = { - fields: Prisma.ProductCategoryOrderByRelevanceFieldEnum | Prisma.ProductCategoryOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type ProductCategoryCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - imageUrl?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type ProductCategoryAvgOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type ProductCategoryMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - imageUrl?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type ProductCategoryMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - imageUrl?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type ProductCategorySumOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type ProductCategoryCreateNestedOneWithoutProductsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCategoryCreateOrConnectWithoutProductsInput - connect?: Prisma.ProductCategoryWhereUniqueInput -} - -export type ProductCategoryUpdateOneWithoutProductsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCategoryCreateOrConnectWithoutProductsInput - upsert?: Prisma.ProductCategoryUpsertWithoutProductsInput - disconnect?: Prisma.ProductCategoryWhereInput | boolean - delete?: Prisma.ProductCategoryWhereInput | boolean - connect?: Prisma.ProductCategoryWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductCategoryUncheckedUpdateWithoutProductsInput> -} - -export type ProductCategoryCreateWithoutProductsInput = { - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type ProductCategoryUncheckedCreateWithoutProductsInput = { - id?: number - name: string - description?: string | null - imageUrl?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type ProductCategoryCreateOrConnectWithoutProductsInput = { - where: Prisma.ProductCategoryWhereUniqueInput - create: Prisma.XOR -} - -export type ProductCategoryUpsertWithoutProductsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductCategoryWhereInput -} - -export type ProductCategoryUpdateToOneWithWhereWithoutProductsInput = { - where?: Prisma.ProductCategoryWhereInput - data: Prisma.XOR -} - -export type ProductCategoryUpdateWithoutProductsInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductCategoryUncheckedUpdateWithoutProductsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - - -/** - * Count Type ProductCategoryCountOutputType - */ - -export type ProductCategoryCountOutputType = { - products: number -} - -export type ProductCategoryCountOutputTypeSelect = { - products?: boolean | ProductCategoryCountOutputTypeCountProductsArgs -} - -/** - * ProductCategoryCountOutputType without action - */ -export type ProductCategoryCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the ProductCategoryCountOutputType - */ - select?: Prisma.ProductCategoryCountOutputTypeSelect | null -} - -/** - * ProductCategoryCountOutputType without action - */ -export type ProductCategoryCountOutputTypeCountProductsArgs = { - where?: Prisma.ProductWhereInput -} - - -export type ProductCategorySelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - imageUrl?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - products?: boolean | Prisma.ProductCategory$productsArgs - _count?: boolean | Prisma.ProductCategoryCountOutputTypeDefaultArgs -}, ExtArgs["result"]["productCategory"]> - - - -export type ProductCategorySelectScalar = { - id?: boolean - name?: boolean - description?: boolean - imageUrl?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean -} - -export type ProductCategoryOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "imageUrl" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["productCategory"]> -export type ProductCategoryInclude = { - products?: boolean | Prisma.ProductCategory$productsArgs - _count?: boolean | Prisma.ProductCategoryCountOutputTypeDefaultArgs -} - -export type $ProductCategoryPayload = { - name: "ProductCategory" - objects: { - products: Prisma.$ProductPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - description: string | null - imageUrl: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - }, ExtArgs["result"]["productCategory"]> - composites: {} -} - -export type ProductCategoryGetPayload = runtime.Types.Result.GetResult - -export type ProductCategoryCountArgs = - Omit & { - select?: ProductCategoryCountAggregateInputType | true - } - -export interface ProductCategoryDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ProductCategory'], meta: { name: 'ProductCategory' } } - /** - * Find zero or one ProductCategory that matches the filter. - * @param {ProductCategoryFindUniqueArgs} args - Arguments to find a ProductCategory - * @example - * // Get one ProductCategory - * const productCategory = await prisma.productCategory.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ProductCategoryClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one ProductCategory that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ProductCategoryFindUniqueOrThrowArgs} args - Arguments to find a ProductCategory - * @example - * // Get one ProductCategory - * const productCategory = await prisma.productCategory.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ProductCategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ProductCategory that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductCategoryFindFirstArgs} args - Arguments to find a ProductCategory - * @example - * // Get one ProductCategory - * const productCategory = await prisma.productCategory.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductCategoryClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ProductCategory that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductCategoryFindFirstOrThrowArgs} args - Arguments to find a ProductCategory - * @example - * // Get one ProductCategory - * const productCategory = await prisma.productCategory.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductCategoryClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more ProductCategories that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductCategoryFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all ProductCategories - * const productCategories = await prisma.productCategory.findMany() - * - * // Get first 10 ProductCategories - * const productCategories = await prisma.productCategory.findMany({ take: 10 }) - * - * // Only select the `id` - * const productCategoryWithIdOnly = await prisma.productCategory.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a ProductCategory. - * @param {ProductCategoryCreateArgs} args - Arguments to create a ProductCategory. - * @example - * // Create one ProductCategory - * const ProductCategory = await prisma.productCategory.create({ - * data: { - * // ... data to create a ProductCategory - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__ProductCategoryClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many ProductCategories. - * @param {ProductCategoryCreateManyArgs} args - Arguments to create many ProductCategories. - * @example - * // Create many ProductCategories - * const productCategory = await prisma.productCategory.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a ProductCategory. - * @param {ProductCategoryDeleteArgs} args - Arguments to delete one ProductCategory. - * @example - * // Delete one ProductCategory - * const ProductCategory = await prisma.productCategory.delete({ - * where: { - * // ... filter to delete one ProductCategory - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__ProductCategoryClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one ProductCategory. - * @param {ProductCategoryUpdateArgs} args - Arguments to update one ProductCategory. - * @example - * // Update one ProductCategory - * const productCategory = await prisma.productCategory.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__ProductCategoryClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more ProductCategories. - * @param {ProductCategoryDeleteManyArgs} args - Arguments to filter ProductCategories to delete. - * @example - * // Delete a few ProductCategories - * const { count } = await prisma.productCategory.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ProductCategories. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductCategoryUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ProductCategories - * const productCategory = await prisma.productCategory.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one ProductCategory. - * @param {ProductCategoryUpsertArgs} args - Arguments to update or create a ProductCategory. - * @example - * // Update or create a ProductCategory - * const productCategory = await prisma.productCategory.upsert({ - * create: { - * // ... data to create a ProductCategory - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ProductCategory we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ProductCategoryClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of ProductCategories. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductCategoryCountArgs} args - Arguments to filter ProductCategories to count. - * @example - * // Count the number of ProductCategories - * const count = await prisma.productCategory.count({ - * where: { - * // ... the filter for the ProductCategories we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a ProductCategory. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductCategoryAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by ProductCategory. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductCategoryGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ProductCategoryGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: ProductCategoryGroupByArgs['orderBy'] } - : { orderBy?: ProductCategoryGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetProductCategoryGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the ProductCategory model - */ -readonly fields: ProductCategoryFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for ProductCategory. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__ProductCategoryClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - products = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the ProductCategory model - */ -export interface ProductCategoryFieldRefs { - readonly id: Prisma.FieldRef<"ProductCategory", 'Int'> - readonly name: Prisma.FieldRef<"ProductCategory", 'String'> - readonly description: Prisma.FieldRef<"ProductCategory", 'String'> - readonly imageUrl: Prisma.FieldRef<"ProductCategory", 'String'> - readonly createdAt: Prisma.FieldRef<"ProductCategory", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"ProductCategory", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"ProductCategory", 'DateTime'> -} - - -// Custom InputTypes -/** - * ProductCategory findUnique - */ -export type ProductCategoryFindUniqueArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - /** - * Filter, which ProductCategory to fetch. - */ - where: Prisma.ProductCategoryWhereUniqueInput -} - -/** - * ProductCategory findUniqueOrThrow - */ -export type ProductCategoryFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - /** - * Filter, which ProductCategory to fetch. - */ - where: Prisma.ProductCategoryWhereUniqueInput -} - -/** - * ProductCategory findFirst - */ -export type ProductCategoryFindFirstArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - /** - * Filter, which ProductCategory to fetch. - */ - where?: Prisma.ProductCategoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductCategories to fetch. - */ - orderBy?: Prisma.ProductCategoryOrderByWithRelationInput | Prisma.ProductCategoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProductCategories. - */ - cursor?: Prisma.ProductCategoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductCategories from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductCategories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProductCategories. - */ - distinct?: Prisma.ProductCategoryScalarFieldEnum | Prisma.ProductCategoryScalarFieldEnum[] -} - -/** - * ProductCategory findFirstOrThrow - */ -export type ProductCategoryFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - /** - * Filter, which ProductCategory to fetch. - */ - where?: Prisma.ProductCategoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductCategories to fetch. - */ - orderBy?: Prisma.ProductCategoryOrderByWithRelationInput | Prisma.ProductCategoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProductCategories. - */ - cursor?: Prisma.ProductCategoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductCategories from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductCategories. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProductCategories. - */ - distinct?: Prisma.ProductCategoryScalarFieldEnum | Prisma.ProductCategoryScalarFieldEnum[] -} - -/** - * ProductCategory findMany - */ -export type ProductCategoryFindManyArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - /** - * Filter, which ProductCategories to fetch. - */ - where?: Prisma.ProductCategoryWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductCategories to fetch. - */ - orderBy?: Prisma.ProductCategoryOrderByWithRelationInput | Prisma.ProductCategoryOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ProductCategories. - */ - cursor?: Prisma.ProductCategoryWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductCategories from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductCategories. - */ - skip?: number - distinct?: Prisma.ProductCategoryScalarFieldEnum | Prisma.ProductCategoryScalarFieldEnum[] -} - -/** - * ProductCategory create - */ -export type ProductCategoryCreateArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - /** - * The data needed to create a ProductCategory. - */ - data: Prisma.XOR -} - -/** - * ProductCategory createMany - */ -export type ProductCategoryCreateManyArgs = { - /** - * The data used to create many ProductCategories. - */ - data: Prisma.ProductCategoryCreateManyInput | Prisma.ProductCategoryCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * ProductCategory update - */ -export type ProductCategoryUpdateArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - /** - * The data needed to update a ProductCategory. - */ - data: Prisma.XOR - /** - * Choose, which ProductCategory to update. - */ - where: Prisma.ProductCategoryWhereUniqueInput -} - -/** - * ProductCategory updateMany - */ -export type ProductCategoryUpdateManyArgs = { - /** - * The data used to update ProductCategories. - */ - data: Prisma.XOR - /** - * Filter which ProductCategories to update - */ - where?: Prisma.ProductCategoryWhereInput - /** - * Limit how many ProductCategories to update. - */ - limit?: number -} - -/** - * ProductCategory upsert - */ -export type ProductCategoryUpsertArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - /** - * The filter to search for the ProductCategory to update in case it exists. - */ - where: Prisma.ProductCategoryWhereUniqueInput - /** - * In case the ProductCategory found by the `where` argument doesn't exist, create a new ProductCategory with this data. - */ - create: Prisma.XOR - /** - * In case the ProductCategory was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * ProductCategory delete - */ -export type ProductCategoryDeleteArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null - /** - * Filter which ProductCategory to delete. - */ - where: Prisma.ProductCategoryWhereUniqueInput -} - -/** - * ProductCategory deleteMany - */ -export type ProductCategoryDeleteManyArgs = { - /** - * Filter which ProductCategories to delete - */ - where?: Prisma.ProductCategoryWhereInput - /** - * Limit how many ProductCategories to delete. - */ - limit?: number -} - -/** - * ProductCategory.products - */ -export type ProductCategory$productsArgs = { - /** - * Select specific fields to fetch from the Product - */ - select?: Prisma.ProductSelect | null - /** - * Omit specific fields from the Product - */ - omit?: Prisma.ProductOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductInclude | null - where?: Prisma.ProductWhereInput - orderBy?: Prisma.ProductOrderByWithRelationInput | Prisma.ProductOrderByWithRelationInput[] - cursor?: Prisma.ProductWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.ProductScalarFieldEnum | Prisma.ProductScalarFieldEnum[] -} - -/** - * ProductCategory without action - */ -export type ProductCategoryDefaultArgs = { - /** - * Select specific fields to fetch from the ProductCategory - */ - select?: Prisma.ProductCategorySelect | null - /** - * Omit specific fields from the ProductCategory - */ - omit?: Prisma.ProductCategoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductCategoryInclude | null -} diff --git a/src/generated/prisma/models/ProductVariant.ts b/src/generated/prisma/models/ProductVariant.ts deleted file mode 100644 index f15dcee..0000000 --- a/src/generated/prisma/models/ProductVariant.ts +++ /dev/null @@ -1,1658 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `ProductVariant` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model ProductVariant - * - */ -export type ProductVariantModel = runtime.Types.Result.DefaultSelection - -export type AggregateProductVariant = { - _count: ProductVariantCountAggregateOutputType | null - _avg: ProductVariantAvgAggregateOutputType | null - _sum: ProductVariantSumAggregateOutputType | null - _min: ProductVariantMinAggregateOutputType | null - _max: ProductVariantMaxAggregateOutputType | null -} - -export type ProductVariantAvgAggregateOutputType = { - id: number | null - basePrice: runtime.Decimal | null - salePrice: runtime.Decimal | null - quantity: runtime.Decimal | null - alertQuantity: runtime.Decimal | null - productId: number | null -} - -export type ProductVariantSumAggregateOutputType = { - id: number | null - basePrice: runtime.Decimal | null - salePrice: runtime.Decimal | null - quantity: runtime.Decimal | null - alertQuantity: runtime.Decimal | null - productId: number | null -} - -export type ProductVariantMinAggregateOutputType = { - id: number | null - name: string | null - basePrice: runtime.Decimal | null - salePrice: runtime.Decimal | null - description: string | null - barcode: string | null - imageUrl: string | null - unit: string | null - quantity: runtime.Decimal | null - alertQuantity: runtime.Decimal | null - isActive: boolean | null - isFeatured: boolean | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - productId: number | null -} - -export type ProductVariantMaxAggregateOutputType = { - id: number | null - name: string | null - basePrice: runtime.Decimal | null - salePrice: runtime.Decimal | null - description: string | null - barcode: string | null - imageUrl: string | null - unit: string | null - quantity: runtime.Decimal | null - alertQuantity: runtime.Decimal | null - isActive: boolean | null - isFeatured: boolean | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - productId: number | null -} - -export type ProductVariantCountAggregateOutputType = { - id: number - name: number - basePrice: number - salePrice: number - description: number - barcode: number - imageUrl: number - unit: number - quantity: number - alertQuantity: number - isActive: number - isFeatured: number - createdAt: number - updatedAt: number - deletedAt: number - productId: number - _all: number -} - - -export type ProductVariantAvgAggregateInputType = { - id?: true - basePrice?: true - salePrice?: true - quantity?: true - alertQuantity?: true - productId?: true -} - -export type ProductVariantSumAggregateInputType = { - id?: true - basePrice?: true - salePrice?: true - quantity?: true - alertQuantity?: true - productId?: true -} - -export type ProductVariantMinAggregateInputType = { - id?: true - name?: true - basePrice?: true - salePrice?: true - description?: true - barcode?: true - imageUrl?: true - unit?: true - quantity?: true - alertQuantity?: true - isActive?: true - isFeatured?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - productId?: true -} - -export type ProductVariantMaxAggregateInputType = { - id?: true - name?: true - basePrice?: true - salePrice?: true - description?: true - barcode?: true - imageUrl?: true - unit?: true - quantity?: true - alertQuantity?: true - isActive?: true - isFeatured?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - productId?: true -} - -export type ProductVariantCountAggregateInputType = { - id?: true - name?: true - basePrice?: true - salePrice?: true - description?: true - barcode?: true - imageUrl?: true - unit?: true - quantity?: true - alertQuantity?: true - isActive?: true - isFeatured?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - productId?: true - _all?: true -} - -export type ProductVariantAggregateArgs = { - /** - * Filter which ProductVariant to aggregate. - */ - where?: Prisma.ProductVariantWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductVariants to fetch. - */ - orderBy?: Prisma.ProductVariantOrderByWithRelationInput | Prisma.ProductVariantOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.ProductVariantWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductVariants from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductVariants. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ProductVariants - **/ - _count?: true | ProductVariantCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ProductVariantAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ProductVariantSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ProductVariantMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ProductVariantMaxAggregateInputType -} - -export type GetProductVariantAggregateType = { - [P in keyof T & keyof AggregateProductVariant]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type ProductVariantGroupByArgs = { - where?: Prisma.ProductVariantWhereInput - orderBy?: Prisma.ProductVariantOrderByWithAggregationInput | Prisma.ProductVariantOrderByWithAggregationInput[] - by: Prisma.ProductVariantScalarFieldEnum[] | Prisma.ProductVariantScalarFieldEnum - having?: Prisma.ProductVariantScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ProductVariantCountAggregateInputType | true - _avg?: ProductVariantAvgAggregateInputType - _sum?: ProductVariantSumAggregateInputType - _min?: ProductVariantMinAggregateInputType - _max?: ProductVariantMaxAggregateInputType -} - -export type ProductVariantGroupByOutputType = { - id: number - name: string - basePrice: runtime.Decimal - salePrice: runtime.Decimal - description: string | null - barcode: string | null - imageUrl: string | null - unit: string | null - quantity: runtime.Decimal | null - alertQuantity: runtime.Decimal | null - isActive: boolean - isFeatured: boolean - createdAt: Date - updatedAt: Date - deletedAt: Date | null - productId: number - _count: ProductVariantCountAggregateOutputType | null - _avg: ProductVariantAvgAggregateOutputType | null - _sum: ProductVariantSumAggregateOutputType | null - _min: ProductVariantMinAggregateOutputType | null - _max: ProductVariantMaxAggregateOutputType | null -} - -type GetProductVariantGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof ProductVariantGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type ProductVariantWhereInput = { - AND?: Prisma.ProductVariantWhereInput | Prisma.ProductVariantWhereInput[] - OR?: Prisma.ProductVariantWhereInput[] - NOT?: Prisma.ProductVariantWhereInput | Prisma.ProductVariantWhereInput[] - id?: Prisma.IntFilter<"ProductVariant"> | number - name?: Prisma.StringFilter<"ProductVariant"> | string - basePrice?: Prisma.DecimalFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - barcode?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - imageUrl?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - unit?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - quantity?: Prisma.DecimalNullableFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.DecimalNullableFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFilter<"ProductVariant"> | boolean - isFeatured?: Prisma.BoolFilter<"ProductVariant"> | boolean - createdAt?: Prisma.DateTimeFilter<"ProductVariant"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductVariant"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductVariant"> | Date | string | null - productId?: Prisma.IntFilter<"ProductVariant"> | number - product?: Prisma.XOR -} - -export type ProductVariantOrderByWithRelationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - basePrice?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - barcode?: Prisma.SortOrderInput | Prisma.SortOrder - imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder - unit?: Prisma.SortOrderInput | Prisma.SortOrder - quantity?: Prisma.SortOrderInput | Prisma.SortOrder - alertQuantity?: Prisma.SortOrderInput | Prisma.SortOrder - isActive?: Prisma.SortOrder - isFeatured?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - productId?: Prisma.SortOrder - product?: Prisma.ProductOrderByWithRelationInput - _relevance?: Prisma.ProductVariantOrderByRelevanceInput -} - -export type ProductVariantWhereUniqueInput = Prisma.AtLeast<{ - id?: number - barcode?: string - AND?: Prisma.ProductVariantWhereInput | Prisma.ProductVariantWhereInput[] - OR?: Prisma.ProductVariantWhereInput[] - NOT?: Prisma.ProductVariantWhereInput | Prisma.ProductVariantWhereInput[] - name?: Prisma.StringFilter<"ProductVariant"> | string - basePrice?: Prisma.DecimalFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - imageUrl?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - unit?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - quantity?: Prisma.DecimalNullableFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.DecimalNullableFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFilter<"ProductVariant"> | boolean - isFeatured?: Prisma.BoolFilter<"ProductVariant"> | boolean - createdAt?: Prisma.DateTimeFilter<"ProductVariant"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductVariant"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductVariant"> | Date | string | null - productId?: Prisma.IntFilter<"ProductVariant"> | number - product?: Prisma.XOR -}, "id" | "barcode"> - -export type ProductVariantOrderByWithAggregationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - basePrice?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - barcode?: Prisma.SortOrderInput | Prisma.SortOrder - imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder - unit?: Prisma.SortOrderInput | Prisma.SortOrder - quantity?: Prisma.SortOrderInput | Prisma.SortOrder - alertQuantity?: Prisma.SortOrderInput | Prisma.SortOrder - isActive?: Prisma.SortOrder - isFeatured?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - productId?: Prisma.SortOrder - _count?: Prisma.ProductVariantCountOrderByAggregateInput - _avg?: Prisma.ProductVariantAvgOrderByAggregateInput - _max?: Prisma.ProductVariantMaxOrderByAggregateInput - _min?: Prisma.ProductVariantMinOrderByAggregateInput - _sum?: Prisma.ProductVariantSumOrderByAggregateInput -} - -export type ProductVariantScalarWhereWithAggregatesInput = { - AND?: Prisma.ProductVariantScalarWhereWithAggregatesInput | Prisma.ProductVariantScalarWhereWithAggregatesInput[] - OR?: Prisma.ProductVariantScalarWhereWithAggregatesInput[] - NOT?: Prisma.ProductVariantScalarWhereWithAggregatesInput | Prisma.ProductVariantScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"ProductVariant"> | number - name?: Prisma.StringWithAggregatesFilter<"ProductVariant"> | string - basePrice?: Prisma.DecimalWithAggregatesFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalWithAggregatesFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableWithAggregatesFilter<"ProductVariant"> | string | null - barcode?: Prisma.StringNullableWithAggregatesFilter<"ProductVariant"> | string | null - imageUrl?: Prisma.StringNullableWithAggregatesFilter<"ProductVariant"> | string | null - unit?: Prisma.StringNullableWithAggregatesFilter<"ProductVariant"> | string | null - quantity?: Prisma.DecimalNullableWithAggregatesFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.DecimalNullableWithAggregatesFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolWithAggregatesFilter<"ProductVariant"> | boolean - isFeatured?: Prisma.BoolWithAggregatesFilter<"ProductVariant"> | boolean - createdAt?: Prisma.DateTimeWithAggregatesFilter<"ProductVariant"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ProductVariant"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ProductVariant"> | Date | string | null - productId?: Prisma.IntWithAggregatesFilter<"ProductVariant"> | number -} - -export type ProductVariantCreateInput = { - name: string - basePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - barcode?: string | null - imageUrl?: string | null - unit?: string | null - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: boolean - isFeatured?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - product: Prisma.ProductCreateNestedOneWithoutVariantsInput -} - -export type ProductVariantUncheckedCreateInput = { - id?: number - name: string - basePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - barcode?: string | null - imageUrl?: string | null - unit?: string | null - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: boolean - isFeatured?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - productId: number -} - -export type ProductVariantUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - basePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - unit?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - quantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isFeatured?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - product?: Prisma.ProductUpdateOneRequiredWithoutVariantsNestedInput -} - -export type ProductVariantUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - basePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - unit?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - quantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isFeatured?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type ProductVariantCreateManyInput = { - id?: number - name: string - basePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - barcode?: string | null - imageUrl?: string | null - unit?: string | null - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: boolean - isFeatured?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - productId: number -} - -export type ProductVariantUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - basePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - unit?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - quantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isFeatured?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductVariantUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - basePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - unit?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - quantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isFeatured?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type ProductVariantOrderByRelevanceInput = { - fields: Prisma.ProductVariantOrderByRelevanceFieldEnum | Prisma.ProductVariantOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type ProductVariantCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - basePrice?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - description?: Prisma.SortOrder - barcode?: Prisma.SortOrder - imageUrl?: Prisma.SortOrder - unit?: Prisma.SortOrder - quantity?: Prisma.SortOrder - alertQuantity?: Prisma.SortOrder - isActive?: Prisma.SortOrder - isFeatured?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type ProductVariantAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - basePrice?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - quantity?: Prisma.SortOrder - alertQuantity?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type ProductVariantMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - basePrice?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - description?: Prisma.SortOrder - barcode?: Prisma.SortOrder - imageUrl?: Prisma.SortOrder - unit?: Prisma.SortOrder - quantity?: Prisma.SortOrder - alertQuantity?: Prisma.SortOrder - isActive?: Prisma.SortOrder - isFeatured?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type ProductVariantMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - basePrice?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - description?: Prisma.SortOrder - barcode?: Prisma.SortOrder - imageUrl?: Prisma.SortOrder - unit?: Prisma.SortOrder - quantity?: Prisma.SortOrder - alertQuantity?: Prisma.SortOrder - isActive?: Prisma.SortOrder - isFeatured?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type ProductVariantSumOrderByAggregateInput = { - id?: Prisma.SortOrder - basePrice?: Prisma.SortOrder - salePrice?: Prisma.SortOrder - quantity?: Prisma.SortOrder - alertQuantity?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type ProductVariantListRelationFilter = { - every?: Prisma.ProductVariantWhereInput - some?: Prisma.ProductVariantWhereInput - none?: Prisma.ProductVariantWhereInput -} - -export type ProductVariantOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type NullableDecimalFieldUpdateOperationsInput = { - set?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - increment?: runtime.Decimal | runtime.DecimalJsLike | number | string - decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string - multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string - divide?: runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type ProductVariantCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.ProductVariantCreateWithoutProductInput[] | Prisma.ProductVariantUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.ProductVariantCreateOrConnectWithoutProductInput | Prisma.ProductVariantCreateOrConnectWithoutProductInput[] - createMany?: Prisma.ProductVariantCreateManyProductInputEnvelope - connect?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] -} - -export type ProductVariantUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.ProductVariantCreateWithoutProductInput[] | Prisma.ProductVariantUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.ProductVariantCreateOrConnectWithoutProductInput | Prisma.ProductVariantCreateOrConnectWithoutProductInput[] - createMany?: Prisma.ProductVariantCreateManyProductInputEnvelope - connect?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] -} - -export type ProductVariantUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.ProductVariantCreateWithoutProductInput[] | Prisma.ProductVariantUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.ProductVariantCreateOrConnectWithoutProductInput | Prisma.ProductVariantCreateOrConnectWithoutProductInput[] - upsert?: Prisma.ProductVariantUpsertWithWhereUniqueWithoutProductInput | Prisma.ProductVariantUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.ProductVariantCreateManyProductInputEnvelope - set?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] - disconnect?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] - delete?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] - connect?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] - update?: Prisma.ProductVariantUpdateWithWhereUniqueWithoutProductInput | Prisma.ProductVariantUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.ProductVariantUpdateManyWithWhereWithoutProductInput | Prisma.ProductVariantUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.ProductVariantScalarWhereInput | Prisma.ProductVariantScalarWhereInput[] -} - -export type ProductVariantUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.ProductVariantCreateWithoutProductInput[] | Prisma.ProductVariantUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.ProductVariantCreateOrConnectWithoutProductInput | Prisma.ProductVariantCreateOrConnectWithoutProductInput[] - upsert?: Prisma.ProductVariantUpsertWithWhereUniqueWithoutProductInput | Prisma.ProductVariantUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.ProductVariantCreateManyProductInputEnvelope - set?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] - disconnect?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] - delete?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] - connect?: Prisma.ProductVariantWhereUniqueInput | Prisma.ProductVariantWhereUniqueInput[] - update?: Prisma.ProductVariantUpdateWithWhereUniqueWithoutProductInput | Prisma.ProductVariantUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.ProductVariantUpdateManyWithWhereWithoutProductInput | Prisma.ProductVariantUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.ProductVariantScalarWhereInput | Prisma.ProductVariantScalarWhereInput[] -} - -export type ProductVariantCreateWithoutProductInput = { - name: string - basePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - barcode?: string | null - imageUrl?: string | null - unit?: string | null - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: boolean - isFeatured?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type ProductVariantUncheckedCreateWithoutProductInput = { - id?: number - name: string - basePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - barcode?: string | null - imageUrl?: string | null - unit?: string | null - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: boolean - isFeatured?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type ProductVariantCreateOrConnectWithoutProductInput = { - where: Prisma.ProductVariantWhereUniqueInput - create: Prisma.XOR -} - -export type ProductVariantCreateManyProductInputEnvelope = { - data: Prisma.ProductVariantCreateManyProductInput | Prisma.ProductVariantCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type ProductVariantUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.ProductVariantWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type ProductVariantUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.ProductVariantWhereUniqueInput - data: Prisma.XOR -} - -export type ProductVariantUpdateManyWithWhereWithoutProductInput = { - where: Prisma.ProductVariantScalarWhereInput - data: Prisma.XOR -} - -export type ProductVariantScalarWhereInput = { - AND?: Prisma.ProductVariantScalarWhereInput | Prisma.ProductVariantScalarWhereInput[] - OR?: Prisma.ProductVariantScalarWhereInput[] - NOT?: Prisma.ProductVariantScalarWhereInput | Prisma.ProductVariantScalarWhereInput[] - id?: Prisma.IntFilter<"ProductVariant"> | number - name?: Prisma.StringFilter<"ProductVariant"> | string - basePrice?: Prisma.DecimalFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - barcode?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - imageUrl?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - unit?: Prisma.StringNullableFilter<"ProductVariant"> | string | null - quantity?: Prisma.DecimalNullableFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.DecimalNullableFilter<"ProductVariant"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFilter<"ProductVariant"> | boolean - isFeatured?: Prisma.BoolFilter<"ProductVariant"> | boolean - createdAt?: Prisma.DateTimeFilter<"ProductVariant"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductVariant"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductVariant"> | Date | string | null - productId?: Prisma.IntFilter<"ProductVariant"> | number -} - -export type ProductVariantCreateManyProductInput = { - id?: number - name: string - basePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - barcode?: string | null - imageUrl?: string | null - unit?: string | null - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: boolean - isFeatured?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type ProductVariantUpdateWithoutProductInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - basePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - unit?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - quantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isFeatured?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductVariantUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - basePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - unit?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - quantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isFeatured?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductVariantUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - basePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - unit?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - quantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - alertQuantity?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isFeatured?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - - - -export type ProductVariantSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - basePrice?: boolean - salePrice?: boolean - description?: boolean - barcode?: boolean - imageUrl?: boolean - unit?: boolean - quantity?: boolean - alertQuantity?: boolean - isActive?: boolean - isFeatured?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - productId?: boolean - product?: boolean | Prisma.ProductDefaultArgs -}, ExtArgs["result"]["productVariant"]> - - - -export type ProductVariantSelectScalar = { - id?: boolean - name?: boolean - basePrice?: boolean - salePrice?: boolean - description?: boolean - barcode?: boolean - imageUrl?: boolean - unit?: boolean - quantity?: boolean - alertQuantity?: boolean - isActive?: boolean - isFeatured?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - productId?: boolean -} - -export type ProductVariantOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "basePrice" | "salePrice" | "description" | "barcode" | "imageUrl" | "unit" | "quantity" | "alertQuantity" | "isActive" | "isFeatured" | "createdAt" | "updatedAt" | "deletedAt" | "productId", ExtArgs["result"]["productVariant"]> -export type ProductVariantInclude = { - product?: boolean | Prisma.ProductDefaultArgs -} - -export type $ProductVariantPayload = { - name: "ProductVariant" - objects: { - product: Prisma.$ProductPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - basePrice: runtime.Decimal - salePrice: runtime.Decimal - description: string | null - barcode: string | null - imageUrl: string | null - unit: string | null - quantity: runtime.Decimal | null - alertQuantity: runtime.Decimal | null - isActive: boolean - isFeatured: boolean - createdAt: Date - updatedAt: Date - deletedAt: Date | null - productId: number - }, ExtArgs["result"]["productVariant"]> - composites: {} -} - -export type ProductVariantGetPayload = runtime.Types.Result.GetResult - -export type ProductVariantCountArgs = - Omit & { - select?: ProductVariantCountAggregateInputType | true - } - -export interface ProductVariantDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ProductVariant'], meta: { name: 'ProductVariant' } } - /** - * Find zero or one ProductVariant that matches the filter. - * @param {ProductVariantFindUniqueArgs} args - Arguments to find a ProductVariant - * @example - * // Get one ProductVariant - * const productVariant = await prisma.productVariant.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ProductVariantClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one ProductVariant that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ProductVariantFindUniqueOrThrowArgs} args - Arguments to find a ProductVariant - * @example - * // Get one ProductVariant - * const productVariant = await prisma.productVariant.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ProductVariantClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ProductVariant that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductVariantFindFirstArgs} args - Arguments to find a ProductVariant - * @example - * // Get one ProductVariant - * const productVariant = await prisma.productVariant.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductVariantClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ProductVariant that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductVariantFindFirstOrThrowArgs} args - Arguments to find a ProductVariant - * @example - * // Get one ProductVariant - * const productVariant = await prisma.productVariant.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductVariantClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more ProductVariants that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductVariantFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all ProductVariants - * const productVariants = await prisma.productVariant.findMany() - * - * // Get first 10 ProductVariants - * const productVariants = await prisma.productVariant.findMany({ take: 10 }) - * - * // Only select the `id` - * const productVariantWithIdOnly = await prisma.productVariant.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a ProductVariant. - * @param {ProductVariantCreateArgs} args - Arguments to create a ProductVariant. - * @example - * // Create one ProductVariant - * const ProductVariant = await prisma.productVariant.create({ - * data: { - * // ... data to create a ProductVariant - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__ProductVariantClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many ProductVariants. - * @param {ProductVariantCreateManyArgs} args - Arguments to create many ProductVariants. - * @example - * // Create many ProductVariants - * const productVariant = await prisma.productVariant.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a ProductVariant. - * @param {ProductVariantDeleteArgs} args - Arguments to delete one ProductVariant. - * @example - * // Delete one ProductVariant - * const ProductVariant = await prisma.productVariant.delete({ - * where: { - * // ... filter to delete one ProductVariant - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__ProductVariantClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one ProductVariant. - * @param {ProductVariantUpdateArgs} args - Arguments to update one ProductVariant. - * @example - * // Update one ProductVariant - * const productVariant = await prisma.productVariant.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__ProductVariantClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more ProductVariants. - * @param {ProductVariantDeleteManyArgs} args - Arguments to filter ProductVariants to delete. - * @example - * // Delete a few ProductVariants - * const { count } = await prisma.productVariant.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ProductVariants. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductVariantUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ProductVariants - * const productVariant = await prisma.productVariant.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one ProductVariant. - * @param {ProductVariantUpsertArgs} args - Arguments to update or create a ProductVariant. - * @example - * // Update or create a ProductVariant - * const productVariant = await prisma.productVariant.upsert({ - * create: { - * // ... data to create a ProductVariant - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ProductVariant we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ProductVariantClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of ProductVariants. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductVariantCountArgs} args - Arguments to filter ProductVariants to count. - * @example - * // Count the number of ProductVariants - * const count = await prisma.productVariant.count({ - * where: { - * // ... the filter for the ProductVariants we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a ProductVariant. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductVariantAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by ProductVariant. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductVariantGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends ProductVariantGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: ProductVariantGroupByArgs['orderBy'] } - : { orderBy?: ProductVariantGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetProductVariantGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the ProductVariant model - */ -readonly fields: ProductVariantFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for ProductVariant. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__ProductVariantClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the ProductVariant model - */ -export interface ProductVariantFieldRefs { - readonly id: Prisma.FieldRef<"ProductVariant", 'Int'> - readonly name: Prisma.FieldRef<"ProductVariant", 'String'> - readonly basePrice: Prisma.FieldRef<"ProductVariant", 'Decimal'> - readonly salePrice: Prisma.FieldRef<"ProductVariant", 'Decimal'> - readonly description: Prisma.FieldRef<"ProductVariant", 'String'> - readonly barcode: Prisma.FieldRef<"ProductVariant", 'String'> - readonly imageUrl: Prisma.FieldRef<"ProductVariant", 'String'> - readonly unit: Prisma.FieldRef<"ProductVariant", 'String'> - readonly quantity: Prisma.FieldRef<"ProductVariant", 'Decimal'> - readonly alertQuantity: Prisma.FieldRef<"ProductVariant", 'Decimal'> - readonly isActive: Prisma.FieldRef<"ProductVariant", 'Boolean'> - readonly isFeatured: Prisma.FieldRef<"ProductVariant", 'Boolean'> - readonly createdAt: Prisma.FieldRef<"ProductVariant", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"ProductVariant", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"ProductVariant", 'DateTime'> - readonly productId: Prisma.FieldRef<"ProductVariant", 'Int'> -} - - -// Custom InputTypes -/** - * ProductVariant findUnique - */ -export type ProductVariantFindUniqueArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - /** - * Filter, which ProductVariant to fetch. - */ - where: Prisma.ProductVariantWhereUniqueInput -} - -/** - * ProductVariant findUniqueOrThrow - */ -export type ProductVariantFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - /** - * Filter, which ProductVariant to fetch. - */ - where: Prisma.ProductVariantWhereUniqueInput -} - -/** - * ProductVariant findFirst - */ -export type ProductVariantFindFirstArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - /** - * Filter, which ProductVariant to fetch. - */ - where?: Prisma.ProductVariantWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductVariants to fetch. - */ - orderBy?: Prisma.ProductVariantOrderByWithRelationInput | Prisma.ProductVariantOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProductVariants. - */ - cursor?: Prisma.ProductVariantWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductVariants from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductVariants. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProductVariants. - */ - distinct?: Prisma.ProductVariantScalarFieldEnum | Prisma.ProductVariantScalarFieldEnum[] -} - -/** - * ProductVariant findFirstOrThrow - */ -export type ProductVariantFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - /** - * Filter, which ProductVariant to fetch. - */ - where?: Prisma.ProductVariantWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductVariants to fetch. - */ - orderBy?: Prisma.ProductVariantOrderByWithRelationInput | Prisma.ProductVariantOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProductVariants. - */ - cursor?: Prisma.ProductVariantWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductVariants from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductVariants. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProductVariants. - */ - distinct?: Prisma.ProductVariantScalarFieldEnum | Prisma.ProductVariantScalarFieldEnum[] -} - -/** - * ProductVariant findMany - */ -export type ProductVariantFindManyArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - /** - * Filter, which ProductVariants to fetch. - */ - where?: Prisma.ProductVariantWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductVariants to fetch. - */ - orderBy?: Prisma.ProductVariantOrderByWithRelationInput | Prisma.ProductVariantOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ProductVariants. - */ - cursor?: Prisma.ProductVariantWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductVariants from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` ProductVariants. - */ - skip?: number - distinct?: Prisma.ProductVariantScalarFieldEnum | Prisma.ProductVariantScalarFieldEnum[] -} - -/** - * ProductVariant create - */ -export type ProductVariantCreateArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - /** - * The data needed to create a ProductVariant. - */ - data: Prisma.XOR -} - -/** - * ProductVariant createMany - */ -export type ProductVariantCreateManyArgs = { - /** - * The data used to create many ProductVariants. - */ - data: Prisma.ProductVariantCreateManyInput | Prisma.ProductVariantCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * ProductVariant update - */ -export type ProductVariantUpdateArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - /** - * The data needed to update a ProductVariant. - */ - data: Prisma.XOR - /** - * Choose, which ProductVariant to update. - */ - where: Prisma.ProductVariantWhereUniqueInput -} - -/** - * ProductVariant updateMany - */ -export type ProductVariantUpdateManyArgs = { - /** - * The data used to update ProductVariants. - */ - data: Prisma.XOR - /** - * Filter which ProductVariants to update - */ - where?: Prisma.ProductVariantWhereInput - /** - * Limit how many ProductVariants to update. - */ - limit?: number -} - -/** - * ProductVariant upsert - */ -export type ProductVariantUpsertArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - /** - * The filter to search for the ProductVariant to update in case it exists. - */ - where: Prisma.ProductVariantWhereUniqueInput - /** - * In case the ProductVariant found by the `where` argument doesn't exist, create a new ProductVariant with this data. - */ - create: Prisma.XOR - /** - * In case the ProductVariant was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * ProductVariant delete - */ -export type ProductVariantDeleteArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null - /** - * Filter which ProductVariant to delete. - */ - where: Prisma.ProductVariantWhereUniqueInput -} - -/** - * ProductVariant deleteMany - */ -export type ProductVariantDeleteManyArgs = { - /** - * Filter which ProductVariants to delete - */ - where?: Prisma.ProductVariantWhereInput - /** - * Limit how many ProductVariants to delete. - */ - limit?: number -} - -/** - * ProductVariant without action - */ -export type ProductVariantDefaultArgs = { - /** - * Select specific fields to fetch from the ProductVariant - */ - select?: Prisma.ProductVariantSelect | null - /** - * Omit specific fields from the ProductVariant - */ - omit?: Prisma.ProductVariantOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductVariantInclude | null -} diff --git a/src/generated/prisma/models/PurchaseReceipt.ts b/src/generated/prisma/models/PurchaseReceipt.ts deleted file mode 100644 index 274ac2e..0000000 --- a/src/generated/prisma/models/PurchaseReceipt.ts +++ /dev/null @@ -1,1893 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `PurchaseReceipt` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model PurchaseReceipt - * - */ -export type PurchaseReceiptModel = runtime.Types.Result.DefaultSelection - -export type AggregatePurchaseReceipt = { - _count: PurchaseReceiptCountAggregateOutputType | null - _avg: PurchaseReceiptAvgAggregateOutputType | null - _sum: PurchaseReceiptSumAggregateOutputType | null - _min: PurchaseReceiptMinAggregateOutputType | null - _max: PurchaseReceiptMaxAggregateOutputType | null -} - -export type PurchaseReceiptAvgAggregateOutputType = { - id: number | null - totalAmount: runtime.Decimal | null - paidAmount: runtime.Decimal | null - supplierId: number | null - inventoryId: number | null -} - -export type PurchaseReceiptSumAggregateOutputType = { - id: number | null - totalAmount: runtime.Decimal | null - paidAmount: runtime.Decimal | null - supplierId: number | null - inventoryId: number | null -} - -export type PurchaseReceiptMinAggregateOutputType = { - id: number | null - code: string | null - totalAmount: runtime.Decimal | null - paidAmount: runtime.Decimal | null - description: string | null - createdAt: Date | null - updatedAt: Date | null - status: $Enums.PurchaseReceiptStatus | null - supplierId: number | null - inventoryId: number | null -} - -export type PurchaseReceiptMaxAggregateOutputType = { - id: number | null - code: string | null - totalAmount: runtime.Decimal | null - paidAmount: runtime.Decimal | null - description: string | null - createdAt: Date | null - updatedAt: Date | null - status: $Enums.PurchaseReceiptStatus | null - supplierId: number | null - inventoryId: number | null -} - -export type PurchaseReceiptCountAggregateOutputType = { - id: number - code: number - totalAmount: number - paidAmount: number - description: number - createdAt: number - updatedAt: number - status: number - supplierId: number - inventoryId: number - _all: number -} - - -export type PurchaseReceiptAvgAggregateInputType = { - id?: true - totalAmount?: true - paidAmount?: true - supplierId?: true - inventoryId?: true -} - -export type PurchaseReceiptSumAggregateInputType = { - id?: true - totalAmount?: true - paidAmount?: true - supplierId?: true - inventoryId?: true -} - -export type PurchaseReceiptMinAggregateInputType = { - id?: true - code?: true - totalAmount?: true - paidAmount?: true - description?: true - createdAt?: true - updatedAt?: true - status?: true - supplierId?: true - inventoryId?: true -} - -export type PurchaseReceiptMaxAggregateInputType = { - id?: true - code?: true - totalAmount?: true - paidAmount?: true - description?: true - createdAt?: true - updatedAt?: true - status?: true - supplierId?: true - inventoryId?: true -} - -export type PurchaseReceiptCountAggregateInputType = { - id?: true - code?: true - totalAmount?: true - paidAmount?: true - description?: true - createdAt?: true - updatedAt?: true - status?: true - supplierId?: true - inventoryId?: true - _all?: true -} - -export type PurchaseReceiptAggregateArgs = { - /** - * Filter which PurchaseReceipt to aggregate. - */ - where?: Prisma.PurchaseReceiptWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceipts to fetch. - */ - orderBy?: Prisma.PurchaseReceiptOrderByWithRelationInput | Prisma.PurchaseReceiptOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.PurchaseReceiptWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceipts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceipts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned PurchaseReceipts - **/ - _count?: true | PurchaseReceiptCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: PurchaseReceiptAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: PurchaseReceiptSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: PurchaseReceiptMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: PurchaseReceiptMaxAggregateInputType -} - -export type GetPurchaseReceiptAggregateType = { - [P in keyof T & keyof AggregatePurchaseReceipt]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type PurchaseReceiptGroupByArgs = { - where?: Prisma.PurchaseReceiptWhereInput - orderBy?: Prisma.PurchaseReceiptOrderByWithAggregationInput | Prisma.PurchaseReceiptOrderByWithAggregationInput[] - by: Prisma.PurchaseReceiptScalarFieldEnum[] | Prisma.PurchaseReceiptScalarFieldEnum - having?: Prisma.PurchaseReceiptScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: PurchaseReceiptCountAggregateInputType | true - _avg?: PurchaseReceiptAvgAggregateInputType - _sum?: PurchaseReceiptSumAggregateInputType - _min?: PurchaseReceiptMinAggregateInputType - _max?: PurchaseReceiptMaxAggregateInputType -} - -export type PurchaseReceiptGroupByOutputType = { - id: number - code: string - totalAmount: runtime.Decimal - paidAmount: runtime.Decimal - description: string | null - createdAt: Date - updatedAt: Date - status: $Enums.PurchaseReceiptStatus - supplierId: number - inventoryId: number - _count: PurchaseReceiptCountAggregateOutputType | null - _avg: PurchaseReceiptAvgAggregateOutputType | null - _sum: PurchaseReceiptSumAggregateOutputType | null - _min: PurchaseReceiptMinAggregateOutputType | null - _max: PurchaseReceiptMaxAggregateOutputType | null -} - -type GetPurchaseReceiptGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof PurchaseReceiptGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type PurchaseReceiptWhereInput = { - AND?: Prisma.PurchaseReceiptWhereInput | Prisma.PurchaseReceiptWhereInput[] - OR?: Prisma.PurchaseReceiptWhereInput[] - NOT?: Prisma.PurchaseReceiptWhereInput | Prisma.PurchaseReceiptWhereInput[] - id?: Prisma.IntFilter<"PurchaseReceipt"> | number - code?: Prisma.StringFilter<"PurchaseReceipt"> | string - totalAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFilter<"PurchaseReceipt"> | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntFilter<"PurchaseReceipt"> | number - inventoryId?: Prisma.IntFilter<"PurchaseReceipt"> | number - items?: Prisma.PurchaseReceiptItemListRelationFilter - inventory?: Prisma.XOR - supplier?: Prisma.XOR - payments?: Prisma.PurchaseReceiptPaymentsListRelationFilter -} - -export type PurchaseReceiptOrderByWithRelationInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - paidAmount?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - status?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - items?: Prisma.PurchaseReceiptItemOrderByRelationAggregateInput - inventory?: Prisma.InventoryOrderByWithRelationInput - supplier?: Prisma.SupplierOrderByWithRelationInput - payments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput - _relevance?: Prisma.PurchaseReceiptOrderByRelevanceInput -} - -export type PurchaseReceiptWhereUniqueInput = Prisma.AtLeast<{ - id?: number - code?: string - AND?: Prisma.PurchaseReceiptWhereInput | Prisma.PurchaseReceiptWhereInput[] - OR?: Prisma.PurchaseReceiptWhereInput[] - NOT?: Prisma.PurchaseReceiptWhereInput | Prisma.PurchaseReceiptWhereInput[] - totalAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFilter<"PurchaseReceipt"> | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntFilter<"PurchaseReceipt"> | number - inventoryId?: Prisma.IntFilter<"PurchaseReceipt"> | number - items?: Prisma.PurchaseReceiptItemListRelationFilter - inventory?: Prisma.XOR - supplier?: Prisma.XOR - payments?: Prisma.PurchaseReceiptPaymentsListRelationFilter -}, "id" | "code"> - -export type PurchaseReceiptOrderByWithAggregationInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - paidAmount?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - status?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - _count?: Prisma.PurchaseReceiptCountOrderByAggregateInput - _avg?: Prisma.PurchaseReceiptAvgOrderByAggregateInput - _max?: Prisma.PurchaseReceiptMaxOrderByAggregateInput - _min?: Prisma.PurchaseReceiptMinOrderByAggregateInput - _sum?: Prisma.PurchaseReceiptSumOrderByAggregateInput -} - -export type PurchaseReceiptScalarWhereWithAggregatesInput = { - AND?: Prisma.PurchaseReceiptScalarWhereWithAggregatesInput | Prisma.PurchaseReceiptScalarWhereWithAggregatesInput[] - OR?: Prisma.PurchaseReceiptScalarWhereWithAggregatesInput[] - NOT?: Prisma.PurchaseReceiptScalarWhereWithAggregatesInput | Prisma.PurchaseReceiptScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"PurchaseReceipt"> | number - code?: Prisma.StringWithAggregatesFilter<"PurchaseReceipt"> | string - totalAmount?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceipt"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceipt"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceipt"> | Date | string - status?: Prisma.EnumPurchaseReceiptStatusWithAggregatesFilter<"PurchaseReceipt"> | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntWithAggregatesFilter<"PurchaseReceipt"> | number - inventoryId?: Prisma.IntWithAggregatesFilter<"PurchaseReceipt"> | number -} - -export type PurchaseReceiptCreateInput = { - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput - inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput - supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput - payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput -} - -export type PurchaseReceiptUncheckedCreateInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - supplierId: number - inventoryId: number - items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput - payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput -} - -export type PurchaseReceiptUpdateInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput - inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput - supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput - payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput -} - -export type PurchaseReceiptUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput - payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput -} - -export type PurchaseReceiptCreateManyInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - supplierId: number - inventoryId: number -} - -export type PurchaseReceiptUpdateManyMutationInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus -} - -export type PurchaseReceiptUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type PurchaseReceiptListRelationFilter = { - every?: Prisma.PurchaseReceiptWhereInput - some?: Prisma.PurchaseReceiptWhereInput - none?: Prisma.PurchaseReceiptWhereInput -} - -export type PurchaseReceiptOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type PurchaseReceiptOrderByRelevanceInput = { - fields: Prisma.PurchaseReceiptOrderByRelevanceFieldEnum | Prisma.PurchaseReceiptOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type PurchaseReceiptCountOrderByAggregateInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - paidAmount?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - status?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type PurchaseReceiptAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - paidAmount?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type PurchaseReceiptMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - paidAmount?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - status?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type PurchaseReceiptMinOrderByAggregateInput = { - id?: Prisma.SortOrder - code?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - paidAmount?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - status?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type PurchaseReceiptSumOrderByAggregateInput = { - id?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - paidAmount?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type PurchaseReceiptScalarRelationFilter = { - is?: Prisma.PurchaseReceiptWhereInput - isNot?: Prisma.PurchaseReceiptWhereInput -} - -export type PurchaseReceiptCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptCreateWithoutInventoryInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput | Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.PurchaseReceiptCreateManyInventoryInputEnvelope - connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] -} - -export type PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptCreateWithoutInventoryInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput | Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.PurchaseReceiptCreateManyInventoryInputEnvelope - connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] -} - -export type PurchaseReceiptUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptCreateWithoutInventoryInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput | Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutInventoryInput | Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.PurchaseReceiptCreateManyInventoryInputEnvelope - set?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - update?: Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutInventoryInput | Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.PurchaseReceiptUpdateManyWithWhereWithoutInventoryInput | Prisma.PurchaseReceiptUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[] -} - -export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptCreateWithoutInventoryInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput | Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutInventoryInput | Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.PurchaseReceiptCreateManyInventoryInputEnvelope - set?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - update?: Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutInventoryInput | Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.PurchaseReceiptUpdateManyWithWhereWithoutInventoryInput | Prisma.PurchaseReceiptUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[] -} - -export type EnumPurchaseReceiptStatusFieldUpdateOperationsInput = { - set?: $Enums.PurchaseReceiptStatus -} - -export type PurchaseReceiptCreateNestedOneWithoutItemsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutItemsInput - connect?: Prisma.PurchaseReceiptWhereUniqueInput -} - -export type PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutItemsInput - upsert?: Prisma.PurchaseReceiptUpsertWithoutItemsInput - connect?: Prisma.PurchaseReceiptWhereUniqueInput - update?: Prisma.XOR, Prisma.PurchaseReceiptUncheckedUpdateWithoutItemsInput> -} - -export type PurchaseReceiptCreateNestedOneWithoutPaymentsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutPaymentsInput - connect?: Prisma.PurchaseReceiptWhereUniqueInput -} - -export type PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutPaymentsInput - upsert?: Prisma.PurchaseReceiptUpsertWithoutPaymentsInput - connect?: Prisma.PurchaseReceiptWhereUniqueInput - update?: Prisma.XOR, Prisma.PurchaseReceiptUncheckedUpdateWithoutPaymentsInput> -} - -export type PurchaseReceiptCreateNestedManyWithoutSupplierInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[] - createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope - connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] -} - -export type PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[] - createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope - connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] -} - -export type PurchaseReceiptUpdateManyWithoutSupplierNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[] - upsert?: Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput[] - createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope - set?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - update?: Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput[] - updateMany?: Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput | Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput[] - deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[] -} - -export type PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[] - upsert?: Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput[] - createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope - set?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[] - update?: Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput[] - updateMany?: Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput | Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput[] - deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[] -} - -export type PurchaseReceiptCreateWithoutInventoryInput = { - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput - supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput - payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput -} - -export type PurchaseReceiptUncheckedCreateWithoutInventoryInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - supplierId: number - items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput - payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput -} - -export type PurchaseReceiptCreateOrConnectWithoutInventoryInput = { - where: Prisma.PurchaseReceiptWhereUniqueInput - create: Prisma.XOR -} - -export type PurchaseReceiptCreateManyInventoryInputEnvelope = { - data: Prisma.PurchaseReceiptCreateManyInventoryInput | Prisma.PurchaseReceiptCreateManyInventoryInput[] - skipDuplicates?: boolean -} - -export type PurchaseReceiptUpsertWithWhereUniqueWithoutInventoryInput = { - where: Prisma.PurchaseReceiptWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type PurchaseReceiptUpdateWithWhereUniqueWithoutInventoryInput = { - where: Prisma.PurchaseReceiptWhereUniqueInput - data: Prisma.XOR -} - -export type PurchaseReceiptUpdateManyWithWhereWithoutInventoryInput = { - where: Prisma.PurchaseReceiptScalarWhereInput - data: Prisma.XOR -} - -export type PurchaseReceiptScalarWhereInput = { - AND?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[] - OR?: Prisma.PurchaseReceiptScalarWhereInput[] - NOT?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[] - id?: Prisma.IntFilter<"PurchaseReceipt"> | number - code?: Prisma.StringFilter<"PurchaseReceipt"> | string - totalAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFilter<"PurchaseReceipt"> | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntFilter<"PurchaseReceipt"> | number - inventoryId?: Prisma.IntFilter<"PurchaseReceipt"> | number -} - -export type PurchaseReceiptCreateWithoutItemsInput = { - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput - supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput - payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput -} - -export type PurchaseReceiptUncheckedCreateWithoutItemsInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - supplierId: number - inventoryId: number - payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput -} - -export type PurchaseReceiptCreateOrConnectWithoutItemsInput = { - where: Prisma.PurchaseReceiptWhereUniqueInput - create: Prisma.XOR -} - -export type PurchaseReceiptUpsertWithoutItemsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.PurchaseReceiptWhereInput -} - -export type PurchaseReceiptUpdateToOneWithWhereWithoutItemsInput = { - where?: Prisma.PurchaseReceiptWhereInput - data: Prisma.XOR -} - -export type PurchaseReceiptUpdateWithoutItemsInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput - supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput - payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput -} - -export type PurchaseReceiptUncheckedUpdateWithoutItemsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput -} - -export type PurchaseReceiptCreateWithoutPaymentsInput = { - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput - inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput - supplier: Prisma.SupplierCreateNestedOneWithoutReceiptsInput -} - -export type PurchaseReceiptUncheckedCreateWithoutPaymentsInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - supplierId: number - inventoryId: number - items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput -} - -export type PurchaseReceiptCreateOrConnectWithoutPaymentsInput = { - where: Prisma.PurchaseReceiptWhereUniqueInput - create: Prisma.XOR -} - -export type PurchaseReceiptUpsertWithoutPaymentsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.PurchaseReceiptWhereInput -} - -export type PurchaseReceiptUpdateToOneWithWhereWithoutPaymentsInput = { - where?: Prisma.PurchaseReceiptWhereInput - data: Prisma.XOR -} - -export type PurchaseReceiptUpdateWithoutPaymentsInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput - inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput - supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput -} - -export type PurchaseReceiptUncheckedUpdateWithoutPaymentsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput -} - -export type PurchaseReceiptCreateWithoutSupplierInput = { - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput - inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput - payments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput -} - -export type PurchaseReceiptUncheckedCreateWithoutSupplierInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - inventoryId: number - items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput - payments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput -} - -export type PurchaseReceiptCreateOrConnectWithoutSupplierInput = { - where: Prisma.PurchaseReceiptWhereUniqueInput - create: Prisma.XOR -} - -export type PurchaseReceiptCreateManySupplierInputEnvelope = { - data: Prisma.PurchaseReceiptCreateManySupplierInput | Prisma.PurchaseReceiptCreateManySupplierInput[] - skipDuplicates?: boolean -} - -export type PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput = { - where: Prisma.PurchaseReceiptWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput = { - where: Prisma.PurchaseReceiptWhereUniqueInput - data: Prisma.XOR -} - -export type PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput = { - where: Prisma.PurchaseReceiptScalarWhereInput - data: Prisma.XOR -} - -export type PurchaseReceiptCreateManyInventoryInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - supplierId: number -} - -export type PurchaseReceiptUpdateWithoutInventoryInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput - supplier?: Prisma.SupplierUpdateOneRequiredWithoutReceiptsNestedInput - payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput -} - -export type PurchaseReceiptUncheckedUpdateWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntFieldUpdateOperationsInput | number - items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput - payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput -} - -export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - supplierId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type PurchaseReceiptCreateManySupplierInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - status?: $Enums.PurchaseReceiptStatus - inventoryId: number -} - -export type PurchaseReceiptUpdateWithoutSupplierInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput - inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput - payments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput -} - -export type PurchaseReceiptUncheckedUpdateWithoutSupplierInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput - payments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput -} - -export type PurchaseReceiptUncheckedUpdateManyWithoutSupplierInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - status?: Prisma.EnumPurchaseReceiptStatusFieldUpdateOperationsInput | $Enums.PurchaseReceiptStatus - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - - -/** - * Count Type PurchaseReceiptCountOutputType - */ - -export type PurchaseReceiptCountOutputType = { - items: number - payments: number -} - -export type PurchaseReceiptCountOutputTypeSelect = { - items?: boolean | PurchaseReceiptCountOutputTypeCountItemsArgs - payments?: boolean | PurchaseReceiptCountOutputTypeCountPaymentsArgs -} - -/** - * PurchaseReceiptCountOutputType without action - */ -export type PurchaseReceiptCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptCountOutputType - */ - select?: Prisma.PurchaseReceiptCountOutputTypeSelect | null -} - -/** - * PurchaseReceiptCountOutputType without action - */ -export type PurchaseReceiptCountOutputTypeCountItemsArgs = { - where?: Prisma.PurchaseReceiptItemWhereInput -} - -/** - * PurchaseReceiptCountOutputType without action - */ -export type PurchaseReceiptCountOutputTypeCountPaymentsArgs = { - where?: Prisma.PurchaseReceiptPaymentsWhereInput -} - - -export type PurchaseReceiptSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - code?: boolean - totalAmount?: boolean - paidAmount?: boolean - description?: boolean - createdAt?: boolean - updatedAt?: boolean - status?: boolean - supplierId?: boolean - inventoryId?: boolean - items?: boolean | Prisma.PurchaseReceipt$itemsArgs - inventory?: boolean | Prisma.InventoryDefaultArgs - supplier?: boolean | Prisma.SupplierDefaultArgs - payments?: boolean | Prisma.PurchaseReceipt$paymentsArgs - _count?: boolean | Prisma.PurchaseReceiptCountOutputTypeDefaultArgs -}, ExtArgs["result"]["purchaseReceipt"]> - - - -export type PurchaseReceiptSelectScalar = { - id?: boolean - code?: boolean - totalAmount?: boolean - paidAmount?: boolean - description?: boolean - createdAt?: boolean - updatedAt?: boolean - status?: boolean - supplierId?: boolean - inventoryId?: boolean -} - -export type PurchaseReceiptOmit = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "paidAmount" | "description" | "createdAt" | "updatedAt" | "status" | "supplierId" | "inventoryId", ExtArgs["result"]["purchaseReceipt"]> -export type PurchaseReceiptInclude = { - items?: boolean | Prisma.PurchaseReceipt$itemsArgs - inventory?: boolean | Prisma.InventoryDefaultArgs - supplier?: boolean | Prisma.SupplierDefaultArgs - payments?: boolean | Prisma.PurchaseReceipt$paymentsArgs - _count?: boolean | Prisma.PurchaseReceiptCountOutputTypeDefaultArgs -} - -export type $PurchaseReceiptPayload = { - name: "PurchaseReceipt" - objects: { - items: Prisma.$PurchaseReceiptItemPayload[] - inventory: Prisma.$InventoryPayload - supplier: Prisma.$SupplierPayload - payments: Prisma.$PurchaseReceiptPaymentsPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - code: string - totalAmount: runtime.Decimal - paidAmount: runtime.Decimal - description: string | null - createdAt: Date - updatedAt: Date - status: $Enums.PurchaseReceiptStatus - supplierId: number - inventoryId: number - }, ExtArgs["result"]["purchaseReceipt"]> - composites: {} -} - -export type PurchaseReceiptGetPayload = runtime.Types.Result.GetResult - -export type PurchaseReceiptCountArgs = - Omit & { - select?: PurchaseReceiptCountAggregateInputType | true - } - -export interface PurchaseReceiptDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['PurchaseReceipt'], meta: { name: 'PurchaseReceipt' } } - /** - * Find zero or one PurchaseReceipt that matches the filter. - * @param {PurchaseReceiptFindUniqueArgs} args - Arguments to find a PurchaseReceipt - * @example - * // Get one PurchaseReceipt - * const purchaseReceipt = await prisma.purchaseReceipt.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one PurchaseReceipt that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {PurchaseReceiptFindUniqueOrThrowArgs} args - Arguments to find a PurchaseReceipt - * @example - * // Get one PurchaseReceipt - * const purchaseReceipt = await prisma.purchaseReceipt.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first PurchaseReceipt that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptFindFirstArgs} args - Arguments to find a PurchaseReceipt - * @example - * // Get one PurchaseReceipt - * const purchaseReceipt = await prisma.purchaseReceipt.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first PurchaseReceipt that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptFindFirstOrThrowArgs} args - Arguments to find a PurchaseReceipt - * @example - * // Get one PurchaseReceipt - * const purchaseReceipt = await prisma.purchaseReceipt.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more PurchaseReceipts that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all PurchaseReceipts - * const purchaseReceipts = await prisma.purchaseReceipt.findMany() - * - * // Get first 10 PurchaseReceipts - * const purchaseReceipts = await prisma.purchaseReceipt.findMany({ take: 10 }) - * - * // Only select the `id` - * const purchaseReceiptWithIdOnly = await prisma.purchaseReceipt.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a PurchaseReceipt. - * @param {PurchaseReceiptCreateArgs} args - Arguments to create a PurchaseReceipt. - * @example - * // Create one PurchaseReceipt - * const PurchaseReceipt = await prisma.purchaseReceipt.create({ - * data: { - * // ... data to create a PurchaseReceipt - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many PurchaseReceipts. - * @param {PurchaseReceiptCreateManyArgs} args - Arguments to create many PurchaseReceipts. - * @example - * // Create many PurchaseReceipts - * const purchaseReceipt = await prisma.purchaseReceipt.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a PurchaseReceipt. - * @param {PurchaseReceiptDeleteArgs} args - Arguments to delete one PurchaseReceipt. - * @example - * // Delete one PurchaseReceipt - * const PurchaseReceipt = await prisma.purchaseReceipt.delete({ - * where: { - * // ... filter to delete one PurchaseReceipt - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one PurchaseReceipt. - * @param {PurchaseReceiptUpdateArgs} args - Arguments to update one PurchaseReceipt. - * @example - * // Update one PurchaseReceipt - * const purchaseReceipt = await prisma.purchaseReceipt.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more PurchaseReceipts. - * @param {PurchaseReceiptDeleteManyArgs} args - Arguments to filter PurchaseReceipts to delete. - * @example - * // Delete a few PurchaseReceipts - * const { count } = await prisma.purchaseReceipt.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more PurchaseReceipts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many PurchaseReceipts - * const purchaseReceipt = await prisma.purchaseReceipt.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one PurchaseReceipt. - * @param {PurchaseReceiptUpsertArgs} args - Arguments to update or create a PurchaseReceipt. - * @example - * // Update or create a PurchaseReceipt - * const purchaseReceipt = await prisma.purchaseReceipt.upsert({ - * create: { - * // ... data to create a PurchaseReceipt - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the PurchaseReceipt we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of PurchaseReceipts. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptCountArgs} args - Arguments to filter PurchaseReceipts to count. - * @example - * // Count the number of PurchaseReceipts - * const count = await prisma.purchaseReceipt.count({ - * where: { - * // ... the filter for the PurchaseReceipts we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a PurchaseReceipt. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by PurchaseReceipt. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends PurchaseReceiptGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: PurchaseReceiptGroupByArgs['orderBy'] } - : { orderBy?: PurchaseReceiptGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetPurchaseReceiptGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the PurchaseReceipt model - */ -readonly fields: PurchaseReceiptFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for PurchaseReceipt. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__PurchaseReceiptClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - items = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - inventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - supplier = {}>(args?: Prisma.Subset>): Prisma.Prisma__SupplierClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - payments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the PurchaseReceipt model - */ -export interface PurchaseReceiptFieldRefs { - readonly id: Prisma.FieldRef<"PurchaseReceipt", 'Int'> - readonly code: Prisma.FieldRef<"PurchaseReceipt", 'String'> - readonly totalAmount: Prisma.FieldRef<"PurchaseReceipt", 'Decimal'> - readonly paidAmount: Prisma.FieldRef<"PurchaseReceipt", 'Decimal'> - readonly description: Prisma.FieldRef<"PurchaseReceipt", 'String'> - readonly createdAt: Prisma.FieldRef<"PurchaseReceipt", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"PurchaseReceipt", 'DateTime'> - readonly status: Prisma.FieldRef<"PurchaseReceipt", 'PurchaseReceiptStatus'> - readonly supplierId: Prisma.FieldRef<"PurchaseReceipt", 'Int'> - readonly inventoryId: Prisma.FieldRef<"PurchaseReceipt", 'Int'> -} - - -// Custom InputTypes -/** - * PurchaseReceipt findUnique - */ -export type PurchaseReceiptFindUniqueArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - /** - * Filter, which PurchaseReceipt to fetch. - */ - where: Prisma.PurchaseReceiptWhereUniqueInput -} - -/** - * PurchaseReceipt findUniqueOrThrow - */ -export type PurchaseReceiptFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - /** - * Filter, which PurchaseReceipt to fetch. - */ - where: Prisma.PurchaseReceiptWhereUniqueInput -} - -/** - * PurchaseReceipt findFirst - */ -export type PurchaseReceiptFindFirstArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - /** - * Filter, which PurchaseReceipt to fetch. - */ - where?: Prisma.PurchaseReceiptWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceipts to fetch. - */ - orderBy?: Prisma.PurchaseReceiptOrderByWithRelationInput | Prisma.PurchaseReceiptOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PurchaseReceipts. - */ - cursor?: Prisma.PurchaseReceiptWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceipts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceipts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PurchaseReceipts. - */ - distinct?: Prisma.PurchaseReceiptScalarFieldEnum | Prisma.PurchaseReceiptScalarFieldEnum[] -} - -/** - * PurchaseReceipt findFirstOrThrow - */ -export type PurchaseReceiptFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - /** - * Filter, which PurchaseReceipt to fetch. - */ - where?: Prisma.PurchaseReceiptWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceipts to fetch. - */ - orderBy?: Prisma.PurchaseReceiptOrderByWithRelationInput | Prisma.PurchaseReceiptOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PurchaseReceipts. - */ - cursor?: Prisma.PurchaseReceiptWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceipts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceipts. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PurchaseReceipts. - */ - distinct?: Prisma.PurchaseReceiptScalarFieldEnum | Prisma.PurchaseReceiptScalarFieldEnum[] -} - -/** - * PurchaseReceipt findMany - */ -export type PurchaseReceiptFindManyArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - /** - * Filter, which PurchaseReceipts to fetch. - */ - where?: Prisma.PurchaseReceiptWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceipts to fetch. - */ - orderBy?: Prisma.PurchaseReceiptOrderByWithRelationInput | Prisma.PurchaseReceiptOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing PurchaseReceipts. - */ - cursor?: Prisma.PurchaseReceiptWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceipts from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceipts. - */ - skip?: number - distinct?: Prisma.PurchaseReceiptScalarFieldEnum | Prisma.PurchaseReceiptScalarFieldEnum[] -} - -/** - * PurchaseReceipt create - */ -export type PurchaseReceiptCreateArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - /** - * The data needed to create a PurchaseReceipt. - */ - data: Prisma.XOR -} - -/** - * PurchaseReceipt createMany - */ -export type PurchaseReceiptCreateManyArgs = { - /** - * The data used to create many PurchaseReceipts. - */ - data: Prisma.PurchaseReceiptCreateManyInput | Prisma.PurchaseReceiptCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * PurchaseReceipt update - */ -export type PurchaseReceiptUpdateArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - /** - * The data needed to update a PurchaseReceipt. - */ - data: Prisma.XOR - /** - * Choose, which PurchaseReceipt to update. - */ - where: Prisma.PurchaseReceiptWhereUniqueInput -} - -/** - * PurchaseReceipt updateMany - */ -export type PurchaseReceiptUpdateManyArgs = { - /** - * The data used to update PurchaseReceipts. - */ - data: Prisma.XOR - /** - * Filter which PurchaseReceipts to update - */ - where?: Prisma.PurchaseReceiptWhereInput - /** - * Limit how many PurchaseReceipts to update. - */ - limit?: number -} - -/** - * PurchaseReceipt upsert - */ -export type PurchaseReceiptUpsertArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - /** - * The filter to search for the PurchaseReceipt to update in case it exists. - */ - where: Prisma.PurchaseReceiptWhereUniqueInput - /** - * In case the PurchaseReceipt found by the `where` argument doesn't exist, create a new PurchaseReceipt with this data. - */ - create: Prisma.XOR - /** - * In case the PurchaseReceipt was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * PurchaseReceipt delete - */ -export type PurchaseReceiptDeleteArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - /** - * Filter which PurchaseReceipt to delete. - */ - where: Prisma.PurchaseReceiptWhereUniqueInput -} - -/** - * PurchaseReceipt deleteMany - */ -export type PurchaseReceiptDeleteManyArgs = { - /** - * Filter which PurchaseReceipts to delete - */ - where?: Prisma.PurchaseReceiptWhereInput - /** - * Limit how many PurchaseReceipts to delete. - */ - limit?: number -} - -/** - * PurchaseReceipt.items - */ -export type PurchaseReceipt$itemsArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - where?: Prisma.PurchaseReceiptItemWhereInput - orderBy?: Prisma.PurchaseReceiptItemOrderByWithRelationInput | Prisma.PurchaseReceiptItemOrderByWithRelationInput[] - cursor?: Prisma.PurchaseReceiptItemWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.PurchaseReceiptItemScalarFieldEnum | Prisma.PurchaseReceiptItemScalarFieldEnum[] -} - -/** - * PurchaseReceipt.payments - */ -export type PurchaseReceipt$paymentsArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - where?: Prisma.PurchaseReceiptPaymentsWhereInput - orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput | Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput[] - cursor?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[] -} - -/** - * PurchaseReceipt without action - */ -export type PurchaseReceiptDefaultArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null -} diff --git a/src/generated/prisma/models/PurchaseReceiptItem.ts b/src/generated/prisma/models/PurchaseReceiptItem.ts deleted file mode 100644 index 6185643..0000000 --- a/src/generated/prisma/models/PurchaseReceiptItem.ts +++ /dev/null @@ -1,1518 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `PurchaseReceiptItem` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model PurchaseReceiptItem - * - */ -export type PurchaseReceiptItemModel = runtime.Types.Result.DefaultSelection - -export type AggregatePurchaseReceiptItem = { - _count: PurchaseReceiptItemCountAggregateOutputType | null - _avg: PurchaseReceiptItemAvgAggregateOutputType | null - _sum: PurchaseReceiptItemSumAggregateOutputType | null - _min: PurchaseReceiptItemMinAggregateOutputType | null - _max: PurchaseReceiptItemMaxAggregateOutputType | null -} - -export type PurchaseReceiptItemAvgAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalAmount: runtime.Decimal | null - receiptId: number | null - productId: number | null -} - -export type PurchaseReceiptItemSumAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalAmount: runtime.Decimal | null - receiptId: number | null - productId: number | null -} - -export type PurchaseReceiptItemMinAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalAmount: runtime.Decimal | null - receiptId: number | null - productId: number | null - description: string | null - createdAt: Date | null -} - -export type PurchaseReceiptItemMaxAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalAmount: runtime.Decimal | null - receiptId: number | null - productId: number | null - description: string | null - createdAt: Date | null -} - -export type PurchaseReceiptItemCountAggregateOutputType = { - id: number - count: number - unitPrice: number - totalAmount: number - receiptId: number - productId: number - description: number - createdAt: number - _all: number -} - - -export type PurchaseReceiptItemAvgAggregateInputType = { - id?: true - count?: true - unitPrice?: true - totalAmount?: true - receiptId?: true - productId?: true -} - -export type PurchaseReceiptItemSumAggregateInputType = { - id?: true - count?: true - unitPrice?: true - totalAmount?: true - receiptId?: true - productId?: true -} - -export type PurchaseReceiptItemMinAggregateInputType = { - id?: true - count?: true - unitPrice?: true - totalAmount?: true - receiptId?: true - productId?: true - description?: true - createdAt?: true -} - -export type PurchaseReceiptItemMaxAggregateInputType = { - id?: true - count?: true - unitPrice?: true - totalAmount?: true - receiptId?: true - productId?: true - description?: true - createdAt?: true -} - -export type PurchaseReceiptItemCountAggregateInputType = { - id?: true - count?: true - unitPrice?: true - totalAmount?: true - receiptId?: true - productId?: true - description?: true - createdAt?: true - _all?: true -} - -export type PurchaseReceiptItemAggregateArgs = { - /** - * Filter which PurchaseReceiptItem to aggregate. - */ - where?: Prisma.PurchaseReceiptItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceiptItems to fetch. - */ - orderBy?: Prisma.PurchaseReceiptItemOrderByWithRelationInput | Prisma.PurchaseReceiptItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.PurchaseReceiptItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceiptItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceiptItems. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned PurchaseReceiptItems - **/ - _count?: true | PurchaseReceiptItemCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: PurchaseReceiptItemAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: PurchaseReceiptItemSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: PurchaseReceiptItemMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: PurchaseReceiptItemMaxAggregateInputType -} - -export type GetPurchaseReceiptItemAggregateType = { - [P in keyof T & keyof AggregatePurchaseReceiptItem]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type PurchaseReceiptItemGroupByArgs = { - where?: Prisma.PurchaseReceiptItemWhereInput - orderBy?: Prisma.PurchaseReceiptItemOrderByWithAggregationInput | Prisma.PurchaseReceiptItemOrderByWithAggregationInput[] - by: Prisma.PurchaseReceiptItemScalarFieldEnum[] | Prisma.PurchaseReceiptItemScalarFieldEnum - having?: Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: PurchaseReceiptItemCountAggregateInputType | true - _avg?: PurchaseReceiptItemAvgAggregateInputType - _sum?: PurchaseReceiptItemSumAggregateInputType - _min?: PurchaseReceiptItemMinAggregateInputType - _max?: PurchaseReceiptItemMaxAggregateInputType -} - -export type PurchaseReceiptItemGroupByOutputType = { - id: number - count: runtime.Decimal - unitPrice: runtime.Decimal - totalAmount: runtime.Decimal - receiptId: number - productId: number - description: string | null - createdAt: Date - _count: PurchaseReceiptItemCountAggregateOutputType | null - _avg: PurchaseReceiptItemAvgAggregateOutputType | null - _sum: PurchaseReceiptItemSumAggregateOutputType | null - _min: PurchaseReceiptItemMinAggregateOutputType | null - _max: PurchaseReceiptItemMaxAggregateOutputType | null -} - -type GetPurchaseReceiptItemGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof PurchaseReceiptItemGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type PurchaseReceiptItemWhereInput = { - AND?: Prisma.PurchaseReceiptItemWhereInput | Prisma.PurchaseReceiptItemWhereInput[] - OR?: Prisma.PurchaseReceiptItemWhereInput[] - NOT?: Prisma.PurchaseReceiptItemWhereInput | Prisma.PurchaseReceiptItemWhereInput[] - id?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string - product?: Prisma.XOR - receipt?: Prisma.XOR -} - -export type PurchaseReceiptItemOrderByWithRelationInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - productId?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - product?: Prisma.ProductOrderByWithRelationInput - receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput - _relevance?: Prisma.PurchaseReceiptItemOrderByRelevanceInput -} - -export type PurchaseReceiptItemWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.PurchaseReceiptItemWhereInput | Prisma.PurchaseReceiptItemWhereInput[] - OR?: Prisma.PurchaseReceiptItemWhereInput[] - NOT?: Prisma.PurchaseReceiptItemWhereInput | Prisma.PurchaseReceiptItemWhereInput[] - count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string - product?: Prisma.XOR - receipt?: Prisma.XOR -}, "id"> - -export type PurchaseReceiptItemOrderByWithAggregationInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - productId?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - _count?: Prisma.PurchaseReceiptItemCountOrderByAggregateInput - _avg?: Prisma.PurchaseReceiptItemAvgOrderByAggregateInput - _max?: Prisma.PurchaseReceiptItemMaxOrderByAggregateInput - _min?: Prisma.PurchaseReceiptItemMinOrderByAggregateInput - _sum?: Prisma.PurchaseReceiptItemSumOrderByAggregateInput -} - -export type PurchaseReceiptItemScalarWhereWithAggregatesInput = { - AND?: Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput | Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput[] - OR?: Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput[] - NOT?: Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput | Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number - count?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number - productId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number - description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptItem"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptItem"> | Date | string -} - -export type PurchaseReceiptItemCreateInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - product: Prisma.ProductCreateNestedOneWithoutPurchaseReceiptItemsInput - receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutItemsInput -} - -export type PurchaseReceiptItemUncheckedCreateInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId: number - productId: number - description?: string | null - createdAt?: Date | string -} - -export type PurchaseReceiptItemUpdateInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - product?: Prisma.ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput - receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput -} - -export type PurchaseReceiptItemUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type PurchaseReceiptItemCreateManyInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId: number - productId: number - description?: string | null - createdAt?: Date | string -} - -export type PurchaseReceiptItemUpdateManyMutationInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type PurchaseReceiptItemUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type PurchaseReceiptItemListRelationFilter = { - every?: Prisma.PurchaseReceiptItemWhereInput - some?: Prisma.PurchaseReceiptItemWhereInput - none?: Prisma.PurchaseReceiptItemWhereInput -} - -export type PurchaseReceiptItemOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type PurchaseReceiptItemOrderByRelevanceInput = { - fields: Prisma.PurchaseReceiptItemOrderByRelevanceFieldEnum | Prisma.PurchaseReceiptItemOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type PurchaseReceiptItemCountOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - productId?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type PurchaseReceiptItemAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type PurchaseReceiptItemMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - productId?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type PurchaseReceiptItemMinOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - productId?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type PurchaseReceiptItemSumOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - productId?: Prisma.SortOrder -} - -export type PurchaseReceiptItemCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptItemCreateWithoutProductInput[] | Prisma.PurchaseReceiptItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.PurchaseReceiptItemCreateOrConnectWithoutProductInput | Prisma.PurchaseReceiptItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.PurchaseReceiptItemCreateManyProductInputEnvelope - connect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] -} - -export type PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptItemCreateWithoutProductInput[] | Prisma.PurchaseReceiptItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.PurchaseReceiptItemCreateOrConnectWithoutProductInput | Prisma.PurchaseReceiptItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.PurchaseReceiptItemCreateManyProductInputEnvelope - connect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] -} - -export type PurchaseReceiptItemUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptItemCreateWithoutProductInput[] | Prisma.PurchaseReceiptItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.PurchaseReceiptItemCreateOrConnectWithoutProductInput | Prisma.PurchaseReceiptItemCreateOrConnectWithoutProductInput[] - upsert?: Prisma.PurchaseReceiptItemUpsertWithWhereUniqueWithoutProductInput | Prisma.PurchaseReceiptItemUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.PurchaseReceiptItemCreateManyProductInputEnvelope - set?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - update?: Prisma.PurchaseReceiptItemUpdateWithWhereUniqueWithoutProductInput | Prisma.PurchaseReceiptItemUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.PurchaseReceiptItemUpdateManyWithWhereWithoutProductInput | Prisma.PurchaseReceiptItemUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.PurchaseReceiptItemScalarWhereInput | Prisma.PurchaseReceiptItemScalarWhereInput[] -} - -export type PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptItemCreateWithoutProductInput[] | Prisma.PurchaseReceiptItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.PurchaseReceiptItemCreateOrConnectWithoutProductInput | Prisma.PurchaseReceiptItemCreateOrConnectWithoutProductInput[] - upsert?: Prisma.PurchaseReceiptItemUpsertWithWhereUniqueWithoutProductInput | Prisma.PurchaseReceiptItemUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.PurchaseReceiptItemCreateManyProductInputEnvelope - set?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - update?: Prisma.PurchaseReceiptItemUpdateWithWhereUniqueWithoutProductInput | Prisma.PurchaseReceiptItemUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.PurchaseReceiptItemUpdateManyWithWhereWithoutProductInput | Prisma.PurchaseReceiptItemUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.PurchaseReceiptItemScalarWhereInput | Prisma.PurchaseReceiptItemScalarWhereInput[] -} - -export type PurchaseReceiptItemCreateNestedManyWithoutReceiptInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptItemCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptItemUncheckedCreateWithoutReceiptInput[] - connectOrCreate?: Prisma.PurchaseReceiptItemCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptItemCreateOrConnectWithoutReceiptInput[] - createMany?: Prisma.PurchaseReceiptItemCreateManyReceiptInputEnvelope - connect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] -} - -export type PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptItemCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptItemUncheckedCreateWithoutReceiptInput[] - connectOrCreate?: Prisma.PurchaseReceiptItemCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptItemCreateOrConnectWithoutReceiptInput[] - createMany?: Prisma.PurchaseReceiptItemCreateManyReceiptInputEnvelope - connect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] -} - -export type PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptItemCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptItemUncheckedCreateWithoutReceiptInput[] - connectOrCreate?: Prisma.PurchaseReceiptItemCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptItemCreateOrConnectWithoutReceiptInput[] - upsert?: Prisma.PurchaseReceiptItemUpsertWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptItemUpsertWithWhereUniqueWithoutReceiptInput[] - createMany?: Prisma.PurchaseReceiptItemCreateManyReceiptInputEnvelope - set?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - update?: Prisma.PurchaseReceiptItemUpdateWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptItemUpdateWithWhereUniqueWithoutReceiptInput[] - updateMany?: Prisma.PurchaseReceiptItemUpdateManyWithWhereWithoutReceiptInput | Prisma.PurchaseReceiptItemUpdateManyWithWhereWithoutReceiptInput[] - deleteMany?: Prisma.PurchaseReceiptItemScalarWhereInput | Prisma.PurchaseReceiptItemScalarWhereInput[] -} - -export type PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptItemCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptItemUncheckedCreateWithoutReceiptInput[] - connectOrCreate?: Prisma.PurchaseReceiptItemCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptItemCreateOrConnectWithoutReceiptInput[] - upsert?: Prisma.PurchaseReceiptItemUpsertWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptItemUpsertWithWhereUniqueWithoutReceiptInput[] - createMany?: Prisma.PurchaseReceiptItemCreateManyReceiptInputEnvelope - set?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptItemWhereUniqueInput | Prisma.PurchaseReceiptItemWhereUniqueInput[] - update?: Prisma.PurchaseReceiptItemUpdateWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptItemUpdateWithWhereUniqueWithoutReceiptInput[] - updateMany?: Prisma.PurchaseReceiptItemUpdateManyWithWhereWithoutReceiptInput | Prisma.PurchaseReceiptItemUpdateManyWithWhereWithoutReceiptInput[] - deleteMany?: Prisma.PurchaseReceiptItemScalarWhereInput | Prisma.PurchaseReceiptItemScalarWhereInput[] -} - -export type PurchaseReceiptItemCreateWithoutProductInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutItemsInput -} - -export type PurchaseReceiptItemUncheckedCreateWithoutProductInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId: number - description?: string | null - createdAt?: Date | string -} - -export type PurchaseReceiptItemCreateOrConnectWithoutProductInput = { - where: Prisma.PurchaseReceiptItemWhereUniqueInput - create: Prisma.XOR -} - -export type PurchaseReceiptItemCreateManyProductInputEnvelope = { - data: Prisma.PurchaseReceiptItemCreateManyProductInput | Prisma.PurchaseReceiptItemCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type PurchaseReceiptItemUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.PurchaseReceiptItemWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type PurchaseReceiptItemUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.PurchaseReceiptItemWhereUniqueInput - data: Prisma.XOR -} - -export type PurchaseReceiptItemUpdateManyWithWhereWithoutProductInput = { - where: Prisma.PurchaseReceiptItemScalarWhereInput - data: Prisma.XOR -} - -export type PurchaseReceiptItemScalarWhereInput = { - AND?: Prisma.PurchaseReceiptItemScalarWhereInput | Prisma.PurchaseReceiptItemScalarWhereInput[] - OR?: Prisma.PurchaseReceiptItemScalarWhereInput[] - NOT?: Prisma.PurchaseReceiptItemScalarWhereInput | Prisma.PurchaseReceiptItemScalarWhereInput[] - id?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string -} - -export type PurchaseReceiptItemCreateWithoutReceiptInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - product: Prisma.ProductCreateNestedOneWithoutPurchaseReceiptItemsInput -} - -export type PurchaseReceiptItemUncheckedCreateWithoutReceiptInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - productId: number - description?: string | null - createdAt?: Date | string -} - -export type PurchaseReceiptItemCreateOrConnectWithoutReceiptInput = { - where: Prisma.PurchaseReceiptItemWhereUniqueInput - create: Prisma.XOR -} - -export type PurchaseReceiptItemCreateManyReceiptInputEnvelope = { - data: Prisma.PurchaseReceiptItemCreateManyReceiptInput | Prisma.PurchaseReceiptItemCreateManyReceiptInput[] - skipDuplicates?: boolean -} - -export type PurchaseReceiptItemUpsertWithWhereUniqueWithoutReceiptInput = { - where: Prisma.PurchaseReceiptItemWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type PurchaseReceiptItemUpdateWithWhereUniqueWithoutReceiptInput = { - where: Prisma.PurchaseReceiptItemWhereUniqueInput - data: Prisma.XOR -} - -export type PurchaseReceiptItemUpdateManyWithWhereWithoutReceiptInput = { - where: Prisma.PurchaseReceiptItemScalarWhereInput - data: Prisma.XOR -} - -export type PurchaseReceiptItemCreateManyProductInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId: number - description?: string | null - createdAt?: Date | string -} - -export type PurchaseReceiptItemUpdateWithoutProductInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput -} - -export type PurchaseReceiptItemUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type PurchaseReceiptItemUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type PurchaseReceiptItemCreateManyReceiptInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - productId: number - description?: string | null - createdAt?: Date | string -} - -export type PurchaseReceiptItemUpdateWithoutReceiptInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - product?: Prisma.ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput -} - -export type PurchaseReceiptItemUncheckedUpdateWithoutReceiptInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - - - -export type PurchaseReceiptItemSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - count?: boolean - unitPrice?: boolean - totalAmount?: boolean - receiptId?: boolean - productId?: boolean - description?: boolean - createdAt?: boolean - product?: boolean | Prisma.ProductDefaultArgs - receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs -}, ExtArgs["result"]["purchaseReceiptItem"]> - - - -export type PurchaseReceiptItemSelectScalar = { - id?: boolean - count?: boolean - unitPrice?: boolean - totalAmount?: boolean - receiptId?: boolean - productId?: boolean - description?: boolean - createdAt?: boolean -} - -export type PurchaseReceiptItemOmit = runtime.Types.Extensions.GetOmit<"id" | "count" | "unitPrice" | "totalAmount" | "receiptId" | "productId" | "description" | "createdAt", ExtArgs["result"]["purchaseReceiptItem"]> -export type PurchaseReceiptItemInclude = { - product?: boolean | Prisma.ProductDefaultArgs - receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs -} - -export type $PurchaseReceiptItemPayload = { - name: "PurchaseReceiptItem" - objects: { - product: Prisma.$ProductPayload - receipt: Prisma.$PurchaseReceiptPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - count: runtime.Decimal - unitPrice: runtime.Decimal - totalAmount: runtime.Decimal - receiptId: number - productId: number - description: string | null - createdAt: Date - }, ExtArgs["result"]["purchaseReceiptItem"]> - composites: {} -} - -export type PurchaseReceiptItemGetPayload = runtime.Types.Result.GetResult - -export type PurchaseReceiptItemCountArgs = - Omit & { - select?: PurchaseReceiptItemCountAggregateInputType | true - } - -export interface PurchaseReceiptItemDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['PurchaseReceiptItem'], meta: { name: 'PurchaseReceiptItem' } } - /** - * Find zero or one PurchaseReceiptItem that matches the filter. - * @param {PurchaseReceiptItemFindUniqueArgs} args - Arguments to find a PurchaseReceiptItem - * @example - * // Get one PurchaseReceiptItem - * const purchaseReceiptItem = await prisma.purchaseReceiptItem.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptItemClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one PurchaseReceiptItem that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {PurchaseReceiptItemFindUniqueOrThrowArgs} args - Arguments to find a PurchaseReceiptItem - * @example - * // Get one PurchaseReceiptItem - * const purchaseReceiptItem = await prisma.purchaseReceiptItem.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptItemClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first PurchaseReceiptItem that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptItemFindFirstArgs} args - Arguments to find a PurchaseReceiptItem - * @example - * // Get one PurchaseReceiptItem - * const purchaseReceiptItem = await prisma.purchaseReceiptItem.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptItemClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first PurchaseReceiptItem that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptItemFindFirstOrThrowArgs} args - Arguments to find a PurchaseReceiptItem - * @example - * // Get one PurchaseReceiptItem - * const purchaseReceiptItem = await prisma.purchaseReceiptItem.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptItemClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more PurchaseReceiptItems that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptItemFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all PurchaseReceiptItems - * const purchaseReceiptItems = await prisma.purchaseReceiptItem.findMany() - * - * // Get first 10 PurchaseReceiptItems - * const purchaseReceiptItems = await prisma.purchaseReceiptItem.findMany({ take: 10 }) - * - * // Only select the `id` - * const purchaseReceiptItemWithIdOnly = await prisma.purchaseReceiptItem.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a PurchaseReceiptItem. - * @param {PurchaseReceiptItemCreateArgs} args - Arguments to create a PurchaseReceiptItem. - * @example - * // Create one PurchaseReceiptItem - * const PurchaseReceiptItem = await prisma.purchaseReceiptItem.create({ - * data: { - * // ... data to create a PurchaseReceiptItem - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptItemClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many PurchaseReceiptItems. - * @param {PurchaseReceiptItemCreateManyArgs} args - Arguments to create many PurchaseReceiptItems. - * @example - * // Create many PurchaseReceiptItems - * const purchaseReceiptItem = await prisma.purchaseReceiptItem.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a PurchaseReceiptItem. - * @param {PurchaseReceiptItemDeleteArgs} args - Arguments to delete one PurchaseReceiptItem. - * @example - * // Delete one PurchaseReceiptItem - * const PurchaseReceiptItem = await prisma.purchaseReceiptItem.delete({ - * where: { - * // ... filter to delete one PurchaseReceiptItem - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptItemClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one PurchaseReceiptItem. - * @param {PurchaseReceiptItemUpdateArgs} args - Arguments to update one PurchaseReceiptItem. - * @example - * // Update one PurchaseReceiptItem - * const purchaseReceiptItem = await prisma.purchaseReceiptItem.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptItemClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more PurchaseReceiptItems. - * @param {PurchaseReceiptItemDeleteManyArgs} args - Arguments to filter PurchaseReceiptItems to delete. - * @example - * // Delete a few PurchaseReceiptItems - * const { count } = await prisma.purchaseReceiptItem.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more PurchaseReceiptItems. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptItemUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many PurchaseReceiptItems - * const purchaseReceiptItem = await prisma.purchaseReceiptItem.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one PurchaseReceiptItem. - * @param {PurchaseReceiptItemUpsertArgs} args - Arguments to update or create a PurchaseReceiptItem. - * @example - * // Update or create a PurchaseReceiptItem - * const purchaseReceiptItem = await prisma.purchaseReceiptItem.upsert({ - * create: { - * // ... data to create a PurchaseReceiptItem - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the PurchaseReceiptItem we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptItemClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of PurchaseReceiptItems. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptItemCountArgs} args - Arguments to filter PurchaseReceiptItems to count. - * @example - * // Count the number of PurchaseReceiptItems - * const count = await prisma.purchaseReceiptItem.count({ - * where: { - * // ... the filter for the PurchaseReceiptItems we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a PurchaseReceiptItem. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptItemAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by PurchaseReceiptItem. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptItemGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends PurchaseReceiptItemGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: PurchaseReceiptItemGroupByArgs['orderBy'] } - : { orderBy?: PurchaseReceiptItemGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetPurchaseReceiptItemGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the PurchaseReceiptItem model - */ -readonly fields: PurchaseReceiptItemFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for PurchaseReceiptItem. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__PurchaseReceiptItemClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - receipt = {}>(args?: Prisma.Subset>): Prisma.Prisma__PurchaseReceiptClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the PurchaseReceiptItem model - */ -export interface PurchaseReceiptItemFieldRefs { - readonly id: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'> - readonly count: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'> - readonly unitPrice: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'> - readonly totalAmount: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'> - readonly receiptId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'> - readonly productId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'> - readonly description: Prisma.FieldRef<"PurchaseReceiptItem", 'String'> - readonly createdAt: Prisma.FieldRef<"PurchaseReceiptItem", 'DateTime'> -} - - -// Custom InputTypes -/** - * PurchaseReceiptItem findUnique - */ -export type PurchaseReceiptItemFindUniqueArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - /** - * Filter, which PurchaseReceiptItem to fetch. - */ - where: Prisma.PurchaseReceiptItemWhereUniqueInput -} - -/** - * PurchaseReceiptItem findUniqueOrThrow - */ -export type PurchaseReceiptItemFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - /** - * Filter, which PurchaseReceiptItem to fetch. - */ - where: Prisma.PurchaseReceiptItemWhereUniqueInput -} - -/** - * PurchaseReceiptItem findFirst - */ -export type PurchaseReceiptItemFindFirstArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - /** - * Filter, which PurchaseReceiptItem to fetch. - */ - where?: Prisma.PurchaseReceiptItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceiptItems to fetch. - */ - orderBy?: Prisma.PurchaseReceiptItemOrderByWithRelationInput | Prisma.PurchaseReceiptItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PurchaseReceiptItems. - */ - cursor?: Prisma.PurchaseReceiptItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceiptItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceiptItems. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PurchaseReceiptItems. - */ - distinct?: Prisma.PurchaseReceiptItemScalarFieldEnum | Prisma.PurchaseReceiptItemScalarFieldEnum[] -} - -/** - * PurchaseReceiptItem findFirstOrThrow - */ -export type PurchaseReceiptItemFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - /** - * Filter, which PurchaseReceiptItem to fetch. - */ - where?: Prisma.PurchaseReceiptItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceiptItems to fetch. - */ - orderBy?: Prisma.PurchaseReceiptItemOrderByWithRelationInput | Prisma.PurchaseReceiptItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PurchaseReceiptItems. - */ - cursor?: Prisma.PurchaseReceiptItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceiptItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceiptItems. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PurchaseReceiptItems. - */ - distinct?: Prisma.PurchaseReceiptItemScalarFieldEnum | Prisma.PurchaseReceiptItemScalarFieldEnum[] -} - -/** - * PurchaseReceiptItem findMany - */ -export type PurchaseReceiptItemFindManyArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - /** - * Filter, which PurchaseReceiptItems to fetch. - */ - where?: Prisma.PurchaseReceiptItemWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceiptItems to fetch. - */ - orderBy?: Prisma.PurchaseReceiptItemOrderByWithRelationInput | Prisma.PurchaseReceiptItemOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing PurchaseReceiptItems. - */ - cursor?: Prisma.PurchaseReceiptItemWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceiptItems from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceiptItems. - */ - skip?: number - distinct?: Prisma.PurchaseReceiptItemScalarFieldEnum | Prisma.PurchaseReceiptItemScalarFieldEnum[] -} - -/** - * PurchaseReceiptItem create - */ -export type PurchaseReceiptItemCreateArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - /** - * The data needed to create a PurchaseReceiptItem. - */ - data: Prisma.XOR -} - -/** - * PurchaseReceiptItem createMany - */ -export type PurchaseReceiptItemCreateManyArgs = { - /** - * The data used to create many PurchaseReceiptItems. - */ - data: Prisma.PurchaseReceiptItemCreateManyInput | Prisma.PurchaseReceiptItemCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * PurchaseReceiptItem update - */ -export type PurchaseReceiptItemUpdateArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - /** - * The data needed to update a PurchaseReceiptItem. - */ - data: Prisma.XOR - /** - * Choose, which PurchaseReceiptItem to update. - */ - where: Prisma.PurchaseReceiptItemWhereUniqueInput -} - -/** - * PurchaseReceiptItem updateMany - */ -export type PurchaseReceiptItemUpdateManyArgs = { - /** - * The data used to update PurchaseReceiptItems. - */ - data: Prisma.XOR - /** - * Filter which PurchaseReceiptItems to update - */ - where?: Prisma.PurchaseReceiptItemWhereInput - /** - * Limit how many PurchaseReceiptItems to update. - */ - limit?: number -} - -/** - * PurchaseReceiptItem upsert - */ -export type PurchaseReceiptItemUpsertArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - /** - * The filter to search for the PurchaseReceiptItem to update in case it exists. - */ - where: Prisma.PurchaseReceiptItemWhereUniqueInput - /** - * In case the PurchaseReceiptItem found by the `where` argument doesn't exist, create a new PurchaseReceiptItem with this data. - */ - create: Prisma.XOR - /** - * In case the PurchaseReceiptItem was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * PurchaseReceiptItem delete - */ -export type PurchaseReceiptItemDeleteArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null - /** - * Filter which PurchaseReceiptItem to delete. - */ - where: Prisma.PurchaseReceiptItemWhereUniqueInput -} - -/** - * PurchaseReceiptItem deleteMany - */ -export type PurchaseReceiptItemDeleteManyArgs = { - /** - * Filter which PurchaseReceiptItems to delete - */ - where?: Prisma.PurchaseReceiptItemWhereInput - /** - * Limit how many PurchaseReceiptItems to delete. - */ - limit?: number -} - -/** - * PurchaseReceiptItem without action - */ -export type PurchaseReceiptItemDefaultArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptItem - */ - select?: Prisma.PurchaseReceiptItemSelect | null - /** - * Omit specific fields from the PurchaseReceiptItem - */ - omit?: Prisma.PurchaseReceiptItemOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptItemInclude | null -} diff --git a/src/generated/prisma/models/PurchaseReceiptPayments.ts b/src/generated/prisma/models/PurchaseReceiptPayments.ts deleted file mode 100644 index 58f6323..0000000 --- a/src/generated/prisma/models/PurchaseReceiptPayments.ts +++ /dev/null @@ -1,1799 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `PurchaseReceiptPayments` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model PurchaseReceiptPayments - * - */ -export type PurchaseReceiptPaymentsModel = runtime.Types.Result.DefaultSelection - -export type AggregatePurchaseReceiptPayments = { - _count: PurchaseReceiptPaymentsCountAggregateOutputType | null - _avg: PurchaseReceiptPaymentsAvgAggregateOutputType | null - _sum: PurchaseReceiptPaymentsSumAggregateOutputType | null - _min: PurchaseReceiptPaymentsMinAggregateOutputType | null - _max: PurchaseReceiptPaymentsMaxAggregateOutputType | null -} - -export type PurchaseReceiptPaymentsAvgAggregateOutputType = { - id: number | null - amount: runtime.Decimal | null - bankAccountId: number | null - receiptId: number | null - inventoryBankAccountInventoryId: number | null - inventoryBankAccountBankAccountId: number | null -} - -export type PurchaseReceiptPaymentsSumAggregateOutputType = { - id: number | null - amount: runtime.Decimal | null - bankAccountId: number | null - receiptId: number | null - inventoryBankAccountInventoryId: number | null - inventoryBankAccountBankAccountId: number | null -} - -export type PurchaseReceiptPaymentsMinAggregateOutputType = { - id: number | null - amount: runtime.Decimal | null - paymentMethod: $Enums.PaymentMethodType | null - type: $Enums.PaymentType | null - bankAccountId: number | null - receiptId: number | null - payedAt: Date | null - description: string | null - createdAt: Date | null - inventoryBankAccountInventoryId: number | null - inventoryBankAccountBankAccountId: number | null -} - -export type PurchaseReceiptPaymentsMaxAggregateOutputType = { - id: number | null - amount: runtime.Decimal | null - paymentMethod: $Enums.PaymentMethodType | null - type: $Enums.PaymentType | null - bankAccountId: number | null - receiptId: number | null - payedAt: Date | null - description: string | null - createdAt: Date | null - inventoryBankAccountInventoryId: number | null - inventoryBankAccountBankAccountId: number | null -} - -export type PurchaseReceiptPaymentsCountAggregateOutputType = { - id: number - amount: number - paymentMethod: number - type: number - bankAccountId: number - receiptId: number - payedAt: number - description: number - createdAt: number - inventoryBankAccountInventoryId: number - inventoryBankAccountBankAccountId: number - _all: number -} - - -export type PurchaseReceiptPaymentsAvgAggregateInputType = { - id?: true - amount?: true - bankAccountId?: true - receiptId?: true - inventoryBankAccountInventoryId?: true - inventoryBankAccountBankAccountId?: true -} - -export type PurchaseReceiptPaymentsSumAggregateInputType = { - id?: true - amount?: true - bankAccountId?: true - receiptId?: true - inventoryBankAccountInventoryId?: true - inventoryBankAccountBankAccountId?: true -} - -export type PurchaseReceiptPaymentsMinAggregateInputType = { - id?: true - amount?: true - paymentMethod?: true - type?: true - bankAccountId?: true - receiptId?: true - payedAt?: true - description?: true - createdAt?: true - inventoryBankAccountInventoryId?: true - inventoryBankAccountBankAccountId?: true -} - -export type PurchaseReceiptPaymentsMaxAggregateInputType = { - id?: true - amount?: true - paymentMethod?: true - type?: true - bankAccountId?: true - receiptId?: true - payedAt?: true - description?: true - createdAt?: true - inventoryBankAccountInventoryId?: true - inventoryBankAccountBankAccountId?: true -} - -export type PurchaseReceiptPaymentsCountAggregateInputType = { - id?: true - amount?: true - paymentMethod?: true - type?: true - bankAccountId?: true - receiptId?: true - payedAt?: true - description?: true - createdAt?: true - inventoryBankAccountInventoryId?: true - inventoryBankAccountBankAccountId?: true - _all?: true -} - -export type PurchaseReceiptPaymentsAggregateArgs = { - /** - * Filter which PurchaseReceiptPayments to aggregate. - */ - where?: Prisma.PurchaseReceiptPaymentsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceiptPayments to fetch. - */ - orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput | Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceiptPayments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceiptPayments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned PurchaseReceiptPayments - **/ - _count?: true | PurchaseReceiptPaymentsCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: PurchaseReceiptPaymentsAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: PurchaseReceiptPaymentsSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: PurchaseReceiptPaymentsMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: PurchaseReceiptPaymentsMaxAggregateInputType -} - -export type GetPurchaseReceiptPaymentsAggregateType = { - [P in keyof T & keyof AggregatePurchaseReceiptPayments]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type PurchaseReceiptPaymentsGroupByArgs = { - where?: Prisma.PurchaseReceiptPaymentsWhereInput - orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithAggregationInput | Prisma.PurchaseReceiptPaymentsOrderByWithAggregationInput[] - by: Prisma.PurchaseReceiptPaymentsScalarFieldEnum[] | Prisma.PurchaseReceiptPaymentsScalarFieldEnum - having?: Prisma.PurchaseReceiptPaymentsScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: PurchaseReceiptPaymentsCountAggregateInputType | true - _avg?: PurchaseReceiptPaymentsAvgAggregateInputType - _sum?: PurchaseReceiptPaymentsSumAggregateInputType - _min?: PurchaseReceiptPaymentsMinAggregateInputType - _max?: PurchaseReceiptPaymentsMaxAggregateInputType -} - -export type PurchaseReceiptPaymentsGroupByOutputType = { - id: number - amount: runtime.Decimal - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - bankAccountId: number - receiptId: number - payedAt: Date - description: string | null - createdAt: Date - inventoryBankAccountInventoryId: number | null - inventoryBankAccountBankAccountId: number | null - _count: PurchaseReceiptPaymentsCountAggregateOutputType | null - _avg: PurchaseReceiptPaymentsAvgAggregateOutputType | null - _sum: PurchaseReceiptPaymentsSumAggregateOutputType | null - _min: PurchaseReceiptPaymentsMinAggregateOutputType | null - _max: PurchaseReceiptPaymentsMaxAggregateOutputType | null -} - -type GetPurchaseReceiptPaymentsGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof PurchaseReceiptPaymentsGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type PurchaseReceiptPaymentsWhereInput = { - AND?: Prisma.PurchaseReceiptPaymentsWhereInput | Prisma.PurchaseReceiptPaymentsWhereInput[] - OR?: Prisma.PurchaseReceiptPaymentsWhereInput[] - NOT?: Prisma.PurchaseReceiptPaymentsWhereInput | Prisma.PurchaseReceiptPaymentsWhereInput[] - id?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number - amount?: Prisma.DecimalFilter<"PurchaseReceiptPayments"> | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType - bankAccountId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number - receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number - payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string - description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string - inventoryBankAccountInventoryId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null - inventoryBankAccountBankAccountId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null - receipt?: Prisma.XOR - bankAccount?: Prisma.XOR - inventoryBankAccount?: Prisma.XOR | null -} - -export type PurchaseReceiptPaymentsOrderByWithRelationInput = { - id?: Prisma.SortOrder - amount?: Prisma.SortOrder - paymentMethod?: Prisma.SortOrder - type?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - payedAt?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - inventoryBankAccountInventoryId?: Prisma.SortOrderInput | Prisma.SortOrder - inventoryBankAccountBankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder - receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput - bankAccount?: Prisma.BankAccountOrderByWithRelationInput - inventoryBankAccount?: Prisma.InventoryBankAccountOrderByWithRelationInput - _relevance?: Prisma.PurchaseReceiptPaymentsOrderByRelevanceInput -} - -export type PurchaseReceiptPaymentsWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.PurchaseReceiptPaymentsWhereInput | Prisma.PurchaseReceiptPaymentsWhereInput[] - OR?: Prisma.PurchaseReceiptPaymentsWhereInput[] - NOT?: Prisma.PurchaseReceiptPaymentsWhereInput | Prisma.PurchaseReceiptPaymentsWhereInput[] - amount?: Prisma.DecimalFilter<"PurchaseReceiptPayments"> | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType - bankAccountId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number - receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number - payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string - description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string - inventoryBankAccountInventoryId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null - inventoryBankAccountBankAccountId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null - receipt?: Prisma.XOR - bankAccount?: Prisma.XOR - inventoryBankAccount?: Prisma.XOR | null -}, "id"> - -export type PurchaseReceiptPaymentsOrderByWithAggregationInput = { - id?: Prisma.SortOrder - amount?: Prisma.SortOrder - paymentMethod?: Prisma.SortOrder - type?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - payedAt?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - inventoryBankAccountInventoryId?: Prisma.SortOrderInput | Prisma.SortOrder - inventoryBankAccountBankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.PurchaseReceiptPaymentsCountOrderByAggregateInput - _avg?: Prisma.PurchaseReceiptPaymentsAvgOrderByAggregateInput - _max?: Prisma.PurchaseReceiptPaymentsMaxOrderByAggregateInput - _min?: Prisma.PurchaseReceiptPaymentsMinOrderByAggregateInput - _sum?: Prisma.PurchaseReceiptPaymentsSumOrderByAggregateInput -} - -export type PurchaseReceiptPaymentsScalarWhereWithAggregatesInput = { - AND?: Prisma.PurchaseReceiptPaymentsScalarWhereWithAggregatesInput | Prisma.PurchaseReceiptPaymentsScalarWhereWithAggregatesInput[] - OR?: Prisma.PurchaseReceiptPaymentsScalarWhereWithAggregatesInput[] - NOT?: Prisma.PurchaseReceiptPaymentsScalarWhereWithAggregatesInput | Prisma.PurchaseReceiptPaymentsScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptPayments"> | number - amount?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptPayments"> | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeWithAggregatesFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeWithAggregatesFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType - bankAccountId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptPayments"> | number - receiptId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptPayments"> | number - payedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string - description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string - inventoryBankAccountInventoryId?: Prisma.IntNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | number | null - inventoryBankAccountBankAccountId?: Prisma.IntNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | number | null -} - -export type PurchaseReceiptPaymentsCreateInput = { - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - payedAt: Date | string - description?: string | null - createdAt?: Date | string - receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput - bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput - inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput -} - -export type PurchaseReceiptPaymentsUncheckedCreateInput = { - id?: number - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - bankAccountId: number - receiptId: number - payedAt: Date | string - description?: string | null - createdAt?: Date | string - inventoryBankAccountInventoryId?: number | null - inventoryBankAccountBankAccountId?: number | null -} - -export type PurchaseReceiptPaymentsUpdateInput = { - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput - bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput - inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput -} - -export type PurchaseReceiptPaymentsUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type PurchaseReceiptPaymentsCreateManyInput = { - id?: number - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - bankAccountId: number - receiptId: number - payedAt: Date | string - description?: string | null - createdAt?: Date | string - inventoryBankAccountInventoryId?: number | null - inventoryBankAccountBankAccountId?: number | null -} - -export type PurchaseReceiptPaymentsUpdateManyMutationInput = { - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type PurchaseReceiptPaymentsUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type PurchaseReceiptPaymentsListRelationFilter = { - every?: Prisma.PurchaseReceiptPaymentsWhereInput - some?: Prisma.PurchaseReceiptPaymentsWhereInput - none?: Prisma.PurchaseReceiptPaymentsWhereInput -} - -export type PurchaseReceiptPaymentsOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type PurchaseReceiptPaymentsOrderByRelevanceInput = { - fields: Prisma.PurchaseReceiptPaymentsOrderByRelevanceFieldEnum | Prisma.PurchaseReceiptPaymentsOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type PurchaseReceiptPaymentsCountOrderByAggregateInput = { - id?: Prisma.SortOrder - amount?: Prisma.SortOrder - paymentMethod?: Prisma.SortOrder - type?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - payedAt?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - inventoryBankAccountInventoryId?: Prisma.SortOrder - inventoryBankAccountBankAccountId?: Prisma.SortOrder -} - -export type PurchaseReceiptPaymentsAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - amount?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - inventoryBankAccountInventoryId?: Prisma.SortOrder - inventoryBankAccountBankAccountId?: Prisma.SortOrder -} - -export type PurchaseReceiptPaymentsMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - amount?: Prisma.SortOrder - paymentMethod?: Prisma.SortOrder - type?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - payedAt?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - inventoryBankAccountInventoryId?: Prisma.SortOrder - inventoryBankAccountBankAccountId?: Prisma.SortOrder -} - -export type PurchaseReceiptPaymentsMinOrderByAggregateInput = { - id?: Prisma.SortOrder - amount?: Prisma.SortOrder - paymentMethod?: Prisma.SortOrder - type?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - payedAt?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - inventoryBankAccountInventoryId?: Prisma.SortOrder - inventoryBankAccountBankAccountId?: Prisma.SortOrder -} - -export type PurchaseReceiptPaymentsSumOrderByAggregateInput = { - id?: Prisma.SortOrder - amount?: Prisma.SortOrder - bankAccountId?: Prisma.SortOrder - receiptId?: Prisma.SortOrder - inventoryBankAccountInventoryId?: Prisma.SortOrder - inventoryBankAccountBankAccountId?: Prisma.SortOrder -} - -export type PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyBankAccountInputEnvelope - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] -} - -export type PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyBankAccountInputEnvelope - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] -} - -export type PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput[] - upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutBankAccountInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyBankAccountInputEnvelope - set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutBankAccountInput[] - updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutBankAccountInput[] - deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] -} - -export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput[] - upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutBankAccountInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyBankAccountInputEnvelope - set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutBankAccountInput[] - updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutBankAccountInput[] - deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] -} - -export type PurchaseReceiptPaymentsCreateNestedManyWithoutInventoryBankAccountInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] -} - -export type PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutInventoryBankAccountInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] -} - -export type PurchaseReceiptPaymentsUpdateManyWithoutInventoryBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[] - upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope - set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput[] - updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput[] - deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] -} - -export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput[] - upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope - set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput[] - updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput[] - deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] -} - -export type PurchaseReceiptPaymentsCreateNestedManyWithoutReceiptInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] -} - -export type PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutReceiptInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] -} - -export type PurchaseReceiptPaymentsUpdateManyWithoutReceiptNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[] - upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope - set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput[] - updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput[] - deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] -} - -export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput = { - create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput[] - connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput[] - upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput[] - createMany?: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope - set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] - update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput[] - updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput[] - deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] -} - -export type EnumPaymentMethodTypeFieldUpdateOperationsInput = { - set?: $Enums.PaymentMethodType -} - -export type EnumPaymentTypeFieldUpdateOperationsInput = { - set?: $Enums.PaymentType -} - -export type PurchaseReceiptPaymentsCreateWithoutBankAccountInput = { - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - payedAt: Date | string - description?: string | null - createdAt?: Date | string - receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput - inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput -} - -export type PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput = { - id?: number - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - receiptId: number - payedAt: Date | string - description?: string | null - createdAt?: Date | string - inventoryBankAccountInventoryId?: number | null - inventoryBankAccountBankAccountId?: number | null -} - -export type PurchaseReceiptPaymentsCreateOrConnectWithoutBankAccountInput = { - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - create: Prisma.XOR -} - -export type PurchaseReceiptPaymentsCreateManyBankAccountInputEnvelope = { - data: Prisma.PurchaseReceiptPaymentsCreateManyBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateManyBankAccountInput[] - skipDuplicates?: boolean -} - -export type PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutBankAccountInput = { - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutBankAccountInput = { - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - data: Prisma.XOR -} - -export type PurchaseReceiptPaymentsUpdateManyWithWhereWithoutBankAccountInput = { - where: Prisma.PurchaseReceiptPaymentsScalarWhereInput - data: Prisma.XOR -} - -export type PurchaseReceiptPaymentsScalarWhereInput = { - AND?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] - OR?: Prisma.PurchaseReceiptPaymentsScalarWhereInput[] - NOT?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] - id?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number - amount?: Prisma.DecimalFilter<"PurchaseReceiptPayments"> | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFilter<"PurchaseReceiptPayments"> | $Enums.PaymentType - bankAccountId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number - receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number - payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string - description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string - inventoryBankAccountInventoryId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null - inventoryBankAccountBankAccountId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null -} - -export type PurchaseReceiptPaymentsCreateWithoutInventoryBankAccountInput = { - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - payedAt: Date | string - description?: string | null - createdAt?: Date | string - receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPaymentsInput - bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput -} - -export type PurchaseReceiptPaymentsUncheckedCreateWithoutInventoryBankAccountInput = { - id?: number - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - bankAccountId: number - receiptId: number - payedAt: Date | string - description?: string | null - createdAt?: Date | string -} - -export type PurchaseReceiptPaymentsCreateOrConnectWithoutInventoryBankAccountInput = { - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - create: Prisma.XOR -} - -export type PurchaseReceiptPaymentsCreateManyInventoryBankAccountInputEnvelope = { - data: Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInput | Prisma.PurchaseReceiptPaymentsCreateManyInventoryBankAccountInput[] - skipDuplicates?: boolean -} - -export type PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutInventoryBankAccountInput = { - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutInventoryBankAccountInput = { - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - data: Prisma.XOR -} - -export type PurchaseReceiptPaymentsUpdateManyWithWhereWithoutInventoryBankAccountInput = { - where: Prisma.PurchaseReceiptPaymentsScalarWhereInput - data: Prisma.XOR -} - -export type PurchaseReceiptPaymentsCreateWithoutReceiptInput = { - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - payedAt: Date | string - description?: string | null - createdAt?: Date | string - bankAccount: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput - inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput -} - -export type PurchaseReceiptPaymentsUncheckedCreateWithoutReceiptInput = { - id?: number - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - bankAccountId: number - payedAt: Date | string - description?: string | null - createdAt?: Date | string - inventoryBankAccountInventoryId?: number | null - inventoryBankAccountBankAccountId?: number | null -} - -export type PurchaseReceiptPaymentsCreateOrConnectWithoutReceiptInput = { - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - create: Prisma.XOR -} - -export type PurchaseReceiptPaymentsCreateManyReceiptInputEnvelope = { - data: Prisma.PurchaseReceiptPaymentsCreateManyReceiptInput | Prisma.PurchaseReceiptPaymentsCreateManyReceiptInput[] - skipDuplicates?: boolean -} - -export type PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutReceiptInput = { - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutReceiptInput = { - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - data: Prisma.XOR -} - -export type PurchaseReceiptPaymentsUpdateManyWithWhereWithoutReceiptInput = { - where: Prisma.PurchaseReceiptPaymentsScalarWhereInput - data: Prisma.XOR -} - -export type PurchaseReceiptPaymentsCreateManyBankAccountInput = { - id?: number - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - receiptId: number - payedAt: Date | string - description?: string | null - createdAt?: Date | string - inventoryBankAccountInventoryId?: number | null - inventoryBankAccountBankAccountId?: number | null -} - -export type PurchaseReceiptPaymentsUpdateWithoutBankAccountInput = { - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput - inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput -} - -export type PurchaseReceiptPaymentsUncheckedUpdateWithoutBankAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type PurchaseReceiptPaymentsCreateManyInventoryBankAccountInput = { - id?: number - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - bankAccountId: number - receiptId: number - payedAt: Date | string - description?: string | null - createdAt?: Date | string -} - -export type PurchaseReceiptPaymentsUpdateWithoutInventoryBankAccountInput = { - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPaymentsNestedInput - bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput -} - -export type PurchaseReceiptPaymentsUncheckedUpdateWithoutInventoryBankAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutInventoryBankAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - receiptId?: Prisma.IntFieldUpdateOperationsInput | number - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type PurchaseReceiptPaymentsCreateManyReceiptInput = { - id?: number - amount: runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - bankAccountId: number - payedAt: Date | string - description?: string | null - createdAt?: Date | string - inventoryBankAccountInventoryId?: number | null - inventoryBankAccountBankAccountId?: number | null -} - -export type PurchaseReceiptPaymentsUpdateWithoutReceiptInput = { - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput - inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput -} - -export type PurchaseReceiptPaymentsUncheckedUpdateWithoutReceiptInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - paymentMethod?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType - type?: Prisma.EnumPaymentTypeFieldUpdateOperationsInput | $Enums.PaymentType - bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number - payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryBankAccountInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - inventoryBankAccountBankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - - - -export type PurchaseReceiptPaymentsSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - amount?: boolean - paymentMethod?: boolean - type?: boolean - bankAccountId?: boolean - receiptId?: boolean - payedAt?: boolean - description?: boolean - createdAt?: boolean - inventoryBankAccountInventoryId?: boolean - inventoryBankAccountBankAccountId?: boolean - receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs - bankAccount?: boolean | Prisma.BankAccountDefaultArgs - inventoryBankAccount?: boolean | Prisma.PurchaseReceiptPayments$inventoryBankAccountArgs -}, ExtArgs["result"]["purchaseReceiptPayments"]> - - - -export type PurchaseReceiptPaymentsSelectScalar = { - id?: boolean - amount?: boolean - paymentMethod?: boolean - type?: boolean - bankAccountId?: boolean - receiptId?: boolean - payedAt?: boolean - description?: boolean - createdAt?: boolean - inventoryBankAccountInventoryId?: boolean - inventoryBankAccountBankAccountId?: boolean -} - -export type PurchaseReceiptPaymentsOmit = runtime.Types.Extensions.GetOmit<"id" | "amount" | "paymentMethod" | "type" | "bankAccountId" | "receiptId" | "payedAt" | "description" | "createdAt" | "inventoryBankAccountInventoryId" | "inventoryBankAccountBankAccountId", ExtArgs["result"]["purchaseReceiptPayments"]> -export type PurchaseReceiptPaymentsInclude = { - receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs - bankAccount?: boolean | Prisma.BankAccountDefaultArgs - inventoryBankAccount?: boolean | Prisma.PurchaseReceiptPayments$inventoryBankAccountArgs -} - -export type $PurchaseReceiptPaymentsPayload = { - name: "PurchaseReceiptPayments" - objects: { - receipt: Prisma.$PurchaseReceiptPayload - bankAccount: Prisma.$BankAccountPayload - inventoryBankAccount: Prisma.$InventoryBankAccountPayload | null - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - amount: runtime.Decimal - paymentMethod: $Enums.PaymentMethodType - type: $Enums.PaymentType - bankAccountId: number - receiptId: number - payedAt: Date - description: string | null - createdAt: Date - inventoryBankAccountInventoryId: number | null - inventoryBankAccountBankAccountId: number | null - }, ExtArgs["result"]["purchaseReceiptPayments"]> - composites: {} -} - -export type PurchaseReceiptPaymentsGetPayload = runtime.Types.Result.GetResult - -export type PurchaseReceiptPaymentsCountArgs = - Omit & { - select?: PurchaseReceiptPaymentsCountAggregateInputType | true - } - -export interface PurchaseReceiptPaymentsDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['PurchaseReceiptPayments'], meta: { name: 'PurchaseReceiptPayments' } } - /** - * Find zero or one PurchaseReceiptPayments that matches the filter. - * @param {PurchaseReceiptPaymentsFindUniqueArgs} args - Arguments to find a PurchaseReceiptPayments - * @example - * // Get one PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptPaymentsClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one PurchaseReceiptPayments that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {PurchaseReceiptPaymentsFindUniqueOrThrowArgs} args - Arguments to find a PurchaseReceiptPayments - * @example - * // Get one PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptPaymentsClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first PurchaseReceiptPayments that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptPaymentsFindFirstArgs} args - Arguments to find a PurchaseReceiptPayments - * @example - * // Get one PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptPaymentsClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first PurchaseReceiptPayments that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptPaymentsFindFirstOrThrowArgs} args - Arguments to find a PurchaseReceiptPayments - * @example - * // Get one PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptPaymentsClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more PurchaseReceiptPayments that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptPaymentsFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.findMany() - * - * // Get first 10 PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.findMany({ take: 10 }) - * - * // Only select the `id` - * const purchaseReceiptPaymentsWithIdOnly = await prisma.purchaseReceiptPayments.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a PurchaseReceiptPayments. - * @param {PurchaseReceiptPaymentsCreateArgs} args - Arguments to create a PurchaseReceiptPayments. - * @example - * // Create one PurchaseReceiptPayments - * const PurchaseReceiptPayments = await prisma.purchaseReceiptPayments.create({ - * data: { - * // ... data to create a PurchaseReceiptPayments - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptPaymentsClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many PurchaseReceiptPayments. - * @param {PurchaseReceiptPaymentsCreateManyArgs} args - Arguments to create many PurchaseReceiptPayments. - * @example - * // Create many PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a PurchaseReceiptPayments. - * @param {PurchaseReceiptPaymentsDeleteArgs} args - Arguments to delete one PurchaseReceiptPayments. - * @example - * // Delete one PurchaseReceiptPayments - * const PurchaseReceiptPayments = await prisma.purchaseReceiptPayments.delete({ - * where: { - * // ... filter to delete one PurchaseReceiptPayments - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptPaymentsClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one PurchaseReceiptPayments. - * @param {PurchaseReceiptPaymentsUpdateArgs} args - Arguments to update one PurchaseReceiptPayments. - * @example - * // Update one PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptPaymentsClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more PurchaseReceiptPayments. - * @param {PurchaseReceiptPaymentsDeleteManyArgs} args - Arguments to filter PurchaseReceiptPayments to delete. - * @example - * // Delete a few PurchaseReceiptPayments - * const { count } = await prisma.purchaseReceiptPayments.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more PurchaseReceiptPayments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptPaymentsUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one PurchaseReceiptPayments. - * @param {PurchaseReceiptPaymentsUpsertArgs} args - Arguments to update or create a PurchaseReceiptPayments. - * @example - * // Update or create a PurchaseReceiptPayments - * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.upsert({ - * create: { - * // ... data to create a PurchaseReceiptPayments - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the PurchaseReceiptPayments we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__PurchaseReceiptPaymentsClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of PurchaseReceiptPayments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptPaymentsCountArgs} args - Arguments to filter PurchaseReceiptPayments to count. - * @example - * // Count the number of PurchaseReceiptPayments - * const count = await prisma.purchaseReceiptPayments.count({ - * where: { - * // ... the filter for the PurchaseReceiptPayments we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a PurchaseReceiptPayments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptPaymentsAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by PurchaseReceiptPayments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {PurchaseReceiptPaymentsGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends PurchaseReceiptPaymentsGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: PurchaseReceiptPaymentsGroupByArgs['orderBy'] } - : { orderBy?: PurchaseReceiptPaymentsGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetPurchaseReceiptPaymentsGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the PurchaseReceiptPayments model - */ -readonly fields: PurchaseReceiptPaymentsFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for PurchaseReceiptPayments. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__PurchaseReceiptPaymentsClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - receipt = {}>(args?: Prisma.Subset>): Prisma.Prisma__PurchaseReceiptClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - bankAccount = {}>(args?: Prisma.Subset>): Prisma.Prisma__BankAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - inventoryBankAccount = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryBankAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the PurchaseReceiptPayments model - */ -export interface PurchaseReceiptPaymentsFieldRefs { - readonly id: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'> - readonly amount: Prisma.FieldRef<"PurchaseReceiptPayments", 'Decimal'> - readonly paymentMethod: Prisma.FieldRef<"PurchaseReceiptPayments", 'PaymentMethodType'> - readonly type: Prisma.FieldRef<"PurchaseReceiptPayments", 'PaymentType'> - readonly bankAccountId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'> - readonly receiptId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'> - readonly payedAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'> - readonly description: Prisma.FieldRef<"PurchaseReceiptPayments", 'String'> - readonly createdAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'> - readonly inventoryBankAccountInventoryId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'> - readonly inventoryBankAccountBankAccountId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'> -} - - -// Custom InputTypes -/** - * PurchaseReceiptPayments findUnique - */ -export type PurchaseReceiptPaymentsFindUniqueArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - /** - * Filter, which PurchaseReceiptPayments to fetch. - */ - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput -} - -/** - * PurchaseReceiptPayments findUniqueOrThrow - */ -export type PurchaseReceiptPaymentsFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - /** - * Filter, which PurchaseReceiptPayments to fetch. - */ - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput -} - -/** - * PurchaseReceiptPayments findFirst - */ -export type PurchaseReceiptPaymentsFindFirstArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - /** - * Filter, which PurchaseReceiptPayments to fetch. - */ - where?: Prisma.PurchaseReceiptPaymentsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceiptPayments to fetch. - */ - orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput | Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PurchaseReceiptPayments. - */ - cursor?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceiptPayments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceiptPayments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PurchaseReceiptPayments. - */ - distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[] -} - -/** - * PurchaseReceiptPayments findFirstOrThrow - */ -export type PurchaseReceiptPaymentsFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - /** - * Filter, which PurchaseReceiptPayments to fetch. - */ - where?: Prisma.PurchaseReceiptPaymentsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceiptPayments to fetch. - */ - orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput | Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for PurchaseReceiptPayments. - */ - cursor?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceiptPayments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceiptPayments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of PurchaseReceiptPayments. - */ - distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[] -} - -/** - * PurchaseReceiptPayments findMany - */ -export type PurchaseReceiptPaymentsFindManyArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - /** - * Filter, which PurchaseReceiptPayments to fetch. - */ - where?: Prisma.PurchaseReceiptPaymentsWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of PurchaseReceiptPayments to fetch. - */ - orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput | Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing PurchaseReceiptPayments. - */ - cursor?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` PurchaseReceiptPayments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` PurchaseReceiptPayments. - */ - skip?: number - distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[] -} - -/** - * PurchaseReceiptPayments create - */ -export type PurchaseReceiptPaymentsCreateArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - /** - * The data needed to create a PurchaseReceiptPayments. - */ - data: Prisma.XOR -} - -/** - * PurchaseReceiptPayments createMany - */ -export type PurchaseReceiptPaymentsCreateManyArgs = { - /** - * The data used to create many PurchaseReceiptPayments. - */ - data: Prisma.PurchaseReceiptPaymentsCreateManyInput | Prisma.PurchaseReceiptPaymentsCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * PurchaseReceiptPayments update - */ -export type PurchaseReceiptPaymentsUpdateArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - /** - * The data needed to update a PurchaseReceiptPayments. - */ - data: Prisma.XOR - /** - * Choose, which PurchaseReceiptPayments to update. - */ - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput -} - -/** - * PurchaseReceiptPayments updateMany - */ -export type PurchaseReceiptPaymentsUpdateManyArgs = { - /** - * The data used to update PurchaseReceiptPayments. - */ - data: Prisma.XOR - /** - * Filter which PurchaseReceiptPayments to update - */ - where?: Prisma.PurchaseReceiptPaymentsWhereInput - /** - * Limit how many PurchaseReceiptPayments to update. - */ - limit?: number -} - -/** - * PurchaseReceiptPayments upsert - */ -export type PurchaseReceiptPaymentsUpsertArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - /** - * The filter to search for the PurchaseReceiptPayments to update in case it exists. - */ - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput - /** - * In case the PurchaseReceiptPayments found by the `where` argument doesn't exist, create a new PurchaseReceiptPayments with this data. - */ - create: Prisma.XOR - /** - * In case the PurchaseReceiptPayments was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * PurchaseReceiptPayments delete - */ -export type PurchaseReceiptPaymentsDeleteArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null - /** - * Filter which PurchaseReceiptPayments to delete. - */ - where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput -} - -/** - * PurchaseReceiptPayments deleteMany - */ -export type PurchaseReceiptPaymentsDeleteManyArgs = { - /** - * Filter which PurchaseReceiptPayments to delete - */ - where?: Prisma.PurchaseReceiptPaymentsWhereInput - /** - * Limit how many PurchaseReceiptPayments to delete. - */ - limit?: number -} - -/** - * PurchaseReceiptPayments.inventoryBankAccount - */ -export type PurchaseReceiptPayments$inventoryBankAccountArgs = { - /** - * Select specific fields to fetch from the InventoryBankAccount - */ - select?: Prisma.InventoryBankAccountSelect | null - /** - * Omit specific fields from the InventoryBankAccount - */ - omit?: Prisma.InventoryBankAccountOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryBankAccountInclude | null - where?: Prisma.InventoryBankAccountWhereInput -} - -/** - * PurchaseReceiptPayments without action - */ -export type PurchaseReceiptPaymentsDefaultArgs = { - /** - * Select specific fields to fetch from the PurchaseReceiptPayments - */ - select?: Prisma.PurchaseReceiptPaymentsSelect | null - /** - * Omit specific fields from the PurchaseReceiptPayments - */ - omit?: Prisma.PurchaseReceiptPaymentsOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptPaymentsInclude | null -} diff --git a/src/generated/prisma/models/RefreshToken.ts b/src/generated/prisma/models/RefreshToken.ts deleted file mode 100644 index 1e339e1..0000000 --- a/src/generated/prisma/models/RefreshToken.ts +++ /dev/null @@ -1,1296 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `RefreshToken` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model RefreshToken - * - */ -export type RefreshTokenModel = runtime.Types.Result.DefaultSelection - -export type AggregateRefreshToken = { - _count: RefreshTokenCountAggregateOutputType | null - _avg: RefreshTokenAvgAggregateOutputType | null - _sum: RefreshTokenSumAggregateOutputType | null - _min: RefreshTokenMinAggregateOutputType | null - _max: RefreshTokenMaxAggregateOutputType | null -} - -export type RefreshTokenAvgAggregateOutputType = { - id: number | null - userId: number | null -} - -export type RefreshTokenSumAggregateOutputType = { - id: number | null - userId: number | null -} - -export type RefreshTokenMinAggregateOutputType = { - id: number | null - tokenHash: string | null - userId: number | null - revoked: boolean | null - expiresAt: Date | null - createdAt: Date | null -} - -export type RefreshTokenMaxAggregateOutputType = { - id: number | null - tokenHash: string | null - userId: number | null - revoked: boolean | null - expiresAt: Date | null - createdAt: Date | null -} - -export type RefreshTokenCountAggregateOutputType = { - id: number - tokenHash: number - userId: number - revoked: number - expiresAt: number - createdAt: number - _all: number -} - - -export type RefreshTokenAvgAggregateInputType = { - id?: true - userId?: true -} - -export type RefreshTokenSumAggregateInputType = { - id?: true - userId?: true -} - -export type RefreshTokenMinAggregateInputType = { - id?: true - tokenHash?: true - userId?: true - revoked?: true - expiresAt?: true - createdAt?: true -} - -export type RefreshTokenMaxAggregateInputType = { - id?: true - tokenHash?: true - userId?: true - revoked?: true - expiresAt?: true - createdAt?: true -} - -export type RefreshTokenCountAggregateInputType = { - id?: true - tokenHash?: true - userId?: true - revoked?: true - expiresAt?: true - createdAt?: true - _all?: true -} - -export type RefreshTokenAggregateArgs = { - /** - * Filter which RefreshToken to aggregate. - */ - where?: Prisma.RefreshTokenWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of RefreshTokens to fetch. - */ - orderBy?: Prisma.RefreshTokenOrderByWithRelationInput | Prisma.RefreshTokenOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.RefreshTokenWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` RefreshTokens from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` RefreshTokens. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned RefreshTokens - **/ - _count?: true | RefreshTokenCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: RefreshTokenAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: RefreshTokenSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: RefreshTokenMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: RefreshTokenMaxAggregateInputType -} - -export type GetRefreshTokenAggregateType = { - [P in keyof T & keyof AggregateRefreshToken]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type RefreshTokenGroupByArgs = { - where?: Prisma.RefreshTokenWhereInput - orderBy?: Prisma.RefreshTokenOrderByWithAggregationInput | Prisma.RefreshTokenOrderByWithAggregationInput[] - by: Prisma.RefreshTokenScalarFieldEnum[] | Prisma.RefreshTokenScalarFieldEnum - having?: Prisma.RefreshTokenScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: RefreshTokenCountAggregateInputType | true - _avg?: RefreshTokenAvgAggregateInputType - _sum?: RefreshTokenSumAggregateInputType - _min?: RefreshTokenMinAggregateInputType - _max?: RefreshTokenMaxAggregateInputType -} - -export type RefreshTokenGroupByOutputType = { - id: number - tokenHash: string - userId: number - revoked: boolean - expiresAt: Date - createdAt: Date - _count: RefreshTokenCountAggregateOutputType | null - _avg: RefreshTokenAvgAggregateOutputType | null - _sum: RefreshTokenSumAggregateOutputType | null - _min: RefreshTokenMinAggregateOutputType | null - _max: RefreshTokenMaxAggregateOutputType | null -} - -type GetRefreshTokenGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof RefreshTokenGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type RefreshTokenWhereInput = { - AND?: Prisma.RefreshTokenWhereInput | Prisma.RefreshTokenWhereInput[] - OR?: Prisma.RefreshTokenWhereInput[] - NOT?: Prisma.RefreshTokenWhereInput | Prisma.RefreshTokenWhereInput[] - id?: Prisma.IntFilter<"RefreshToken"> | number - tokenHash?: Prisma.StringFilter<"RefreshToken"> | string - userId?: Prisma.IntFilter<"RefreshToken"> | number - revoked?: Prisma.BoolFilter<"RefreshToken"> | boolean - expiresAt?: Prisma.DateTimeFilter<"RefreshToken"> | Date | string - createdAt?: Prisma.DateTimeFilter<"RefreshToken"> | Date | string - user?: Prisma.XOR -} - -export type RefreshTokenOrderByWithRelationInput = { - id?: Prisma.SortOrder - tokenHash?: Prisma.SortOrder - userId?: Prisma.SortOrder - revoked?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - user?: Prisma.UserOrderByWithRelationInput - _relevance?: Prisma.RefreshTokenOrderByRelevanceInput -} - -export type RefreshTokenWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.RefreshTokenWhereInput | Prisma.RefreshTokenWhereInput[] - OR?: Prisma.RefreshTokenWhereInput[] - NOT?: Prisma.RefreshTokenWhereInput | Prisma.RefreshTokenWhereInput[] - tokenHash?: Prisma.StringFilter<"RefreshToken"> | string - userId?: Prisma.IntFilter<"RefreshToken"> | number - revoked?: Prisma.BoolFilter<"RefreshToken"> | boolean - expiresAt?: Prisma.DateTimeFilter<"RefreshToken"> | Date | string - createdAt?: Prisma.DateTimeFilter<"RefreshToken"> | Date | string - user?: Prisma.XOR -}, "id"> - -export type RefreshTokenOrderByWithAggregationInput = { - id?: Prisma.SortOrder - tokenHash?: Prisma.SortOrder - userId?: Prisma.SortOrder - revoked?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - _count?: Prisma.RefreshTokenCountOrderByAggregateInput - _avg?: Prisma.RefreshTokenAvgOrderByAggregateInput - _max?: Prisma.RefreshTokenMaxOrderByAggregateInput - _min?: Prisma.RefreshTokenMinOrderByAggregateInput - _sum?: Prisma.RefreshTokenSumOrderByAggregateInput -} - -export type RefreshTokenScalarWhereWithAggregatesInput = { - AND?: Prisma.RefreshTokenScalarWhereWithAggregatesInput | Prisma.RefreshTokenScalarWhereWithAggregatesInput[] - OR?: Prisma.RefreshTokenScalarWhereWithAggregatesInput[] - NOT?: Prisma.RefreshTokenScalarWhereWithAggregatesInput | Prisma.RefreshTokenScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"RefreshToken"> | number - tokenHash?: Prisma.StringWithAggregatesFilter<"RefreshToken"> | string - userId?: Prisma.IntWithAggregatesFilter<"RefreshToken"> | number - revoked?: Prisma.BoolWithAggregatesFilter<"RefreshToken"> | boolean - expiresAt?: Prisma.DateTimeWithAggregatesFilter<"RefreshToken"> | Date | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"RefreshToken"> | Date | string -} - -export type RefreshTokenCreateInput = { - tokenHash: string - revoked?: boolean - expiresAt: Date | string - createdAt?: Date | string - user: Prisma.UserCreateNestedOneWithoutRefreshTokensInput -} - -export type RefreshTokenUncheckedCreateInput = { - id?: number - tokenHash: string - userId: number - revoked?: boolean - expiresAt: Date | string - createdAt?: Date | string -} - -export type RefreshTokenUpdateInput = { - tokenHash?: Prisma.StringFieldUpdateOperationsInput | string - revoked?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - user?: Prisma.UserUpdateOneRequiredWithoutRefreshTokensNestedInput -} - -export type RefreshTokenUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - tokenHash?: Prisma.StringFieldUpdateOperationsInput | string - userId?: Prisma.IntFieldUpdateOperationsInput | number - revoked?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type RefreshTokenCreateManyInput = { - id?: number - tokenHash: string - userId: number - revoked?: boolean - expiresAt: Date | string - createdAt?: Date | string -} - -export type RefreshTokenUpdateManyMutationInput = { - tokenHash?: Prisma.StringFieldUpdateOperationsInput | string - revoked?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type RefreshTokenUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - tokenHash?: Prisma.StringFieldUpdateOperationsInput | string - userId?: Prisma.IntFieldUpdateOperationsInput | number - revoked?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type RefreshTokenListRelationFilter = { - every?: Prisma.RefreshTokenWhereInput - some?: Prisma.RefreshTokenWhereInput - none?: Prisma.RefreshTokenWhereInput -} - -export type RefreshTokenOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type RefreshTokenOrderByRelevanceInput = { - fields: Prisma.RefreshTokenOrderByRelevanceFieldEnum | Prisma.RefreshTokenOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type RefreshTokenCountOrderByAggregateInput = { - id?: Prisma.SortOrder - tokenHash?: Prisma.SortOrder - userId?: Prisma.SortOrder - revoked?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type RefreshTokenAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - userId?: Prisma.SortOrder -} - -export type RefreshTokenMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - tokenHash?: Prisma.SortOrder - userId?: Prisma.SortOrder - revoked?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type RefreshTokenMinOrderByAggregateInput = { - id?: Prisma.SortOrder - tokenHash?: Prisma.SortOrder - userId?: Prisma.SortOrder - revoked?: Prisma.SortOrder - expiresAt?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type RefreshTokenSumOrderByAggregateInput = { - id?: Prisma.SortOrder - userId?: Prisma.SortOrder -} - -export type RefreshTokenCreateNestedManyWithoutUserInput = { - create?: Prisma.XOR | Prisma.RefreshTokenCreateWithoutUserInput[] | Prisma.RefreshTokenUncheckedCreateWithoutUserInput[] - connectOrCreate?: Prisma.RefreshTokenCreateOrConnectWithoutUserInput | Prisma.RefreshTokenCreateOrConnectWithoutUserInput[] - createMany?: Prisma.RefreshTokenCreateManyUserInputEnvelope - connect?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] -} - -export type RefreshTokenUncheckedCreateNestedManyWithoutUserInput = { - create?: Prisma.XOR | Prisma.RefreshTokenCreateWithoutUserInput[] | Prisma.RefreshTokenUncheckedCreateWithoutUserInput[] - connectOrCreate?: Prisma.RefreshTokenCreateOrConnectWithoutUserInput | Prisma.RefreshTokenCreateOrConnectWithoutUserInput[] - createMany?: Prisma.RefreshTokenCreateManyUserInputEnvelope - connect?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] -} - -export type RefreshTokenUpdateManyWithoutUserNestedInput = { - create?: Prisma.XOR | Prisma.RefreshTokenCreateWithoutUserInput[] | Prisma.RefreshTokenUncheckedCreateWithoutUserInput[] - connectOrCreate?: Prisma.RefreshTokenCreateOrConnectWithoutUserInput | Prisma.RefreshTokenCreateOrConnectWithoutUserInput[] - upsert?: Prisma.RefreshTokenUpsertWithWhereUniqueWithoutUserInput | Prisma.RefreshTokenUpsertWithWhereUniqueWithoutUserInput[] - createMany?: Prisma.RefreshTokenCreateManyUserInputEnvelope - set?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] - disconnect?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] - delete?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] - connect?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] - update?: Prisma.RefreshTokenUpdateWithWhereUniqueWithoutUserInput | Prisma.RefreshTokenUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: Prisma.RefreshTokenUpdateManyWithWhereWithoutUserInput | Prisma.RefreshTokenUpdateManyWithWhereWithoutUserInput[] - deleteMany?: Prisma.RefreshTokenScalarWhereInput | Prisma.RefreshTokenScalarWhereInput[] -} - -export type RefreshTokenUncheckedUpdateManyWithoutUserNestedInput = { - create?: Prisma.XOR | Prisma.RefreshTokenCreateWithoutUserInput[] | Prisma.RefreshTokenUncheckedCreateWithoutUserInput[] - connectOrCreate?: Prisma.RefreshTokenCreateOrConnectWithoutUserInput | Prisma.RefreshTokenCreateOrConnectWithoutUserInput[] - upsert?: Prisma.RefreshTokenUpsertWithWhereUniqueWithoutUserInput | Prisma.RefreshTokenUpsertWithWhereUniqueWithoutUserInput[] - createMany?: Prisma.RefreshTokenCreateManyUserInputEnvelope - set?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] - disconnect?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] - delete?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] - connect?: Prisma.RefreshTokenWhereUniqueInput | Prisma.RefreshTokenWhereUniqueInput[] - update?: Prisma.RefreshTokenUpdateWithWhereUniqueWithoutUserInput | Prisma.RefreshTokenUpdateWithWhereUniqueWithoutUserInput[] - updateMany?: Prisma.RefreshTokenUpdateManyWithWhereWithoutUserInput | Prisma.RefreshTokenUpdateManyWithWhereWithoutUserInput[] - deleteMany?: Prisma.RefreshTokenScalarWhereInput | Prisma.RefreshTokenScalarWhereInput[] -} - -export type RefreshTokenCreateWithoutUserInput = { - tokenHash: string - revoked?: boolean - expiresAt: Date | string - createdAt?: Date | string -} - -export type RefreshTokenUncheckedCreateWithoutUserInput = { - id?: number - tokenHash: string - revoked?: boolean - expiresAt: Date | string - createdAt?: Date | string -} - -export type RefreshTokenCreateOrConnectWithoutUserInput = { - where: Prisma.RefreshTokenWhereUniqueInput - create: Prisma.XOR -} - -export type RefreshTokenCreateManyUserInputEnvelope = { - data: Prisma.RefreshTokenCreateManyUserInput | Prisma.RefreshTokenCreateManyUserInput[] - skipDuplicates?: boolean -} - -export type RefreshTokenUpsertWithWhereUniqueWithoutUserInput = { - where: Prisma.RefreshTokenWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type RefreshTokenUpdateWithWhereUniqueWithoutUserInput = { - where: Prisma.RefreshTokenWhereUniqueInput - data: Prisma.XOR -} - -export type RefreshTokenUpdateManyWithWhereWithoutUserInput = { - where: Prisma.RefreshTokenScalarWhereInput - data: Prisma.XOR -} - -export type RefreshTokenScalarWhereInput = { - AND?: Prisma.RefreshTokenScalarWhereInput | Prisma.RefreshTokenScalarWhereInput[] - OR?: Prisma.RefreshTokenScalarWhereInput[] - NOT?: Prisma.RefreshTokenScalarWhereInput | Prisma.RefreshTokenScalarWhereInput[] - id?: Prisma.IntFilter<"RefreshToken"> | number - tokenHash?: Prisma.StringFilter<"RefreshToken"> | string - userId?: Prisma.IntFilter<"RefreshToken"> | number - revoked?: Prisma.BoolFilter<"RefreshToken"> | boolean - expiresAt?: Prisma.DateTimeFilter<"RefreshToken"> | Date | string - createdAt?: Prisma.DateTimeFilter<"RefreshToken"> | Date | string -} - -export type RefreshTokenCreateManyUserInput = { - id?: number - tokenHash: string - revoked?: boolean - expiresAt: Date | string - createdAt?: Date | string -} - -export type RefreshTokenUpdateWithoutUserInput = { - tokenHash?: Prisma.StringFieldUpdateOperationsInput | string - revoked?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type RefreshTokenUncheckedUpdateWithoutUserInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - tokenHash?: Prisma.StringFieldUpdateOperationsInput | string - revoked?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type RefreshTokenUncheckedUpdateManyWithoutUserInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - tokenHash?: Prisma.StringFieldUpdateOperationsInput | string - revoked?: Prisma.BoolFieldUpdateOperationsInput | boolean - expiresAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - - - -export type RefreshTokenSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - tokenHash?: boolean - userId?: boolean - revoked?: boolean - expiresAt?: boolean - createdAt?: boolean - user?: boolean | Prisma.UserDefaultArgs -}, ExtArgs["result"]["refreshToken"]> - - - -export type RefreshTokenSelectScalar = { - id?: boolean - tokenHash?: boolean - userId?: boolean - revoked?: boolean - expiresAt?: boolean - createdAt?: boolean -} - -export type RefreshTokenOmit = runtime.Types.Extensions.GetOmit<"id" | "tokenHash" | "userId" | "revoked" | "expiresAt" | "createdAt", ExtArgs["result"]["refreshToken"]> -export type RefreshTokenInclude = { - user?: boolean | Prisma.UserDefaultArgs -} - -export type $RefreshTokenPayload = { - name: "RefreshToken" - objects: { - user: Prisma.$UserPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - tokenHash: string - userId: number - revoked: boolean - expiresAt: Date - createdAt: Date - }, ExtArgs["result"]["refreshToken"]> - composites: {} -} - -export type RefreshTokenGetPayload = runtime.Types.Result.GetResult - -export type RefreshTokenCountArgs = - Omit & { - select?: RefreshTokenCountAggregateInputType | true - } - -export interface RefreshTokenDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['RefreshToken'], meta: { name: 'RefreshToken' } } - /** - * Find zero or one RefreshToken that matches the filter. - * @param {RefreshTokenFindUniqueArgs} args - Arguments to find a RefreshToken - * @example - * // Get one RefreshToken - * const refreshToken = await prisma.refreshToken.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__RefreshTokenClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one RefreshToken that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {RefreshTokenFindUniqueOrThrowArgs} args - Arguments to find a RefreshToken - * @example - * // Get one RefreshToken - * const refreshToken = await prisma.refreshToken.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__RefreshTokenClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first RefreshToken that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RefreshTokenFindFirstArgs} args - Arguments to find a RefreshToken - * @example - * // Get one RefreshToken - * const refreshToken = await prisma.refreshToken.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__RefreshTokenClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first RefreshToken that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RefreshTokenFindFirstOrThrowArgs} args - Arguments to find a RefreshToken - * @example - * // Get one RefreshToken - * const refreshToken = await prisma.refreshToken.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__RefreshTokenClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more RefreshTokens that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RefreshTokenFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all RefreshTokens - * const refreshTokens = await prisma.refreshToken.findMany() - * - * // Get first 10 RefreshTokens - * const refreshTokens = await prisma.refreshToken.findMany({ take: 10 }) - * - * // Only select the `id` - * const refreshTokenWithIdOnly = await prisma.refreshToken.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a RefreshToken. - * @param {RefreshTokenCreateArgs} args - Arguments to create a RefreshToken. - * @example - * // Create one RefreshToken - * const RefreshToken = await prisma.refreshToken.create({ - * data: { - * // ... data to create a RefreshToken - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__RefreshTokenClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many RefreshTokens. - * @param {RefreshTokenCreateManyArgs} args - Arguments to create many RefreshTokens. - * @example - * // Create many RefreshTokens - * const refreshToken = await prisma.refreshToken.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a RefreshToken. - * @param {RefreshTokenDeleteArgs} args - Arguments to delete one RefreshToken. - * @example - * // Delete one RefreshToken - * const RefreshToken = await prisma.refreshToken.delete({ - * where: { - * // ... filter to delete one RefreshToken - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__RefreshTokenClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one RefreshToken. - * @param {RefreshTokenUpdateArgs} args - Arguments to update one RefreshToken. - * @example - * // Update one RefreshToken - * const refreshToken = await prisma.refreshToken.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__RefreshTokenClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more RefreshTokens. - * @param {RefreshTokenDeleteManyArgs} args - Arguments to filter RefreshTokens to delete. - * @example - * // Delete a few RefreshTokens - * const { count } = await prisma.refreshToken.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more RefreshTokens. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RefreshTokenUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many RefreshTokens - * const refreshToken = await prisma.refreshToken.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one RefreshToken. - * @param {RefreshTokenUpsertArgs} args - Arguments to update or create a RefreshToken. - * @example - * // Update or create a RefreshToken - * const refreshToken = await prisma.refreshToken.upsert({ - * create: { - * // ... data to create a RefreshToken - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the RefreshToken we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__RefreshTokenClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of RefreshTokens. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RefreshTokenCountArgs} args - Arguments to filter RefreshTokens to count. - * @example - * // Count the number of RefreshTokens - * const count = await prisma.refreshToken.count({ - * where: { - * // ... the filter for the RefreshTokens we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a RefreshToken. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RefreshTokenAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by RefreshToken. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RefreshTokenGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends RefreshTokenGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: RefreshTokenGroupByArgs['orderBy'] } - : { orderBy?: RefreshTokenGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetRefreshTokenGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the RefreshToken model - */ -readonly fields: RefreshTokenFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for RefreshToken. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__RefreshTokenClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - user = {}>(args?: Prisma.Subset>): Prisma.Prisma__UserClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the RefreshToken model - */ -export interface RefreshTokenFieldRefs { - readonly id: Prisma.FieldRef<"RefreshToken", 'Int'> - readonly tokenHash: Prisma.FieldRef<"RefreshToken", 'String'> - readonly userId: Prisma.FieldRef<"RefreshToken", 'Int'> - readonly revoked: Prisma.FieldRef<"RefreshToken", 'Boolean'> - readonly expiresAt: Prisma.FieldRef<"RefreshToken", 'DateTime'> - readonly createdAt: Prisma.FieldRef<"RefreshToken", 'DateTime'> -} - - -// Custom InputTypes -/** - * RefreshToken findUnique - */ -export type RefreshTokenFindUniqueArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - /** - * Filter, which RefreshToken to fetch. - */ - where: Prisma.RefreshTokenWhereUniqueInput -} - -/** - * RefreshToken findUniqueOrThrow - */ -export type RefreshTokenFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - /** - * Filter, which RefreshToken to fetch. - */ - where: Prisma.RefreshTokenWhereUniqueInput -} - -/** - * RefreshToken findFirst - */ -export type RefreshTokenFindFirstArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - /** - * Filter, which RefreshToken to fetch. - */ - where?: Prisma.RefreshTokenWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of RefreshTokens to fetch. - */ - orderBy?: Prisma.RefreshTokenOrderByWithRelationInput | Prisma.RefreshTokenOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for RefreshTokens. - */ - cursor?: Prisma.RefreshTokenWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` RefreshTokens from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` RefreshTokens. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of RefreshTokens. - */ - distinct?: Prisma.RefreshTokenScalarFieldEnum | Prisma.RefreshTokenScalarFieldEnum[] -} - -/** - * RefreshToken findFirstOrThrow - */ -export type RefreshTokenFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - /** - * Filter, which RefreshToken to fetch. - */ - where?: Prisma.RefreshTokenWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of RefreshTokens to fetch. - */ - orderBy?: Prisma.RefreshTokenOrderByWithRelationInput | Prisma.RefreshTokenOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for RefreshTokens. - */ - cursor?: Prisma.RefreshTokenWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` RefreshTokens from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` RefreshTokens. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of RefreshTokens. - */ - distinct?: Prisma.RefreshTokenScalarFieldEnum | Prisma.RefreshTokenScalarFieldEnum[] -} - -/** - * RefreshToken findMany - */ -export type RefreshTokenFindManyArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - /** - * Filter, which RefreshTokens to fetch. - */ - where?: Prisma.RefreshTokenWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of RefreshTokens to fetch. - */ - orderBy?: Prisma.RefreshTokenOrderByWithRelationInput | Prisma.RefreshTokenOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing RefreshTokens. - */ - cursor?: Prisma.RefreshTokenWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` RefreshTokens from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` RefreshTokens. - */ - skip?: number - distinct?: Prisma.RefreshTokenScalarFieldEnum | Prisma.RefreshTokenScalarFieldEnum[] -} - -/** - * RefreshToken create - */ -export type RefreshTokenCreateArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - /** - * The data needed to create a RefreshToken. - */ - data: Prisma.XOR -} - -/** - * RefreshToken createMany - */ -export type RefreshTokenCreateManyArgs = { - /** - * The data used to create many RefreshTokens. - */ - data: Prisma.RefreshTokenCreateManyInput | Prisma.RefreshTokenCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * RefreshToken update - */ -export type RefreshTokenUpdateArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - /** - * The data needed to update a RefreshToken. - */ - data: Prisma.XOR - /** - * Choose, which RefreshToken to update. - */ - where: Prisma.RefreshTokenWhereUniqueInput -} - -/** - * RefreshToken updateMany - */ -export type RefreshTokenUpdateManyArgs = { - /** - * The data used to update RefreshTokens. - */ - data: Prisma.XOR - /** - * Filter which RefreshTokens to update - */ - where?: Prisma.RefreshTokenWhereInput - /** - * Limit how many RefreshTokens to update. - */ - limit?: number -} - -/** - * RefreshToken upsert - */ -export type RefreshTokenUpsertArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - /** - * The filter to search for the RefreshToken to update in case it exists. - */ - where: Prisma.RefreshTokenWhereUniqueInput - /** - * In case the RefreshToken found by the `where` argument doesn't exist, create a new RefreshToken with this data. - */ - create: Prisma.XOR - /** - * In case the RefreshToken was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * RefreshToken delete - */ -export type RefreshTokenDeleteArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - /** - * Filter which RefreshToken to delete. - */ - where: Prisma.RefreshTokenWhereUniqueInput -} - -/** - * RefreshToken deleteMany - */ -export type RefreshTokenDeleteManyArgs = { - /** - * Filter which RefreshTokens to delete - */ - where?: Prisma.RefreshTokenWhereInput - /** - * Limit how many RefreshTokens to delete. - */ - limit?: number -} - -/** - * RefreshToken without action - */ -export type RefreshTokenDefaultArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null -} diff --git a/src/generated/prisma/models/Role.ts b/src/generated/prisma/models/Role.ts deleted file mode 100644 index 798a89c..0000000 --- a/src/generated/prisma/models/Role.ts +++ /dev/null @@ -1,1311 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `Role` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model Role - * - */ -export type RoleModel = runtime.Types.Result.DefaultSelection - -export type AggregateRole = { - _count: RoleCountAggregateOutputType | null - _avg: RoleAvgAggregateOutputType | null - _sum: RoleSumAggregateOutputType | null - _min: RoleMinAggregateOutputType | null - _max: RoleMaxAggregateOutputType | null -} - -export type RoleAvgAggregateOutputType = { - id: number | null -} - -export type RoleSumAggregateOutputType = { - id: number | null -} - -export type RoleMinAggregateOutputType = { - id: number | null - name: string | null - description: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type RoleMaxAggregateOutputType = { - id: number | null - name: string | null - description: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type RoleCountAggregateOutputType = { - id: number - name: number - description: number - permissions: number - createdAt: number - updatedAt: number - deletedAt: number - _all: number -} - - -export type RoleAvgAggregateInputType = { - id?: true -} - -export type RoleSumAggregateInputType = { - id?: true -} - -export type RoleMinAggregateInputType = { - id?: true - name?: true - description?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type RoleMaxAggregateInputType = { - id?: true - name?: true - description?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type RoleCountAggregateInputType = { - id?: true - name?: true - description?: true - permissions?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - _all?: true -} - -export type RoleAggregateArgs = { - /** - * Filter which Role to aggregate. - */ - where?: Prisma.RoleWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Roles to fetch. - */ - orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.RoleWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Roles from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Roles. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Roles - **/ - _count?: true | RoleCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: RoleAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: RoleSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: RoleMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: RoleMaxAggregateInputType -} - -export type GetRoleAggregateType = { - [P in keyof T & keyof AggregateRole]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type RoleGroupByArgs = { - where?: Prisma.RoleWhereInput - orderBy?: Prisma.RoleOrderByWithAggregationInput | Prisma.RoleOrderByWithAggregationInput[] - by: Prisma.RoleScalarFieldEnum[] | Prisma.RoleScalarFieldEnum - having?: Prisma.RoleScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: RoleCountAggregateInputType | true - _avg?: RoleAvgAggregateInputType - _sum?: RoleSumAggregateInputType - _min?: RoleMinAggregateInputType - _max?: RoleMaxAggregateInputType -} - -export type RoleGroupByOutputType = { - id: number - name: string - description: string | null - permissions: runtime.JsonValue | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - _count: RoleCountAggregateOutputType | null - _avg: RoleAvgAggregateOutputType | null - _sum: RoleSumAggregateOutputType | null - _min: RoleMinAggregateOutputType | null - _max: RoleMaxAggregateOutputType | null -} - -type GetRoleGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof RoleGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type RoleWhereInput = { - AND?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[] - OR?: Prisma.RoleWhereInput[] - NOT?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[] - id?: Prisma.IntFilter<"Role"> | number - name?: Prisma.StringFilter<"Role"> | string - description?: Prisma.StringNullableFilter<"Role"> | string | null - permissions?: Prisma.JsonNullableFilter<"Role"> - createdAt?: Prisma.DateTimeFilter<"Role"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Role"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Role"> | Date | string | null - users?: Prisma.UserListRelationFilter -} - -export type RoleOrderByWithRelationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - permissions?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - users?: Prisma.UserOrderByRelationAggregateInput - _relevance?: Prisma.RoleOrderByRelevanceInput -} - -export type RoleWhereUniqueInput = Prisma.AtLeast<{ - id?: number - name?: string - AND?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[] - OR?: Prisma.RoleWhereInput[] - NOT?: Prisma.RoleWhereInput | Prisma.RoleWhereInput[] - description?: Prisma.StringNullableFilter<"Role"> | string | null - permissions?: Prisma.JsonNullableFilter<"Role"> - createdAt?: Prisma.DateTimeFilter<"Role"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Role"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Role"> | Date | string | null - users?: Prisma.UserListRelationFilter -}, "id" | "name"> - -export type RoleOrderByWithAggregationInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - permissions?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.RoleCountOrderByAggregateInput - _avg?: Prisma.RoleAvgOrderByAggregateInput - _max?: Prisma.RoleMaxOrderByAggregateInput - _min?: Prisma.RoleMinOrderByAggregateInput - _sum?: Prisma.RoleSumOrderByAggregateInput -} - -export type RoleScalarWhereWithAggregatesInput = { - AND?: Prisma.RoleScalarWhereWithAggregatesInput | Prisma.RoleScalarWhereWithAggregatesInput[] - OR?: Prisma.RoleScalarWhereWithAggregatesInput[] - NOT?: Prisma.RoleScalarWhereWithAggregatesInput | Prisma.RoleScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"Role"> | number - name?: Prisma.StringWithAggregatesFilter<"Role"> | string - description?: Prisma.StringNullableWithAggregatesFilter<"Role"> | string | null - permissions?: Prisma.JsonNullableWithAggregatesFilter<"Role"> - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Role"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Role"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Role"> | Date | string | null -} - -export type RoleCreateInput = { - name: string - description?: string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - users?: Prisma.UserCreateNestedManyWithoutRoleInput -} - -export type RoleUncheckedCreateInput = { - id?: number - name: string - description?: string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - users?: Prisma.UserUncheckedCreateNestedManyWithoutRoleInput -} - -export type RoleUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - users?: Prisma.UserUpdateManyWithoutRoleNestedInput -} - -export type RoleUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - users?: Prisma.UserUncheckedUpdateManyWithoutRoleNestedInput -} - -export type RoleCreateManyInput = { - id?: number - name: string - description?: string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type RoleUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type RoleUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type RoleScalarRelationFilter = { - is?: Prisma.RoleWhereInput - isNot?: Prisma.RoleWhereInput -} - -export type RoleOrderByRelevanceInput = { - fields: Prisma.RoleOrderByRelevanceFieldEnum | Prisma.RoleOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type RoleCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - permissions?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type RoleAvgOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type RoleMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type RoleMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type RoleSumOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type RoleCreateNestedOneWithoutUsersInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.RoleCreateOrConnectWithoutUsersInput - connect?: Prisma.RoleWhereUniqueInput -} - -export type RoleUpdateOneRequiredWithoutUsersNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.RoleCreateOrConnectWithoutUsersInput - upsert?: Prisma.RoleUpsertWithoutUsersInput - connect?: Prisma.RoleWhereUniqueInput - update?: Prisma.XOR, Prisma.RoleUncheckedUpdateWithoutUsersInput> -} - -export type NullableStringFieldUpdateOperationsInput = { - set?: string | null -} - -export type RoleCreateWithoutUsersInput = { - name: string - description?: string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type RoleUncheckedCreateWithoutUsersInput = { - id?: number - name: string - description?: string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type RoleCreateOrConnectWithoutUsersInput = { - where: Prisma.RoleWhereUniqueInput - create: Prisma.XOR -} - -export type RoleUpsertWithoutUsersInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.RoleWhereInput -} - -export type RoleUpdateToOneWithWhereWithoutUsersInput = { - where?: Prisma.RoleWhereInput - data: Prisma.XOR -} - -export type RoleUpdateWithoutUsersInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type RoleUncheckedUpdateWithoutUsersInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - permissions?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - - -/** - * Count Type RoleCountOutputType - */ - -export type RoleCountOutputType = { - users: number -} - -export type RoleCountOutputTypeSelect = { - users?: boolean | RoleCountOutputTypeCountUsersArgs -} - -/** - * RoleCountOutputType without action - */ -export type RoleCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the RoleCountOutputType - */ - select?: Prisma.RoleCountOutputTypeSelect | null -} - -/** - * RoleCountOutputType without action - */ -export type RoleCountOutputTypeCountUsersArgs = { - where?: Prisma.UserWhereInput -} - - -export type RoleSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - description?: boolean - permissions?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - users?: boolean | Prisma.Role$usersArgs - _count?: boolean | Prisma.RoleCountOutputTypeDefaultArgs -}, ExtArgs["result"]["role"]> - - - -export type RoleSelectScalar = { - id?: boolean - name?: boolean - description?: boolean - permissions?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean -} - -export type RoleOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "permissions" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["role"]> -export type RoleInclude = { - users?: boolean | Prisma.Role$usersArgs - _count?: boolean | Prisma.RoleCountOutputTypeDefaultArgs -} - -export type $RolePayload = { - name: "Role" - objects: { - users: Prisma.$UserPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - description: string | null - permissions: runtime.JsonValue | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - }, ExtArgs["result"]["role"]> - composites: {} -} - -export type RoleGetPayload = runtime.Types.Result.GetResult - -export type RoleCountArgs = - Omit & { - select?: RoleCountAggregateInputType | true - } - -export interface RoleDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Role'], meta: { name: 'Role' } } - /** - * Find zero or one Role that matches the filter. - * @param {RoleFindUniqueArgs} args - Arguments to find a Role - * @example - * // Get one Role - * const role = await prisma.role.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Role that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {RoleFindUniqueOrThrowArgs} args - Arguments to find a Role - * @example - * // Get one Role - * const role = await prisma.role.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Role that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RoleFindFirstArgs} args - Arguments to find a Role - * @example - * // Get one Role - * const role = await prisma.role.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Role that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RoleFindFirstOrThrowArgs} args - Arguments to find a Role - * @example - * // Get one Role - * const role = await prisma.role.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Roles that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RoleFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Roles - * const roles = await prisma.role.findMany() - * - * // Get first 10 Roles - * const roles = await prisma.role.findMany({ take: 10 }) - * - * // Only select the `id` - * const roleWithIdOnly = await prisma.role.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Role. - * @param {RoleCreateArgs} args - Arguments to create a Role. - * @example - * // Create one Role - * const Role = await prisma.role.create({ - * data: { - * // ... data to create a Role - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Roles. - * @param {RoleCreateManyArgs} args - Arguments to create many Roles. - * @example - * // Create many Roles - * const role = await prisma.role.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a Role. - * @param {RoleDeleteArgs} args - Arguments to delete one Role. - * @example - * // Delete one Role - * const Role = await prisma.role.delete({ - * where: { - * // ... filter to delete one Role - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Role. - * @param {RoleUpdateArgs} args - Arguments to update one Role. - * @example - * // Update one Role - * const role = await prisma.role.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Roles. - * @param {RoleDeleteManyArgs} args - Arguments to filter Roles to delete. - * @example - * // Delete a few Roles - * const { count } = await prisma.role.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Roles. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RoleUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Roles - * const role = await prisma.role.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Role. - * @param {RoleUpsertArgs} args - Arguments to update or create a Role. - * @example - * // Update or create a Role - * const role = await prisma.role.upsert({ - * create: { - * // ... data to create a Role - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Role we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__RoleClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Roles. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RoleCountArgs} args - Arguments to filter Roles to count. - * @example - * // Count the number of Roles - * const count = await prisma.role.count({ - * where: { - * // ... the filter for the Roles we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Role. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RoleAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by Role. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {RoleGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends RoleGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: RoleGroupByArgs['orderBy'] } - : { orderBy?: RoleGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetRoleGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Role model - */ -readonly fields: RoleFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for Role. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__RoleClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - users = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the Role model - */ -export interface RoleFieldRefs { - readonly id: Prisma.FieldRef<"Role", 'Int'> - readonly name: Prisma.FieldRef<"Role", 'String'> - readonly description: Prisma.FieldRef<"Role", 'String'> - readonly permissions: Prisma.FieldRef<"Role", 'Json'> - readonly createdAt: Prisma.FieldRef<"Role", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Role", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"Role", 'DateTime'> -} - - -// Custom InputTypes -/** - * Role findUnique - */ -export type RoleFindUniqueArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null - /** - * Filter, which Role to fetch. - */ - where: Prisma.RoleWhereUniqueInput -} - -/** - * Role findUniqueOrThrow - */ -export type RoleFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null - /** - * Filter, which Role to fetch. - */ - where: Prisma.RoleWhereUniqueInput -} - -/** - * Role findFirst - */ -export type RoleFindFirstArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null - /** - * Filter, which Role to fetch. - */ - where?: Prisma.RoleWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Roles to fetch. - */ - orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Roles. - */ - cursor?: Prisma.RoleWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Roles from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Roles. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Roles. - */ - distinct?: Prisma.RoleScalarFieldEnum | Prisma.RoleScalarFieldEnum[] -} - -/** - * Role findFirstOrThrow - */ -export type RoleFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null - /** - * Filter, which Role to fetch. - */ - where?: Prisma.RoleWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Roles to fetch. - */ - orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Roles. - */ - cursor?: Prisma.RoleWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Roles from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Roles. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Roles. - */ - distinct?: Prisma.RoleScalarFieldEnum | Prisma.RoleScalarFieldEnum[] -} - -/** - * Role findMany - */ -export type RoleFindManyArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null - /** - * Filter, which Roles to fetch. - */ - where?: Prisma.RoleWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Roles to fetch. - */ - orderBy?: Prisma.RoleOrderByWithRelationInput | Prisma.RoleOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Roles. - */ - cursor?: Prisma.RoleWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Roles from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Roles. - */ - skip?: number - distinct?: Prisma.RoleScalarFieldEnum | Prisma.RoleScalarFieldEnum[] -} - -/** - * Role create - */ -export type RoleCreateArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null - /** - * The data needed to create a Role. - */ - data: Prisma.XOR -} - -/** - * Role createMany - */ -export type RoleCreateManyArgs = { - /** - * The data used to create many Roles. - */ - data: Prisma.RoleCreateManyInput | Prisma.RoleCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Role update - */ -export type RoleUpdateArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null - /** - * The data needed to update a Role. - */ - data: Prisma.XOR - /** - * Choose, which Role to update. - */ - where: Prisma.RoleWhereUniqueInput -} - -/** - * Role updateMany - */ -export type RoleUpdateManyArgs = { - /** - * The data used to update Roles. - */ - data: Prisma.XOR - /** - * Filter which Roles to update - */ - where?: Prisma.RoleWhereInput - /** - * Limit how many Roles to update. - */ - limit?: number -} - -/** - * Role upsert - */ -export type RoleUpsertArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null - /** - * The filter to search for the Role to update in case it exists. - */ - where: Prisma.RoleWhereUniqueInput - /** - * In case the Role found by the `where` argument doesn't exist, create a new Role with this data. - */ - create: Prisma.XOR - /** - * In case the Role was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * Role delete - */ -export type RoleDeleteArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null - /** - * Filter which Role to delete. - */ - where: Prisma.RoleWhereUniqueInput -} - -/** - * Role deleteMany - */ -export type RoleDeleteManyArgs = { - /** - * Filter which Roles to delete - */ - where?: Prisma.RoleWhereInput - /** - * Limit how many Roles to delete. - */ - limit?: number -} - -/** - * Role.users - */ -export type Role$usersArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - where?: Prisma.UserWhereInput - orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] - cursor?: Prisma.UserWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] -} - -/** - * Role without action - */ -export type RoleDefaultArgs = { - /** - * Select specific fields to fetch from the Role - */ - select?: Prisma.RoleSelect | null - /** - * Omit specific fields from the Role - */ - omit?: Prisma.RoleOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RoleInclude | null -} diff --git a/src/generated/prisma/models/SalesInvoice.ts b/src/generated/prisma/models/SalesInvoice.ts index 43912de..259728a 100644 --- a/src/generated/prisma/models/SalesInvoice.ts +++ b/src/generated/prisma/models/SalesInvoice.ts @@ -30,14 +30,12 @@ export type SalesInvoiceAvgAggregateOutputType = { id: number | null totalAmount: runtime.Decimal | null customerId: number | null - posAccountId: number | null } export type SalesInvoiceSumAggregateOutputType = { id: number | null totalAmount: runtime.Decimal | null customerId: number | null - posAccountId: number | null } export type SalesInvoiceMinAggregateOutputType = { @@ -48,7 +46,6 @@ export type SalesInvoiceMinAggregateOutputType = { createdAt: Date | null updatedAt: Date | null customerId: number | null - posAccountId: number | null } export type SalesInvoiceMaxAggregateOutputType = { @@ -59,7 +56,6 @@ export type SalesInvoiceMaxAggregateOutputType = { createdAt: Date | null updatedAt: Date | null customerId: number | null - posAccountId: number | null } export type SalesInvoiceCountAggregateOutputType = { @@ -70,7 +66,6 @@ export type SalesInvoiceCountAggregateOutputType = { createdAt: number updatedAt: number customerId: number - posAccountId: number _all: number } @@ -79,14 +74,12 @@ export type SalesInvoiceAvgAggregateInputType = { id?: true totalAmount?: true customerId?: true - posAccountId?: true } export type SalesInvoiceSumAggregateInputType = { id?: true totalAmount?: true customerId?: true - posAccountId?: true } export type SalesInvoiceMinAggregateInputType = { @@ -97,7 +90,6 @@ export type SalesInvoiceMinAggregateInputType = { createdAt?: true updatedAt?: true customerId?: true - posAccountId?: true } export type SalesInvoiceMaxAggregateInputType = { @@ -108,7 +100,6 @@ export type SalesInvoiceMaxAggregateInputType = { createdAt?: true updatedAt?: true customerId?: true - posAccountId?: true } export type SalesInvoiceCountAggregateInputType = { @@ -119,7 +110,6 @@ export type SalesInvoiceCountAggregateInputType = { createdAt?: true updatedAt?: true customerId?: true - posAccountId?: true _all?: true } @@ -217,7 +207,6 @@ export type SalesInvoiceGroupByOutputType = { createdAt: Date updatedAt: Date customerId: number | null - posAccountId: number _count: SalesInvoiceCountAggregateOutputType | null _avg: SalesInvoiceAvgAggregateOutputType | null _sum: SalesInvoiceSumAggregateOutputType | null @@ -251,9 +240,7 @@ export type SalesInvoiceWhereInput = { createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null - posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number customer?: Prisma.XOR | null - posAccount?: Prisma.XOR items?: Prisma.SalesInvoiceItemListRelationFilter salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter } @@ -266,9 +253,7 @@ export type SalesInvoiceOrderByWithRelationInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder customerId?: Prisma.SortOrderInput | Prisma.SortOrder - posAccountId?: Prisma.SortOrder customer?: Prisma.CustomerOrderByWithRelationInput - posAccount?: Prisma.PosAccountOrderByWithRelationInput items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput salesInvoicePayments?: Prisma.SalesInvoicePaymentOrderByRelationAggregateInput _relevance?: Prisma.SalesInvoiceOrderByRelevanceInput @@ -285,9 +270,7 @@ export type SalesInvoiceWhereUniqueInput = Prisma.AtLeast<{ createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null - posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number customer?: Prisma.XOR | null - posAccount?: Prisma.XOR items?: Prisma.SalesInvoiceItemListRelationFilter salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter }, "id" | "code"> @@ -300,7 +283,6 @@ export type SalesInvoiceOrderByWithAggregationInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder customerId?: Prisma.SortOrderInput | Prisma.SortOrder - posAccountId?: Prisma.SortOrder _count?: Prisma.SalesInvoiceCountOrderByAggregateInput _avg?: Prisma.SalesInvoiceAvgOrderByAggregateInput _max?: Prisma.SalesInvoiceMaxOrderByAggregateInput @@ -319,7 +301,6 @@ export type SalesInvoiceScalarWhereWithAggregatesInput = { createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string customerId?: Prisma.IntNullableWithAggregatesFilter<"SalesInvoice"> | number | null - posAccountId?: Prisma.IntWithAggregatesFilter<"SalesInvoice"> | number } export type SalesInvoiceCreateInput = { @@ -329,7 +310,6 @@ export type SalesInvoiceCreateInput = { createdAt?: Date | string updatedAt?: Date | string customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput - posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput } @@ -342,7 +322,6 @@ export type SalesInvoiceUncheckedCreateInput = { createdAt?: Date | string updatedAt?: Date | string customerId?: number | null - posAccountId: number items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput } @@ -354,7 +333,6 @@ export type SalesInvoiceUpdateInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput - posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput } @@ -367,7 +345,6 @@ export type SalesInvoiceUncheckedUpdateInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput } @@ -380,7 +357,6 @@ export type SalesInvoiceCreateManyInput = { createdAt?: Date | string updatedAt?: Date | string customerId?: number | null - posAccountId: number } export type SalesInvoiceUpdateManyMutationInput = { @@ -399,7 +375,6 @@ export type SalesInvoiceUncheckedUpdateManyInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number } export type SalesInvoiceListRelationFilter = { @@ -426,14 +401,12 @@ export type SalesInvoiceCountOrderByAggregateInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder } export type SalesInvoiceAvgOrderByAggregateInput = { id?: Prisma.SortOrder totalAmount?: Prisma.SortOrder customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder } export type SalesInvoiceMaxOrderByAggregateInput = { @@ -444,7 +417,6 @@ export type SalesInvoiceMaxOrderByAggregateInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder } export type SalesInvoiceMinOrderByAggregateInput = { @@ -455,14 +427,12 @@ export type SalesInvoiceMinOrderByAggregateInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder } export type SalesInvoiceSumOrderByAggregateInput = { id?: Prisma.SortOrder totalAmount?: Prisma.SortOrder customerId?: Prisma.SortOrder - posAccountId?: Prisma.SortOrder } export type SalesInvoiceScalarRelationFilter = { @@ -470,48 +440,6 @@ export type SalesInvoiceScalarRelationFilter = { isNot?: Prisma.SalesInvoiceWhereInput } -export type SalesInvoiceCreateNestedManyWithoutPosAccountInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[] - connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[] - createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope - connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] -} - -export type SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[] - connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[] - createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope - connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] -} - -export type SalesInvoiceUpdateManyWithoutPosAccountNestedInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[] - connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[] - upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput[] - createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope - set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput[] - updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput[] - deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] -} - -export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[] - connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[] - upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput[] - createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope - set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput[] - updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput[] - deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] -} - export type SalesInvoiceCreateNestedManyWithoutCustomerInput = { create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[] connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[] @@ -582,76 +510,12 @@ export type SalesInvoiceUpdateOneRequiredWithoutSalesInvoicePaymentsNestedInput update?: Prisma.XOR, Prisma.SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput> } -export type SalesInvoiceCreateWithoutPosAccountInput = { - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput - items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput - salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput -} - -export type SalesInvoiceUncheckedCreateWithoutPosAccountInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - customerId?: number | null - items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput - salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput -} - -export type SalesInvoiceCreateOrConnectWithoutPosAccountInput = { - where: Prisma.SalesInvoiceWhereUniqueInput - create: Prisma.XOR -} - -export type SalesInvoiceCreateManyPosAccountInputEnvelope = { - data: Prisma.SalesInvoiceCreateManyPosAccountInput | Prisma.SalesInvoiceCreateManyPosAccountInput[] - skipDuplicates?: boolean -} - -export type SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput = { - where: Prisma.SalesInvoiceWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput = { - where: Prisma.SalesInvoiceWhereUniqueInput - data: Prisma.XOR -} - -export type SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput = { - where: Prisma.SalesInvoiceScalarWhereInput - data: Prisma.XOR -} - -export type SalesInvoiceScalarWhereInput = { - AND?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] - OR?: Prisma.SalesInvoiceScalarWhereInput[] - NOT?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] - id?: Prisma.IntFilter<"SalesInvoice"> | number - code?: Prisma.StringFilter<"SalesInvoice"> | string - totalAmount?: Prisma.DecimalFilter<"SalesInvoice"> | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null - createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string - customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null - posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number -} - export type SalesInvoiceCreateWithoutCustomerInput = { code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string description?: string | null createdAt?: Date | string updatedAt?: Date | string - posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput } @@ -663,7 +527,6 @@ export type SalesInvoiceUncheckedCreateWithoutCustomerInput = { description?: string | null createdAt?: Date | string updatedAt?: Date | string - posAccountId: number items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput } @@ -694,6 +557,19 @@ export type SalesInvoiceUpdateManyWithWhereWithoutCustomerInput = { data: Prisma.XOR } +export type SalesInvoiceScalarWhereInput = { + AND?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] + OR?: Prisma.SalesInvoiceScalarWhereInput[] + NOT?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] + id?: Prisma.IntFilter<"SalesInvoice"> | number + code?: Prisma.StringFilter<"SalesInvoice"> | string + totalAmount?: Prisma.DecimalFilter<"SalesInvoice"> | runtime.Decimal | runtime.DecimalJsLike | number | string + description?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null + createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string + customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null +} + export type SalesInvoiceCreateWithoutItemsInput = { code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string @@ -701,7 +577,6 @@ export type SalesInvoiceCreateWithoutItemsInput = { createdAt?: Date | string updatedAt?: Date | string customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput - posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput } @@ -713,7 +588,6 @@ export type SalesInvoiceUncheckedCreateWithoutItemsInput = { createdAt?: Date | string updatedAt?: Date | string customerId?: number | null - posAccountId: number salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput } @@ -740,7 +614,6 @@ export type SalesInvoiceUpdateWithoutItemsInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput - posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput } @@ -752,7 +625,6 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput } @@ -763,7 +635,6 @@ export type SalesInvoiceCreateWithoutSalesInvoicePaymentsInput = { createdAt?: Date | string updatedAt?: Date | string customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput - posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput } @@ -775,7 +646,6 @@ export type SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput = { createdAt?: Date | string updatedAt?: Date | string customerId?: number | null - posAccountId: number items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput } @@ -802,7 +672,6 @@ export type SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput - posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput } @@ -814,53 +683,9 @@ export type SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput } -export type SalesInvoiceCreateManyPosAccountInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - customerId?: number | null -} - -export type SalesInvoiceUpdateWithoutPosAccountInput = { - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput - items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput - salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput -} - -export type SalesInvoiceUncheckedUpdateWithoutPosAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput - salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput -} - -export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - code?: Prisma.StringFieldUpdateOperationsInput | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - export type SalesInvoiceCreateManyCustomerInput = { id?: number code: string @@ -868,7 +693,6 @@ export type SalesInvoiceCreateManyCustomerInput = { description?: string | null createdAt?: Date | string updatedAt?: Date | string - posAccountId: number } export type SalesInvoiceUpdateWithoutCustomerInput = { @@ -877,7 +701,6 @@ export type SalesInvoiceUpdateWithoutCustomerInput = { description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput } @@ -889,7 +712,6 @@ export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = { description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput } @@ -901,7 +723,6 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = { description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - posAccountId?: Prisma.IntFieldUpdateOperationsInput | number } @@ -952,9 +773,7 @@ export type SalesInvoiceSelect - posAccount?: boolean | Prisma.PosAccountDefaultArgs items?: boolean | Prisma.SalesInvoice$itemsArgs salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs _count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs @@ -970,13 +789,11 @@ export type SalesInvoiceSelectScalar = { createdAt?: boolean updatedAt?: boolean customerId?: boolean - posAccountId?: boolean } -export type SalesInvoiceOmit = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "customerId" | "posAccountId", ExtArgs["result"]["salesInvoice"]> +export type SalesInvoiceOmit = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "customerId", ExtArgs["result"]["salesInvoice"]> export type SalesInvoiceInclude = { customer?: boolean | Prisma.SalesInvoice$customerArgs - posAccount?: boolean | Prisma.PosAccountDefaultArgs items?: boolean | Prisma.SalesInvoice$itemsArgs salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs _count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs @@ -986,7 +803,6 @@ export type $SalesInvoicePayload | null - posAccount: Prisma.$PosAccountPayload items: Prisma.$SalesInvoiceItemPayload[] salesInvoicePayments: Prisma.$SalesInvoicePaymentPayload[] } @@ -998,7 +814,6 @@ export type $SalesInvoicePayload composites: {} } @@ -1340,7 +1155,6 @@ readonly fields: SalesInvoiceFieldRefs; export interface Prisma__SalesInvoiceClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" customer = {}>(args?: Prisma.Subset>): Prisma.Prisma__CustomerClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - posAccount = {}>(args?: Prisma.Subset>): Prisma.Prisma__PosAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> items = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> salesInvoicePayments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> /** @@ -1379,7 +1193,6 @@ export interface SalesInvoiceFieldRefs { readonly createdAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'> readonly customerId: Prisma.FieldRef<"SalesInvoice", 'Int'> - readonly posAccountId: Prisma.FieldRef<"SalesInvoice", 'Int'> } diff --git a/src/generated/prisma/models/SalesInvoiceItem.ts b/src/generated/prisma/models/SalesInvoiceItem.ts index 61a14e5..e11e04b 100644 --- a/src/generated/prisma/models/SalesInvoiceItem.ts +++ b/src/generated/prisma/models/SalesInvoiceItem.ts @@ -32,7 +32,8 @@ export type SalesInvoiceItemAvgAggregateOutputType = { unitPrice: runtime.Decimal | null totalAmount: runtime.Decimal | null invoiceId: number | null - productId: number | null + goodId: number | null + serviceId: number | null } export type SalesInvoiceItemSumAggregateOutputType = { @@ -41,7 +42,8 @@ export type SalesInvoiceItemSumAggregateOutputType = { unitPrice: runtime.Decimal | null totalAmount: runtime.Decimal | null invoiceId: number | null - productId: number | null + goodId: number | null + serviceId: number | null } export type SalesInvoiceItemMinAggregateOutputType = { @@ -51,7 +53,8 @@ export type SalesInvoiceItemMinAggregateOutputType = { totalAmount: runtime.Decimal | null createdAt: Date | null invoiceId: number | null - productId: number | null + goodId: number | null + serviceId: number | null } export type SalesInvoiceItemMaxAggregateOutputType = { @@ -61,7 +64,8 @@ export type SalesInvoiceItemMaxAggregateOutputType = { totalAmount: runtime.Decimal | null createdAt: Date | null invoiceId: number | null - productId: number | null + goodId: number | null + serviceId: number | null } export type SalesInvoiceItemCountAggregateOutputType = { @@ -71,7 +75,8 @@ export type SalesInvoiceItemCountAggregateOutputType = { totalAmount: number createdAt: number invoiceId: number - productId: number + goodId: number + serviceId: number _all: number } @@ -82,7 +87,8 @@ export type SalesInvoiceItemAvgAggregateInputType = { unitPrice?: true totalAmount?: true invoiceId?: true - productId?: true + goodId?: true + serviceId?: true } export type SalesInvoiceItemSumAggregateInputType = { @@ -91,7 +97,8 @@ export type SalesInvoiceItemSumAggregateInputType = { unitPrice?: true totalAmount?: true invoiceId?: true - productId?: true + goodId?: true + serviceId?: true } export type SalesInvoiceItemMinAggregateInputType = { @@ -101,7 +108,8 @@ export type SalesInvoiceItemMinAggregateInputType = { totalAmount?: true createdAt?: true invoiceId?: true - productId?: true + goodId?: true + serviceId?: true } export type SalesInvoiceItemMaxAggregateInputType = { @@ -111,7 +119,8 @@ export type SalesInvoiceItemMaxAggregateInputType = { totalAmount?: true createdAt?: true invoiceId?: true - productId?: true + goodId?: true + serviceId?: true } export type SalesInvoiceItemCountAggregateInputType = { @@ -121,7 +130,8 @@ export type SalesInvoiceItemCountAggregateInputType = { totalAmount?: true createdAt?: true invoiceId?: true - productId?: true + goodId?: true + serviceId?: true _all?: true } @@ -218,7 +228,8 @@ export type SalesInvoiceItemGroupByOutputType = { totalAmount: runtime.Decimal createdAt: Date invoiceId: number - productId: number + goodId: number + serviceId: number _count: SalesInvoiceItemCountAggregateOutputType | null _avg: SalesInvoiceItemAvgAggregateOutputType | null _sum: SalesInvoiceItemSumAggregateOutputType | null @@ -251,9 +262,11 @@ export type SalesInvoiceItemWhereInput = { totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number - productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number + goodId?: Prisma.IntFilter<"SalesInvoiceItem"> | number + serviceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number invoice?: Prisma.XOR - product?: Prisma.XOR + good?: Prisma.XOR | null + service?: Prisma.XOR | null } export type SalesInvoiceItemOrderByWithRelationInput = { @@ -263,9 +276,11 @@ export type SalesInvoiceItemOrderByWithRelationInput = { totalAmount?: Prisma.SortOrder createdAt?: Prisma.SortOrder invoiceId?: Prisma.SortOrder - productId?: Prisma.SortOrder + goodId?: Prisma.SortOrder + serviceId?: Prisma.SortOrder invoice?: Prisma.SalesInvoiceOrderByWithRelationInput - product?: Prisma.ProductOrderByWithRelationInput + good?: Prisma.GoodOrderByWithRelationInput + service?: Prisma.ServiceOrderByWithRelationInput } export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{ @@ -278,9 +293,11 @@ export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{ totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number - productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number + goodId?: Prisma.IntFilter<"SalesInvoiceItem"> | number + serviceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number invoice?: Prisma.XOR - product?: Prisma.XOR + good?: Prisma.XOR | null + service?: Prisma.XOR | null }, "id"> export type SalesInvoiceItemOrderByWithAggregationInput = { @@ -290,7 +307,8 @@ export type SalesInvoiceItemOrderByWithAggregationInput = { totalAmount?: Prisma.SortOrder createdAt?: Prisma.SortOrder invoiceId?: Prisma.SortOrder - productId?: Prisma.SortOrder + goodId?: Prisma.SortOrder + serviceId?: Prisma.SortOrder _count?: Prisma.SalesInvoiceItemCountOrderByAggregateInput _avg?: Prisma.SalesInvoiceItemAvgOrderByAggregateInput _max?: Prisma.SalesInvoiceItemMaxOrderByAggregateInput @@ -308,7 +326,8 @@ export type SalesInvoiceItemScalarWhereWithAggregatesInput = { totalAmount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoiceItem"> | Date | string invoiceId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number - productId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number + goodId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number + serviceId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number } export type SalesInvoiceItemCreateInput = { @@ -317,7 +336,8 @@ export type SalesInvoiceItemCreateInput = { totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Date | string invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput - product: Prisma.ProductCreateNestedOneWithoutSalesInvoiceItemsInput + good?: Prisma.GoodCreateNestedOneWithoutSalesInvoiceItemsInput + service?: Prisma.ServiceCreateNestedOneWithoutSalesInvoiceItemsInput } export type SalesInvoiceItemUncheckedCreateInput = { @@ -327,7 +347,8 @@ export type SalesInvoiceItemUncheckedCreateInput = { totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Date | string invoiceId: number - productId: number + goodId: number + serviceId: number } export type SalesInvoiceItemUpdateInput = { @@ -336,7 +357,8 @@ export type SalesInvoiceItemUpdateInput = { totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput + good?: Prisma.GoodUpdateOneWithoutSalesInvoiceItemsNestedInput + service?: Prisma.ServiceUpdateOneWithoutSalesInvoiceItemsNestedInput } export type SalesInvoiceItemUncheckedUpdateInput = { @@ -346,7 +368,8 @@ export type SalesInvoiceItemUncheckedUpdateInput = { totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string invoiceId?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number + goodId?: Prisma.IntFieldUpdateOperationsInput | number + serviceId?: Prisma.IntFieldUpdateOperationsInput | number } export type SalesInvoiceItemCreateManyInput = { @@ -356,7 +379,8 @@ export type SalesInvoiceItemCreateManyInput = { totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Date | string invoiceId: number - productId: number + goodId: number + serviceId: number } export type SalesInvoiceItemUpdateManyMutationInput = { @@ -373,7 +397,8 @@ export type SalesInvoiceItemUncheckedUpdateManyInput = { totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string invoiceId?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number + goodId?: Prisma.IntFieldUpdateOperationsInput | number + serviceId?: Prisma.IntFieldUpdateOperationsInput | number } export type SalesInvoiceItemListRelationFilter = { @@ -393,7 +418,8 @@ export type SalesInvoiceItemCountOrderByAggregateInput = { totalAmount?: Prisma.SortOrder createdAt?: Prisma.SortOrder invoiceId?: Prisma.SortOrder - productId?: Prisma.SortOrder + goodId?: Prisma.SortOrder + serviceId?: Prisma.SortOrder } export type SalesInvoiceItemAvgOrderByAggregateInput = { @@ -402,7 +428,8 @@ export type SalesInvoiceItemAvgOrderByAggregateInput = { unitPrice?: Prisma.SortOrder totalAmount?: Prisma.SortOrder invoiceId?: Prisma.SortOrder - productId?: Prisma.SortOrder + goodId?: Prisma.SortOrder + serviceId?: Prisma.SortOrder } export type SalesInvoiceItemMaxOrderByAggregateInput = { @@ -412,7 +439,8 @@ export type SalesInvoiceItemMaxOrderByAggregateInput = { totalAmount?: Prisma.SortOrder createdAt?: Prisma.SortOrder invoiceId?: Prisma.SortOrder - productId?: Prisma.SortOrder + goodId?: Prisma.SortOrder + serviceId?: Prisma.SortOrder } export type SalesInvoiceItemMinOrderByAggregateInput = { @@ -422,7 +450,8 @@ export type SalesInvoiceItemMinOrderByAggregateInput = { totalAmount?: Prisma.SortOrder createdAt?: Prisma.SortOrder invoiceId?: Prisma.SortOrder - productId?: Prisma.SortOrder + goodId?: Prisma.SortOrder + serviceId?: Prisma.SortOrder } export type SalesInvoiceItemSumOrderByAggregateInput = { @@ -431,48 +460,49 @@ export type SalesInvoiceItemSumOrderByAggregateInput = { unitPrice?: Prisma.SortOrder totalAmount?: Prisma.SortOrder invoiceId?: Prisma.SortOrder - productId?: Prisma.SortOrder + goodId?: Prisma.SortOrder + serviceId?: Prisma.SortOrder } -export type SalesInvoiceItemCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope +export type SalesInvoiceItemCreateNestedManyWithoutGoodInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutGoodInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyGoodInputEnvelope connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] } -export type SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope +export type SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutGoodInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyGoodInputEnvelope connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] } -export type SalesInvoiceItemUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] - upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope +export type SalesInvoiceItemUpdateManyWithoutGoodNestedInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutGoodInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput[] + upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyGoodInputEnvelope set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] - update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput[] + update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput[] + updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput[] deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] } -export type SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] - upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope +export type SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutGoodInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput[] + upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyGoodInputEnvelope set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] - update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput[] + update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput[] + updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput[] deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] } @@ -518,47 +548,91 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput = { deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] } -export type SalesInvoiceItemCreateWithoutProductInput = { +export type SalesInvoiceItemCreateNestedManyWithoutServiceInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyServiceInputEnvelope + connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] +} + +export type SalesInvoiceItemUncheckedCreateNestedManyWithoutServiceInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyServiceInputEnvelope + connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] +} + +export type SalesInvoiceItemUpdateManyWithoutServiceNestedInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[] + upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyServiceInputEnvelope + set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] + disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] + delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] + connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] + update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput[] + updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput[] + deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] +} + +export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceNestedInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[] + upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyServiceInputEnvelope + set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] + disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] + delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] + connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] + update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput[] + updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput[] + deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] +} + +export type SalesInvoiceItemCreateWithoutGoodInput = { count: runtime.Decimal | runtime.DecimalJsLike | number | string unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Date | string invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput + service?: Prisma.ServiceCreateNestedOneWithoutSalesInvoiceItemsInput } -export type SalesInvoiceItemUncheckedCreateWithoutProductInput = { +export type SalesInvoiceItemUncheckedCreateWithoutGoodInput = { id?: number count: runtime.Decimal | runtime.DecimalJsLike | number | string unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Date | string invoiceId: number + serviceId: number } -export type SalesInvoiceItemCreateOrConnectWithoutProductInput = { +export type SalesInvoiceItemCreateOrConnectWithoutGoodInput = { where: Prisma.SalesInvoiceItemWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR } -export type SalesInvoiceItemCreateManyProductInputEnvelope = { - data: Prisma.SalesInvoiceItemCreateManyProductInput | Prisma.SalesInvoiceItemCreateManyProductInput[] +export type SalesInvoiceItemCreateManyGoodInputEnvelope = { + data: Prisma.SalesInvoiceItemCreateManyGoodInput | Prisma.SalesInvoiceItemCreateManyGoodInput[] skipDuplicates?: boolean } -export type SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput = { +export type SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput = { where: Prisma.SalesInvoiceItemWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR + create: Prisma.XOR } -export type SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput = { +export type SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput = { where: Prisma.SalesInvoiceItemWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR } -export type SalesInvoiceItemUpdateManyWithWhereWithoutProductInput = { +export type SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput = { where: Prisma.SalesInvoiceItemScalarWhereInput - data: Prisma.XOR + data: Prisma.XOR } export type SalesInvoiceItemScalarWhereInput = { @@ -571,7 +645,8 @@ export type SalesInvoiceItemScalarWhereInput = { totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number - productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number + goodId?: Prisma.IntFilter<"SalesInvoiceItem"> | number + serviceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number } export type SalesInvoiceItemCreateWithoutInvoiceInput = { @@ -579,7 +654,8 @@ export type SalesInvoiceItemCreateWithoutInvoiceInput = { unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Date | string - product: Prisma.ProductCreateNestedOneWithoutSalesInvoiceItemsInput + good?: Prisma.GoodCreateNestedOneWithoutSalesInvoiceItemsInput + service?: Prisma.ServiceCreateNestedOneWithoutSalesInvoiceItemsInput } export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = { @@ -588,7 +664,8 @@ export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = { unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Date | string - productId: number + goodId: number + serviceId: number } export type SalesInvoiceItemCreateOrConnectWithoutInvoiceInput = { @@ -617,39 +694,88 @@ export type SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput = { data: Prisma.XOR } -export type SalesInvoiceItemCreateManyProductInput = { +export type SalesInvoiceItemCreateWithoutServiceInput = { + count: runtime.Decimal | runtime.DecimalJsLike | number | string + unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Date | string + invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput + good?: Prisma.GoodCreateNestedOneWithoutSalesInvoiceItemsInput +} + +export type SalesInvoiceItemUncheckedCreateWithoutServiceInput = { id?: number count: runtime.Decimal | runtime.DecimalJsLike | number | string unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Date | string invoiceId: number + goodId: number } -export type SalesInvoiceItemUpdateWithoutProductInput = { +export type SalesInvoiceItemCreateOrConnectWithoutServiceInput = { + where: Prisma.SalesInvoiceItemWhereUniqueInput + create: Prisma.XOR +} + +export type SalesInvoiceItemCreateManyServiceInputEnvelope = { + data: Prisma.SalesInvoiceItemCreateManyServiceInput | Prisma.SalesInvoiceItemCreateManyServiceInput[] + skipDuplicates?: boolean +} + +export type SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput = { + where: Prisma.SalesInvoiceItemWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput = { + where: Prisma.SalesInvoiceItemWhereUniqueInput + data: Prisma.XOR +} + +export type SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput = { + where: Prisma.SalesInvoiceItemScalarWhereInput + data: Prisma.XOR +} + +export type SalesInvoiceItemCreateManyGoodInput = { + id?: number + count: runtime.Decimal | runtime.DecimalJsLike | number | string + unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Date | string + invoiceId: number + serviceId: number +} + +export type SalesInvoiceItemUpdateWithoutGoodInput = { count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput + service?: Prisma.ServiceUpdateOneWithoutSalesInvoiceItemsNestedInput } -export type SalesInvoiceItemUncheckedUpdateWithoutProductInput = { +export type SalesInvoiceItemUncheckedUpdateWithoutGoodInput = { id?: Prisma.IntFieldUpdateOperationsInput | number count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string invoiceId?: Prisma.IntFieldUpdateOperationsInput | number + serviceId?: Prisma.IntFieldUpdateOperationsInput | number } -export type SalesInvoiceItemUncheckedUpdateManyWithoutProductInput = { +export type SalesInvoiceItemUncheckedUpdateManyWithoutGoodInput = { id?: Prisma.IntFieldUpdateOperationsInput | number count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string invoiceId?: Prisma.IntFieldUpdateOperationsInput | number + serviceId?: Prisma.IntFieldUpdateOperationsInput | number } export type SalesInvoiceItemCreateManyInvoiceInput = { @@ -658,7 +784,8 @@ export type SalesInvoiceItemCreateManyInvoiceInput = { unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Date | string - productId: number + goodId: number + serviceId: number } export type SalesInvoiceItemUpdateWithoutInvoiceInput = { @@ -666,7 +793,8 @@ export type SalesInvoiceItemUpdateWithoutInvoiceInput = { unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - product?: Prisma.ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput + good?: Prisma.GoodUpdateOneWithoutSalesInvoiceItemsNestedInput + service?: Prisma.ServiceUpdateOneWithoutSalesInvoiceItemsNestedInput } export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = { @@ -675,7 +803,8 @@ export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = { unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number + goodId?: Prisma.IntFieldUpdateOperationsInput | number + serviceId?: Prisma.IntFieldUpdateOperationsInput | number } export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = { @@ -684,7 +813,47 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = { unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number + goodId?: Prisma.IntFieldUpdateOperationsInput | number + serviceId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type SalesInvoiceItemCreateManyServiceInput = { + id?: number + count: runtime.Decimal | runtime.DecimalJsLike | number | string + unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Date | string + invoiceId: number + goodId: number +} + +export type SalesInvoiceItemUpdateWithoutServiceInput = { + count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput + good?: Prisma.GoodUpdateOneWithoutSalesInvoiceItemsNestedInput +} + +export type SalesInvoiceItemUncheckedUpdateWithoutServiceInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + invoiceId?: Prisma.IntFieldUpdateOperationsInput | number + goodId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + invoiceId?: Prisma.IntFieldUpdateOperationsInput | number + goodId?: Prisma.IntFieldUpdateOperationsInput | number } @@ -696,9 +865,11 @@ export type SalesInvoiceItemSelect - product?: boolean | Prisma.ProductDefaultArgs + good?: boolean | Prisma.SalesInvoiceItem$goodArgs + service?: boolean | Prisma.SalesInvoiceItem$serviceArgs }, ExtArgs["result"]["salesInvoiceItem"]> @@ -710,20 +881,23 @@ export type SalesInvoiceItemSelectScalar = { totalAmount?: boolean createdAt?: boolean invoiceId?: boolean - productId?: boolean + goodId?: boolean + serviceId?: boolean } -export type SalesInvoiceItemOmit = runtime.Types.Extensions.GetOmit<"id" | "count" | "unitPrice" | "totalAmount" | "createdAt" | "invoiceId" | "productId", ExtArgs["result"]["salesInvoiceItem"]> +export type SalesInvoiceItemOmit = runtime.Types.Extensions.GetOmit<"id" | "count" | "unitPrice" | "totalAmount" | "createdAt" | "invoiceId" | "goodId" | "serviceId", ExtArgs["result"]["salesInvoiceItem"]> export type SalesInvoiceItemInclude = { invoice?: boolean | Prisma.SalesInvoiceDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs + good?: boolean | Prisma.SalesInvoiceItem$goodArgs + service?: boolean | Prisma.SalesInvoiceItem$serviceArgs } export type $SalesInvoiceItemPayload = { name: "SalesInvoiceItem" objects: { invoice: Prisma.$SalesInvoicePayload - product: Prisma.$ProductPayload + good: Prisma.$GoodPayload | null + service: Prisma.$ServicePayload | null } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number @@ -732,7 +906,8 @@ export type $SalesInvoiceItemPayload composites: {} } @@ -1074,7 +1249,8 @@ readonly fields: SalesInvoiceItemFieldRefs; export interface Prisma__SalesInvoiceItemClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" invoice = {}>(args?: Prisma.Subset>): Prisma.Prisma__SalesInvoiceClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + good = {}>(args?: Prisma.Subset>): Prisma.Prisma__GoodClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + service = {}>(args?: Prisma.Subset>): Prisma.Prisma__ServiceClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -1110,7 +1286,8 @@ export interface SalesInvoiceItemFieldRefs { readonly totalAmount: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'> readonly createdAt: Prisma.FieldRef<"SalesInvoiceItem", 'DateTime'> readonly invoiceId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'> - readonly productId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'> + readonly goodId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'> + readonly serviceId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'> } @@ -1453,6 +1630,44 @@ export type SalesInvoiceItemDeleteManyArgs = { + /** + * Select specific fields to fetch from the Good + */ + select?: Prisma.GoodSelect | null + /** + * Omit specific fields from the Good + */ + omit?: Prisma.GoodOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.GoodInclude | null + where?: Prisma.GoodWhereInput +} + +/** + * SalesInvoiceItem.service + */ +export type SalesInvoiceItem$serviceArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + where?: Prisma.ServiceWhereInput +} + /** * SalesInvoiceItem without action */ diff --git a/src/generated/prisma/models/SalesInvoicePayment.ts b/src/generated/prisma/models/SalesInvoicePayment.ts index 72d10b7..7f304a9 100644 --- a/src/generated/prisma/models/SalesInvoicePayment.ts +++ b/src/generated/prisma/models/SalesInvoicePayment.ts @@ -434,6 +434,10 @@ export type SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput = { deleteMany?: Prisma.SalesInvoicePaymentScalarWhereInput | Prisma.SalesInvoicePaymentScalarWhereInput[] } +export type EnumPaymentMethodTypeFieldUpdateOperationsInput = { + set?: $Enums.PaymentMethodType +} + export type SalesInvoicePaymentCreateWithoutInvoiceInput = { amount: runtime.Decimal | runtime.DecimalJsLike | number | string paymentMethod: $Enums.PaymentMethodType diff --git a/src/generated/prisma/models/Service.ts b/src/generated/prisma/models/Service.ts new file mode 100644 index 0000000..340daba --- /dev/null +++ b/src/generated/prisma/models/Service.ts @@ -0,0 +1,1610 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `Service` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums.js" +import type * as Prisma from "../internal/prismaNamespace.js" + +/** + * Model Service + * + */ +export type ServiceModel = runtime.Types.Result.DefaultSelection + +export type AggregateService = { + _count: ServiceCountAggregateOutputType | null + _avg: ServiceAvgAggregateOutputType | null + _sum: ServiceSumAggregateOutputType | null + _min: ServiceMinAggregateOutputType | null + _max: ServiceMaxAggregateOutputType | null +} + +export type ServiceAvgAggregateOutputType = { + id: number | null + categoryId: number | null + baseSalePrice: runtime.Decimal | null +} + +export type ServiceSumAggregateOutputType = { + id: number | null + categoryId: number | null + baseSalePrice: runtime.Decimal | null +} + +export type ServiceMinAggregateOutputType = { + id: number | null + name: string | null + description: string | null + sku: string | null + barcode: string | null + createdAt: Date | null + updatedAt: Date | null + deletedAt: Date | null + categoryId: number | null + baseSalePrice: runtime.Decimal | null +} + +export type ServiceMaxAggregateOutputType = { + id: number | null + name: string | null + description: string | null + sku: string | null + barcode: string | null + createdAt: Date | null + updatedAt: Date | null + deletedAt: Date | null + categoryId: number | null + baseSalePrice: runtime.Decimal | null +} + +export type ServiceCountAggregateOutputType = { + id: number + name: number + description: number + sku: number + barcode: number + createdAt: number + updatedAt: number + deletedAt: number + categoryId: number + baseSalePrice: number + _all: number +} + + +export type ServiceAvgAggregateInputType = { + id?: true + categoryId?: true + baseSalePrice?: true +} + +export type ServiceSumAggregateInputType = { + id?: true + categoryId?: true + baseSalePrice?: true +} + +export type ServiceMinAggregateInputType = { + id?: true + name?: true + description?: true + sku?: true + barcode?: true + createdAt?: true + updatedAt?: true + deletedAt?: true + categoryId?: true + baseSalePrice?: true +} + +export type ServiceMaxAggregateInputType = { + id?: true + name?: true + description?: true + sku?: true + barcode?: true + createdAt?: true + updatedAt?: true + deletedAt?: true + categoryId?: true + baseSalePrice?: true +} + +export type ServiceCountAggregateInputType = { + id?: true + name?: true + description?: true + sku?: true + barcode?: true + createdAt?: true + updatedAt?: true + deletedAt?: true + categoryId?: true + baseSalePrice?: true + _all?: true +} + +export type ServiceAggregateArgs = { + /** + * Filter which Service to aggregate. + */ + where?: Prisma.ServiceWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Services to fetch. + */ + orderBy?: Prisma.ServiceOrderByWithRelationInput | Prisma.ServiceOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.ServiceWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Services from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Services. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned Services + **/ + _count?: true | ServiceCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ServiceAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ServiceSumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ServiceMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ServiceMaxAggregateInputType +} + +export type GetServiceAggregateType = { + [P in keyof T & keyof AggregateService]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type ServiceGroupByArgs = { + where?: Prisma.ServiceWhereInput + orderBy?: Prisma.ServiceOrderByWithAggregationInput | Prisma.ServiceOrderByWithAggregationInput[] + by: Prisma.ServiceScalarFieldEnum[] | Prisma.ServiceScalarFieldEnum + having?: Prisma.ServiceScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ServiceCountAggregateInputType | true + _avg?: ServiceAvgAggregateInputType + _sum?: ServiceSumAggregateInputType + _min?: ServiceMinAggregateInputType + _max?: ServiceMaxAggregateInputType +} + +export type ServiceGroupByOutputType = { + id: number + name: string + description: string | null + sku: string + barcode: string | null + createdAt: Date + updatedAt: Date + deletedAt: Date | null + categoryId: number | null + baseSalePrice: runtime.Decimal + _count: ServiceCountAggregateOutputType | null + _avg: ServiceAvgAggregateOutputType | null + _sum: ServiceSumAggregateOutputType | null + _min: ServiceMinAggregateOutputType | null + _max: ServiceMaxAggregateOutputType | null +} + +type GetServiceGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof ServiceGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type ServiceWhereInput = { + AND?: Prisma.ServiceWhereInput | Prisma.ServiceWhereInput[] + OR?: Prisma.ServiceWhereInput[] + NOT?: Prisma.ServiceWhereInput | Prisma.ServiceWhereInput[] + id?: Prisma.IntFilter<"Service"> | number + name?: Prisma.StringFilter<"Service"> | string + description?: Prisma.StringNullableFilter<"Service"> | string | null + sku?: Prisma.StringFilter<"Service"> | string + barcode?: Prisma.StringNullableFilter<"Service"> | string | null + createdAt?: Prisma.DateTimeFilter<"Service"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Service"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"Service"> | Date | string | null + categoryId?: Prisma.IntNullableFilter<"Service"> | number | null + baseSalePrice?: Prisma.DecimalFilter<"Service"> | runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.XOR | null + salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter +} + +export type ServiceOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + sku?: Prisma.SortOrder + barcode?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + categoryId?: Prisma.SortOrderInput | Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder + category?: Prisma.ServiceCategoryOrderByWithRelationInput + salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput + _relevance?: Prisma.ServiceOrderByRelevanceInput +} + +export type ServiceWhereUniqueInput = Prisma.AtLeast<{ + id?: number + sku?: string + barcode?: string + AND?: Prisma.ServiceWhereInput | Prisma.ServiceWhereInput[] + OR?: Prisma.ServiceWhereInput[] + NOT?: Prisma.ServiceWhereInput | Prisma.ServiceWhereInput[] + name?: Prisma.StringFilter<"Service"> | string + description?: Prisma.StringNullableFilter<"Service"> | string | null + createdAt?: Prisma.DateTimeFilter<"Service"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Service"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"Service"> | Date | string | null + categoryId?: Prisma.IntNullableFilter<"Service"> | number | null + baseSalePrice?: Prisma.DecimalFilter<"Service"> | runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.XOR | null + salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter +}, "id" | "sku" | "barcode"> + +export type ServiceOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + sku?: Prisma.SortOrder + barcode?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + categoryId?: Prisma.SortOrderInput | Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder + _count?: Prisma.ServiceCountOrderByAggregateInput + _avg?: Prisma.ServiceAvgOrderByAggregateInput + _max?: Prisma.ServiceMaxOrderByAggregateInput + _min?: Prisma.ServiceMinOrderByAggregateInput + _sum?: Prisma.ServiceSumOrderByAggregateInput +} + +export type ServiceScalarWhereWithAggregatesInput = { + AND?: Prisma.ServiceScalarWhereWithAggregatesInput | Prisma.ServiceScalarWhereWithAggregatesInput[] + OR?: Prisma.ServiceScalarWhereWithAggregatesInput[] + NOT?: Prisma.ServiceScalarWhereWithAggregatesInput | Prisma.ServiceScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"Service"> | number + name?: Prisma.StringWithAggregatesFilter<"Service"> | string + description?: Prisma.StringNullableWithAggregatesFilter<"Service"> | string | null + sku?: Prisma.StringWithAggregatesFilter<"Service"> | string + barcode?: Prisma.StringNullableWithAggregatesFilter<"Service"> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<"Service"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Service"> | Date | string + deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Service"> | Date | string | null + categoryId?: Prisma.IntNullableWithAggregatesFilter<"Service"> | number | null + baseSalePrice?: Prisma.DecimalWithAggregatesFilter<"Service"> | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type ServiceCreateInput = { + name: string + description?: string | null + sku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.ServiceCategoryCreateNestedOneWithoutServicesInput + salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutServiceInput +} + +export type ServiceUncheckedCreateInput = { + id?: number + name: string + description?: string | null + sku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + categoryId?: number | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutServiceInput +} + +export type ServiceUpdateInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.ServiceCategoryUpdateOneWithoutServicesNestedInput + salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutServiceNestedInput +} + +export type ServiceUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutServiceNestedInput +} + +export type ServiceCreateManyInput = { + id?: number + name: string + description?: string | null + sku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + categoryId?: number | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type ServiceUpdateManyMutationInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type ServiceUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type ServiceNullableScalarRelationFilter = { + is?: Prisma.ServiceWhereInput | null + isNot?: Prisma.ServiceWhereInput | null +} + +export type ServiceOrderByRelevanceInput = { + fields: Prisma.ServiceOrderByRelevanceFieldEnum | Prisma.ServiceOrderByRelevanceFieldEnum[] + sort: Prisma.SortOrder + search: string +} + +export type ServiceCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + sku?: Prisma.SortOrder + barcode?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type ServiceAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type ServiceMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + sku?: Prisma.SortOrder + barcode?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type ServiceMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + sku?: Prisma.SortOrder + barcode?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type ServiceSumOrderByAggregateInput = { + id?: Prisma.SortOrder + categoryId?: Prisma.SortOrder + baseSalePrice?: Prisma.SortOrder +} + +export type ServiceListRelationFilter = { + every?: Prisma.ServiceWhereInput + some?: Prisma.ServiceWhereInput + none?: Prisma.ServiceWhereInput +} + +export type ServiceOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder +} + +export type ServiceCreateNestedOneWithoutSalesInvoiceItemsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ServiceCreateOrConnectWithoutSalesInvoiceItemsInput + connect?: Prisma.ServiceWhereUniqueInput +} + +export type ServiceUpdateOneWithoutSalesInvoiceItemsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ServiceCreateOrConnectWithoutSalesInvoiceItemsInput + upsert?: Prisma.ServiceUpsertWithoutSalesInvoiceItemsInput + disconnect?: Prisma.ServiceWhereInput | boolean + delete?: Prisma.ServiceWhereInput | boolean + connect?: Prisma.ServiceWhereUniqueInput + update?: Prisma.XOR, Prisma.ServiceUncheckedUpdateWithoutSalesInvoiceItemsInput> +} + +export type ServiceCreateNestedManyWithoutCategoryInput = { + create?: Prisma.XOR | Prisma.ServiceCreateWithoutCategoryInput[] | Prisma.ServiceUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: Prisma.ServiceCreateOrConnectWithoutCategoryInput | Prisma.ServiceCreateOrConnectWithoutCategoryInput[] + createMany?: Prisma.ServiceCreateManyCategoryInputEnvelope + connect?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] +} + +export type ServiceUncheckedCreateNestedManyWithoutCategoryInput = { + create?: Prisma.XOR | Prisma.ServiceCreateWithoutCategoryInput[] | Prisma.ServiceUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: Prisma.ServiceCreateOrConnectWithoutCategoryInput | Prisma.ServiceCreateOrConnectWithoutCategoryInput[] + createMany?: Prisma.ServiceCreateManyCategoryInputEnvelope + connect?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] +} + +export type ServiceUpdateManyWithoutCategoryNestedInput = { + create?: Prisma.XOR | Prisma.ServiceCreateWithoutCategoryInput[] | Prisma.ServiceUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: Prisma.ServiceCreateOrConnectWithoutCategoryInput | Prisma.ServiceCreateOrConnectWithoutCategoryInput[] + upsert?: Prisma.ServiceUpsertWithWhereUniqueWithoutCategoryInput | Prisma.ServiceUpsertWithWhereUniqueWithoutCategoryInput[] + createMany?: Prisma.ServiceCreateManyCategoryInputEnvelope + set?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] + disconnect?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] + delete?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] + connect?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] + update?: Prisma.ServiceUpdateWithWhereUniqueWithoutCategoryInput | Prisma.ServiceUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: Prisma.ServiceUpdateManyWithWhereWithoutCategoryInput | Prisma.ServiceUpdateManyWithWhereWithoutCategoryInput[] + deleteMany?: Prisma.ServiceScalarWhereInput | Prisma.ServiceScalarWhereInput[] +} + +export type ServiceUncheckedUpdateManyWithoutCategoryNestedInput = { + create?: Prisma.XOR | Prisma.ServiceCreateWithoutCategoryInput[] | Prisma.ServiceUncheckedCreateWithoutCategoryInput[] + connectOrCreate?: Prisma.ServiceCreateOrConnectWithoutCategoryInput | Prisma.ServiceCreateOrConnectWithoutCategoryInput[] + upsert?: Prisma.ServiceUpsertWithWhereUniqueWithoutCategoryInput | Prisma.ServiceUpsertWithWhereUniqueWithoutCategoryInput[] + createMany?: Prisma.ServiceCreateManyCategoryInputEnvelope + set?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] + disconnect?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] + delete?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] + connect?: Prisma.ServiceWhereUniqueInput | Prisma.ServiceWhereUniqueInput[] + update?: Prisma.ServiceUpdateWithWhereUniqueWithoutCategoryInput | Prisma.ServiceUpdateWithWhereUniqueWithoutCategoryInput[] + updateMany?: Prisma.ServiceUpdateManyWithWhereWithoutCategoryInput | Prisma.ServiceUpdateManyWithWhereWithoutCategoryInput[] + deleteMany?: Prisma.ServiceScalarWhereInput | Prisma.ServiceScalarWhereInput[] +} + +export type ServiceCreateWithoutSalesInvoiceItemsInput = { + name: string + description?: string | null + sku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.ServiceCategoryCreateNestedOneWithoutServicesInput +} + +export type ServiceUncheckedCreateWithoutSalesInvoiceItemsInput = { + id?: number + name: string + description?: string | null + sku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + categoryId?: number | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type ServiceCreateOrConnectWithoutSalesInvoiceItemsInput = { + where: Prisma.ServiceWhereUniqueInput + create: Prisma.XOR +} + +export type ServiceUpsertWithoutSalesInvoiceItemsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.ServiceWhereInput +} + +export type ServiceUpdateToOneWithWhereWithoutSalesInvoiceItemsInput = { + where?: Prisma.ServiceWhereInput + data: Prisma.XOR +} + +export type ServiceUpdateWithoutSalesInvoiceItemsInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + category?: Prisma.ServiceCategoryUpdateOneWithoutServicesNestedInput +} + +export type ServiceUncheckedUpdateWithoutSalesInvoiceItemsInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type ServiceCreateWithoutCategoryInput = { + name: string + description?: string | null + sku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutServiceInput +} + +export type ServiceUncheckedCreateWithoutCategoryInput = { + id?: number + name: string + description?: string | null + sku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutServiceInput +} + +export type ServiceCreateOrConnectWithoutCategoryInput = { + where: Prisma.ServiceWhereUniqueInput + create: Prisma.XOR +} + +export type ServiceCreateManyCategoryInputEnvelope = { + data: Prisma.ServiceCreateManyCategoryInput | Prisma.ServiceCreateManyCategoryInput[] + skipDuplicates?: boolean +} + +export type ServiceUpsertWithWhereUniqueWithoutCategoryInput = { + where: Prisma.ServiceWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type ServiceUpdateWithWhereUniqueWithoutCategoryInput = { + where: Prisma.ServiceWhereUniqueInput + data: Prisma.XOR +} + +export type ServiceUpdateManyWithWhereWithoutCategoryInput = { + where: Prisma.ServiceScalarWhereInput + data: Prisma.XOR +} + +export type ServiceScalarWhereInput = { + AND?: Prisma.ServiceScalarWhereInput | Prisma.ServiceScalarWhereInput[] + OR?: Prisma.ServiceScalarWhereInput[] + NOT?: Prisma.ServiceScalarWhereInput | Prisma.ServiceScalarWhereInput[] + id?: Prisma.IntFilter<"Service"> | number + name?: Prisma.StringFilter<"Service"> | string + description?: Prisma.StringNullableFilter<"Service"> | string | null + sku?: Prisma.StringFilter<"Service"> | string + barcode?: Prisma.StringNullableFilter<"Service"> | string | null + createdAt?: Prisma.DateTimeFilter<"Service"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"Service"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"Service"> | Date | string | null + categoryId?: Prisma.IntNullableFilter<"Service"> | number | null + baseSalePrice?: Prisma.DecimalFilter<"Service"> | runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type ServiceCreateManyCategoryInput = { + id?: number + name: string + description?: string | null + sku: string + barcode?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + baseSalePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string +} + +export type ServiceUpdateWithoutCategoryInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutServiceNestedInput +} + +export type ServiceUncheckedUpdateWithoutCategoryInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutServiceNestedInput +} + +export type ServiceUncheckedUpdateManyWithoutCategoryInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + sku?: Prisma.StringFieldUpdateOperationsInput | string + barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + baseSalePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string +} + + +/** + * Count Type ServiceCountOutputType + */ + +export type ServiceCountOutputType = { + salesInvoiceItems: number +} + +export type ServiceCountOutputTypeSelect = { + salesInvoiceItems?: boolean | ServiceCountOutputTypeCountSalesInvoiceItemsArgs +} + +/** + * ServiceCountOutputType without action + */ +export type ServiceCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ServiceCountOutputType + */ + select?: Prisma.ServiceCountOutputTypeSelect | null +} + +/** + * ServiceCountOutputType without action + */ +export type ServiceCountOutputTypeCountSalesInvoiceItemsArgs = { + where?: Prisma.SalesInvoiceItemWhereInput +} + + +export type ServiceSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + sku?: boolean + barcode?: boolean + createdAt?: boolean + updatedAt?: boolean + deletedAt?: boolean + categoryId?: boolean + baseSalePrice?: boolean + category?: boolean | Prisma.Service$categoryArgs + salesInvoiceItems?: boolean | Prisma.Service$salesInvoiceItemsArgs + _count?: boolean | Prisma.ServiceCountOutputTypeDefaultArgs +}, ExtArgs["result"]["service"]> + + + +export type ServiceSelectScalar = { + id?: boolean + name?: boolean + description?: boolean + sku?: boolean + barcode?: boolean + createdAt?: boolean + updatedAt?: boolean + deletedAt?: boolean + categoryId?: boolean + baseSalePrice?: boolean +} + +export type ServiceOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "sku" | "barcode" | "createdAt" | "updatedAt" | "deletedAt" | "categoryId" | "baseSalePrice", ExtArgs["result"]["service"]> +export type ServiceInclude = { + category?: boolean | Prisma.Service$categoryArgs + salesInvoiceItems?: boolean | Prisma.Service$salesInvoiceItemsArgs + _count?: boolean | Prisma.ServiceCountOutputTypeDefaultArgs +} + +export type $ServicePayload = { + name: "Service" + objects: { + category: Prisma.$ServiceCategoryPayload | null + salesInvoiceItems: Prisma.$SalesInvoiceItemPayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + name: string + description: string | null + sku: string + barcode: string | null + createdAt: Date + updatedAt: Date + deletedAt: Date | null + categoryId: number | null + baseSalePrice: runtime.Decimal + }, ExtArgs["result"]["service"]> + composites: {} +} + +export type ServiceGetPayload = runtime.Types.Result.GetResult + +export type ServiceCountArgs = + Omit & { + select?: ServiceCountAggregateInputType | true + } + +export interface ServiceDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['Service'], meta: { name: 'Service' } } + /** + * Find zero or one Service that matches the filter. + * @param {ServiceFindUniqueArgs} args - Arguments to find a Service + * @example + * // Get one Service + * const service = await prisma.service.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one Service that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ServiceFindUniqueOrThrowArgs} args - Arguments to find a Service + * @example + * // Get one Service + * const service = await prisma.service.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Service that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceFindFirstArgs} args - Arguments to find a Service + * @example + * // Get one Service + * const service = await prisma.service.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ServiceClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first Service that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceFindFirstOrThrowArgs} args - Arguments to find a Service + * @example + * // Get one Service + * const service = await prisma.service.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ServiceClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more Services that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all Services + * const services = await prisma.service.findMany() + * + * // Get first 10 Services + * const services = await prisma.service.findMany({ take: 10 }) + * + * // Only select the `id` + * const serviceWithIdOnly = await prisma.service.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a Service. + * @param {ServiceCreateArgs} args - Arguments to create a Service. + * @example + * // Create one Service + * const Service = await prisma.service.create({ + * data: { + * // ... data to create a Service + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many Services. + * @param {ServiceCreateManyArgs} args - Arguments to create many Services. + * @example + * // Create many Services + * const service = await prisma.service.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Delete a Service. + * @param {ServiceDeleteArgs} args - Arguments to delete one Service. + * @example + * // Delete one Service + * const Service = await prisma.service.delete({ + * where: { + * // ... filter to delete one Service + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one Service. + * @param {ServiceUpdateArgs} args - Arguments to update one Service. + * @example + * // Update one Service + * const service = await prisma.service.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more Services. + * @param {ServiceDeleteManyArgs} args - Arguments to filter Services to delete. + * @example + * // Delete a few Services + * const { count } = await prisma.service.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more Services. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many Services + * const service = await prisma.service.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one Service. + * @param {ServiceUpsertArgs} args - Arguments to update or create a Service. + * @example + * // Update or create a Service + * const service = await prisma.service.upsert({ + * create: { + * // ... data to create a Service + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the Service we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of Services. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceCountArgs} args - Arguments to filter Services to count. + * @example + * // Count the number of Services + * const count = await prisma.service.count({ + * where: { + * // ... the filter for the Services we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a Service. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by Service. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ServiceGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: ServiceGroupByArgs['orderBy'] } + : { orderBy?: ServiceGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetServiceGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the Service model + */ +readonly fields: ServiceFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for Service. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__ServiceClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + category = {}>(args?: Prisma.Subset>): Prisma.Prisma__ServiceCategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + salesInvoiceItems = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the Service model + */ +export interface ServiceFieldRefs { + readonly id: Prisma.FieldRef<"Service", 'Int'> + readonly name: Prisma.FieldRef<"Service", 'String'> + readonly description: Prisma.FieldRef<"Service", 'String'> + readonly sku: Prisma.FieldRef<"Service", 'String'> + readonly barcode: Prisma.FieldRef<"Service", 'String'> + readonly createdAt: Prisma.FieldRef<"Service", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"Service", 'DateTime'> + readonly deletedAt: Prisma.FieldRef<"Service", 'DateTime'> + readonly categoryId: Prisma.FieldRef<"Service", 'Int'> + readonly baseSalePrice: Prisma.FieldRef<"Service", 'Decimal'> +} + + +// Custom InputTypes +/** + * Service findUnique + */ +export type ServiceFindUniqueArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + /** + * Filter, which Service to fetch. + */ + where: Prisma.ServiceWhereUniqueInput +} + +/** + * Service findUniqueOrThrow + */ +export type ServiceFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + /** + * Filter, which Service to fetch. + */ + where: Prisma.ServiceWhereUniqueInput +} + +/** + * Service findFirst + */ +export type ServiceFindFirstArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + /** + * Filter, which Service to fetch. + */ + where?: Prisma.ServiceWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Services to fetch. + */ + orderBy?: Prisma.ServiceOrderByWithRelationInput | Prisma.ServiceOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Services. + */ + cursor?: Prisma.ServiceWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Services from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Services. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Services. + */ + distinct?: Prisma.ServiceScalarFieldEnum | Prisma.ServiceScalarFieldEnum[] +} + +/** + * Service findFirstOrThrow + */ +export type ServiceFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + /** + * Filter, which Service to fetch. + */ + where?: Prisma.ServiceWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Services to fetch. + */ + orderBy?: Prisma.ServiceOrderByWithRelationInput | Prisma.ServiceOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for Services. + */ + cursor?: Prisma.ServiceWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Services from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Services. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of Services. + */ + distinct?: Prisma.ServiceScalarFieldEnum | Prisma.ServiceScalarFieldEnum[] +} + +/** + * Service findMany + */ +export type ServiceFindManyArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + /** + * Filter, which Services to fetch. + */ + where?: Prisma.ServiceWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of Services to fetch. + */ + orderBy?: Prisma.ServiceOrderByWithRelationInput | Prisma.ServiceOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing Services. + */ + cursor?: Prisma.ServiceWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` Services from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` Services. + */ + skip?: number + distinct?: Prisma.ServiceScalarFieldEnum | Prisma.ServiceScalarFieldEnum[] +} + +/** + * Service create + */ +export type ServiceCreateArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + /** + * The data needed to create a Service. + */ + data: Prisma.XOR +} + +/** + * Service createMany + */ +export type ServiceCreateManyArgs = { + /** + * The data used to create many Services. + */ + data: Prisma.ServiceCreateManyInput | Prisma.ServiceCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * Service update + */ +export type ServiceUpdateArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + /** + * The data needed to update a Service. + */ + data: Prisma.XOR + /** + * Choose, which Service to update. + */ + where: Prisma.ServiceWhereUniqueInput +} + +/** + * Service updateMany + */ +export type ServiceUpdateManyArgs = { + /** + * The data used to update Services. + */ + data: Prisma.XOR + /** + * Filter which Services to update + */ + where?: Prisma.ServiceWhereInput + /** + * Limit how many Services to update. + */ + limit?: number +} + +/** + * Service upsert + */ +export type ServiceUpsertArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + /** + * The filter to search for the Service to update in case it exists. + */ + where: Prisma.ServiceWhereUniqueInput + /** + * In case the Service found by the `where` argument doesn't exist, create a new Service with this data. + */ + create: Prisma.XOR + /** + * In case the Service was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * Service delete + */ +export type ServiceDeleteArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + /** + * Filter which Service to delete. + */ + where: Prisma.ServiceWhereUniqueInput +} + +/** + * Service deleteMany + */ +export type ServiceDeleteManyArgs = { + /** + * Filter which Services to delete + */ + where?: Prisma.ServiceWhereInput + /** + * Limit how many Services to delete. + */ + limit?: number +} + +/** + * Service.category + */ +export type Service$categoryArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + where?: Prisma.ServiceCategoryWhereInput +} + +/** + * Service.salesInvoiceItems + */ +export type Service$salesInvoiceItemsArgs = { + /** + * Select specific fields to fetch from the SalesInvoiceItem + */ + select?: Prisma.SalesInvoiceItemSelect | null + /** + * Omit specific fields from the SalesInvoiceItem + */ + omit?: Prisma.SalesInvoiceItemOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.SalesInvoiceItemInclude | null + where?: Prisma.SalesInvoiceItemWhereInput + orderBy?: Prisma.SalesInvoiceItemOrderByWithRelationInput | Prisma.SalesInvoiceItemOrderByWithRelationInput[] + cursor?: Prisma.SalesInvoiceItemWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.SalesInvoiceItemScalarFieldEnum | Prisma.SalesInvoiceItemScalarFieldEnum[] +} + +/** + * Service without action + */ +export type ServiceDefaultArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null +} diff --git a/src/generated/prisma/models/ServiceCategory.ts b/src/generated/prisma/models/ServiceCategory.ts new file mode 100644 index 0000000..b6b3908 --- /dev/null +++ b/src/generated/prisma/models/ServiceCategory.ts @@ -0,0 +1,1315 @@ + +/* !!! This is code generated by Prisma. Do not edit directly. !!! */ +/* eslint-disable */ +// biome-ignore-all lint: generated file +// @ts-nocheck +/* + * This file exports the `ServiceCategory` model and its related types. + * + * 🟢 You can import this file directly. + */ +import type * as runtime from "@prisma/client/runtime/client" +import type * as $Enums from "../enums.js" +import type * as Prisma from "../internal/prismaNamespace.js" + +/** + * Model ServiceCategory + * + */ +export type ServiceCategoryModel = runtime.Types.Result.DefaultSelection + +export type AggregateServiceCategory = { + _count: ServiceCategoryCountAggregateOutputType | null + _avg: ServiceCategoryAvgAggregateOutputType | null + _sum: ServiceCategorySumAggregateOutputType | null + _min: ServiceCategoryMinAggregateOutputType | null + _max: ServiceCategoryMaxAggregateOutputType | null +} + +export type ServiceCategoryAvgAggregateOutputType = { + id: number | null +} + +export type ServiceCategorySumAggregateOutputType = { + id: number | null +} + +export type ServiceCategoryMinAggregateOutputType = { + id: number | null + name: string | null + description: string | null + imageUrl: string | null + createdAt: Date | null + updatedAt: Date | null + deletedAt: Date | null +} + +export type ServiceCategoryMaxAggregateOutputType = { + id: number | null + name: string | null + description: string | null + imageUrl: string | null + createdAt: Date | null + updatedAt: Date | null + deletedAt: Date | null +} + +export type ServiceCategoryCountAggregateOutputType = { + id: number + name: number + description: number + imageUrl: number + createdAt: number + updatedAt: number + deletedAt: number + _all: number +} + + +export type ServiceCategoryAvgAggregateInputType = { + id?: true +} + +export type ServiceCategorySumAggregateInputType = { + id?: true +} + +export type ServiceCategoryMinAggregateInputType = { + id?: true + name?: true + description?: true + imageUrl?: true + createdAt?: true + updatedAt?: true + deletedAt?: true +} + +export type ServiceCategoryMaxAggregateInputType = { + id?: true + name?: true + description?: true + imageUrl?: true + createdAt?: true + updatedAt?: true + deletedAt?: true +} + +export type ServiceCategoryCountAggregateInputType = { + id?: true + name?: true + description?: true + imageUrl?: true + createdAt?: true + updatedAt?: true + deletedAt?: true + _all?: true +} + +export type ServiceCategoryAggregateArgs = { + /** + * Filter which ServiceCategory to aggregate. + */ + where?: Prisma.ServiceCategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ServiceCategories to fetch. + */ + orderBy?: Prisma.ServiceCategoryOrderByWithRelationInput | Prisma.ServiceCategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the start position + */ + cursor?: Prisma.ServiceCategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ServiceCategories from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ServiceCategories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Count returned ServiceCategories + **/ + _count?: true | ServiceCategoryCountAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to average + **/ + _avg?: ServiceCategoryAvgAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to sum + **/ + _sum?: ServiceCategorySumAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the minimum value + **/ + _min?: ServiceCategoryMinAggregateInputType + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} + * + * Select which fields to find the maximum value + **/ + _max?: ServiceCategoryMaxAggregateInputType +} + +export type GetServiceCategoryAggregateType = { + [P in keyof T & keyof AggregateServiceCategory]: P extends '_count' | 'count' + ? T[P] extends true + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType +} + + + + +export type ServiceCategoryGroupByArgs = { + where?: Prisma.ServiceCategoryWhereInput + orderBy?: Prisma.ServiceCategoryOrderByWithAggregationInput | Prisma.ServiceCategoryOrderByWithAggregationInput[] + by: Prisma.ServiceCategoryScalarFieldEnum[] | Prisma.ServiceCategoryScalarFieldEnum + having?: Prisma.ServiceCategoryScalarWhereWithAggregatesInput + take?: number + skip?: number + _count?: ServiceCategoryCountAggregateInputType | true + _avg?: ServiceCategoryAvgAggregateInputType + _sum?: ServiceCategorySumAggregateInputType + _min?: ServiceCategoryMinAggregateInputType + _max?: ServiceCategoryMaxAggregateInputType +} + +export type ServiceCategoryGroupByOutputType = { + id: number + name: string + description: string | null + imageUrl: string | null + createdAt: Date + updatedAt: Date + deletedAt: Date | null + _count: ServiceCategoryCountAggregateOutputType | null + _avg: ServiceCategoryAvgAggregateOutputType | null + _sum: ServiceCategorySumAggregateOutputType | null + _min: ServiceCategoryMinAggregateOutputType | null + _max: ServiceCategoryMaxAggregateOutputType | null +} + +type GetServiceCategoryGroupByPayload = Prisma.PrismaPromise< + Array< + Prisma.PickEnumerable & + { + [P in ((keyof T) & (keyof ServiceCategoryGroupByOutputType))]: P extends '_count' + ? T[P] extends boolean + ? number + : Prisma.GetScalarType + : Prisma.GetScalarType + } + > + > + + + +export type ServiceCategoryWhereInput = { + AND?: Prisma.ServiceCategoryWhereInput | Prisma.ServiceCategoryWhereInput[] + OR?: Prisma.ServiceCategoryWhereInput[] + NOT?: Prisma.ServiceCategoryWhereInput | Prisma.ServiceCategoryWhereInput[] + id?: Prisma.IntFilter<"ServiceCategory"> | number + name?: Prisma.StringFilter<"ServiceCategory"> | string + description?: Prisma.StringNullableFilter<"ServiceCategory"> | string | null + imageUrl?: Prisma.StringNullableFilter<"ServiceCategory"> | string | null + createdAt?: Prisma.DateTimeFilter<"ServiceCategory"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"ServiceCategory"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"ServiceCategory"> | Date | string | null + services?: Prisma.ServiceListRelationFilter +} + +export type ServiceCategoryOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + services?: Prisma.ServiceOrderByRelationAggregateInput + _relevance?: Prisma.ServiceCategoryOrderByRelevanceInput +} + +export type ServiceCategoryWhereUniqueInput = Prisma.AtLeast<{ + id?: number + AND?: Prisma.ServiceCategoryWhereInput | Prisma.ServiceCategoryWhereInput[] + OR?: Prisma.ServiceCategoryWhereInput[] + NOT?: Prisma.ServiceCategoryWhereInput | Prisma.ServiceCategoryWhereInput[] + name?: Prisma.StringFilter<"ServiceCategory"> | string + description?: Prisma.StringNullableFilter<"ServiceCategory"> | string | null + imageUrl?: Prisma.StringNullableFilter<"ServiceCategory"> | string | null + createdAt?: Prisma.DateTimeFilter<"ServiceCategory"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"ServiceCategory"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"ServiceCategory"> | Date | string | null + services?: Prisma.ServiceListRelationFilter +}, "id"> + +export type ServiceCategoryOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + imageUrl?: Prisma.SortOrderInput | Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + _count?: Prisma.ServiceCategoryCountOrderByAggregateInput + _avg?: Prisma.ServiceCategoryAvgOrderByAggregateInput + _max?: Prisma.ServiceCategoryMaxOrderByAggregateInput + _min?: Prisma.ServiceCategoryMinOrderByAggregateInput + _sum?: Prisma.ServiceCategorySumOrderByAggregateInput +} + +export type ServiceCategoryScalarWhereWithAggregatesInput = { + AND?: Prisma.ServiceCategoryScalarWhereWithAggregatesInput | Prisma.ServiceCategoryScalarWhereWithAggregatesInput[] + OR?: Prisma.ServiceCategoryScalarWhereWithAggregatesInput[] + NOT?: Prisma.ServiceCategoryScalarWhereWithAggregatesInput | Prisma.ServiceCategoryScalarWhereWithAggregatesInput[] + id?: Prisma.IntWithAggregatesFilter<"ServiceCategory"> | number + name?: Prisma.StringWithAggregatesFilter<"ServiceCategory"> | string + description?: Prisma.StringNullableWithAggregatesFilter<"ServiceCategory"> | string | null + imageUrl?: Prisma.StringNullableWithAggregatesFilter<"ServiceCategory"> | string | null + createdAt?: Prisma.DateTimeWithAggregatesFilter<"ServiceCategory"> | Date | string + updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ServiceCategory"> | Date | string + deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ServiceCategory"> | Date | string | null +} + +export type ServiceCategoryCreateInput = { + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + services?: Prisma.ServiceCreateNestedManyWithoutCategoryInput +} + +export type ServiceCategoryUncheckedCreateInput = { + id?: number + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + services?: Prisma.ServiceUncheckedCreateNestedManyWithoutCategoryInput +} + +export type ServiceCategoryUpdateInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + services?: Prisma.ServiceUpdateManyWithoutCategoryNestedInput +} + +export type ServiceCategoryUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + services?: Prisma.ServiceUncheckedUpdateManyWithoutCategoryNestedInput +} + +export type ServiceCategoryCreateManyInput = { + id?: number + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type ServiceCategoryUpdateManyMutationInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type ServiceCategoryUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type ServiceCategoryNullableScalarRelationFilter = { + is?: Prisma.ServiceCategoryWhereInput | null + isNot?: Prisma.ServiceCategoryWhereInput | null +} + +export type ServiceCategoryOrderByRelevanceInput = { + fields: Prisma.ServiceCategoryOrderByRelevanceFieldEnum | Prisma.ServiceCategoryOrderByRelevanceFieldEnum[] + sort: Prisma.SortOrder + search: string +} + +export type ServiceCategoryCountOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + imageUrl?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder +} + +export type ServiceCategoryAvgOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type ServiceCategoryMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + imageUrl?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder +} + +export type ServiceCategoryMinOrderByAggregateInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + description?: Prisma.SortOrder + imageUrl?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrder +} + +export type ServiceCategorySumOrderByAggregateInput = { + id?: Prisma.SortOrder +} + +export type ServiceCategoryCreateNestedOneWithoutServicesInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ServiceCategoryCreateOrConnectWithoutServicesInput + connect?: Prisma.ServiceCategoryWhereUniqueInput +} + +export type ServiceCategoryUpdateOneWithoutServicesNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.ServiceCategoryCreateOrConnectWithoutServicesInput + upsert?: Prisma.ServiceCategoryUpsertWithoutServicesInput + disconnect?: Prisma.ServiceCategoryWhereInput | boolean + delete?: Prisma.ServiceCategoryWhereInput | boolean + connect?: Prisma.ServiceCategoryWhereUniqueInput + update?: Prisma.XOR, Prisma.ServiceCategoryUncheckedUpdateWithoutServicesInput> +} + +export type ServiceCategoryCreateWithoutServicesInput = { + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type ServiceCategoryUncheckedCreateWithoutServicesInput = { + id?: number + name: string + description?: string | null + imageUrl?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type ServiceCategoryCreateOrConnectWithoutServicesInput = { + where: Prisma.ServiceCategoryWhereUniqueInput + create: Prisma.XOR +} + +export type ServiceCategoryUpsertWithoutServicesInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.ServiceCategoryWhereInput +} + +export type ServiceCategoryUpdateToOneWithWhereWithoutServicesInput = { + where?: Prisma.ServiceCategoryWhereInput + data: Prisma.XOR +} + +export type ServiceCategoryUpdateWithoutServicesInput = { + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type ServiceCategoryUncheckedUpdateWithoutServicesInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + imageUrl?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + + +/** + * Count Type ServiceCategoryCountOutputType + */ + +export type ServiceCategoryCountOutputType = { + services: number +} + +export type ServiceCategoryCountOutputTypeSelect = { + services?: boolean | ServiceCategoryCountOutputTypeCountServicesArgs +} + +/** + * ServiceCategoryCountOutputType without action + */ +export type ServiceCategoryCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the ServiceCategoryCountOutputType + */ + select?: Prisma.ServiceCategoryCountOutputTypeSelect | null +} + +/** + * ServiceCategoryCountOutputType without action + */ +export type ServiceCategoryCountOutputTypeCountServicesArgs = { + where?: Prisma.ServiceWhereInput +} + + +export type ServiceCategorySelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + name?: boolean + description?: boolean + imageUrl?: boolean + createdAt?: boolean + updatedAt?: boolean + deletedAt?: boolean + services?: boolean | Prisma.ServiceCategory$servicesArgs + _count?: boolean | Prisma.ServiceCategoryCountOutputTypeDefaultArgs +}, ExtArgs["result"]["serviceCategory"]> + + + +export type ServiceCategorySelectScalar = { + id?: boolean + name?: boolean + description?: boolean + imageUrl?: boolean + createdAt?: boolean + updatedAt?: boolean + deletedAt?: boolean +} + +export type ServiceCategoryOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "imageUrl" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["serviceCategory"]> +export type ServiceCategoryInclude = { + services?: boolean | Prisma.ServiceCategory$servicesArgs + _count?: boolean | Prisma.ServiceCategoryCountOutputTypeDefaultArgs +} + +export type $ServiceCategoryPayload = { + name: "ServiceCategory" + objects: { + services: Prisma.$ServicePayload[] + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + name: string + description: string | null + imageUrl: string | null + createdAt: Date + updatedAt: Date + deletedAt: Date | null + }, ExtArgs["result"]["serviceCategory"]> + composites: {} +} + +export type ServiceCategoryGetPayload = runtime.Types.Result.GetResult + +export type ServiceCategoryCountArgs = + Omit & { + select?: ServiceCategoryCountAggregateInputType | true + } + +export interface ServiceCategoryDelegate { + [K: symbol]: { types: Prisma.TypeMap['model']['ServiceCategory'], meta: { name: 'ServiceCategory' } } + /** + * Find zero or one ServiceCategory that matches the filter. + * @param {ServiceCategoryFindUniqueArgs} args - Arguments to find a ServiceCategory + * @example + * // Get one ServiceCategory + * const serviceCategory = await prisma.serviceCategory.findUnique({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceCategoryClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find one ServiceCategory that matches the filter or throw an error with `error.code='P2025'` + * if no matches were found. + * @param {ServiceCategoryFindUniqueOrThrowArgs} args - Arguments to find a ServiceCategory + * @example + * // Get one ServiceCategory + * const serviceCategory = await prisma.serviceCategory.findUniqueOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceCategoryClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ServiceCategory that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceCategoryFindFirstArgs} args - Arguments to find a ServiceCategory + * @example + * // Get one ServiceCategory + * const serviceCategory = await prisma.serviceCategory.findFirst({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ServiceCategoryClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + + /** + * Find the first ServiceCategory that matches the filter or + * throw `PrismaKnownClientError` with `P2025` code if no matches were found. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceCategoryFindFirstOrThrowArgs} args - Arguments to find a ServiceCategory + * @example + * // Get one ServiceCategory + * const serviceCategory = await prisma.serviceCategory.findFirstOrThrow({ + * where: { + * // ... provide filter here + * } + * }) + */ + findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ServiceCategoryClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Find zero or more ServiceCategories that matches the filter. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceCategoryFindManyArgs} args - Arguments to filter and select certain fields only. + * @example + * // Get all ServiceCategories + * const serviceCategories = await prisma.serviceCategory.findMany() + * + * // Get first 10 ServiceCategories + * const serviceCategories = await prisma.serviceCategory.findMany({ take: 10 }) + * + * // Only select the `id` + * const serviceCategoryWithIdOnly = await prisma.serviceCategory.findMany({ select: { id: true } }) + * + */ + findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> + + /** + * Create a ServiceCategory. + * @param {ServiceCategoryCreateArgs} args - Arguments to create a ServiceCategory. + * @example + * // Create one ServiceCategory + * const ServiceCategory = await prisma.serviceCategory.create({ + * data: { + * // ... data to create a ServiceCategory + * } + * }) + * + */ + create(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceCategoryClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Create many ServiceCategories. + * @param {ServiceCategoryCreateManyArgs} args - Arguments to create many ServiceCategories. + * @example + * // Create many ServiceCategories + * const serviceCategory = await prisma.serviceCategory.createMany({ + * data: [ + * // ... provide data here + * ] + * }) + * + */ + createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Delete a ServiceCategory. + * @param {ServiceCategoryDeleteArgs} args - Arguments to delete one ServiceCategory. + * @example + * // Delete one ServiceCategory + * const ServiceCategory = await prisma.serviceCategory.delete({ + * where: { + * // ... filter to delete one ServiceCategory + * } + * }) + * + */ + delete(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceCategoryClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Update one ServiceCategory. + * @param {ServiceCategoryUpdateArgs} args - Arguments to update one ServiceCategory. + * @example + * // Update one ServiceCategory + * const serviceCategory = await prisma.serviceCategory.update({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + update(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceCategoryClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + /** + * Delete zero or more ServiceCategories. + * @param {ServiceCategoryDeleteManyArgs} args - Arguments to filter ServiceCategories to delete. + * @example + * // Delete a few ServiceCategories + * const { count } = await prisma.serviceCategory.deleteMany({ + * where: { + * // ... provide filter here + * } + * }) + * + */ + deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Update zero or more ServiceCategories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceCategoryUpdateManyArgs} args - Arguments to update one or more rows. + * @example + * // Update many ServiceCategories + * const serviceCategory = await prisma.serviceCategory.updateMany({ + * where: { + * // ... provide filter here + * }, + * data: { + * // ... provide data here + * } + * }) + * + */ + updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise + + /** + * Create or update one ServiceCategory. + * @param {ServiceCategoryUpsertArgs} args - Arguments to update or create a ServiceCategory. + * @example + * // Update or create a ServiceCategory + * const serviceCategory = await prisma.serviceCategory.upsert({ + * create: { + * // ... data to create a ServiceCategory + * }, + * update: { + * // ... in case it already exists, update + * }, + * where: { + * // ... the filter for the ServiceCategory we want to update + * } + * }) + */ + upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ServiceCategoryClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> + + + /** + * Count the number of ServiceCategories. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceCategoryCountArgs} args - Arguments to filter ServiceCategories to count. + * @example + * // Count the number of ServiceCategories + * const count = await prisma.serviceCategory.count({ + * where: { + * // ... the filter for the ServiceCategories we want to count + * } + * }) + **/ + count( + args?: Prisma.Subset, + ): Prisma.PrismaPromise< + T extends runtime.Types.Utils.Record<'select', any> + ? T['select'] extends true + ? number + : Prisma.GetScalarType + : number + > + + /** + * Allows you to perform aggregations operations on a ServiceCategory. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceCategoryAggregateArgs} args - Select which aggregations you would like to apply and on what fields. + * @example + * // Ordered by age ascending + * // Where email contains prisma.io + * // Limited to the 10 users + * const aggregations = await prisma.user.aggregate({ + * _avg: { + * age: true, + * }, + * where: { + * email: { + * contains: "prisma.io", + * }, + * }, + * orderBy: { + * age: "asc", + * }, + * take: 10, + * }) + **/ + aggregate(args: Prisma.Subset): Prisma.PrismaPromise> + + /** + * Group by ServiceCategory. + * Note, that providing `undefined` is treated as the value not being there. + * Read more here: https://pris.ly/d/null-undefined + * @param {ServiceCategoryGroupByArgs} args - Group by arguments. + * @example + * // Group by city, order by createdAt, get count + * const result = await prisma.user.groupBy({ + * by: ['city', 'createdAt'], + * orderBy: { + * createdAt: true + * }, + * _count: { + * _all: true + * }, + * }) + * + **/ + groupBy< + T extends ServiceCategoryGroupByArgs, + HasSelectOrTake extends Prisma.Or< + Prisma.Extends<'skip', Prisma.Keys>, + Prisma.Extends<'take', Prisma.Keys> + >, + OrderByArg extends Prisma.True extends HasSelectOrTake + ? { orderBy: ServiceCategoryGroupByArgs['orderBy'] } + : { orderBy?: ServiceCategoryGroupByArgs['orderBy'] }, + OrderFields extends Prisma.ExcludeUnderscoreKeys>>, + ByFields extends Prisma.MaybeTupleToUnion, + ByValid extends Prisma.Has, + HavingFields extends Prisma.GetHavingFields, + HavingValid extends Prisma.Has, + ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, + InputErrors extends ByEmpty extends Prisma.True + ? `Error: "by" must not be empty.` + : HavingValid extends Prisma.False + ? { + [P in HavingFields]: P extends ByFields + ? never + : P extends string + ? `Error: Field "${P}" used in "having" needs to be provided in "by".` + : [ + Error, + 'Field ', + P, + ` in "having" needs to be provided in "by"`, + ] + }[HavingFields] + : 'take' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "take", you also need to provide "orderBy"' + : 'skip' extends Prisma.Keys + ? 'orderBy' extends Prisma.Keys + ? ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + : 'Error: If you provide "skip", you also need to provide "orderBy"' + : ByValid extends Prisma.True + ? {} + : { + [P in OrderFields]: P extends ByFields + ? never + : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` + }[OrderFields] + >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetServiceCategoryGroupByPayload : Prisma.PrismaPromise +/** + * Fields of the ServiceCategory model + */ +readonly fields: ServiceCategoryFieldRefs; +} + +/** + * The delegate class that acts as a "Promise-like" for ServiceCategory. + * Why is this prefixed with `Prisma__`? + * Because we want to prevent naming conflicts as mentioned in + * https://github.com/prisma/prisma-client-js/issues/707 + */ +export interface Prisma__ServiceCategoryClient extends Prisma.PrismaPromise { + readonly [Symbol.toStringTag]: "PrismaPromise" + services = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + /** + * Attaches callbacks for the resolution and/or rejection of the Promise. + * @param onfulfilled The callback to execute when the Promise is resolved. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of which ever callback is executed. + */ + then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback for only the rejection of the Promise. + * @param onrejected The callback to execute when the Promise is rejected. + * @returns A Promise for the completion of the callback. + */ + catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise + /** + * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The + * resolved value cannot be modified from the callback. + * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). + * @returns A Promise for the completion of the callback. + */ + finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise +} + + + + +/** + * Fields of the ServiceCategory model + */ +export interface ServiceCategoryFieldRefs { + readonly id: Prisma.FieldRef<"ServiceCategory", 'Int'> + readonly name: Prisma.FieldRef<"ServiceCategory", 'String'> + readonly description: Prisma.FieldRef<"ServiceCategory", 'String'> + readonly imageUrl: Prisma.FieldRef<"ServiceCategory", 'String'> + readonly createdAt: Prisma.FieldRef<"ServiceCategory", 'DateTime'> + readonly updatedAt: Prisma.FieldRef<"ServiceCategory", 'DateTime'> + readonly deletedAt: Prisma.FieldRef<"ServiceCategory", 'DateTime'> +} + + +// Custom InputTypes +/** + * ServiceCategory findUnique + */ +export type ServiceCategoryFindUniqueArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + /** + * Filter, which ServiceCategory to fetch. + */ + where: Prisma.ServiceCategoryWhereUniqueInput +} + +/** + * ServiceCategory findUniqueOrThrow + */ +export type ServiceCategoryFindUniqueOrThrowArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + /** + * Filter, which ServiceCategory to fetch. + */ + where: Prisma.ServiceCategoryWhereUniqueInput +} + +/** + * ServiceCategory findFirst + */ +export type ServiceCategoryFindFirstArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + /** + * Filter, which ServiceCategory to fetch. + */ + where?: Prisma.ServiceCategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ServiceCategories to fetch. + */ + orderBy?: Prisma.ServiceCategoryOrderByWithRelationInput | Prisma.ServiceCategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ServiceCategories. + */ + cursor?: Prisma.ServiceCategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ServiceCategories from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ServiceCategories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ServiceCategories. + */ + distinct?: Prisma.ServiceCategoryScalarFieldEnum | Prisma.ServiceCategoryScalarFieldEnum[] +} + +/** + * ServiceCategory findFirstOrThrow + */ +export type ServiceCategoryFindFirstOrThrowArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + /** + * Filter, which ServiceCategory to fetch. + */ + where?: Prisma.ServiceCategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ServiceCategories to fetch. + */ + orderBy?: Prisma.ServiceCategoryOrderByWithRelationInput | Prisma.ServiceCategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for searching for ServiceCategories. + */ + cursor?: Prisma.ServiceCategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ServiceCategories from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ServiceCategories. + */ + skip?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} + * + * Filter by unique combinations of ServiceCategories. + */ + distinct?: Prisma.ServiceCategoryScalarFieldEnum | Prisma.ServiceCategoryScalarFieldEnum[] +} + +/** + * ServiceCategory findMany + */ +export type ServiceCategoryFindManyArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + /** + * Filter, which ServiceCategories to fetch. + */ + where?: Prisma.ServiceCategoryWhereInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} + * + * Determine the order of ServiceCategories to fetch. + */ + orderBy?: Prisma.ServiceCategoryOrderByWithRelationInput | Prisma.ServiceCategoryOrderByWithRelationInput[] + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} + * + * Sets the position for listing ServiceCategories. + */ + cursor?: Prisma.ServiceCategoryWhereUniqueInput + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Take `±n` ServiceCategories from the position of the cursor. + */ + take?: number + /** + * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} + * + * Skip the first `n` ServiceCategories. + */ + skip?: number + distinct?: Prisma.ServiceCategoryScalarFieldEnum | Prisma.ServiceCategoryScalarFieldEnum[] +} + +/** + * ServiceCategory create + */ +export type ServiceCategoryCreateArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + /** + * The data needed to create a ServiceCategory. + */ + data: Prisma.XOR +} + +/** + * ServiceCategory createMany + */ +export type ServiceCategoryCreateManyArgs = { + /** + * The data used to create many ServiceCategories. + */ + data: Prisma.ServiceCategoryCreateManyInput | Prisma.ServiceCategoryCreateManyInput[] + skipDuplicates?: boolean +} + +/** + * ServiceCategory update + */ +export type ServiceCategoryUpdateArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + /** + * The data needed to update a ServiceCategory. + */ + data: Prisma.XOR + /** + * Choose, which ServiceCategory to update. + */ + where: Prisma.ServiceCategoryWhereUniqueInput +} + +/** + * ServiceCategory updateMany + */ +export type ServiceCategoryUpdateManyArgs = { + /** + * The data used to update ServiceCategories. + */ + data: Prisma.XOR + /** + * Filter which ServiceCategories to update + */ + where?: Prisma.ServiceCategoryWhereInput + /** + * Limit how many ServiceCategories to update. + */ + limit?: number +} + +/** + * ServiceCategory upsert + */ +export type ServiceCategoryUpsertArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + /** + * The filter to search for the ServiceCategory to update in case it exists. + */ + where: Prisma.ServiceCategoryWhereUniqueInput + /** + * In case the ServiceCategory found by the `where` argument doesn't exist, create a new ServiceCategory with this data. + */ + create: Prisma.XOR + /** + * In case the ServiceCategory was found with the provided `where` argument, update it with this data. + */ + update: Prisma.XOR +} + +/** + * ServiceCategory delete + */ +export type ServiceCategoryDeleteArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null + /** + * Filter which ServiceCategory to delete. + */ + where: Prisma.ServiceCategoryWhereUniqueInput +} + +/** + * ServiceCategory deleteMany + */ +export type ServiceCategoryDeleteManyArgs = { + /** + * Filter which ServiceCategories to delete + */ + where?: Prisma.ServiceCategoryWhereInput + /** + * Limit how many ServiceCategories to delete. + */ + limit?: number +} + +/** + * ServiceCategory.services + */ +export type ServiceCategory$servicesArgs = { + /** + * Select specific fields to fetch from the Service + */ + select?: Prisma.ServiceSelect | null + /** + * Omit specific fields from the Service + */ + omit?: Prisma.ServiceOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceInclude | null + where?: Prisma.ServiceWhereInput + orderBy?: Prisma.ServiceOrderByWithRelationInput | Prisma.ServiceOrderByWithRelationInput[] + cursor?: Prisma.ServiceWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.ServiceScalarFieldEnum | Prisma.ServiceScalarFieldEnum[] +} + +/** + * ServiceCategory without action + */ +export type ServiceCategoryDefaultArgs = { + /** + * Select specific fields to fetch from the ServiceCategory + */ + select?: Prisma.ServiceCategorySelect | null + /** + * Omit specific fields from the ServiceCategory + */ + omit?: Prisma.ServiceCategoryOmit | null + /** + * Choose, which related nodes to fetch as well + */ + include?: Prisma.ServiceCategoryInclude | null +} diff --git a/src/generated/prisma/models/StockAdjustment.ts b/src/generated/prisma/models/StockAdjustment.ts deleted file mode 100644 index 4b4d7bc..0000000 --- a/src/generated/prisma/models/StockAdjustment.ts +++ /dev/null @@ -1,1382 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `StockAdjustment` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model StockAdjustment - * - */ -export type StockAdjustmentModel = runtime.Types.Result.DefaultSelection - -export type AggregateStockAdjustment = { - _count: StockAdjustmentCountAggregateOutputType | null - _avg: StockAdjustmentAvgAggregateOutputType | null - _sum: StockAdjustmentSumAggregateOutputType | null - _min: StockAdjustmentMinAggregateOutputType | null - _max: StockAdjustmentMaxAggregateOutputType | null -} - -export type StockAdjustmentAvgAggregateOutputType = { - id: number | null - adjustedQuantity: runtime.Decimal | null - productId: number | null - inventoryId: number | null -} - -export type StockAdjustmentSumAggregateOutputType = { - id: number | null - adjustedQuantity: runtime.Decimal | null - productId: number | null - inventoryId: number | null -} - -export type StockAdjustmentMinAggregateOutputType = { - id: number | null - adjustedQuantity: runtime.Decimal | null - createdAt: Date | null - productId: number | null - inventoryId: number | null -} - -export type StockAdjustmentMaxAggregateOutputType = { - id: number | null - adjustedQuantity: runtime.Decimal | null - createdAt: Date | null - productId: number | null - inventoryId: number | null -} - -export type StockAdjustmentCountAggregateOutputType = { - id: number - adjustedQuantity: number - createdAt: number - productId: number - inventoryId: number - _all: number -} - - -export type StockAdjustmentAvgAggregateInputType = { - id?: true - adjustedQuantity?: true - productId?: true - inventoryId?: true -} - -export type StockAdjustmentSumAggregateInputType = { - id?: true - adjustedQuantity?: true - productId?: true - inventoryId?: true -} - -export type StockAdjustmentMinAggregateInputType = { - id?: true - adjustedQuantity?: true - createdAt?: true - productId?: true - inventoryId?: true -} - -export type StockAdjustmentMaxAggregateInputType = { - id?: true - adjustedQuantity?: true - createdAt?: true - productId?: true - inventoryId?: true -} - -export type StockAdjustmentCountAggregateInputType = { - id?: true - adjustedQuantity?: true - createdAt?: true - productId?: true - inventoryId?: true - _all?: true -} - -export type StockAdjustmentAggregateArgs = { - /** - * Filter which StockAdjustment to aggregate. - */ - where?: Prisma.StockAdjustmentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockAdjustments to fetch. - */ - orderBy?: Prisma.StockAdjustmentOrderByWithRelationInput | Prisma.StockAdjustmentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.StockAdjustmentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockAdjustments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockAdjustments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned StockAdjustments - **/ - _count?: true | StockAdjustmentCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: StockAdjustmentAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: StockAdjustmentSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: StockAdjustmentMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: StockAdjustmentMaxAggregateInputType -} - -export type GetStockAdjustmentAggregateType = { - [P in keyof T & keyof AggregateStockAdjustment]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type StockAdjustmentGroupByArgs = { - where?: Prisma.StockAdjustmentWhereInput - orderBy?: Prisma.StockAdjustmentOrderByWithAggregationInput | Prisma.StockAdjustmentOrderByWithAggregationInput[] - by: Prisma.StockAdjustmentScalarFieldEnum[] | Prisma.StockAdjustmentScalarFieldEnum - having?: Prisma.StockAdjustmentScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: StockAdjustmentCountAggregateInputType | true - _avg?: StockAdjustmentAvgAggregateInputType - _sum?: StockAdjustmentSumAggregateInputType - _min?: StockAdjustmentMinAggregateInputType - _max?: StockAdjustmentMaxAggregateInputType -} - -export type StockAdjustmentGroupByOutputType = { - id: number - adjustedQuantity: runtime.Decimal - createdAt: Date - productId: number - inventoryId: number - _count: StockAdjustmentCountAggregateOutputType | null - _avg: StockAdjustmentAvgAggregateOutputType | null - _sum: StockAdjustmentSumAggregateOutputType | null - _min: StockAdjustmentMinAggregateOutputType | null - _max: StockAdjustmentMaxAggregateOutputType | null -} - -type GetStockAdjustmentGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof StockAdjustmentGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type StockAdjustmentWhereInput = { - AND?: Prisma.StockAdjustmentWhereInput | Prisma.StockAdjustmentWhereInput[] - OR?: Prisma.StockAdjustmentWhereInput[] - NOT?: Prisma.StockAdjustmentWhereInput | Prisma.StockAdjustmentWhereInput[] - id?: Prisma.IntFilter<"StockAdjustment"> | number - adjustedQuantity?: Prisma.DecimalFilter<"StockAdjustment"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"StockAdjustment"> | Date | string - productId?: Prisma.IntFilter<"StockAdjustment"> | number - inventoryId?: Prisma.IntFilter<"StockAdjustment"> | number - inventory?: Prisma.XOR - product?: Prisma.XOR -} - -export type StockAdjustmentOrderByWithRelationInput = { - id?: Prisma.SortOrder - adjustedQuantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - inventory?: Prisma.InventoryOrderByWithRelationInput - product?: Prisma.ProductOrderByWithRelationInput -} - -export type StockAdjustmentWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.StockAdjustmentWhereInput | Prisma.StockAdjustmentWhereInput[] - OR?: Prisma.StockAdjustmentWhereInput[] - NOT?: Prisma.StockAdjustmentWhereInput | Prisma.StockAdjustmentWhereInput[] - adjustedQuantity?: Prisma.DecimalFilter<"StockAdjustment"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"StockAdjustment"> | Date | string - productId?: Prisma.IntFilter<"StockAdjustment"> | number - inventoryId?: Prisma.IntFilter<"StockAdjustment"> | number - inventory?: Prisma.XOR - product?: Prisma.XOR -}, "id"> - -export type StockAdjustmentOrderByWithAggregationInput = { - id?: Prisma.SortOrder - adjustedQuantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - _count?: Prisma.StockAdjustmentCountOrderByAggregateInput - _avg?: Prisma.StockAdjustmentAvgOrderByAggregateInput - _max?: Prisma.StockAdjustmentMaxOrderByAggregateInput - _min?: Prisma.StockAdjustmentMinOrderByAggregateInput - _sum?: Prisma.StockAdjustmentSumOrderByAggregateInput -} - -export type StockAdjustmentScalarWhereWithAggregatesInput = { - AND?: Prisma.StockAdjustmentScalarWhereWithAggregatesInput | Prisma.StockAdjustmentScalarWhereWithAggregatesInput[] - OR?: Prisma.StockAdjustmentScalarWhereWithAggregatesInput[] - NOT?: Prisma.StockAdjustmentScalarWhereWithAggregatesInput | Prisma.StockAdjustmentScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"StockAdjustment"> | number - adjustedQuantity?: Prisma.DecimalWithAggregatesFilter<"StockAdjustment"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"StockAdjustment"> | Date | string - productId?: Prisma.IntWithAggregatesFilter<"StockAdjustment"> | number - inventoryId?: Prisma.IntWithAggregatesFilter<"StockAdjustment"> | number -} - -export type StockAdjustmentCreateInput = { - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockAdjustmentsInput - product: Prisma.ProductCreateNestedOneWithoutStockAdjustmentsInput -} - -export type StockAdjustmentUncheckedCreateInput = { - id?: number - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number - inventoryId: number -} - -export type StockAdjustmentUpdateInput = { - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockAdjustmentsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockAdjustmentsNestedInput -} - -export type StockAdjustmentUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockAdjustmentCreateManyInput = { - id?: number - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number - inventoryId: number -} - -export type StockAdjustmentUpdateManyMutationInput = { - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type StockAdjustmentUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockAdjustmentListRelationFilter = { - every?: Prisma.StockAdjustmentWhereInput - some?: Prisma.StockAdjustmentWhereInput - none?: Prisma.StockAdjustmentWhereInput -} - -export type StockAdjustmentOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type StockAdjustmentCountOrderByAggregateInput = { - id?: Prisma.SortOrder - adjustedQuantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type StockAdjustmentAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - adjustedQuantity?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type StockAdjustmentMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - adjustedQuantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type StockAdjustmentMinOrderByAggregateInput = { - id?: Prisma.SortOrder - adjustedQuantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type StockAdjustmentSumOrderByAggregateInput = { - id?: Prisma.SortOrder - adjustedQuantity?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder -} - -export type StockAdjustmentCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.StockAdjustmentCreateWithoutInventoryInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput | Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.StockAdjustmentCreateManyInventoryInputEnvelope - connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] -} - -export type StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.StockAdjustmentCreateWithoutInventoryInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput | Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.StockAdjustmentCreateManyInventoryInputEnvelope - connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] -} - -export type StockAdjustmentUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockAdjustmentCreateWithoutInventoryInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput | Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.StockAdjustmentCreateManyInventoryInputEnvelope - set?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - disconnect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - delete?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - update?: Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.StockAdjustmentUpdateManyWithWhereWithoutInventoryInput | Prisma.StockAdjustmentUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[] -} - -export type StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockAdjustmentCreateWithoutInventoryInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput | Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.StockAdjustmentCreateManyInventoryInputEnvelope - set?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - disconnect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - delete?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - update?: Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.StockAdjustmentUpdateManyWithWhereWithoutInventoryInput | Prisma.StockAdjustmentUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[] -} - -export type StockAdjustmentCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope - connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] -} - -export type StockAdjustmentUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope - connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] -} - -export type StockAdjustmentUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[] - upsert?: Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope - set?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - disconnect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - delete?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - update?: Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput | Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[] -} - -export type StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[] - upsert?: Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope - set?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - disconnect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - delete?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[] - update?: Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput | Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[] -} - -export type StockAdjustmentCreateWithoutInventoryInput = { - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - product: Prisma.ProductCreateNestedOneWithoutStockAdjustmentsInput -} - -export type StockAdjustmentUncheckedCreateWithoutInventoryInput = { - id?: number - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number -} - -export type StockAdjustmentCreateOrConnectWithoutInventoryInput = { - where: Prisma.StockAdjustmentWhereUniqueInput - create: Prisma.XOR -} - -export type StockAdjustmentCreateManyInventoryInputEnvelope = { - data: Prisma.StockAdjustmentCreateManyInventoryInput | Prisma.StockAdjustmentCreateManyInventoryInput[] - skipDuplicates?: boolean -} - -export type StockAdjustmentUpsertWithWhereUniqueWithoutInventoryInput = { - where: Prisma.StockAdjustmentWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockAdjustmentUpdateWithWhereUniqueWithoutInventoryInput = { - where: Prisma.StockAdjustmentWhereUniqueInput - data: Prisma.XOR -} - -export type StockAdjustmentUpdateManyWithWhereWithoutInventoryInput = { - where: Prisma.StockAdjustmentScalarWhereInput - data: Prisma.XOR -} - -export type StockAdjustmentScalarWhereInput = { - AND?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[] - OR?: Prisma.StockAdjustmentScalarWhereInput[] - NOT?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[] - id?: Prisma.IntFilter<"StockAdjustment"> | number - adjustedQuantity?: Prisma.DecimalFilter<"StockAdjustment"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"StockAdjustment"> | Date | string - productId?: Prisma.IntFilter<"StockAdjustment"> | number - inventoryId?: Prisma.IntFilter<"StockAdjustment"> | number -} - -export type StockAdjustmentCreateWithoutProductInput = { - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockAdjustmentsInput -} - -export type StockAdjustmentUncheckedCreateWithoutProductInput = { - id?: number - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventoryId: number -} - -export type StockAdjustmentCreateOrConnectWithoutProductInput = { - where: Prisma.StockAdjustmentWhereUniqueInput - create: Prisma.XOR -} - -export type StockAdjustmentCreateManyProductInputEnvelope = { - data: Prisma.StockAdjustmentCreateManyProductInput | Prisma.StockAdjustmentCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type StockAdjustmentUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.StockAdjustmentWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockAdjustmentUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.StockAdjustmentWhereUniqueInput - data: Prisma.XOR -} - -export type StockAdjustmentUpdateManyWithWhereWithoutProductInput = { - where: Prisma.StockAdjustmentScalarWhereInput - data: Prisma.XOR -} - -export type StockAdjustmentCreateManyInventoryInput = { - id?: number - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number -} - -export type StockAdjustmentUpdateWithoutInventoryInput = { - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - product?: Prisma.ProductUpdateOneRequiredWithoutStockAdjustmentsNestedInput -} - -export type StockAdjustmentUncheckedUpdateWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockAdjustmentUncheckedUpdateManyWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockAdjustmentCreateManyProductInput = { - id?: number - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventoryId: number -} - -export type StockAdjustmentUpdateWithoutProductInput = { - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockAdjustmentsNestedInput -} - -export type StockAdjustmentUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockAdjustmentUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - - - -export type StockAdjustmentSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - adjustedQuantity?: boolean - createdAt?: boolean - productId?: boolean - inventoryId?: boolean - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs -}, ExtArgs["result"]["stockAdjustment"]> - - - -export type StockAdjustmentSelectScalar = { - id?: boolean - adjustedQuantity?: boolean - createdAt?: boolean - productId?: boolean - inventoryId?: boolean -} - -export type StockAdjustmentOmit = runtime.Types.Extensions.GetOmit<"id" | "adjustedQuantity" | "createdAt" | "productId" | "inventoryId", ExtArgs["result"]["stockAdjustment"]> -export type StockAdjustmentInclude = { - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs -} - -export type $StockAdjustmentPayload = { - name: "StockAdjustment" - objects: { - inventory: Prisma.$InventoryPayload - product: Prisma.$ProductPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - adjustedQuantity: runtime.Decimal - createdAt: Date - productId: number - inventoryId: number - }, ExtArgs["result"]["stockAdjustment"]> - composites: {} -} - -export type StockAdjustmentGetPayload = runtime.Types.Result.GetResult - -export type StockAdjustmentCountArgs = - Omit & { - select?: StockAdjustmentCountAggregateInputType | true - } - -export interface StockAdjustmentDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['StockAdjustment'], meta: { name: 'StockAdjustment' } } - /** - * Find zero or one StockAdjustment that matches the filter. - * @param {StockAdjustmentFindUniqueArgs} args - Arguments to find a StockAdjustment - * @example - * // Get one StockAdjustment - * const stockAdjustment = await prisma.stockAdjustment.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__StockAdjustmentClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one StockAdjustment that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {StockAdjustmentFindUniqueOrThrowArgs} args - Arguments to find a StockAdjustment - * @example - * // Get one StockAdjustment - * const stockAdjustment = await prisma.stockAdjustment.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__StockAdjustmentClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first StockAdjustment that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAdjustmentFindFirstArgs} args - Arguments to find a StockAdjustment - * @example - * // Get one StockAdjustment - * const stockAdjustment = await prisma.stockAdjustment.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__StockAdjustmentClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first StockAdjustment that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAdjustmentFindFirstOrThrowArgs} args - Arguments to find a StockAdjustment - * @example - * // Get one StockAdjustment - * const stockAdjustment = await prisma.stockAdjustment.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__StockAdjustmentClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more StockAdjustments that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAdjustmentFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all StockAdjustments - * const stockAdjustments = await prisma.stockAdjustment.findMany() - * - * // Get first 10 StockAdjustments - * const stockAdjustments = await prisma.stockAdjustment.findMany({ take: 10 }) - * - * // Only select the `id` - * const stockAdjustmentWithIdOnly = await prisma.stockAdjustment.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a StockAdjustment. - * @param {StockAdjustmentCreateArgs} args - Arguments to create a StockAdjustment. - * @example - * // Create one StockAdjustment - * const StockAdjustment = await prisma.stockAdjustment.create({ - * data: { - * // ... data to create a StockAdjustment - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__StockAdjustmentClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many StockAdjustments. - * @param {StockAdjustmentCreateManyArgs} args - Arguments to create many StockAdjustments. - * @example - * // Create many StockAdjustments - * const stockAdjustment = await prisma.stockAdjustment.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a StockAdjustment. - * @param {StockAdjustmentDeleteArgs} args - Arguments to delete one StockAdjustment. - * @example - * // Delete one StockAdjustment - * const StockAdjustment = await prisma.stockAdjustment.delete({ - * where: { - * // ... filter to delete one StockAdjustment - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__StockAdjustmentClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one StockAdjustment. - * @param {StockAdjustmentUpdateArgs} args - Arguments to update one StockAdjustment. - * @example - * // Update one StockAdjustment - * const stockAdjustment = await prisma.stockAdjustment.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__StockAdjustmentClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more StockAdjustments. - * @param {StockAdjustmentDeleteManyArgs} args - Arguments to filter StockAdjustments to delete. - * @example - * // Delete a few StockAdjustments - * const { count } = await prisma.stockAdjustment.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more StockAdjustments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAdjustmentUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many StockAdjustments - * const stockAdjustment = await prisma.stockAdjustment.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one StockAdjustment. - * @param {StockAdjustmentUpsertArgs} args - Arguments to update or create a StockAdjustment. - * @example - * // Update or create a StockAdjustment - * const stockAdjustment = await prisma.stockAdjustment.upsert({ - * create: { - * // ... data to create a StockAdjustment - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the StockAdjustment we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__StockAdjustmentClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of StockAdjustments. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAdjustmentCountArgs} args - Arguments to filter StockAdjustments to count. - * @example - * // Count the number of StockAdjustments - * const count = await prisma.stockAdjustment.count({ - * where: { - * // ... the filter for the StockAdjustments we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a StockAdjustment. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAdjustmentAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by StockAdjustment. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAdjustmentGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends StockAdjustmentGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: StockAdjustmentGroupByArgs['orderBy'] } - : { orderBy?: StockAdjustmentGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetStockAdjustmentGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the StockAdjustment model - */ -readonly fields: StockAdjustmentFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for StockAdjustment. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__StockAdjustmentClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - inventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the StockAdjustment model - */ -export interface StockAdjustmentFieldRefs { - readonly id: Prisma.FieldRef<"StockAdjustment", 'Int'> - readonly adjustedQuantity: Prisma.FieldRef<"StockAdjustment", 'Decimal'> - readonly createdAt: Prisma.FieldRef<"StockAdjustment", 'DateTime'> - readonly productId: Prisma.FieldRef<"StockAdjustment", 'Int'> - readonly inventoryId: Prisma.FieldRef<"StockAdjustment", 'Int'> -} - - -// Custom InputTypes -/** - * StockAdjustment findUnique - */ -export type StockAdjustmentFindUniqueArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - /** - * Filter, which StockAdjustment to fetch. - */ - where: Prisma.StockAdjustmentWhereUniqueInput -} - -/** - * StockAdjustment findUniqueOrThrow - */ -export type StockAdjustmentFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - /** - * Filter, which StockAdjustment to fetch. - */ - where: Prisma.StockAdjustmentWhereUniqueInput -} - -/** - * StockAdjustment findFirst - */ -export type StockAdjustmentFindFirstArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - /** - * Filter, which StockAdjustment to fetch. - */ - where?: Prisma.StockAdjustmentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockAdjustments to fetch. - */ - orderBy?: Prisma.StockAdjustmentOrderByWithRelationInput | Prisma.StockAdjustmentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for StockAdjustments. - */ - cursor?: Prisma.StockAdjustmentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockAdjustments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockAdjustments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockAdjustments. - */ - distinct?: Prisma.StockAdjustmentScalarFieldEnum | Prisma.StockAdjustmentScalarFieldEnum[] -} - -/** - * StockAdjustment findFirstOrThrow - */ -export type StockAdjustmentFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - /** - * Filter, which StockAdjustment to fetch. - */ - where?: Prisma.StockAdjustmentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockAdjustments to fetch. - */ - orderBy?: Prisma.StockAdjustmentOrderByWithRelationInput | Prisma.StockAdjustmentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for StockAdjustments. - */ - cursor?: Prisma.StockAdjustmentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockAdjustments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockAdjustments. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockAdjustments. - */ - distinct?: Prisma.StockAdjustmentScalarFieldEnum | Prisma.StockAdjustmentScalarFieldEnum[] -} - -/** - * StockAdjustment findMany - */ -export type StockAdjustmentFindManyArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - /** - * Filter, which StockAdjustments to fetch. - */ - where?: Prisma.StockAdjustmentWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockAdjustments to fetch. - */ - orderBy?: Prisma.StockAdjustmentOrderByWithRelationInput | Prisma.StockAdjustmentOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing StockAdjustments. - */ - cursor?: Prisma.StockAdjustmentWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockAdjustments from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockAdjustments. - */ - skip?: number - distinct?: Prisma.StockAdjustmentScalarFieldEnum | Prisma.StockAdjustmentScalarFieldEnum[] -} - -/** - * StockAdjustment create - */ -export type StockAdjustmentCreateArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - /** - * The data needed to create a StockAdjustment. - */ - data: Prisma.XOR -} - -/** - * StockAdjustment createMany - */ -export type StockAdjustmentCreateManyArgs = { - /** - * The data used to create many StockAdjustments. - */ - data: Prisma.StockAdjustmentCreateManyInput | Prisma.StockAdjustmentCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * StockAdjustment update - */ -export type StockAdjustmentUpdateArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - /** - * The data needed to update a StockAdjustment. - */ - data: Prisma.XOR - /** - * Choose, which StockAdjustment to update. - */ - where: Prisma.StockAdjustmentWhereUniqueInput -} - -/** - * StockAdjustment updateMany - */ -export type StockAdjustmentUpdateManyArgs = { - /** - * The data used to update StockAdjustments. - */ - data: Prisma.XOR - /** - * Filter which StockAdjustments to update - */ - where?: Prisma.StockAdjustmentWhereInput - /** - * Limit how many StockAdjustments to update. - */ - limit?: number -} - -/** - * StockAdjustment upsert - */ -export type StockAdjustmentUpsertArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - /** - * The filter to search for the StockAdjustment to update in case it exists. - */ - where: Prisma.StockAdjustmentWhereUniqueInput - /** - * In case the StockAdjustment found by the `where` argument doesn't exist, create a new StockAdjustment with this data. - */ - create: Prisma.XOR - /** - * In case the StockAdjustment was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * StockAdjustment delete - */ -export type StockAdjustmentDeleteArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null - /** - * Filter which StockAdjustment to delete. - */ - where: Prisma.StockAdjustmentWhereUniqueInput -} - -/** - * StockAdjustment deleteMany - */ -export type StockAdjustmentDeleteManyArgs = { - /** - * Filter which StockAdjustments to delete - */ - where?: Prisma.StockAdjustmentWhereInput - /** - * Limit how many StockAdjustments to delete. - */ - limit?: number -} - -/** - * StockAdjustment without action - */ -export type StockAdjustmentDefaultArgs = { - /** - * Select specific fields to fetch from the StockAdjustment - */ - select?: Prisma.StockAdjustmentSelect | null - /** - * Omit specific fields from the StockAdjustment - */ - omit?: Prisma.StockAdjustmentOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockAdjustmentInclude | null -} diff --git a/src/generated/prisma/models/StockAvailableView.ts b/src/generated/prisma/models/StockAvailableView.ts deleted file mode 100644 index 404d8c7..0000000 --- a/src/generated/prisma/models/StockAvailableView.ts +++ /dev/null @@ -1,719 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `StockAvailableView` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model StockAvailableView - * - */ -export type StockAvailableViewModel = runtime.Types.Result.DefaultSelection - -export type AggregateStockAvailableView = { - _count: StockAvailableViewCountAggregateOutputType | null - _avg: StockAvailableViewAvgAggregateOutputType | null - _sum: StockAvailableViewSumAggregateOutputType | null - _min: StockAvailableViewMinAggregateOutputType | null - _max: StockAvailableViewMaxAggregateOutputType | null -} - -export type StockAvailableViewAvgAggregateOutputType = { - productId: number | null - inventoryId: number | null - physicalQuantity: runtime.Decimal | null - reservedQuantity: runtime.Decimal | null - availableQuantity: runtime.Decimal | null -} - -export type StockAvailableViewSumAggregateOutputType = { - productId: number | null - inventoryId: number | null - physicalQuantity: runtime.Decimal | null - reservedQuantity: runtime.Decimal | null - availableQuantity: runtime.Decimal | null -} - -export type StockAvailableViewMinAggregateOutputType = { - productId: number | null - inventoryId: number | null - physicalQuantity: runtime.Decimal | null - reservedQuantity: runtime.Decimal | null - availableQuantity: runtime.Decimal | null -} - -export type StockAvailableViewMaxAggregateOutputType = { - productId: number | null - inventoryId: number | null - physicalQuantity: runtime.Decimal | null - reservedQuantity: runtime.Decimal | null - availableQuantity: runtime.Decimal | null -} - -export type StockAvailableViewCountAggregateOutputType = { - productId: number - inventoryId: number - physicalQuantity: number - reservedQuantity: number - availableQuantity: number - _all: number -} - - -export type StockAvailableViewAvgAggregateInputType = { - productId?: true - inventoryId?: true - physicalQuantity?: true - reservedQuantity?: true - availableQuantity?: true -} - -export type StockAvailableViewSumAggregateInputType = { - productId?: true - inventoryId?: true - physicalQuantity?: true - reservedQuantity?: true - availableQuantity?: true -} - -export type StockAvailableViewMinAggregateInputType = { - productId?: true - inventoryId?: true - physicalQuantity?: true - reservedQuantity?: true - availableQuantity?: true -} - -export type StockAvailableViewMaxAggregateInputType = { - productId?: true - inventoryId?: true - physicalQuantity?: true - reservedQuantity?: true - availableQuantity?: true -} - -export type StockAvailableViewCountAggregateInputType = { - productId?: true - inventoryId?: true - physicalQuantity?: true - reservedQuantity?: true - availableQuantity?: true - _all?: true -} - -export type StockAvailableViewAggregateArgs = { - /** - * Filter which StockAvailableView to aggregate. - */ - where?: Prisma.StockAvailableViewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockAvailableViews to fetch. - */ - orderBy?: Prisma.StockAvailableViewOrderByWithRelationInput | Prisma.StockAvailableViewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockAvailableViews from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockAvailableViews. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned StockAvailableViews - **/ - _count?: true | StockAvailableViewCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: StockAvailableViewAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: StockAvailableViewSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: StockAvailableViewMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: StockAvailableViewMaxAggregateInputType -} - -export type GetStockAvailableViewAggregateType = { - [P in keyof T & keyof AggregateStockAvailableView]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type StockAvailableViewGroupByArgs = { - where?: Prisma.StockAvailableViewWhereInput - orderBy?: Prisma.StockAvailableViewOrderByWithAggregationInput | Prisma.StockAvailableViewOrderByWithAggregationInput[] - by: Prisma.StockAvailableViewScalarFieldEnum[] | Prisma.StockAvailableViewScalarFieldEnum - having?: Prisma.StockAvailableViewScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: StockAvailableViewCountAggregateInputType | true - _avg?: StockAvailableViewAvgAggregateInputType - _sum?: StockAvailableViewSumAggregateInputType - _min?: StockAvailableViewMinAggregateInputType - _max?: StockAvailableViewMaxAggregateInputType -} - -export type StockAvailableViewGroupByOutputType = { - productId: number - inventoryId: number - physicalQuantity: runtime.Decimal - reservedQuantity: runtime.Decimal - availableQuantity: runtime.Decimal - _count: StockAvailableViewCountAggregateOutputType | null - _avg: StockAvailableViewAvgAggregateOutputType | null - _sum: StockAvailableViewSumAggregateOutputType | null - _min: StockAvailableViewMinAggregateOutputType | null - _max: StockAvailableViewMaxAggregateOutputType | null -} - -type GetStockAvailableViewGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof StockAvailableViewGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type StockAvailableViewWhereInput = { - AND?: Prisma.StockAvailableViewWhereInput | Prisma.StockAvailableViewWhereInput[] - OR?: Prisma.StockAvailableViewWhereInput[] - NOT?: Prisma.StockAvailableViewWhereInput | Prisma.StockAvailableViewWhereInput[] - productId?: Prisma.IntFilter<"StockAvailableView"> | number - inventoryId?: Prisma.IntFilter<"StockAvailableView"> | number - physicalQuantity?: Prisma.DecimalFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string - reservedQuantity?: Prisma.DecimalFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string - availableQuantity?: Prisma.DecimalFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type StockAvailableViewOrderByWithRelationInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - physicalQuantity?: Prisma.SortOrder - reservedQuantity?: Prisma.SortOrder - availableQuantity?: Prisma.SortOrder -} - -export type StockAvailableViewOrderByWithAggregationInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - physicalQuantity?: Prisma.SortOrder - reservedQuantity?: Prisma.SortOrder - availableQuantity?: Prisma.SortOrder - _count?: Prisma.StockAvailableViewCountOrderByAggregateInput - _avg?: Prisma.StockAvailableViewAvgOrderByAggregateInput - _max?: Prisma.StockAvailableViewMaxOrderByAggregateInput - _min?: Prisma.StockAvailableViewMinOrderByAggregateInput - _sum?: Prisma.StockAvailableViewSumOrderByAggregateInput -} - -export type StockAvailableViewScalarWhereWithAggregatesInput = { - AND?: Prisma.StockAvailableViewScalarWhereWithAggregatesInput | Prisma.StockAvailableViewScalarWhereWithAggregatesInput[] - OR?: Prisma.StockAvailableViewScalarWhereWithAggregatesInput[] - NOT?: Prisma.StockAvailableViewScalarWhereWithAggregatesInput | Prisma.StockAvailableViewScalarWhereWithAggregatesInput[] - productId?: Prisma.IntWithAggregatesFilter<"StockAvailableView"> | number - inventoryId?: Prisma.IntWithAggregatesFilter<"StockAvailableView"> | number - physicalQuantity?: Prisma.DecimalWithAggregatesFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string - reservedQuantity?: Prisma.DecimalWithAggregatesFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string - availableQuantity?: Prisma.DecimalWithAggregatesFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type StockAvailableViewCountOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - physicalQuantity?: Prisma.SortOrder - reservedQuantity?: Prisma.SortOrder - availableQuantity?: Prisma.SortOrder -} - -export type StockAvailableViewAvgOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - physicalQuantity?: Prisma.SortOrder - reservedQuantity?: Prisma.SortOrder - availableQuantity?: Prisma.SortOrder -} - -export type StockAvailableViewMaxOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - physicalQuantity?: Prisma.SortOrder - reservedQuantity?: Prisma.SortOrder - availableQuantity?: Prisma.SortOrder -} - -export type StockAvailableViewMinOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - physicalQuantity?: Prisma.SortOrder - reservedQuantity?: Prisma.SortOrder - availableQuantity?: Prisma.SortOrder -} - -export type StockAvailableViewSumOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - physicalQuantity?: Prisma.SortOrder - reservedQuantity?: Prisma.SortOrder - availableQuantity?: Prisma.SortOrder -} - - - -export type StockAvailableViewSelect = runtime.Types.Extensions.GetSelect<{ - productId?: boolean - inventoryId?: boolean - physicalQuantity?: boolean - reservedQuantity?: boolean - availableQuantity?: boolean -}, ExtArgs["result"]["stockAvailableView"]> - - - -export type StockAvailableViewSelectScalar = { - productId?: boolean - inventoryId?: boolean - physicalQuantity?: boolean - reservedQuantity?: boolean - availableQuantity?: boolean -} - -export type StockAvailableViewOmit = runtime.Types.Extensions.GetOmit<"productId" | "inventoryId" | "physicalQuantity" | "reservedQuantity" | "availableQuantity", ExtArgs["result"]["stockAvailableView"]> - -export type $StockAvailableViewPayload = { - name: "StockAvailableView" - objects: {} - scalars: runtime.Types.Extensions.GetPayloadResult<{ - productId: number - inventoryId: number - physicalQuantity: runtime.Decimal - reservedQuantity: runtime.Decimal - availableQuantity: runtime.Decimal - }, ExtArgs["result"]["stockAvailableView"]> - composites: {} -} - -export type StockAvailableViewGetPayload = runtime.Types.Result.GetResult - -export type StockAvailableViewCountArgs = - Omit & { - select?: StockAvailableViewCountAggregateInputType | true - } - -export interface StockAvailableViewDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['StockAvailableView'], meta: { name: 'StockAvailableView' } } - /** - * Find the first StockAvailableView that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAvailableViewFindFirstArgs} args - Arguments to find a StockAvailableView - * @example - * // Get one StockAvailableView - * const stockAvailableView = await prisma.stockAvailableView.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst ? { - orderBy: {} - } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { - orderBy: {} - } : {}>(args?: Prisma.SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__StockAvailableViewClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first StockAvailableView that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAvailableViewFindFirstOrThrowArgs} args - Arguments to find a StockAvailableView - * @example - * // Get one StockAvailableView - * const stockAvailableView = await prisma.stockAvailableView.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow ? { - orderBy: {} - } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { - orderBy: {} - } : {}>(args?: Prisma.SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__StockAvailableViewClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more StockAvailableViews that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAvailableViewFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all StockAvailableViews - * const stockAvailableViews = await prisma.stockAvailableView.findMany() - * - * // Get first 10 StockAvailableViews - * const stockAvailableViews = await prisma.stockAvailableView.findMany({ take: 10 }) - * - * // Only select the `productId` - * const stockAvailableViewWithProductIdOnly = await prisma.stockAvailableView.findMany({ select: { productId: true } }) - * - */ - findMany ? { - orderBy: {} - } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { - orderBy: {} - } : {}>(args?: Prisma.SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - - /** - * Count the number of StockAvailableViews. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAvailableViewCountArgs} args - Arguments to filter StockAvailableViews to count. - * @example - * // Count the number of StockAvailableViews - * const count = await prisma.stockAvailableView.count({ - * where: { - * // ... the filter for the StockAvailableViews we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a StockAvailableView. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAvailableViewAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by StockAvailableView. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockAvailableViewGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends StockAvailableViewGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: StockAvailableViewGroupByArgs['orderBy'] } - : { orderBy?: StockAvailableViewGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetStockAvailableViewGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the StockAvailableView model - */ -readonly fields: StockAvailableViewFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for StockAvailableView. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__StockAvailableViewClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the StockAvailableView model - */ -export interface StockAvailableViewFieldRefs { - readonly productId: Prisma.FieldRef<"StockAvailableView", 'Int'> - readonly inventoryId: Prisma.FieldRef<"StockAvailableView", 'Int'> - readonly physicalQuantity: Prisma.FieldRef<"StockAvailableView", 'Decimal'> - readonly reservedQuantity: Prisma.FieldRef<"StockAvailableView", 'Decimal'> - readonly availableQuantity: Prisma.FieldRef<"StockAvailableView", 'Decimal'> -} - - -// Custom InputTypes -/** - * StockAvailableView findFirst - */ -export type StockAvailableViewFindFirstArgs = { - /** - * Select specific fields to fetch from the StockAvailableView - */ - select?: Prisma.StockAvailableViewSelect | null - /** - * Omit specific fields from the StockAvailableView - */ - omit?: Prisma.StockAvailableViewOmit | null - /** - * Filter, which StockAvailableView to fetch. - */ - where?: Prisma.StockAvailableViewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockAvailableViews to fetch. - */ - orderBy?: Prisma.StockAvailableViewOrderByWithRelationInput | Prisma.StockAvailableViewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockAvailableViews from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockAvailableViews. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockAvailableViews. - */ - distinct?: Prisma.StockAvailableViewScalarFieldEnum | Prisma.StockAvailableViewScalarFieldEnum[] -} - -/** - * StockAvailableView findFirstOrThrow - */ -export type StockAvailableViewFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the StockAvailableView - */ - select?: Prisma.StockAvailableViewSelect | null - /** - * Omit specific fields from the StockAvailableView - */ - omit?: Prisma.StockAvailableViewOmit | null - /** - * Filter, which StockAvailableView to fetch. - */ - where?: Prisma.StockAvailableViewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockAvailableViews to fetch. - */ - orderBy?: Prisma.StockAvailableViewOrderByWithRelationInput | Prisma.StockAvailableViewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockAvailableViews from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockAvailableViews. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockAvailableViews. - */ - distinct?: Prisma.StockAvailableViewScalarFieldEnum | Prisma.StockAvailableViewScalarFieldEnum[] -} - -/** - * StockAvailableView findMany - */ -export type StockAvailableViewFindManyArgs = { - /** - * Select specific fields to fetch from the StockAvailableView - */ - select?: Prisma.StockAvailableViewSelect | null - /** - * Omit specific fields from the StockAvailableView - */ - omit?: Prisma.StockAvailableViewOmit | null - /** - * Filter, which StockAvailableViews to fetch. - */ - where?: Prisma.StockAvailableViewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockAvailableViews to fetch. - */ - orderBy?: Prisma.StockAvailableViewOrderByWithRelationInput | Prisma.StockAvailableViewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockAvailableViews from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockAvailableViews. - */ - skip?: number - distinct?: Prisma.StockAvailableViewScalarFieldEnum | Prisma.StockAvailableViewScalarFieldEnum[] -} - -/** - * StockAvailableView without action - */ -export type StockAvailableViewDefaultArgs = { - /** - * Select specific fields to fetch from the StockAvailableView - */ - select?: Prisma.StockAvailableViewSelect | null - /** - * Omit specific fields from the StockAvailableView - */ - omit?: Prisma.StockAvailableViewOmit | null -} diff --git a/src/generated/prisma/models/StockBalance.ts b/src/generated/prisma/models/StockBalance.ts deleted file mode 100644 index 4d45f4e..0000000 --- a/src/generated/prisma/models/StockBalance.ts +++ /dev/null @@ -1,1517 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `StockBalance` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model StockBalance - * - */ -export type StockBalanceModel = runtime.Types.Result.DefaultSelection - -export type AggregateStockBalance = { - _count: StockBalanceCountAggregateOutputType | null - _avg: StockBalanceAvgAggregateOutputType | null - _sum: StockBalanceSumAggregateOutputType | null - _min: StockBalanceMinAggregateOutputType | null - _max: StockBalanceMaxAggregateOutputType | null -} - -export type StockBalanceAvgAggregateOutputType = { - quantity: runtime.Decimal | null - totalCost: runtime.Decimal | null - avgCost: runtime.Decimal | null - inventoryId: number | null - productId: number | null - id: number | null -} - -export type StockBalanceSumAggregateOutputType = { - quantity: runtime.Decimal | null - totalCost: runtime.Decimal | null - avgCost: runtime.Decimal | null - inventoryId: number | null - productId: number | null - id: number | null -} - -export type StockBalanceMinAggregateOutputType = { - quantity: runtime.Decimal | null - totalCost: runtime.Decimal | null - updatedAt: Date | null - avgCost: runtime.Decimal | null - inventoryId: number | null - productId: number | null - createdAt: Date | null - id: number | null -} - -export type StockBalanceMaxAggregateOutputType = { - quantity: runtime.Decimal | null - totalCost: runtime.Decimal | null - updatedAt: Date | null - avgCost: runtime.Decimal | null - inventoryId: number | null - productId: number | null - createdAt: Date | null - id: number | null -} - -export type StockBalanceCountAggregateOutputType = { - quantity: number - totalCost: number - updatedAt: number - avgCost: number - inventoryId: number - productId: number - createdAt: number - id: number - _all: number -} - - -export type StockBalanceAvgAggregateInputType = { - quantity?: true - totalCost?: true - avgCost?: true - inventoryId?: true - productId?: true - id?: true -} - -export type StockBalanceSumAggregateInputType = { - quantity?: true - totalCost?: true - avgCost?: true - inventoryId?: true - productId?: true - id?: true -} - -export type StockBalanceMinAggregateInputType = { - quantity?: true - totalCost?: true - updatedAt?: true - avgCost?: true - inventoryId?: true - productId?: true - createdAt?: true - id?: true -} - -export type StockBalanceMaxAggregateInputType = { - quantity?: true - totalCost?: true - updatedAt?: true - avgCost?: true - inventoryId?: true - productId?: true - createdAt?: true - id?: true -} - -export type StockBalanceCountAggregateInputType = { - quantity?: true - totalCost?: true - updatedAt?: true - avgCost?: true - inventoryId?: true - productId?: true - createdAt?: true - id?: true - _all?: true -} - -export type StockBalanceAggregateArgs = { - /** - * Filter which StockBalance to aggregate. - */ - where?: Prisma.StockBalanceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockBalances to fetch. - */ - orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.StockBalanceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockBalances from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockBalances. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned StockBalances - **/ - _count?: true | StockBalanceCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: StockBalanceAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: StockBalanceSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: StockBalanceMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: StockBalanceMaxAggregateInputType -} - -export type GetStockBalanceAggregateType = { - [P in keyof T & keyof AggregateStockBalance]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type StockBalanceGroupByArgs = { - where?: Prisma.StockBalanceWhereInput - orderBy?: Prisma.StockBalanceOrderByWithAggregationInput | Prisma.StockBalanceOrderByWithAggregationInput[] - by: Prisma.StockBalanceScalarFieldEnum[] | Prisma.StockBalanceScalarFieldEnum - having?: Prisma.StockBalanceScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: StockBalanceCountAggregateInputType | true - _avg?: StockBalanceAvgAggregateInputType - _sum?: StockBalanceSumAggregateInputType - _min?: StockBalanceMinAggregateInputType - _max?: StockBalanceMaxAggregateInputType -} - -export type StockBalanceGroupByOutputType = { - quantity: runtime.Decimal - totalCost: runtime.Decimal - updatedAt: Date - avgCost: runtime.Decimal - inventoryId: number - productId: number - createdAt: Date - id: number - _count: StockBalanceCountAggregateOutputType | null - _avg: StockBalanceAvgAggregateOutputType | null - _sum: StockBalanceSumAggregateOutputType | null - _min: StockBalanceMinAggregateOutputType | null - _max: StockBalanceMaxAggregateOutputType | null -} - -type GetStockBalanceGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof StockBalanceGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type StockBalanceWhereInput = { - AND?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[] - OR?: Prisma.StockBalanceWhereInput[] - NOT?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[] - quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string - avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId?: Prisma.IntFilter<"StockBalance"> | number - productId?: Prisma.IntFilter<"StockBalance"> | number - createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string - id?: Prisma.IntFilter<"StockBalance"> | number - inventory?: Prisma.XOR - product?: Prisma.XOR -} - -export type StockBalanceOrderByWithRelationInput = { - quantity?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - productId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - id?: Prisma.SortOrder - inventory?: Prisma.InventoryOrderByWithRelationInput - product?: Prisma.ProductOrderByWithRelationInput -} - -export type StockBalanceWhereUniqueInput = Prisma.AtLeast<{ - id?: number - productId_inventoryId?: Prisma.StockBalanceProductIdInventoryIdCompoundUniqueInput - AND?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[] - OR?: Prisma.StockBalanceWhereInput[] - NOT?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[] - quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string - avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId?: Prisma.IntFilter<"StockBalance"> | number - productId?: Prisma.IntFilter<"StockBalance"> | number - createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string - inventory?: Prisma.XOR - product?: Prisma.XOR -}, "id" | "productId_inventoryId"> - -export type StockBalanceOrderByWithAggregationInput = { - quantity?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - productId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - id?: Prisma.SortOrder - _count?: Prisma.StockBalanceCountOrderByAggregateInput - _avg?: Prisma.StockBalanceAvgOrderByAggregateInput - _max?: Prisma.StockBalanceMaxOrderByAggregateInput - _min?: Prisma.StockBalanceMinOrderByAggregateInput - _sum?: Prisma.StockBalanceSumOrderByAggregateInput -} - -export type StockBalanceScalarWhereWithAggregatesInput = { - AND?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[] - OR?: Prisma.StockBalanceScalarWhereWithAggregatesInput[] - NOT?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[] - quantity?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"StockBalance"> | Date | string - avgCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number - productId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number - createdAt?: Prisma.DateTimeWithAggregatesFilter<"StockBalance"> | Date | string - id?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number -} - -export type StockBalanceCreateInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Date | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput - product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput -} - -export type StockBalanceUncheckedCreateInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Date | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId: number - productId: number - createdAt?: Date | string - id?: number -} - -export type StockBalanceUpdateInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput -} - -export type StockBalanceUncheckedUpdateInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - id?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockBalanceCreateManyInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Date | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId: number - productId: number - createdAt?: Date | string - id?: number -} - -export type StockBalanceUpdateManyMutationInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type StockBalanceUncheckedUpdateManyInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - id?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockBalanceListRelationFilter = { - every?: Prisma.StockBalanceWhereInput - some?: Prisma.StockBalanceWhereInput - none?: Prisma.StockBalanceWhereInput -} - -export type StockBalanceOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type StockBalanceProductIdInventoryIdCompoundUniqueInput = { - productId: number - inventoryId: number -} - -export type StockBalanceCountOrderByAggregateInput = { - quantity?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - productId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - id?: Prisma.SortOrder -} - -export type StockBalanceAvgOrderByAggregateInput = { - quantity?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - productId?: Prisma.SortOrder - id?: Prisma.SortOrder -} - -export type StockBalanceMaxOrderByAggregateInput = { - quantity?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - productId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - id?: Prisma.SortOrder -} - -export type StockBalanceMinOrderByAggregateInput = { - quantity?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - productId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - id?: Prisma.SortOrder -} - -export type StockBalanceSumOrderByAggregateInput = { - quantity?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - productId?: Prisma.SortOrder - id?: Prisma.SortOrder -} - -export type StockBalanceCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.StockBalanceCreateWithoutInventoryInput[] | Prisma.StockBalanceUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutInventoryInput | Prisma.StockBalanceCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.StockBalanceCreateManyInventoryInputEnvelope - connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] -} - -export type StockBalanceUncheckedCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.StockBalanceCreateWithoutInventoryInput[] | Prisma.StockBalanceUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutInventoryInput | Prisma.StockBalanceCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.StockBalanceCreateManyInventoryInputEnvelope - connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] -} - -export type StockBalanceUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockBalanceCreateWithoutInventoryInput[] | Prisma.StockBalanceUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutInventoryInput | Prisma.StockBalanceCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.StockBalanceCreateManyInventoryInputEnvelope - set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutInventoryInput | Prisma.StockBalanceUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[] -} - -export type StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockBalanceCreateWithoutInventoryInput[] | Prisma.StockBalanceUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutInventoryInput | Prisma.StockBalanceCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.StockBalanceCreateManyInventoryInputEnvelope - set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutInventoryInput | Prisma.StockBalanceUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[] -} - -export type StockBalanceCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope - connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] -} - -export type StockBalanceUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope - connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] -} - -export type StockBalanceUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[] - upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope - set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput | Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[] -} - -export type StockBalanceUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[] - upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope - set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[] - update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput | Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[] -} - -export type StockBalanceCreateWithoutInventoryInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Date | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput -} - -export type StockBalanceUncheckedCreateWithoutInventoryInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Date | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - productId: number - createdAt?: Date | string - id?: number -} - -export type StockBalanceCreateOrConnectWithoutInventoryInput = { - where: Prisma.StockBalanceWhereUniqueInput - create: Prisma.XOR -} - -export type StockBalanceCreateManyInventoryInputEnvelope = { - data: Prisma.StockBalanceCreateManyInventoryInput | Prisma.StockBalanceCreateManyInventoryInput[] - skipDuplicates?: boolean -} - -export type StockBalanceUpsertWithWhereUniqueWithoutInventoryInput = { - where: Prisma.StockBalanceWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockBalanceUpdateWithWhereUniqueWithoutInventoryInput = { - where: Prisma.StockBalanceWhereUniqueInput - data: Prisma.XOR -} - -export type StockBalanceUpdateManyWithWhereWithoutInventoryInput = { - where: Prisma.StockBalanceScalarWhereInput - data: Prisma.XOR -} - -export type StockBalanceScalarWhereInput = { - AND?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[] - OR?: Prisma.StockBalanceScalarWhereInput[] - NOT?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[] - quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string - avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId?: Prisma.IntFilter<"StockBalance"> | number - productId?: Prisma.IntFilter<"StockBalance"> | number - createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string - id?: Prisma.IntFilter<"StockBalance"> | number -} - -export type StockBalanceCreateWithoutProductInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Date | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput -} - -export type StockBalanceUncheckedCreateWithoutProductInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Date | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId: number - createdAt?: Date | string - id?: number -} - -export type StockBalanceCreateOrConnectWithoutProductInput = { - where: Prisma.StockBalanceWhereUniqueInput - create: Prisma.XOR -} - -export type StockBalanceCreateManyProductInputEnvelope = { - data: Prisma.StockBalanceCreateManyProductInput | Prisma.StockBalanceCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type StockBalanceUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.StockBalanceWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockBalanceUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.StockBalanceWhereUniqueInput - data: Prisma.XOR -} - -export type StockBalanceUpdateManyWithWhereWithoutProductInput = { - where: Prisma.StockBalanceScalarWhereInput - data: Prisma.XOR -} - -export type StockBalanceCreateManyInventoryInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Date | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - productId: number - createdAt?: Date | string - id?: number -} - -export type StockBalanceUpdateWithoutInventoryInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput -} - -export type StockBalanceUncheckedUpdateWithoutInventoryInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - id?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockBalanceUncheckedUpdateManyWithoutInventoryInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - id?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockBalanceCreateManyProductInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Date | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId: number - createdAt?: Date | string - id?: number -} - -export type StockBalanceUpdateWithoutProductInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput -} - -export type StockBalanceUncheckedUpdateWithoutProductInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - id?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockBalanceUncheckedUpdateManyWithoutProductInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - id?: Prisma.IntFieldUpdateOperationsInput | number -} - - - -export type StockBalanceSelect = runtime.Types.Extensions.GetSelect<{ - quantity?: boolean - totalCost?: boolean - updatedAt?: boolean - avgCost?: boolean - inventoryId?: boolean - productId?: boolean - createdAt?: boolean - id?: boolean - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs -}, ExtArgs["result"]["stockBalance"]> - - - -export type StockBalanceSelectScalar = { - quantity?: boolean - totalCost?: boolean - updatedAt?: boolean - avgCost?: boolean - inventoryId?: boolean - productId?: boolean - createdAt?: boolean - id?: boolean -} - -export type StockBalanceOmit = runtime.Types.Extensions.GetOmit<"quantity" | "totalCost" | "updatedAt" | "avgCost" | "inventoryId" | "productId" | "createdAt" | "id", ExtArgs["result"]["stockBalance"]> -export type StockBalanceInclude = { - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs -} - -export type $StockBalancePayload = { - name: "StockBalance" - objects: { - inventory: Prisma.$InventoryPayload - product: Prisma.$ProductPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - quantity: runtime.Decimal - totalCost: runtime.Decimal - updatedAt: Date - avgCost: runtime.Decimal - inventoryId: number - productId: number - createdAt: Date - id: number - }, ExtArgs["result"]["stockBalance"]> - composites: {} -} - -export type StockBalanceGetPayload = runtime.Types.Result.GetResult - -export type StockBalanceCountArgs = - Omit & { - select?: StockBalanceCountAggregateInputType | true - } - -export interface StockBalanceDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['StockBalance'], meta: { name: 'StockBalance' } } - /** - * Find zero or one StockBalance that matches the filter. - * @param {StockBalanceFindUniqueArgs} args - Arguments to find a StockBalance - * @example - * // Get one StockBalance - * const stockBalance = await prisma.stockBalance.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__StockBalanceClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one StockBalance that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {StockBalanceFindUniqueOrThrowArgs} args - Arguments to find a StockBalance - * @example - * // Get one StockBalance - * const stockBalance = await prisma.stockBalance.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__StockBalanceClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first StockBalance that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockBalanceFindFirstArgs} args - Arguments to find a StockBalance - * @example - * // Get one StockBalance - * const stockBalance = await prisma.stockBalance.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__StockBalanceClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first StockBalance that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockBalanceFindFirstOrThrowArgs} args - Arguments to find a StockBalance - * @example - * // Get one StockBalance - * const stockBalance = await prisma.stockBalance.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__StockBalanceClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more StockBalances that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockBalanceFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all StockBalances - * const stockBalances = await prisma.stockBalance.findMany() - * - * // Get first 10 StockBalances - * const stockBalances = await prisma.stockBalance.findMany({ take: 10 }) - * - * // Only select the `quantity` - * const stockBalanceWithQuantityOnly = await prisma.stockBalance.findMany({ select: { quantity: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a StockBalance. - * @param {StockBalanceCreateArgs} args - Arguments to create a StockBalance. - * @example - * // Create one StockBalance - * const StockBalance = await prisma.stockBalance.create({ - * data: { - * // ... data to create a StockBalance - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__StockBalanceClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many StockBalances. - * @param {StockBalanceCreateManyArgs} args - Arguments to create many StockBalances. - * @example - * // Create many StockBalances - * const stockBalance = await prisma.stockBalance.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a StockBalance. - * @param {StockBalanceDeleteArgs} args - Arguments to delete one StockBalance. - * @example - * // Delete one StockBalance - * const StockBalance = await prisma.stockBalance.delete({ - * where: { - * // ... filter to delete one StockBalance - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__StockBalanceClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one StockBalance. - * @param {StockBalanceUpdateArgs} args - Arguments to update one StockBalance. - * @example - * // Update one StockBalance - * const stockBalance = await prisma.stockBalance.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__StockBalanceClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more StockBalances. - * @param {StockBalanceDeleteManyArgs} args - Arguments to filter StockBalances to delete. - * @example - * // Delete a few StockBalances - * const { count } = await prisma.stockBalance.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more StockBalances. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockBalanceUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many StockBalances - * const stockBalance = await prisma.stockBalance.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one StockBalance. - * @param {StockBalanceUpsertArgs} args - Arguments to update or create a StockBalance. - * @example - * // Update or create a StockBalance - * const stockBalance = await prisma.stockBalance.upsert({ - * create: { - * // ... data to create a StockBalance - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the StockBalance we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__StockBalanceClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of StockBalances. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockBalanceCountArgs} args - Arguments to filter StockBalances to count. - * @example - * // Count the number of StockBalances - * const count = await prisma.stockBalance.count({ - * where: { - * // ... the filter for the StockBalances we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a StockBalance. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockBalanceAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by StockBalance. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockBalanceGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends StockBalanceGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: StockBalanceGroupByArgs['orderBy'] } - : { orderBy?: StockBalanceGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetStockBalanceGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the StockBalance model - */ -readonly fields: StockBalanceFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for StockBalance. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__StockBalanceClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - inventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the StockBalance model - */ -export interface StockBalanceFieldRefs { - readonly quantity: Prisma.FieldRef<"StockBalance", 'Decimal'> - readonly totalCost: Prisma.FieldRef<"StockBalance", 'Decimal'> - readonly updatedAt: Prisma.FieldRef<"StockBalance", 'DateTime'> - readonly avgCost: Prisma.FieldRef<"StockBalance", 'Decimal'> - readonly inventoryId: Prisma.FieldRef<"StockBalance", 'Int'> - readonly productId: Prisma.FieldRef<"StockBalance", 'Int'> - readonly createdAt: Prisma.FieldRef<"StockBalance", 'DateTime'> - readonly id: Prisma.FieldRef<"StockBalance", 'Int'> -} - - -// Custom InputTypes -/** - * StockBalance findUnique - */ -export type StockBalanceFindUniqueArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - /** - * Filter, which StockBalance to fetch. - */ - where: Prisma.StockBalanceWhereUniqueInput -} - -/** - * StockBalance findUniqueOrThrow - */ -export type StockBalanceFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - /** - * Filter, which StockBalance to fetch. - */ - where: Prisma.StockBalanceWhereUniqueInput -} - -/** - * StockBalance findFirst - */ -export type StockBalanceFindFirstArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - /** - * Filter, which StockBalance to fetch. - */ - where?: Prisma.StockBalanceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockBalances to fetch. - */ - orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for StockBalances. - */ - cursor?: Prisma.StockBalanceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockBalances from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockBalances. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockBalances. - */ - distinct?: Prisma.StockBalanceScalarFieldEnum | Prisma.StockBalanceScalarFieldEnum[] -} - -/** - * StockBalance findFirstOrThrow - */ -export type StockBalanceFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - /** - * Filter, which StockBalance to fetch. - */ - where?: Prisma.StockBalanceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockBalances to fetch. - */ - orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for StockBalances. - */ - cursor?: Prisma.StockBalanceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockBalances from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockBalances. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockBalances. - */ - distinct?: Prisma.StockBalanceScalarFieldEnum | Prisma.StockBalanceScalarFieldEnum[] -} - -/** - * StockBalance findMany - */ -export type StockBalanceFindManyArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - /** - * Filter, which StockBalances to fetch. - */ - where?: Prisma.StockBalanceWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockBalances to fetch. - */ - orderBy?: Prisma.StockBalanceOrderByWithRelationInput | Prisma.StockBalanceOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing StockBalances. - */ - cursor?: Prisma.StockBalanceWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockBalances from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockBalances. - */ - skip?: number - distinct?: Prisma.StockBalanceScalarFieldEnum | Prisma.StockBalanceScalarFieldEnum[] -} - -/** - * StockBalance create - */ -export type StockBalanceCreateArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - /** - * The data needed to create a StockBalance. - */ - data: Prisma.XOR -} - -/** - * StockBalance createMany - */ -export type StockBalanceCreateManyArgs = { - /** - * The data used to create many StockBalances. - */ - data: Prisma.StockBalanceCreateManyInput | Prisma.StockBalanceCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * StockBalance update - */ -export type StockBalanceUpdateArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - /** - * The data needed to update a StockBalance. - */ - data: Prisma.XOR - /** - * Choose, which StockBalance to update. - */ - where: Prisma.StockBalanceWhereUniqueInput -} - -/** - * StockBalance updateMany - */ -export type StockBalanceUpdateManyArgs = { - /** - * The data used to update StockBalances. - */ - data: Prisma.XOR - /** - * Filter which StockBalances to update - */ - where?: Prisma.StockBalanceWhereInput - /** - * Limit how many StockBalances to update. - */ - limit?: number -} - -/** - * StockBalance upsert - */ -export type StockBalanceUpsertArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - /** - * The filter to search for the StockBalance to update in case it exists. - */ - where: Prisma.StockBalanceWhereUniqueInput - /** - * In case the StockBalance found by the `where` argument doesn't exist, create a new StockBalance with this data. - */ - create: Prisma.XOR - /** - * In case the StockBalance was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * StockBalance delete - */ -export type StockBalanceDeleteArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null - /** - * Filter which StockBalance to delete. - */ - where: Prisma.StockBalanceWhereUniqueInput -} - -/** - * StockBalance deleteMany - */ -export type StockBalanceDeleteManyArgs = { - /** - * Filter which StockBalances to delete - */ - where?: Prisma.StockBalanceWhereInput - /** - * Limit how many StockBalances to delete. - */ - limit?: number -} - -/** - * StockBalance without action - */ -export type StockBalanceDefaultArgs = { - /** - * Select specific fields to fetch from the StockBalance - */ - select?: Prisma.StockBalanceSelect | null - /** - * Omit specific fields from the StockBalance - */ - omit?: Prisma.StockBalanceOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockBalanceInclude | null -} diff --git a/src/generated/prisma/models/StockMovement.ts b/src/generated/prisma/models/StockMovement.ts deleted file mode 100644 index 1447d58..0000000 --- a/src/generated/prisma/models/StockMovement.ts +++ /dev/null @@ -1,2408 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `StockMovement` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model StockMovement - * - */ -export type StockMovementModel = runtime.Types.Result.DefaultSelection - -export type AggregateStockMovement = { - _count: StockMovementCountAggregateOutputType | null - _avg: StockMovementAvgAggregateOutputType | null - _sum: StockMovementSumAggregateOutputType | null - _min: StockMovementMinAggregateOutputType | null - _max: StockMovementMaxAggregateOutputType | null -} - -export type StockMovementAvgAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalCost: runtime.Decimal | null - productId: number | null - inventoryId: number | null - avgCost: runtime.Decimal | null - supplierId: number | null - remainedInStock: runtime.Decimal | null - counterInventoryId: number | null - customerId: number | null -} - -export type StockMovementSumAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalCost: runtime.Decimal | null - productId: number | null - inventoryId: number | null - avgCost: runtime.Decimal | null - supplierId: number | null - remainedInStock: runtime.Decimal | null - counterInventoryId: number | null - customerId: number | null -} - -export type StockMovementMinAggregateOutputType = { - id: number | null - type: $Enums.MovementType | null - quantity: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalCost: runtime.Decimal | null - referenceType: $Enums.MovementReferenceType | null - referenceId: string | null - createdAt: Date | null - productId: number | null - inventoryId: number | null - avgCost: runtime.Decimal | null - supplierId: number | null - remainedInStock: runtime.Decimal | null - counterInventoryId: number | null - customerId: number | null -} - -export type StockMovementMaxAggregateOutputType = { - id: number | null - type: $Enums.MovementType | null - quantity: runtime.Decimal | null - unitPrice: runtime.Decimal | null - totalCost: runtime.Decimal | null - referenceType: $Enums.MovementReferenceType | null - referenceId: string | null - createdAt: Date | null - productId: number | null - inventoryId: number | null - avgCost: runtime.Decimal | null - supplierId: number | null - remainedInStock: runtime.Decimal | null - counterInventoryId: number | null - customerId: number | null -} - -export type StockMovementCountAggregateOutputType = { - id: number - type: number - quantity: number - unitPrice: number - totalCost: number - referenceType: number - referenceId: number - createdAt: number - productId: number - inventoryId: number - avgCost: number - supplierId: number - remainedInStock: number - counterInventoryId: number - customerId: number - _all: number -} - - -export type StockMovementAvgAggregateInputType = { - id?: true - quantity?: true - unitPrice?: true - totalCost?: true - productId?: true - inventoryId?: true - avgCost?: true - supplierId?: true - remainedInStock?: true - counterInventoryId?: true - customerId?: true -} - -export type StockMovementSumAggregateInputType = { - id?: true - quantity?: true - unitPrice?: true - totalCost?: true - productId?: true - inventoryId?: true - avgCost?: true - supplierId?: true - remainedInStock?: true - counterInventoryId?: true - customerId?: true -} - -export type StockMovementMinAggregateInputType = { - id?: true - type?: true - quantity?: true - unitPrice?: true - totalCost?: true - referenceType?: true - referenceId?: true - createdAt?: true - productId?: true - inventoryId?: true - avgCost?: true - supplierId?: true - remainedInStock?: true - counterInventoryId?: true - customerId?: true -} - -export type StockMovementMaxAggregateInputType = { - id?: true - type?: true - quantity?: true - unitPrice?: true - totalCost?: true - referenceType?: true - referenceId?: true - createdAt?: true - productId?: true - inventoryId?: true - avgCost?: true - supplierId?: true - remainedInStock?: true - counterInventoryId?: true - customerId?: true -} - -export type StockMovementCountAggregateInputType = { - id?: true - type?: true - quantity?: true - unitPrice?: true - totalCost?: true - referenceType?: true - referenceId?: true - createdAt?: true - productId?: true - inventoryId?: true - avgCost?: true - supplierId?: true - remainedInStock?: true - counterInventoryId?: true - customerId?: true - _all?: true -} - -export type StockMovementAggregateArgs = { - /** - * Filter which StockMovement to aggregate. - */ - where?: Prisma.StockMovementWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockMovements to fetch. - */ - orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.StockMovementWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockMovements from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockMovements. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned StockMovements - **/ - _count?: true | StockMovementCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: StockMovementAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: StockMovementSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: StockMovementMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: StockMovementMaxAggregateInputType -} - -export type GetStockMovementAggregateType = { - [P in keyof T & keyof AggregateStockMovement]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type StockMovementGroupByArgs = { - where?: Prisma.StockMovementWhereInput - orderBy?: Prisma.StockMovementOrderByWithAggregationInput | Prisma.StockMovementOrderByWithAggregationInput[] - by: Prisma.StockMovementScalarFieldEnum[] | Prisma.StockMovementScalarFieldEnum - having?: Prisma.StockMovementScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: StockMovementCountAggregateInputType | true - _avg?: StockMovementAvgAggregateInputType - _sum?: StockMovementSumAggregateInputType - _min?: StockMovementMinAggregateInputType - _max?: StockMovementMaxAggregateInputType -} - -export type StockMovementGroupByOutputType = { - id: number - type: $Enums.MovementType - quantity: runtime.Decimal - unitPrice: runtime.Decimal - totalCost: runtime.Decimal - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt: Date - productId: number - inventoryId: number - avgCost: runtime.Decimal - supplierId: number | null - remainedInStock: runtime.Decimal - counterInventoryId: number | null - customerId: number | null - _count: StockMovementCountAggregateOutputType | null - _avg: StockMovementAvgAggregateOutputType | null - _sum: StockMovementSumAggregateOutputType | null - _min: StockMovementMinAggregateOutputType | null - _max: StockMovementMaxAggregateOutputType | null -} - -type GetStockMovementGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof StockMovementGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type StockMovementWhereInput = { - AND?: Prisma.StockMovementWhereInput | Prisma.StockMovementWhereInput[] - OR?: Prisma.StockMovementWhereInput[] - NOT?: Prisma.StockMovementWhereInput | Prisma.StockMovementWhereInput[] - id?: Prisma.IntFilter<"StockMovement"> | number - type?: Prisma.EnumMovementTypeFilter<"StockMovement"> | $Enums.MovementType - quantity?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFilter<"StockMovement"> | $Enums.MovementReferenceType - referenceId?: Prisma.StringFilter<"StockMovement"> | string - createdAt?: Prisma.DateTimeFilter<"StockMovement"> | Date | string - productId?: Prisma.IntFilter<"StockMovement"> | number - inventoryId?: Prisma.IntFilter<"StockMovement"> | number - avgCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - remainedInStock?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - customerId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - counterInventory?: Prisma.XOR | null - customer?: Prisma.XOR | null - inventory?: Prisma.XOR - product?: Prisma.XOR - supplier?: Prisma.XOR | null -} - -export type StockMovementOrderByWithRelationInput = { - id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - supplierId?: Prisma.SortOrderInput | Prisma.SortOrder - remainedInStock?: Prisma.SortOrder - counterInventoryId?: Prisma.SortOrderInput | Prisma.SortOrder - customerId?: Prisma.SortOrderInput | Prisma.SortOrder - counterInventory?: Prisma.InventoryOrderByWithRelationInput - customer?: Prisma.CustomerOrderByWithRelationInput - inventory?: Prisma.InventoryOrderByWithRelationInput - product?: Prisma.ProductOrderByWithRelationInput - supplier?: Prisma.SupplierOrderByWithRelationInput - _relevance?: Prisma.StockMovementOrderByRelevanceInput -} - -export type StockMovementWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.StockMovementWhereInput | Prisma.StockMovementWhereInput[] - OR?: Prisma.StockMovementWhereInput[] - NOT?: Prisma.StockMovementWhereInput | Prisma.StockMovementWhereInput[] - type?: Prisma.EnumMovementTypeFilter<"StockMovement"> | $Enums.MovementType - quantity?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFilter<"StockMovement"> | $Enums.MovementReferenceType - referenceId?: Prisma.StringFilter<"StockMovement"> | string - createdAt?: Prisma.DateTimeFilter<"StockMovement"> | Date | string - productId?: Prisma.IntFilter<"StockMovement"> | number - inventoryId?: Prisma.IntFilter<"StockMovement"> | number - avgCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - remainedInStock?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - customerId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - counterInventory?: Prisma.XOR | null - customer?: Prisma.XOR | null - inventory?: Prisma.XOR - product?: Prisma.XOR - supplier?: Prisma.XOR | null -}, "id"> - -export type StockMovementOrderByWithAggregationInput = { - id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - supplierId?: Prisma.SortOrderInput | Prisma.SortOrder - remainedInStock?: Prisma.SortOrder - counterInventoryId?: Prisma.SortOrderInput | Prisma.SortOrder - customerId?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.StockMovementCountOrderByAggregateInput - _avg?: Prisma.StockMovementAvgOrderByAggregateInput - _max?: Prisma.StockMovementMaxOrderByAggregateInput - _min?: Prisma.StockMovementMinOrderByAggregateInput - _sum?: Prisma.StockMovementSumOrderByAggregateInput -} - -export type StockMovementScalarWhereWithAggregatesInput = { - AND?: Prisma.StockMovementScalarWhereWithAggregatesInput | Prisma.StockMovementScalarWhereWithAggregatesInput[] - OR?: Prisma.StockMovementScalarWhereWithAggregatesInput[] - NOT?: Prisma.StockMovementScalarWhereWithAggregatesInput | Prisma.StockMovementScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"StockMovement"> | number - type?: Prisma.EnumMovementTypeWithAggregatesFilter<"StockMovement"> | $Enums.MovementType - quantity?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeWithAggregatesFilter<"StockMovement"> | $Enums.MovementReferenceType - referenceId?: Prisma.StringWithAggregatesFilter<"StockMovement"> | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"StockMovement"> | Date | string - productId?: Prisma.IntWithAggregatesFilter<"StockMovement"> | number - inventoryId?: Prisma.IntWithAggregatesFilter<"StockMovement"> | number - avgCost?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.IntNullableWithAggregatesFilter<"StockMovement"> | number | null - remainedInStock?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.IntNullableWithAggregatesFilter<"StockMovement"> | number | null - customerId?: Prisma.IntNullableWithAggregatesFilter<"StockMovement"> | number | null -} - -export type StockMovementCreateInput = { - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput - customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput - inventory: Prisma.InventoryCreateNestedOneWithoutStockMovementsInput - product: Prisma.ProductCreateNestedOneWithoutStockMovementsInput - supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput -} - -export type StockMovementUncheckedCreateInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null - customerId?: number | null -} - -export type StockMovementUpdateInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockMovementsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockMovementsNestedInput - supplier?: Prisma.SupplierUpdateOneWithoutStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementCreateManyInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null - customerId?: number | null -} - -export type StockMovementUpdateManyMutationInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string -} - -export type StockMovementUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementListRelationFilter = { - every?: Prisma.StockMovementWhereInput - some?: Prisma.StockMovementWhereInput - none?: Prisma.StockMovementWhereInput -} - -export type StockMovementOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type StockMovementOrderByRelevanceInput = { - fields: Prisma.StockMovementOrderByRelevanceFieldEnum | Prisma.StockMovementOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type StockMovementCountOrderByAggregateInput = { - id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder - counterInventoryId?: Prisma.SortOrder - customerId?: Prisma.SortOrder -} - -export type StockMovementAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder - counterInventoryId?: Prisma.SortOrder - customerId?: Prisma.SortOrder -} - -export type StockMovementMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder - counterInventoryId?: Prisma.SortOrder - customerId?: Prisma.SortOrder -} - -export type StockMovementMinOrderByAggregateInput = { - id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - referenceType?: Prisma.SortOrder - referenceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder - counterInventoryId?: Prisma.SortOrder - customerId?: Prisma.SortOrder -} - -export type StockMovementSumOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - unitPrice?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder - counterInventoryId?: Prisma.SortOrder - customerId?: Prisma.SortOrder -} - -export type StockMovementCreateNestedManyWithoutCounterInventoryInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCounterInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutCounterInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput | Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput[] - createMany?: Prisma.StockMovementCreateManyCounterInventoryInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutInventoryInput | Prisma.StockMovementCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.StockMovementCreateManyInventoryInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCounterInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutCounterInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput | Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput[] - createMany?: Prisma.StockMovementCreateManyCounterInventoryInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementUncheckedCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutInventoryInput | Prisma.StockMovementCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.StockMovementCreateManyInventoryInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementUpdateManyWithoutCounterInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCounterInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutCounterInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput | Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutCounterInventoryInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutCounterInventoryInput[] - createMany?: Prisma.StockMovementCreateManyCounterInventoryInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutCounterInventoryInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutCounterInventoryInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutCounterInventoryInput | Prisma.StockMovementUpdateManyWithWhereWithoutCounterInventoryInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type StockMovementUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutInventoryInput | Prisma.StockMovementCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.StockMovementCreateManyInventoryInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutInventoryInput | Prisma.StockMovementUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCounterInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutCounterInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput | Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutCounterInventoryInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutCounterInventoryInput[] - createMany?: Prisma.StockMovementCreateManyCounterInventoryInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutCounterInventoryInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutCounterInventoryInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutCounterInventoryInput | Prisma.StockMovementUpdateManyWithWhereWithoutCounterInventoryInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type StockMovementUncheckedUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutInventoryInput | Prisma.StockMovementCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.StockMovementCreateManyInventoryInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutInventoryInput | Prisma.StockMovementUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type StockMovementCreateNestedManyWithoutCustomerInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCustomerInput[] | Prisma.StockMovementUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCustomerInput | Prisma.StockMovementCreateOrConnectWithoutCustomerInput[] - createMany?: Prisma.StockMovementCreateManyCustomerInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementUncheckedCreateNestedManyWithoutCustomerInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCustomerInput[] | Prisma.StockMovementUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCustomerInput | Prisma.StockMovementCreateOrConnectWithoutCustomerInput[] - createMany?: Prisma.StockMovementCreateManyCustomerInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementUpdateManyWithoutCustomerNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCustomerInput[] | Prisma.StockMovementUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCustomerInput | Prisma.StockMovementCreateOrConnectWithoutCustomerInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutCustomerInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutCustomerInput[] - createMany?: Prisma.StockMovementCreateManyCustomerInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutCustomerInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutCustomerInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutCustomerInput | Prisma.StockMovementUpdateManyWithWhereWithoutCustomerInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type StockMovementUncheckedUpdateManyWithoutCustomerNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCustomerInput[] | Prisma.StockMovementUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCustomerInput | Prisma.StockMovementCreateOrConnectWithoutCustomerInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutCustomerInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutCustomerInput[] - createMany?: Prisma.StockMovementCreateManyCustomerInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutCustomerInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutCustomerInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutCustomerInput | Prisma.StockMovementUpdateManyWithWhereWithoutCustomerInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type StockMovementCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutProductInput[] | Prisma.StockMovementUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutProductInput | Prisma.StockMovementCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockMovementCreateManyProductInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutProductInput[] | Prisma.StockMovementUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutProductInput | Prisma.StockMovementCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockMovementCreateManyProductInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutProductInput[] | Prisma.StockMovementUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutProductInput | Prisma.StockMovementCreateOrConnectWithoutProductInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutProductInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.StockMovementCreateManyProductInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutProductInput | Prisma.StockMovementUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type StockMovementUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutProductInput[] | Prisma.StockMovementUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutProductInput | Prisma.StockMovementCreateOrConnectWithoutProductInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutProductInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.StockMovementCreateManyProductInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutProductInput | Prisma.StockMovementUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type EnumMovementTypeFieldUpdateOperationsInput = { - set?: $Enums.MovementType -} - -export type EnumMovementReferenceTypeFieldUpdateOperationsInput = { - set?: $Enums.MovementReferenceType -} - -export type StockMovementCreateNestedManyWithoutSupplierInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutSupplierInput[] | Prisma.StockMovementUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutSupplierInput | Prisma.StockMovementCreateOrConnectWithoutSupplierInput[] - createMany?: Prisma.StockMovementCreateManySupplierInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementUncheckedCreateNestedManyWithoutSupplierInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutSupplierInput[] | Prisma.StockMovementUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutSupplierInput | Prisma.StockMovementCreateOrConnectWithoutSupplierInput[] - createMany?: Prisma.StockMovementCreateManySupplierInputEnvelope - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] -} - -export type StockMovementUpdateManyWithoutSupplierNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutSupplierInput[] | Prisma.StockMovementUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutSupplierInput | Prisma.StockMovementCreateOrConnectWithoutSupplierInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutSupplierInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutSupplierInput[] - createMany?: Prisma.StockMovementCreateManySupplierInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutSupplierInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutSupplierInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutSupplierInput | Prisma.StockMovementUpdateManyWithWhereWithoutSupplierInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type StockMovementUncheckedUpdateManyWithoutSupplierNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutSupplierInput[] | Prisma.StockMovementUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutSupplierInput | Prisma.StockMovementCreateOrConnectWithoutSupplierInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutSupplierInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutSupplierInput[] - createMany?: Prisma.StockMovementCreateManySupplierInputEnvelope - set?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - disconnect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - delete?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - connect?: Prisma.StockMovementWhereUniqueInput | Prisma.StockMovementWhereUniqueInput[] - update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutSupplierInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutSupplierInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutSupplierInput | Prisma.StockMovementUpdateManyWithWhereWithoutSupplierInput[] - deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] -} - -export type StockMovementCreateWithoutCounterInventoryInput = { - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput - inventory: Prisma.InventoryCreateNestedOneWithoutStockMovementsInput - product: Prisma.ProductCreateNestedOneWithoutStockMovementsInput - supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput -} - -export type StockMovementUncheckedCreateWithoutCounterInventoryInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - customerId?: number | null -} - -export type StockMovementCreateOrConnectWithoutCounterInventoryInput = { - where: Prisma.StockMovementWhereUniqueInput - create: Prisma.XOR -} - -export type StockMovementCreateManyCounterInventoryInputEnvelope = { - data: Prisma.StockMovementCreateManyCounterInventoryInput | Prisma.StockMovementCreateManyCounterInventoryInput[] - skipDuplicates?: boolean -} - -export type StockMovementCreateWithoutInventoryInput = { - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput - customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput - product: Prisma.ProductCreateNestedOneWithoutStockMovementsInput - supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput -} - -export type StockMovementUncheckedCreateWithoutInventoryInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null - customerId?: number | null -} - -export type StockMovementCreateOrConnectWithoutInventoryInput = { - where: Prisma.StockMovementWhereUniqueInput - create: Prisma.XOR -} - -export type StockMovementCreateManyInventoryInputEnvelope = { - data: Prisma.StockMovementCreateManyInventoryInput | Prisma.StockMovementCreateManyInventoryInput[] - skipDuplicates?: boolean -} - -export type StockMovementUpsertWithWhereUniqueWithoutCounterInventoryInput = { - where: Prisma.StockMovementWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockMovementUpdateWithWhereUniqueWithoutCounterInventoryInput = { - where: Prisma.StockMovementWhereUniqueInput - data: Prisma.XOR -} - -export type StockMovementUpdateManyWithWhereWithoutCounterInventoryInput = { - where: Prisma.StockMovementScalarWhereInput - data: Prisma.XOR -} - -export type StockMovementScalarWhereInput = { - AND?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] - OR?: Prisma.StockMovementScalarWhereInput[] - NOT?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] - id?: Prisma.IntFilter<"StockMovement"> | number - type?: Prisma.EnumMovementTypeFilter<"StockMovement"> | $Enums.MovementType - quantity?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFilter<"StockMovement"> | $Enums.MovementReferenceType - referenceId?: Prisma.StringFilter<"StockMovement"> | string - createdAt?: Prisma.DateTimeFilter<"StockMovement"> | Date | string - productId?: Prisma.IntFilter<"StockMovement"> | number - inventoryId?: Prisma.IntFilter<"StockMovement"> | number - avgCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - remainedInStock?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - customerId?: Prisma.IntNullableFilter<"StockMovement"> | number | null -} - -export type StockMovementUpsertWithWhereUniqueWithoutInventoryInput = { - where: Prisma.StockMovementWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockMovementUpdateWithWhereUniqueWithoutInventoryInput = { - where: Prisma.StockMovementWhereUniqueInput - data: Prisma.XOR -} - -export type StockMovementUpdateManyWithWhereWithoutInventoryInput = { - where: Prisma.StockMovementScalarWhereInput - data: Prisma.XOR -} - -export type StockMovementCreateWithoutCustomerInput = { - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput - inventory: Prisma.InventoryCreateNestedOneWithoutStockMovementsInput - product: Prisma.ProductCreateNestedOneWithoutStockMovementsInput - supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput -} - -export type StockMovementUncheckedCreateWithoutCustomerInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null -} - -export type StockMovementCreateOrConnectWithoutCustomerInput = { - where: Prisma.StockMovementWhereUniqueInput - create: Prisma.XOR -} - -export type StockMovementCreateManyCustomerInputEnvelope = { - data: Prisma.StockMovementCreateManyCustomerInput | Prisma.StockMovementCreateManyCustomerInput[] - skipDuplicates?: boolean -} - -export type StockMovementUpsertWithWhereUniqueWithoutCustomerInput = { - where: Prisma.StockMovementWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockMovementUpdateWithWhereUniqueWithoutCustomerInput = { - where: Prisma.StockMovementWhereUniqueInput - data: Prisma.XOR -} - -export type StockMovementUpdateManyWithWhereWithoutCustomerInput = { - where: Prisma.StockMovementScalarWhereInput - data: Prisma.XOR -} - -export type StockMovementCreateWithoutProductInput = { - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput - customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput - inventory: Prisma.InventoryCreateNestedOneWithoutStockMovementsInput - supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput -} - -export type StockMovementUncheckedCreateWithoutProductInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null - customerId?: number | null -} - -export type StockMovementCreateOrConnectWithoutProductInput = { - where: Prisma.StockMovementWhereUniqueInput - create: Prisma.XOR -} - -export type StockMovementCreateManyProductInputEnvelope = { - data: Prisma.StockMovementCreateManyProductInput | Prisma.StockMovementCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type StockMovementUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.StockMovementWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockMovementUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.StockMovementWhereUniqueInput - data: Prisma.XOR -} - -export type StockMovementUpdateManyWithWhereWithoutProductInput = { - where: Prisma.StockMovementScalarWhereInput - data: Prisma.XOR -} - -export type StockMovementCreateWithoutSupplierInput = { - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput - customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput - inventory: Prisma.InventoryCreateNestedOneWithoutStockMovementsInput - product: Prisma.ProductCreateNestedOneWithoutStockMovementsInput -} - -export type StockMovementUncheckedCreateWithoutSupplierInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null - customerId?: number | null -} - -export type StockMovementCreateOrConnectWithoutSupplierInput = { - where: Prisma.StockMovementWhereUniqueInput - create: Prisma.XOR -} - -export type StockMovementCreateManySupplierInputEnvelope = { - data: Prisma.StockMovementCreateManySupplierInput | Prisma.StockMovementCreateManySupplierInput[] - skipDuplicates?: boolean -} - -export type StockMovementUpsertWithWhereUniqueWithoutSupplierInput = { - where: Prisma.StockMovementWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockMovementUpdateWithWhereUniqueWithoutSupplierInput = { - where: Prisma.StockMovementWhereUniqueInput - data: Prisma.XOR -} - -export type StockMovementUpdateManyWithWhereWithoutSupplierInput = { - where: Prisma.StockMovementScalarWhereInput - data: Prisma.XOR -} - -export type StockMovementCreateManyCounterInventoryInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - customerId?: number | null -} - -export type StockMovementCreateManyInventoryInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null - customerId?: number | null -} - -export type StockMovementUpdateWithoutCounterInventoryInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockMovementsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockMovementsNestedInput - supplier?: Prisma.SupplierUpdateOneWithoutStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateWithoutCounterInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementUncheckedUpdateManyWithoutCounterInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementUpdateWithoutInventoryInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockMovementsNestedInput - supplier?: Prisma.SupplierUpdateOneWithoutStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementUncheckedUpdateManyWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementCreateManyCustomerInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null -} - -export type StockMovementUpdateWithoutCustomerInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockMovementsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockMovementsNestedInput - supplier?: Prisma.SupplierUpdateOneWithoutStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateWithoutCustomerInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementUncheckedUpdateManyWithoutCustomerInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementCreateManyProductInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null - customerId?: number | null -} - -export type StockMovementUpdateWithoutProductInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockMovementsNestedInput - supplier?: Prisma.SupplierUpdateOneWithoutStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementCreateManySupplierInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt?: Date | string - productId: number - inventoryId: number - avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: number | null - customerId?: number | null -} - -export type StockMovementUpdateWithoutSupplierInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockMovementsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateWithoutSupplierInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementUncheckedUpdateManyWithoutSupplierInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType - referenceId?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - - - -export type StockMovementSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - type?: boolean - quantity?: boolean - unitPrice?: boolean - totalCost?: boolean - referenceType?: boolean - referenceId?: boolean - createdAt?: boolean - productId?: boolean - inventoryId?: boolean - avgCost?: boolean - supplierId?: boolean - remainedInStock?: boolean - counterInventoryId?: boolean - customerId?: boolean - counterInventory?: boolean | Prisma.StockMovement$counterInventoryArgs - customer?: boolean | Prisma.StockMovement$customerArgs - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs - supplier?: boolean | Prisma.StockMovement$supplierArgs -}, ExtArgs["result"]["stockMovement"]> - - - -export type StockMovementSelectScalar = { - id?: boolean - type?: boolean - quantity?: boolean - unitPrice?: boolean - totalCost?: boolean - referenceType?: boolean - referenceId?: boolean - createdAt?: boolean - productId?: boolean - inventoryId?: boolean - avgCost?: boolean - supplierId?: boolean - remainedInStock?: boolean - counterInventoryId?: boolean - customerId?: boolean -} - -export type StockMovementOmit = runtime.Types.Extensions.GetOmit<"id" | "type" | "quantity" | "unitPrice" | "totalCost" | "referenceType" | "referenceId" | "createdAt" | "productId" | "inventoryId" | "avgCost" | "supplierId" | "remainedInStock" | "counterInventoryId" | "customerId", ExtArgs["result"]["stockMovement"]> -export type StockMovementInclude = { - counterInventory?: boolean | Prisma.StockMovement$counterInventoryArgs - customer?: boolean | Prisma.StockMovement$customerArgs - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs - supplier?: boolean | Prisma.StockMovement$supplierArgs -} - -export type $StockMovementPayload = { - name: "StockMovement" - objects: { - counterInventory: Prisma.$InventoryPayload | null - customer: Prisma.$CustomerPayload | null - inventory: Prisma.$InventoryPayload - product: Prisma.$ProductPayload - supplier: Prisma.$SupplierPayload | null - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - type: $Enums.MovementType - quantity: runtime.Decimal - unitPrice: runtime.Decimal - totalCost: runtime.Decimal - referenceType: $Enums.MovementReferenceType - referenceId: string - createdAt: Date - productId: number - inventoryId: number - avgCost: runtime.Decimal - supplierId: number | null - remainedInStock: runtime.Decimal - counterInventoryId: number | null - customerId: number | null - }, ExtArgs["result"]["stockMovement"]> - composites: {} -} - -export type StockMovementGetPayload = runtime.Types.Result.GetResult - -export type StockMovementCountArgs = - Omit & { - select?: StockMovementCountAggregateInputType | true - } - -export interface StockMovementDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['StockMovement'], meta: { name: 'StockMovement' } } - /** - * Find zero or one StockMovement that matches the filter. - * @param {StockMovementFindUniqueArgs} args - Arguments to find a StockMovement - * @example - * // Get one StockMovement - * const stockMovement = await prisma.stockMovement.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__StockMovementClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one StockMovement that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {StockMovementFindUniqueOrThrowArgs} args - Arguments to find a StockMovement - * @example - * // Get one StockMovement - * const stockMovement = await prisma.stockMovement.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__StockMovementClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first StockMovement that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockMovementFindFirstArgs} args - Arguments to find a StockMovement - * @example - * // Get one StockMovement - * const stockMovement = await prisma.stockMovement.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__StockMovementClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first StockMovement that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockMovementFindFirstOrThrowArgs} args - Arguments to find a StockMovement - * @example - * // Get one StockMovement - * const stockMovement = await prisma.stockMovement.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__StockMovementClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more StockMovements that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockMovementFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all StockMovements - * const stockMovements = await prisma.stockMovement.findMany() - * - * // Get first 10 StockMovements - * const stockMovements = await prisma.stockMovement.findMany({ take: 10 }) - * - * // Only select the `id` - * const stockMovementWithIdOnly = await prisma.stockMovement.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a StockMovement. - * @param {StockMovementCreateArgs} args - Arguments to create a StockMovement. - * @example - * // Create one StockMovement - * const StockMovement = await prisma.stockMovement.create({ - * data: { - * // ... data to create a StockMovement - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__StockMovementClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many StockMovements. - * @param {StockMovementCreateManyArgs} args - Arguments to create many StockMovements. - * @example - * // Create many StockMovements - * const stockMovement = await prisma.stockMovement.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a StockMovement. - * @param {StockMovementDeleteArgs} args - Arguments to delete one StockMovement. - * @example - * // Delete one StockMovement - * const StockMovement = await prisma.stockMovement.delete({ - * where: { - * // ... filter to delete one StockMovement - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__StockMovementClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one StockMovement. - * @param {StockMovementUpdateArgs} args - Arguments to update one StockMovement. - * @example - * // Update one StockMovement - * const stockMovement = await prisma.stockMovement.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__StockMovementClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more StockMovements. - * @param {StockMovementDeleteManyArgs} args - Arguments to filter StockMovements to delete. - * @example - * // Delete a few StockMovements - * const { count } = await prisma.stockMovement.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more StockMovements. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockMovementUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many StockMovements - * const stockMovement = await prisma.stockMovement.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one StockMovement. - * @param {StockMovementUpsertArgs} args - Arguments to update or create a StockMovement. - * @example - * // Update or create a StockMovement - * const stockMovement = await prisma.stockMovement.upsert({ - * create: { - * // ... data to create a StockMovement - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the StockMovement we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__StockMovementClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of StockMovements. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockMovementCountArgs} args - Arguments to filter StockMovements to count. - * @example - * // Count the number of StockMovements - * const count = await prisma.stockMovement.count({ - * where: { - * // ... the filter for the StockMovements we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a StockMovement. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockMovementAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by StockMovement. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockMovementGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends StockMovementGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: StockMovementGroupByArgs['orderBy'] } - : { orderBy?: StockMovementGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetStockMovementGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the StockMovement model - */ -readonly fields: StockMovementFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for StockMovement. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__StockMovementClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - counterInventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - customer = {}>(args?: Prisma.Subset>): Prisma.Prisma__CustomerClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - inventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - supplier = {}>(args?: Prisma.Subset>): Prisma.Prisma__SupplierClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the StockMovement model - */ -export interface StockMovementFieldRefs { - readonly id: Prisma.FieldRef<"StockMovement", 'Int'> - readonly type: Prisma.FieldRef<"StockMovement", 'MovementType'> - readonly quantity: Prisma.FieldRef<"StockMovement", 'Decimal'> - readonly unitPrice: Prisma.FieldRef<"StockMovement", 'Decimal'> - readonly totalCost: Prisma.FieldRef<"StockMovement", 'Decimal'> - readonly referenceType: Prisma.FieldRef<"StockMovement", 'MovementReferenceType'> - readonly referenceId: Prisma.FieldRef<"StockMovement", 'String'> - readonly createdAt: Prisma.FieldRef<"StockMovement", 'DateTime'> - readonly productId: Prisma.FieldRef<"StockMovement", 'Int'> - readonly inventoryId: Prisma.FieldRef<"StockMovement", 'Int'> - readonly avgCost: Prisma.FieldRef<"StockMovement", 'Decimal'> - readonly supplierId: Prisma.FieldRef<"StockMovement", 'Int'> - readonly remainedInStock: Prisma.FieldRef<"StockMovement", 'Decimal'> - readonly counterInventoryId: Prisma.FieldRef<"StockMovement", 'Int'> - readonly customerId: Prisma.FieldRef<"StockMovement", 'Int'> -} - - -// Custom InputTypes -/** - * StockMovement findUnique - */ -export type StockMovementFindUniqueArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - /** - * Filter, which StockMovement to fetch. - */ - where: Prisma.StockMovementWhereUniqueInput -} - -/** - * StockMovement findUniqueOrThrow - */ -export type StockMovementFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - /** - * Filter, which StockMovement to fetch. - */ - where: Prisma.StockMovementWhereUniqueInput -} - -/** - * StockMovement findFirst - */ -export type StockMovementFindFirstArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - /** - * Filter, which StockMovement to fetch. - */ - where?: Prisma.StockMovementWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockMovements to fetch. - */ - orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for StockMovements. - */ - cursor?: Prisma.StockMovementWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockMovements from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockMovements. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockMovements. - */ - distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] -} - -/** - * StockMovement findFirstOrThrow - */ -export type StockMovementFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - /** - * Filter, which StockMovement to fetch. - */ - where?: Prisma.StockMovementWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockMovements to fetch. - */ - orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for StockMovements. - */ - cursor?: Prisma.StockMovementWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockMovements from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockMovements. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockMovements. - */ - distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] -} - -/** - * StockMovement findMany - */ -export type StockMovementFindManyArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - /** - * Filter, which StockMovements to fetch. - */ - where?: Prisma.StockMovementWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockMovements to fetch. - */ - orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing StockMovements. - */ - cursor?: Prisma.StockMovementWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockMovements from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockMovements. - */ - skip?: number - distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] -} - -/** - * StockMovement create - */ -export type StockMovementCreateArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - /** - * The data needed to create a StockMovement. - */ - data: Prisma.XOR -} - -/** - * StockMovement createMany - */ -export type StockMovementCreateManyArgs = { - /** - * The data used to create many StockMovements. - */ - data: Prisma.StockMovementCreateManyInput | Prisma.StockMovementCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * StockMovement update - */ -export type StockMovementUpdateArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - /** - * The data needed to update a StockMovement. - */ - data: Prisma.XOR - /** - * Choose, which StockMovement to update. - */ - where: Prisma.StockMovementWhereUniqueInput -} - -/** - * StockMovement updateMany - */ -export type StockMovementUpdateManyArgs = { - /** - * The data used to update StockMovements. - */ - data: Prisma.XOR - /** - * Filter which StockMovements to update - */ - where?: Prisma.StockMovementWhereInput - /** - * Limit how many StockMovements to update. - */ - limit?: number -} - -/** - * StockMovement upsert - */ -export type StockMovementUpsertArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - /** - * The filter to search for the StockMovement to update in case it exists. - */ - where: Prisma.StockMovementWhereUniqueInput - /** - * In case the StockMovement found by the `where` argument doesn't exist, create a new StockMovement with this data. - */ - create: Prisma.XOR - /** - * In case the StockMovement was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * StockMovement delete - */ -export type StockMovementDeleteArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - /** - * Filter which StockMovement to delete. - */ - where: Prisma.StockMovementWhereUniqueInput -} - -/** - * StockMovement deleteMany - */ -export type StockMovementDeleteManyArgs = { - /** - * Filter which StockMovements to delete - */ - where?: Prisma.StockMovementWhereInput - /** - * Limit how many StockMovements to delete. - */ - limit?: number -} - -/** - * StockMovement.counterInventory - */ -export type StockMovement$counterInventoryArgs = { - /** - * Select specific fields to fetch from the Inventory - */ - select?: Prisma.InventorySelect | null - /** - * Omit specific fields from the Inventory - */ - omit?: Prisma.InventoryOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.InventoryInclude | null - where?: Prisma.InventoryWhereInput -} - -/** - * StockMovement.customer - */ -export type StockMovement$customerArgs = { - /** - * Select specific fields to fetch from the Customer - */ - select?: Prisma.CustomerSelect | null - /** - * Omit specific fields from the Customer - */ - omit?: Prisma.CustomerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.CustomerInclude | null - where?: Prisma.CustomerWhereInput -} - -/** - * StockMovement.supplier - */ -export type StockMovement$supplierArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - where?: Prisma.SupplierWhereInput -} - -/** - * StockMovement without action - */ -export type StockMovementDefaultArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null -} diff --git a/src/generated/prisma/models/StockReservation.ts b/src/generated/prisma/models/StockReservation.ts deleted file mode 100644 index dc3c841..0000000 --- a/src/generated/prisma/models/StockReservation.ts +++ /dev/null @@ -1,1547 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `StockReservation` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model StockReservation - * - */ -export type StockReservationModel = runtime.Types.Result.DefaultSelection - -export type AggregateStockReservation = { - _count: StockReservationCountAggregateOutputType | null - _avg: StockReservationAvgAggregateOutputType | null - _sum: StockReservationSumAggregateOutputType | null - _min: StockReservationMinAggregateOutputType | null - _max: StockReservationMaxAggregateOutputType | null -} - -export type StockReservationAvgAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - productId: number | null - inventoryId: number | null - orderId: number | null -} - -export type StockReservationSumAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - productId: number | null - inventoryId: number | null - orderId: number | null -} - -export type StockReservationMinAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - createdAt: Date | null - productId: number | null - inventoryId: number | null - orderId: number | null -} - -export type StockReservationMaxAggregateOutputType = { - id: number | null - quantity: runtime.Decimal | null - createdAt: Date | null - productId: number | null - inventoryId: number | null - orderId: number | null -} - -export type StockReservationCountAggregateOutputType = { - id: number - quantity: number - createdAt: number - productId: number - inventoryId: number - orderId: number - _all: number -} - - -export type StockReservationAvgAggregateInputType = { - id?: true - quantity?: true - productId?: true - inventoryId?: true - orderId?: true -} - -export type StockReservationSumAggregateInputType = { - id?: true - quantity?: true - productId?: true - inventoryId?: true - orderId?: true -} - -export type StockReservationMinAggregateInputType = { - id?: true - quantity?: true - createdAt?: true - productId?: true - inventoryId?: true - orderId?: true -} - -export type StockReservationMaxAggregateInputType = { - id?: true - quantity?: true - createdAt?: true - productId?: true - inventoryId?: true - orderId?: true -} - -export type StockReservationCountAggregateInputType = { - id?: true - quantity?: true - createdAt?: true - productId?: true - inventoryId?: true - orderId?: true - _all?: true -} - -export type StockReservationAggregateArgs = { - /** - * Filter which StockReservation to aggregate. - */ - where?: Prisma.StockReservationWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockReservations to fetch. - */ - orderBy?: Prisma.StockReservationOrderByWithRelationInput | Prisma.StockReservationOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.StockReservationWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockReservations from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockReservations. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned StockReservations - **/ - _count?: true | StockReservationCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: StockReservationAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: StockReservationSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: StockReservationMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: StockReservationMaxAggregateInputType -} - -export type GetStockReservationAggregateType = { - [P in keyof T & keyof AggregateStockReservation]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type StockReservationGroupByArgs = { - where?: Prisma.StockReservationWhereInput - orderBy?: Prisma.StockReservationOrderByWithAggregationInput | Prisma.StockReservationOrderByWithAggregationInput[] - by: Prisma.StockReservationScalarFieldEnum[] | Prisma.StockReservationScalarFieldEnum - having?: Prisma.StockReservationScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: StockReservationCountAggregateInputType | true - _avg?: StockReservationAvgAggregateInputType - _sum?: StockReservationSumAggregateInputType - _min?: StockReservationMinAggregateInputType - _max?: StockReservationMaxAggregateInputType -} - -export type StockReservationGroupByOutputType = { - id: number - quantity: runtime.Decimal - createdAt: Date - productId: number - inventoryId: number - orderId: number - _count: StockReservationCountAggregateOutputType | null - _avg: StockReservationAvgAggregateOutputType | null - _sum: StockReservationSumAggregateOutputType | null - _min: StockReservationMinAggregateOutputType | null - _max: StockReservationMaxAggregateOutputType | null -} - -type GetStockReservationGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof StockReservationGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type StockReservationWhereInput = { - AND?: Prisma.StockReservationWhereInput | Prisma.StockReservationWhereInput[] - OR?: Prisma.StockReservationWhereInput[] - NOT?: Prisma.StockReservationWhereInput | Prisma.StockReservationWhereInput[] - id?: Prisma.IntFilter<"StockReservation"> | number - quantity?: Prisma.DecimalFilter<"StockReservation"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"StockReservation"> | Date | string - productId?: Prisma.IntFilter<"StockReservation"> | number - inventoryId?: Prisma.IntFilter<"StockReservation"> | number - orderId?: Prisma.IntFilter<"StockReservation"> | number - inventory?: Prisma.XOR - product?: Prisma.XOR - order?: Prisma.XOR -} - -export type StockReservationOrderByWithRelationInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - orderId?: Prisma.SortOrder - inventory?: Prisma.InventoryOrderByWithRelationInput - product?: Prisma.ProductOrderByWithRelationInput - order?: Prisma.OrderOrderByWithRelationInput -} - -export type StockReservationWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.StockReservationWhereInput | Prisma.StockReservationWhereInput[] - OR?: Prisma.StockReservationWhereInput[] - NOT?: Prisma.StockReservationWhereInput | Prisma.StockReservationWhereInput[] - quantity?: Prisma.DecimalFilter<"StockReservation"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"StockReservation"> | Date | string - productId?: Prisma.IntFilter<"StockReservation"> | number - inventoryId?: Prisma.IntFilter<"StockReservation"> | number - orderId?: Prisma.IntFilter<"StockReservation"> | number - inventory?: Prisma.XOR - product?: Prisma.XOR - order?: Prisma.XOR -}, "id"> - -export type StockReservationOrderByWithAggregationInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - orderId?: Prisma.SortOrder - _count?: Prisma.StockReservationCountOrderByAggregateInput - _avg?: Prisma.StockReservationAvgOrderByAggregateInput - _max?: Prisma.StockReservationMaxOrderByAggregateInput - _min?: Prisma.StockReservationMinOrderByAggregateInput - _sum?: Prisma.StockReservationSumOrderByAggregateInput -} - -export type StockReservationScalarWhereWithAggregatesInput = { - AND?: Prisma.StockReservationScalarWhereWithAggregatesInput | Prisma.StockReservationScalarWhereWithAggregatesInput[] - OR?: Prisma.StockReservationScalarWhereWithAggregatesInput[] - NOT?: Prisma.StockReservationScalarWhereWithAggregatesInput | Prisma.StockReservationScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"StockReservation"> | number - quantity?: Prisma.DecimalWithAggregatesFilter<"StockReservation"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"StockReservation"> | Date | string - productId?: Prisma.IntWithAggregatesFilter<"StockReservation"> | number - inventoryId?: Prisma.IntWithAggregatesFilter<"StockReservation"> | number - orderId?: Prisma.IntWithAggregatesFilter<"StockReservation"> | number -} - -export type StockReservationCreateInput = { - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockReservationsInput - product: Prisma.ProductCreateNestedOneWithoutStockReservationsInput - order: Prisma.OrderCreateNestedOneWithoutStockReservationsInput -} - -export type StockReservationUncheckedCreateInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number - inventoryId: number - orderId: number -} - -export type StockReservationUpdateInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockReservationsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockReservationsNestedInput - order?: Prisma.OrderUpdateOneRequiredWithoutStockReservationsNestedInput -} - -export type StockReservationUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - orderId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockReservationCreateManyInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number - inventoryId: number - orderId: number -} - -export type StockReservationUpdateManyMutationInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type StockReservationUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - orderId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockReservationListRelationFilter = { - every?: Prisma.StockReservationWhereInput - some?: Prisma.StockReservationWhereInput - none?: Prisma.StockReservationWhereInput -} - -export type StockReservationOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type StockReservationCountOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - orderId?: Prisma.SortOrder -} - -export type StockReservationAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - orderId?: Prisma.SortOrder -} - -export type StockReservationMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - orderId?: Prisma.SortOrder -} - -export type StockReservationMinOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - orderId?: Prisma.SortOrder -} - -export type StockReservationSumOrderByAggregateInput = { - id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - orderId?: Prisma.SortOrder -} - -export type StockReservationCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutInventoryInput[] | Prisma.StockReservationUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutInventoryInput | Prisma.StockReservationCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.StockReservationCreateManyInventoryInputEnvelope - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] -} - -export type StockReservationUncheckedCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutInventoryInput[] | Prisma.StockReservationUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutInventoryInput | Prisma.StockReservationCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.StockReservationCreateManyInventoryInputEnvelope - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] -} - -export type StockReservationUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutInventoryInput[] | Prisma.StockReservationUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutInventoryInput | Prisma.StockReservationCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.StockReservationUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockReservationUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.StockReservationCreateManyInventoryInputEnvelope - set?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - disconnect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - delete?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - update?: Prisma.StockReservationUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockReservationUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.StockReservationUpdateManyWithWhereWithoutInventoryInput | Prisma.StockReservationUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.StockReservationScalarWhereInput | Prisma.StockReservationScalarWhereInput[] -} - -export type StockReservationUncheckedUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutInventoryInput[] | Prisma.StockReservationUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutInventoryInput | Prisma.StockReservationCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.StockReservationUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockReservationUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.StockReservationCreateManyInventoryInputEnvelope - set?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - disconnect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - delete?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - update?: Prisma.StockReservationUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockReservationUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.StockReservationUpdateManyWithWhereWithoutInventoryInput | Prisma.StockReservationUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.StockReservationScalarWhereInput | Prisma.StockReservationScalarWhereInput[] -} - -export type StockReservationCreateNestedManyWithoutOrderInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutOrderInput[] | Prisma.StockReservationUncheckedCreateWithoutOrderInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutOrderInput | Prisma.StockReservationCreateOrConnectWithoutOrderInput[] - createMany?: Prisma.StockReservationCreateManyOrderInputEnvelope - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] -} - -export type StockReservationUncheckedCreateNestedManyWithoutOrderInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutOrderInput[] | Prisma.StockReservationUncheckedCreateWithoutOrderInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutOrderInput | Prisma.StockReservationCreateOrConnectWithoutOrderInput[] - createMany?: Prisma.StockReservationCreateManyOrderInputEnvelope - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] -} - -export type StockReservationUpdateManyWithoutOrderNestedInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutOrderInput[] | Prisma.StockReservationUncheckedCreateWithoutOrderInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutOrderInput | Prisma.StockReservationCreateOrConnectWithoutOrderInput[] - upsert?: Prisma.StockReservationUpsertWithWhereUniqueWithoutOrderInput | Prisma.StockReservationUpsertWithWhereUniqueWithoutOrderInput[] - createMany?: Prisma.StockReservationCreateManyOrderInputEnvelope - set?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - disconnect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - delete?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - update?: Prisma.StockReservationUpdateWithWhereUniqueWithoutOrderInput | Prisma.StockReservationUpdateWithWhereUniqueWithoutOrderInput[] - updateMany?: Prisma.StockReservationUpdateManyWithWhereWithoutOrderInput | Prisma.StockReservationUpdateManyWithWhereWithoutOrderInput[] - deleteMany?: Prisma.StockReservationScalarWhereInput | Prisma.StockReservationScalarWhereInput[] -} - -export type StockReservationUncheckedUpdateManyWithoutOrderNestedInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutOrderInput[] | Prisma.StockReservationUncheckedCreateWithoutOrderInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutOrderInput | Prisma.StockReservationCreateOrConnectWithoutOrderInput[] - upsert?: Prisma.StockReservationUpsertWithWhereUniqueWithoutOrderInput | Prisma.StockReservationUpsertWithWhereUniqueWithoutOrderInput[] - createMany?: Prisma.StockReservationCreateManyOrderInputEnvelope - set?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - disconnect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - delete?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - update?: Prisma.StockReservationUpdateWithWhereUniqueWithoutOrderInput | Prisma.StockReservationUpdateWithWhereUniqueWithoutOrderInput[] - updateMany?: Prisma.StockReservationUpdateManyWithWhereWithoutOrderInput | Prisma.StockReservationUpdateManyWithWhereWithoutOrderInput[] - deleteMany?: Prisma.StockReservationScalarWhereInput | Prisma.StockReservationScalarWhereInput[] -} - -export type StockReservationCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutProductInput[] | Prisma.StockReservationUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutProductInput | Prisma.StockReservationCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockReservationCreateManyProductInputEnvelope - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] -} - -export type StockReservationUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutProductInput[] | Prisma.StockReservationUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutProductInput | Prisma.StockReservationCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockReservationCreateManyProductInputEnvelope - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] -} - -export type StockReservationUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutProductInput[] | Prisma.StockReservationUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutProductInput | Prisma.StockReservationCreateOrConnectWithoutProductInput[] - upsert?: Prisma.StockReservationUpsertWithWhereUniqueWithoutProductInput | Prisma.StockReservationUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.StockReservationCreateManyProductInputEnvelope - set?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - disconnect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - delete?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - update?: Prisma.StockReservationUpdateWithWhereUniqueWithoutProductInput | Prisma.StockReservationUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockReservationUpdateManyWithWhereWithoutProductInput | Prisma.StockReservationUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.StockReservationScalarWhereInput | Prisma.StockReservationScalarWhereInput[] -} - -export type StockReservationUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.StockReservationCreateWithoutProductInput[] | Prisma.StockReservationUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockReservationCreateOrConnectWithoutProductInput | Prisma.StockReservationCreateOrConnectWithoutProductInput[] - upsert?: Prisma.StockReservationUpsertWithWhereUniqueWithoutProductInput | Prisma.StockReservationUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.StockReservationCreateManyProductInputEnvelope - set?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - disconnect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - delete?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - connect?: Prisma.StockReservationWhereUniqueInput | Prisma.StockReservationWhereUniqueInput[] - update?: Prisma.StockReservationUpdateWithWhereUniqueWithoutProductInput | Prisma.StockReservationUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockReservationUpdateManyWithWhereWithoutProductInput | Prisma.StockReservationUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.StockReservationScalarWhereInput | Prisma.StockReservationScalarWhereInput[] -} - -export type StockReservationCreateWithoutInventoryInput = { - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - product: Prisma.ProductCreateNestedOneWithoutStockReservationsInput - order: Prisma.OrderCreateNestedOneWithoutStockReservationsInput -} - -export type StockReservationUncheckedCreateWithoutInventoryInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number - orderId: number -} - -export type StockReservationCreateOrConnectWithoutInventoryInput = { - where: Prisma.StockReservationWhereUniqueInput - create: Prisma.XOR -} - -export type StockReservationCreateManyInventoryInputEnvelope = { - data: Prisma.StockReservationCreateManyInventoryInput | Prisma.StockReservationCreateManyInventoryInput[] - skipDuplicates?: boolean -} - -export type StockReservationUpsertWithWhereUniqueWithoutInventoryInput = { - where: Prisma.StockReservationWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockReservationUpdateWithWhereUniqueWithoutInventoryInput = { - where: Prisma.StockReservationWhereUniqueInput - data: Prisma.XOR -} - -export type StockReservationUpdateManyWithWhereWithoutInventoryInput = { - where: Prisma.StockReservationScalarWhereInput - data: Prisma.XOR -} - -export type StockReservationScalarWhereInput = { - AND?: Prisma.StockReservationScalarWhereInput | Prisma.StockReservationScalarWhereInput[] - OR?: Prisma.StockReservationScalarWhereInput[] - NOT?: Prisma.StockReservationScalarWhereInput | Prisma.StockReservationScalarWhereInput[] - id?: Prisma.IntFilter<"StockReservation"> | number - quantity?: Prisma.DecimalFilter<"StockReservation"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"StockReservation"> | Date | string - productId?: Prisma.IntFilter<"StockReservation"> | number - inventoryId?: Prisma.IntFilter<"StockReservation"> | number - orderId?: Prisma.IntFilter<"StockReservation"> | number -} - -export type StockReservationCreateWithoutOrderInput = { - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockReservationsInput - product: Prisma.ProductCreateNestedOneWithoutStockReservationsInput -} - -export type StockReservationUncheckedCreateWithoutOrderInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number - inventoryId: number -} - -export type StockReservationCreateOrConnectWithoutOrderInput = { - where: Prisma.StockReservationWhereUniqueInput - create: Prisma.XOR -} - -export type StockReservationCreateManyOrderInputEnvelope = { - data: Prisma.StockReservationCreateManyOrderInput | Prisma.StockReservationCreateManyOrderInput[] - skipDuplicates?: boolean -} - -export type StockReservationUpsertWithWhereUniqueWithoutOrderInput = { - where: Prisma.StockReservationWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockReservationUpdateWithWhereUniqueWithoutOrderInput = { - where: Prisma.StockReservationWhereUniqueInput - data: Prisma.XOR -} - -export type StockReservationUpdateManyWithWhereWithoutOrderInput = { - where: Prisma.StockReservationScalarWhereInput - data: Prisma.XOR -} - -export type StockReservationCreateWithoutProductInput = { - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockReservationsInput - order: Prisma.OrderCreateNestedOneWithoutStockReservationsInput -} - -export type StockReservationUncheckedCreateWithoutProductInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventoryId: number - orderId: number -} - -export type StockReservationCreateOrConnectWithoutProductInput = { - where: Prisma.StockReservationWhereUniqueInput - create: Prisma.XOR -} - -export type StockReservationCreateManyProductInputEnvelope = { - data: Prisma.StockReservationCreateManyProductInput | Prisma.StockReservationCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type StockReservationUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.StockReservationWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type StockReservationUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.StockReservationWhereUniqueInput - data: Prisma.XOR -} - -export type StockReservationUpdateManyWithWhereWithoutProductInput = { - where: Prisma.StockReservationScalarWhereInput - data: Prisma.XOR -} - -export type StockReservationCreateManyInventoryInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number - orderId: number -} - -export type StockReservationUpdateWithoutInventoryInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - product?: Prisma.ProductUpdateOneRequiredWithoutStockReservationsNestedInput - order?: Prisma.OrderUpdateOneRequiredWithoutStockReservationsNestedInput -} - -export type StockReservationUncheckedUpdateWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - orderId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockReservationUncheckedUpdateManyWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - orderId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockReservationCreateManyOrderInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - productId: number - inventoryId: number -} - -export type StockReservationUpdateWithoutOrderInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockReservationsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockReservationsNestedInput -} - -export type StockReservationUncheckedUpdateWithoutOrderInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockReservationUncheckedUpdateManyWithoutOrderInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockReservationCreateManyProductInput = { - id?: number - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventoryId: number - orderId: number -} - -export type StockReservationUpdateWithoutProductInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockReservationsNestedInput - order?: Prisma.OrderUpdateOneRequiredWithoutStockReservationsNestedInput -} - -export type StockReservationUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - orderId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type StockReservationUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - orderId?: Prisma.IntFieldUpdateOperationsInput | number -} - - - -export type StockReservationSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - quantity?: boolean - createdAt?: boolean - productId?: boolean - inventoryId?: boolean - orderId?: boolean - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs - order?: boolean | Prisma.OrderDefaultArgs -}, ExtArgs["result"]["stockReservation"]> - - - -export type StockReservationSelectScalar = { - id?: boolean - quantity?: boolean - createdAt?: boolean - productId?: boolean - inventoryId?: boolean - orderId?: boolean -} - -export type StockReservationOmit = runtime.Types.Extensions.GetOmit<"id" | "quantity" | "createdAt" | "productId" | "inventoryId" | "orderId", ExtArgs["result"]["stockReservation"]> -export type StockReservationInclude = { - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs - order?: boolean | Prisma.OrderDefaultArgs -} - -export type $StockReservationPayload = { - name: "StockReservation" - objects: { - inventory: Prisma.$InventoryPayload - product: Prisma.$ProductPayload - order: Prisma.$OrderPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - quantity: runtime.Decimal - createdAt: Date - productId: number - inventoryId: number - orderId: number - }, ExtArgs["result"]["stockReservation"]> - composites: {} -} - -export type StockReservationGetPayload = runtime.Types.Result.GetResult - -export type StockReservationCountArgs = - Omit & { - select?: StockReservationCountAggregateInputType | true - } - -export interface StockReservationDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['StockReservation'], meta: { name: 'StockReservation' } } - /** - * Find zero or one StockReservation that matches the filter. - * @param {StockReservationFindUniqueArgs} args - Arguments to find a StockReservation - * @example - * // Get one StockReservation - * const stockReservation = await prisma.stockReservation.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__StockReservationClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one StockReservation that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {StockReservationFindUniqueOrThrowArgs} args - Arguments to find a StockReservation - * @example - * // Get one StockReservation - * const stockReservation = await prisma.stockReservation.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__StockReservationClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first StockReservation that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockReservationFindFirstArgs} args - Arguments to find a StockReservation - * @example - * // Get one StockReservation - * const stockReservation = await prisma.stockReservation.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__StockReservationClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first StockReservation that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockReservationFindFirstOrThrowArgs} args - Arguments to find a StockReservation - * @example - * // Get one StockReservation - * const stockReservation = await prisma.stockReservation.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__StockReservationClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more StockReservations that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockReservationFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all StockReservations - * const stockReservations = await prisma.stockReservation.findMany() - * - * // Get first 10 StockReservations - * const stockReservations = await prisma.stockReservation.findMany({ take: 10 }) - * - * // Only select the `id` - * const stockReservationWithIdOnly = await prisma.stockReservation.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a StockReservation. - * @param {StockReservationCreateArgs} args - Arguments to create a StockReservation. - * @example - * // Create one StockReservation - * const StockReservation = await prisma.stockReservation.create({ - * data: { - * // ... data to create a StockReservation - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__StockReservationClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many StockReservations. - * @param {StockReservationCreateManyArgs} args - Arguments to create many StockReservations. - * @example - * // Create many StockReservations - * const stockReservation = await prisma.stockReservation.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a StockReservation. - * @param {StockReservationDeleteArgs} args - Arguments to delete one StockReservation. - * @example - * // Delete one StockReservation - * const StockReservation = await prisma.stockReservation.delete({ - * where: { - * // ... filter to delete one StockReservation - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__StockReservationClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one StockReservation. - * @param {StockReservationUpdateArgs} args - Arguments to update one StockReservation. - * @example - * // Update one StockReservation - * const stockReservation = await prisma.stockReservation.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__StockReservationClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more StockReservations. - * @param {StockReservationDeleteManyArgs} args - Arguments to filter StockReservations to delete. - * @example - * // Delete a few StockReservations - * const { count } = await prisma.stockReservation.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more StockReservations. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockReservationUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many StockReservations - * const stockReservation = await prisma.stockReservation.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one StockReservation. - * @param {StockReservationUpsertArgs} args - Arguments to update or create a StockReservation. - * @example - * // Update or create a StockReservation - * const stockReservation = await prisma.stockReservation.upsert({ - * create: { - * // ... data to create a StockReservation - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the StockReservation we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__StockReservationClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of StockReservations. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockReservationCountArgs} args - Arguments to filter StockReservations to count. - * @example - * // Count the number of StockReservations - * const count = await prisma.stockReservation.count({ - * where: { - * // ... the filter for the StockReservations we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a StockReservation. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockReservationAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by StockReservation. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StockReservationGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends StockReservationGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: StockReservationGroupByArgs['orderBy'] } - : { orderBy?: StockReservationGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetStockReservationGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the StockReservation model - */ -readonly fields: StockReservationFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for StockReservation. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__StockReservationClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - inventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - order = {}>(args?: Prisma.Subset>): Prisma.Prisma__OrderClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the StockReservation model - */ -export interface StockReservationFieldRefs { - readonly id: Prisma.FieldRef<"StockReservation", 'Int'> - readonly quantity: Prisma.FieldRef<"StockReservation", 'Decimal'> - readonly createdAt: Prisma.FieldRef<"StockReservation", 'DateTime'> - readonly productId: Prisma.FieldRef<"StockReservation", 'Int'> - readonly inventoryId: Prisma.FieldRef<"StockReservation", 'Int'> - readonly orderId: Prisma.FieldRef<"StockReservation", 'Int'> -} - - -// Custom InputTypes -/** - * StockReservation findUnique - */ -export type StockReservationFindUniqueArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - /** - * Filter, which StockReservation to fetch. - */ - where: Prisma.StockReservationWhereUniqueInput -} - -/** - * StockReservation findUniqueOrThrow - */ -export type StockReservationFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - /** - * Filter, which StockReservation to fetch. - */ - where: Prisma.StockReservationWhereUniqueInput -} - -/** - * StockReservation findFirst - */ -export type StockReservationFindFirstArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - /** - * Filter, which StockReservation to fetch. - */ - where?: Prisma.StockReservationWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockReservations to fetch. - */ - orderBy?: Prisma.StockReservationOrderByWithRelationInput | Prisma.StockReservationOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for StockReservations. - */ - cursor?: Prisma.StockReservationWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockReservations from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockReservations. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockReservations. - */ - distinct?: Prisma.StockReservationScalarFieldEnum | Prisma.StockReservationScalarFieldEnum[] -} - -/** - * StockReservation findFirstOrThrow - */ -export type StockReservationFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - /** - * Filter, which StockReservation to fetch. - */ - where?: Prisma.StockReservationWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockReservations to fetch. - */ - orderBy?: Prisma.StockReservationOrderByWithRelationInput | Prisma.StockReservationOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for StockReservations. - */ - cursor?: Prisma.StockReservationWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockReservations from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockReservations. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of StockReservations. - */ - distinct?: Prisma.StockReservationScalarFieldEnum | Prisma.StockReservationScalarFieldEnum[] -} - -/** - * StockReservation findMany - */ -export type StockReservationFindManyArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - /** - * Filter, which StockReservations to fetch. - */ - where?: Prisma.StockReservationWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of StockReservations to fetch. - */ - orderBy?: Prisma.StockReservationOrderByWithRelationInput | Prisma.StockReservationOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing StockReservations. - */ - cursor?: Prisma.StockReservationWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` StockReservations from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` StockReservations. - */ - skip?: number - distinct?: Prisma.StockReservationScalarFieldEnum | Prisma.StockReservationScalarFieldEnum[] -} - -/** - * StockReservation create - */ -export type StockReservationCreateArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - /** - * The data needed to create a StockReservation. - */ - data: Prisma.XOR -} - -/** - * StockReservation createMany - */ -export type StockReservationCreateManyArgs = { - /** - * The data used to create many StockReservations. - */ - data: Prisma.StockReservationCreateManyInput | Prisma.StockReservationCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * StockReservation update - */ -export type StockReservationUpdateArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - /** - * The data needed to update a StockReservation. - */ - data: Prisma.XOR - /** - * Choose, which StockReservation to update. - */ - where: Prisma.StockReservationWhereUniqueInput -} - -/** - * StockReservation updateMany - */ -export type StockReservationUpdateManyArgs = { - /** - * The data used to update StockReservations. - */ - data: Prisma.XOR - /** - * Filter which StockReservations to update - */ - where?: Prisma.StockReservationWhereInput - /** - * Limit how many StockReservations to update. - */ - limit?: number -} - -/** - * StockReservation upsert - */ -export type StockReservationUpsertArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - /** - * The filter to search for the StockReservation to update in case it exists. - */ - where: Prisma.StockReservationWhereUniqueInput - /** - * In case the StockReservation found by the `where` argument doesn't exist, create a new StockReservation with this data. - */ - create: Prisma.XOR - /** - * In case the StockReservation was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * StockReservation delete - */ -export type StockReservationDeleteArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null - /** - * Filter which StockReservation to delete. - */ - where: Prisma.StockReservationWhereUniqueInput -} - -/** - * StockReservation deleteMany - */ -export type StockReservationDeleteManyArgs = { - /** - * Filter which StockReservations to delete - */ - where?: Prisma.StockReservationWhereInput - /** - * Limit how many StockReservations to delete. - */ - limit?: number -} - -/** - * StockReservation without action - */ -export type StockReservationDefaultArgs = { - /** - * Select specific fields to fetch from the StockReservation - */ - select?: Prisma.StockReservationSelect | null - /** - * Omit specific fields from the StockReservation - */ - omit?: Prisma.StockReservationOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockReservationInclude | null -} diff --git a/src/generated/prisma/models/Supplier.ts b/src/generated/prisma/models/Supplier.ts deleted file mode 100644 index 329b757..0000000 --- a/src/generated/prisma/models/Supplier.ts +++ /dev/null @@ -1,1796 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `Supplier` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model Supplier - * - */ -export type SupplierModel = runtime.Types.Result.DefaultSelection - -export type AggregateSupplier = { - _count: SupplierCountAggregateOutputType | null - _avg: SupplierAvgAggregateOutputType | null - _sum: SupplierSumAggregateOutputType | null - _min: SupplierMinAggregateOutputType | null - _max: SupplierMaxAggregateOutputType | null -} - -export type SupplierAvgAggregateOutputType = { - id: number | null -} - -export type SupplierSumAggregateOutputType = { - id: number | null -} - -export type SupplierMinAggregateOutputType = { - id: number | null - firstName: string | null - lastName: string | null - email: string | null - mobileNumber: string | null - address: string | null - city: string | null - state: string | null - country: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type SupplierMaxAggregateOutputType = { - id: number | null - firstName: string | null - lastName: string | null - email: string | null - mobileNumber: string | null - address: string | null - city: string | null - state: string | null - country: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type SupplierCountAggregateOutputType = { - id: number - firstName: number - lastName: number - email: number - mobileNumber: number - address: number - city: number - state: number - country: number - isActive: number - createdAt: number - updatedAt: number - deletedAt: number - _all: number -} - - -export type SupplierAvgAggregateInputType = { - id?: true -} - -export type SupplierSumAggregateInputType = { - id?: true -} - -export type SupplierMinAggregateInputType = { - id?: true - firstName?: true - lastName?: true - email?: true - mobileNumber?: true - address?: true - city?: true - state?: true - country?: true - isActive?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type SupplierMaxAggregateInputType = { - id?: true - firstName?: true - lastName?: true - email?: true - mobileNumber?: true - address?: true - city?: true - state?: true - country?: true - isActive?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type SupplierCountAggregateInputType = { - id?: true - firstName?: true - lastName?: true - email?: true - mobileNumber?: true - address?: true - city?: true - state?: true - country?: true - isActive?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - _all?: true -} - -export type SupplierAggregateArgs = { - /** - * Filter which Supplier to aggregate. - */ - where?: Prisma.SupplierWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Suppliers to fetch. - */ - orderBy?: Prisma.SupplierOrderByWithRelationInput | Prisma.SupplierOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.SupplierWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Suppliers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Suppliers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Suppliers - **/ - _count?: true | SupplierCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: SupplierAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: SupplierSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: SupplierMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: SupplierMaxAggregateInputType -} - -export type GetSupplierAggregateType = { - [P in keyof T & keyof AggregateSupplier]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type SupplierGroupByArgs = { - where?: Prisma.SupplierWhereInput - orderBy?: Prisma.SupplierOrderByWithAggregationInput | Prisma.SupplierOrderByWithAggregationInput[] - by: Prisma.SupplierScalarFieldEnum[] | Prisma.SupplierScalarFieldEnum - having?: Prisma.SupplierScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: SupplierCountAggregateInputType | true - _avg?: SupplierAvgAggregateInputType - _sum?: SupplierSumAggregateInputType - _min?: SupplierMinAggregateInputType - _max?: SupplierMaxAggregateInputType -} - -export type SupplierGroupByOutputType = { - id: number - firstName: string - lastName: string - email: string | null - mobileNumber: string - address: string | null - city: string | null - state: string | null - country: string | null - isActive: boolean - createdAt: Date - updatedAt: Date - deletedAt: Date | null - _count: SupplierCountAggregateOutputType | null - _avg: SupplierAvgAggregateOutputType | null - _sum: SupplierSumAggregateOutputType | null - _min: SupplierMinAggregateOutputType | null - _max: SupplierMaxAggregateOutputType | null -} - -type GetSupplierGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof SupplierGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type SupplierWhereInput = { - AND?: Prisma.SupplierWhereInput | Prisma.SupplierWhereInput[] - OR?: Prisma.SupplierWhereInput[] - NOT?: Prisma.SupplierWhereInput | Prisma.SupplierWhereInput[] - id?: Prisma.IntFilter<"Supplier"> | number - firstName?: Prisma.StringFilter<"Supplier"> | string - lastName?: Prisma.StringFilter<"Supplier"> | string - email?: Prisma.StringNullableFilter<"Supplier"> | string | null - mobileNumber?: Prisma.StringFilter<"Supplier"> | string - address?: Prisma.StringNullableFilter<"Supplier"> | string | null - city?: Prisma.StringNullableFilter<"Supplier"> | string | null - state?: Prisma.StringNullableFilter<"Supplier"> | string | null - country?: Prisma.StringNullableFilter<"Supplier"> | string | null - isActive?: Prisma.BoolFilter<"Supplier"> | boolean - createdAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null - stockMovements?: Prisma.StockMovementListRelationFilter - receipts?: Prisma.PurchaseReceiptListRelationFilter - ledger?: Prisma.SupplierLedgerListRelationFilter -} - -export type SupplierOrderByWithRelationInput = { - id?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - email?: Prisma.SortOrderInput | Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - address?: Prisma.SortOrderInput | Prisma.SortOrder - city?: Prisma.SortOrderInput | Prisma.SortOrder - state?: Prisma.SortOrderInput | Prisma.SortOrder - country?: Prisma.SortOrderInput | Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput - receipts?: Prisma.PurchaseReceiptOrderByRelationAggregateInput - ledger?: Prisma.SupplierLedgerOrderByRelationAggregateInput - _relevance?: Prisma.SupplierOrderByRelevanceInput -} - -export type SupplierWhereUniqueInput = Prisma.AtLeast<{ - id?: number - mobileNumber?: string - AND?: Prisma.SupplierWhereInput | Prisma.SupplierWhereInput[] - OR?: Prisma.SupplierWhereInput[] - NOT?: Prisma.SupplierWhereInput | Prisma.SupplierWhereInput[] - firstName?: Prisma.StringFilter<"Supplier"> | string - lastName?: Prisma.StringFilter<"Supplier"> | string - email?: Prisma.StringNullableFilter<"Supplier"> | string | null - address?: Prisma.StringNullableFilter<"Supplier"> | string | null - city?: Prisma.StringNullableFilter<"Supplier"> | string | null - state?: Prisma.StringNullableFilter<"Supplier"> | string | null - country?: Prisma.StringNullableFilter<"Supplier"> | string | null - isActive?: Prisma.BoolFilter<"Supplier"> | boolean - createdAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null - stockMovements?: Prisma.StockMovementListRelationFilter - receipts?: Prisma.PurchaseReceiptListRelationFilter - ledger?: Prisma.SupplierLedgerListRelationFilter -}, "id" | "mobileNumber"> - -export type SupplierOrderByWithAggregationInput = { - id?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - email?: Prisma.SortOrderInput | Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - address?: Prisma.SortOrderInput | Prisma.SortOrder - city?: Prisma.SortOrderInput | Prisma.SortOrder - state?: Prisma.SortOrderInput | Prisma.SortOrder - country?: Prisma.SortOrderInput | Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.SupplierCountOrderByAggregateInput - _avg?: Prisma.SupplierAvgOrderByAggregateInput - _max?: Prisma.SupplierMaxOrderByAggregateInput - _min?: Prisma.SupplierMinOrderByAggregateInput - _sum?: Prisma.SupplierSumOrderByAggregateInput -} - -export type SupplierScalarWhereWithAggregatesInput = { - AND?: Prisma.SupplierScalarWhereWithAggregatesInput | Prisma.SupplierScalarWhereWithAggregatesInput[] - OR?: Prisma.SupplierScalarWhereWithAggregatesInput[] - NOT?: Prisma.SupplierScalarWhereWithAggregatesInput | Prisma.SupplierScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"Supplier"> | number - firstName?: Prisma.StringWithAggregatesFilter<"Supplier"> | string - lastName?: Prisma.StringWithAggregatesFilter<"Supplier"> | string - email?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null - mobileNumber?: Prisma.StringWithAggregatesFilter<"Supplier"> | string - address?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null - city?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null - state?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null - country?: Prisma.StringNullableWithAggregatesFilter<"Supplier"> | string | null - isActive?: Prisma.BoolWithAggregatesFilter<"Supplier"> | boolean - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Supplier"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Supplier"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Supplier"> | Date | string | null -} - -export type SupplierCreateInput = { - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput - receipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutSupplierInput - ledger?: Prisma.SupplierLedgerCreateNestedManyWithoutSupplierInput -} - -export type SupplierUncheckedCreateInput = { - id?: number - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput - receipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput - ledger?: Prisma.SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput -} - -export type SupplierUpdateInput = { - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput - receipts?: Prisma.PurchaseReceiptUpdateManyWithoutSupplierNestedInput - ledger?: Prisma.SupplierLedgerUpdateManyWithoutSupplierNestedInput -} - -export type SupplierUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutSupplierNestedInput - receipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput - ledger?: Prisma.SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput -} - -export type SupplierCreateManyInput = { - id?: number - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type SupplierUpdateManyMutationInput = { - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type SupplierUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type SupplierScalarRelationFilter = { - is?: Prisma.SupplierWhereInput - isNot?: Prisma.SupplierWhereInput -} - -export type SupplierNullableScalarRelationFilter = { - is?: Prisma.SupplierWhereInput | null - isNot?: Prisma.SupplierWhereInput | null -} - -export type SupplierOrderByRelevanceInput = { - fields: Prisma.SupplierOrderByRelevanceFieldEnum | Prisma.SupplierOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type SupplierCountOrderByAggregateInput = { - id?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - email?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - address?: Prisma.SortOrder - city?: Prisma.SortOrder - state?: Prisma.SortOrder - country?: Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type SupplierAvgOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type SupplierMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - email?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - address?: Prisma.SortOrder - city?: Prisma.SortOrder - state?: Prisma.SortOrder - country?: Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type SupplierMinOrderByAggregateInput = { - id?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - email?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - address?: Prisma.SortOrder - city?: Prisma.SortOrder - state?: Prisma.SortOrder - country?: Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type SupplierSumOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type SupplierCreateNestedOneWithoutReceiptsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutReceiptsInput - connect?: Prisma.SupplierWhereUniqueInput -} - -export type SupplierUpdateOneRequiredWithoutReceiptsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutReceiptsInput - upsert?: Prisma.SupplierUpsertWithoutReceiptsInput - connect?: Prisma.SupplierWhereUniqueInput - update?: Prisma.XOR, Prisma.SupplierUncheckedUpdateWithoutReceiptsInput> -} - -export type SupplierCreateNestedOneWithoutStockMovementsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutStockMovementsInput - connect?: Prisma.SupplierWhereUniqueInput -} - -export type SupplierUpdateOneWithoutStockMovementsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutStockMovementsInput - upsert?: Prisma.SupplierUpsertWithoutStockMovementsInput - disconnect?: Prisma.SupplierWhereInput | boolean - delete?: Prisma.SupplierWhereInput | boolean - connect?: Prisma.SupplierWhereUniqueInput - update?: Prisma.XOR, Prisma.SupplierUncheckedUpdateWithoutStockMovementsInput> -} - -export type SupplierCreateNestedOneWithoutLedgerInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutLedgerInput - connect?: Prisma.SupplierWhereUniqueInput -} - -export type SupplierUpdateOneRequiredWithoutLedgerNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutLedgerInput - upsert?: Prisma.SupplierUpsertWithoutLedgerInput - connect?: Prisma.SupplierWhereUniqueInput - update?: Prisma.XOR, Prisma.SupplierUncheckedUpdateWithoutLedgerInput> -} - -export type SupplierCreateWithoutReceiptsInput = { - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput - ledger?: Prisma.SupplierLedgerCreateNestedManyWithoutSupplierInput -} - -export type SupplierUncheckedCreateWithoutReceiptsInput = { - id?: number - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput - ledger?: Prisma.SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput -} - -export type SupplierCreateOrConnectWithoutReceiptsInput = { - where: Prisma.SupplierWhereUniqueInput - create: Prisma.XOR -} - -export type SupplierUpsertWithoutReceiptsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.SupplierWhereInput -} - -export type SupplierUpdateToOneWithWhereWithoutReceiptsInput = { - where?: Prisma.SupplierWhereInput - data: Prisma.XOR -} - -export type SupplierUpdateWithoutReceiptsInput = { - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput - ledger?: Prisma.SupplierLedgerUpdateManyWithoutSupplierNestedInput -} - -export type SupplierUncheckedUpdateWithoutReceiptsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutSupplierNestedInput - ledger?: Prisma.SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput -} - -export type SupplierCreateWithoutStockMovementsInput = { - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - receipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutSupplierInput - ledger?: Prisma.SupplierLedgerCreateNestedManyWithoutSupplierInput -} - -export type SupplierUncheckedCreateWithoutStockMovementsInput = { - id?: number - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - receipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput - ledger?: Prisma.SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput -} - -export type SupplierCreateOrConnectWithoutStockMovementsInput = { - where: Prisma.SupplierWhereUniqueInput - create: Prisma.XOR -} - -export type SupplierUpsertWithoutStockMovementsInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.SupplierWhereInput -} - -export type SupplierUpdateToOneWithWhereWithoutStockMovementsInput = { - where?: Prisma.SupplierWhereInput - data: Prisma.XOR -} - -export type SupplierUpdateWithoutStockMovementsInput = { - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - receipts?: Prisma.PurchaseReceiptUpdateManyWithoutSupplierNestedInput - ledger?: Prisma.SupplierLedgerUpdateManyWithoutSupplierNestedInput -} - -export type SupplierUncheckedUpdateWithoutStockMovementsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - receipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput - ledger?: Prisma.SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput -} - -export type SupplierCreateWithoutLedgerInput = { - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput - receipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutSupplierInput -} - -export type SupplierUncheckedCreateWithoutLedgerInput = { - id?: number - firstName: string - lastName: string - email?: string | null - mobileNumber: string - address?: string | null - city?: string | null - state?: string | null - country?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput - receipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput -} - -export type SupplierCreateOrConnectWithoutLedgerInput = { - where: Prisma.SupplierWhereUniqueInput - create: Prisma.XOR -} - -export type SupplierUpsertWithoutLedgerInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.SupplierWhereInput -} - -export type SupplierUpdateToOneWithWhereWithoutLedgerInput = { - where?: Prisma.SupplierWhereInput - data: Prisma.XOR -} - -export type SupplierUpdateWithoutLedgerInput = { - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput - receipts?: Prisma.PurchaseReceiptUpdateManyWithoutSupplierNestedInput -} - -export type SupplierUncheckedUpdateWithoutLedgerInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutSupplierNestedInput - receipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput -} - - -/** - * Count Type SupplierCountOutputType - */ - -export type SupplierCountOutputType = { - stockMovements: number - receipts: number - ledger: number -} - -export type SupplierCountOutputTypeSelect = { - stockMovements?: boolean | SupplierCountOutputTypeCountStockMovementsArgs - receipts?: boolean | SupplierCountOutputTypeCountReceiptsArgs - ledger?: boolean | SupplierCountOutputTypeCountLedgerArgs -} - -/** - * SupplierCountOutputType without action - */ -export type SupplierCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the SupplierCountOutputType - */ - select?: Prisma.SupplierCountOutputTypeSelect | null -} - -/** - * SupplierCountOutputType without action - */ -export type SupplierCountOutputTypeCountStockMovementsArgs = { - where?: Prisma.StockMovementWhereInput -} - -/** - * SupplierCountOutputType without action - */ -export type SupplierCountOutputTypeCountReceiptsArgs = { - where?: Prisma.PurchaseReceiptWhereInput -} - -/** - * SupplierCountOutputType without action - */ -export type SupplierCountOutputTypeCountLedgerArgs = { - where?: Prisma.SupplierLedgerWhereInput -} - - -export type SupplierSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - firstName?: boolean - lastName?: boolean - email?: boolean - mobileNumber?: boolean - address?: boolean - city?: boolean - state?: boolean - country?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - stockMovements?: boolean | Prisma.Supplier$stockMovementsArgs - receipts?: boolean | Prisma.Supplier$receiptsArgs - ledger?: boolean | Prisma.Supplier$ledgerArgs - _count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs -}, ExtArgs["result"]["supplier"]> - - - -export type SupplierSelectScalar = { - id?: boolean - firstName?: boolean - lastName?: boolean - email?: boolean - mobileNumber?: boolean - address?: boolean - city?: boolean - state?: boolean - country?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean -} - -export type SupplierOmit = runtime.Types.Extensions.GetOmit<"id" | "firstName" | "lastName" | "email" | "mobileNumber" | "address" | "city" | "state" | "country" | "isActive" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["supplier"]> -export type SupplierInclude = { - stockMovements?: boolean | Prisma.Supplier$stockMovementsArgs - receipts?: boolean | Prisma.Supplier$receiptsArgs - ledger?: boolean | Prisma.Supplier$ledgerArgs - _count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs -} - -export type $SupplierPayload = { - name: "Supplier" - objects: { - stockMovements: Prisma.$StockMovementPayload[] - receipts: Prisma.$PurchaseReceiptPayload[] - ledger: Prisma.$SupplierLedgerPayload[] - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - firstName: string - lastName: string - email: string | null - mobileNumber: string - address: string | null - city: string | null - state: string | null - country: string | null - isActive: boolean - createdAt: Date - updatedAt: Date - deletedAt: Date | null - }, ExtArgs["result"]["supplier"]> - composites: {} -} - -export type SupplierGetPayload = runtime.Types.Result.GetResult - -export type SupplierCountArgs = - Omit & { - select?: SupplierCountAggregateInputType | true - } - -export interface SupplierDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Supplier'], meta: { name: 'Supplier' } } - /** - * Find zero or one Supplier that matches the filter. - * @param {SupplierFindUniqueArgs} args - Arguments to find a Supplier - * @example - * // Get one Supplier - * const supplier = await prisma.supplier.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Supplier that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {SupplierFindUniqueOrThrowArgs} args - Arguments to find a Supplier - * @example - * // Get one Supplier - * const supplier = await prisma.supplier.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Supplier that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierFindFirstArgs} args - Arguments to find a Supplier - * @example - * // Get one Supplier - * const supplier = await prisma.supplier.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__SupplierClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Supplier that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierFindFirstOrThrowArgs} args - Arguments to find a Supplier - * @example - * // Get one Supplier - * const supplier = await prisma.supplier.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__SupplierClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Suppliers that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Suppliers - * const suppliers = await prisma.supplier.findMany() - * - * // Get first 10 Suppliers - * const suppliers = await prisma.supplier.findMany({ take: 10 }) - * - * // Only select the `id` - * const supplierWithIdOnly = await prisma.supplier.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Supplier. - * @param {SupplierCreateArgs} args - Arguments to create a Supplier. - * @example - * // Create one Supplier - * const Supplier = await prisma.supplier.create({ - * data: { - * // ... data to create a Supplier - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Suppliers. - * @param {SupplierCreateManyArgs} args - Arguments to create many Suppliers. - * @example - * // Create many Suppliers - * const supplier = await prisma.supplier.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a Supplier. - * @param {SupplierDeleteArgs} args - Arguments to delete one Supplier. - * @example - * // Delete one Supplier - * const Supplier = await prisma.supplier.delete({ - * where: { - * // ... filter to delete one Supplier - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Supplier. - * @param {SupplierUpdateArgs} args - Arguments to update one Supplier. - * @example - * // Update one Supplier - * const supplier = await prisma.supplier.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Suppliers. - * @param {SupplierDeleteManyArgs} args - Arguments to filter Suppliers to delete. - * @example - * // Delete a few Suppliers - * const { count } = await prisma.supplier.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Suppliers. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Suppliers - * const supplier = await prisma.supplier.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Supplier. - * @param {SupplierUpsertArgs} args - Arguments to update or create a Supplier. - * @example - * // Update or create a Supplier - * const supplier = await prisma.supplier.upsert({ - * create: { - * // ... data to create a Supplier - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Supplier we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Suppliers. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierCountArgs} args - Arguments to filter Suppliers to count. - * @example - * // Count the number of Suppliers - * const count = await prisma.supplier.count({ - * where: { - * // ... the filter for the Suppliers we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a Supplier. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by Supplier. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends SupplierGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: SupplierGroupByArgs['orderBy'] } - : { orderBy?: SupplierGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetSupplierGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Supplier model - */ -readonly fields: SupplierFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for Supplier. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__SupplierClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - stockMovements = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - receipts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - ledger = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the Supplier model - */ -export interface SupplierFieldRefs { - readonly id: Prisma.FieldRef<"Supplier", 'Int'> - readonly firstName: Prisma.FieldRef<"Supplier", 'String'> - readonly lastName: Prisma.FieldRef<"Supplier", 'String'> - readonly email: Prisma.FieldRef<"Supplier", 'String'> - readonly mobileNumber: Prisma.FieldRef<"Supplier", 'String'> - readonly address: Prisma.FieldRef<"Supplier", 'String'> - readonly city: Prisma.FieldRef<"Supplier", 'String'> - readonly state: Prisma.FieldRef<"Supplier", 'String'> - readonly country: Prisma.FieldRef<"Supplier", 'String'> - readonly isActive: Prisma.FieldRef<"Supplier", 'Boolean'> - readonly createdAt: Prisma.FieldRef<"Supplier", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Supplier", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"Supplier", 'DateTime'> -} - - -// Custom InputTypes -/** - * Supplier findUnique - */ -export type SupplierFindUniqueArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - /** - * Filter, which Supplier to fetch. - */ - where: Prisma.SupplierWhereUniqueInput -} - -/** - * Supplier findUniqueOrThrow - */ -export type SupplierFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - /** - * Filter, which Supplier to fetch. - */ - where: Prisma.SupplierWhereUniqueInput -} - -/** - * Supplier findFirst - */ -export type SupplierFindFirstArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - /** - * Filter, which Supplier to fetch. - */ - where?: Prisma.SupplierWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Suppliers to fetch. - */ - orderBy?: Prisma.SupplierOrderByWithRelationInput | Prisma.SupplierOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Suppliers. - */ - cursor?: Prisma.SupplierWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Suppliers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Suppliers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Suppliers. - */ - distinct?: Prisma.SupplierScalarFieldEnum | Prisma.SupplierScalarFieldEnum[] -} - -/** - * Supplier findFirstOrThrow - */ -export type SupplierFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - /** - * Filter, which Supplier to fetch. - */ - where?: Prisma.SupplierWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Suppliers to fetch. - */ - orderBy?: Prisma.SupplierOrderByWithRelationInput | Prisma.SupplierOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Suppliers. - */ - cursor?: Prisma.SupplierWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Suppliers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Suppliers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Suppliers. - */ - distinct?: Prisma.SupplierScalarFieldEnum | Prisma.SupplierScalarFieldEnum[] -} - -/** - * Supplier findMany - */ -export type SupplierFindManyArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - /** - * Filter, which Suppliers to fetch. - */ - where?: Prisma.SupplierWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Suppliers to fetch. - */ - orderBy?: Prisma.SupplierOrderByWithRelationInput | Prisma.SupplierOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Suppliers. - */ - cursor?: Prisma.SupplierWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Suppliers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Suppliers. - */ - skip?: number - distinct?: Prisma.SupplierScalarFieldEnum | Prisma.SupplierScalarFieldEnum[] -} - -/** - * Supplier create - */ -export type SupplierCreateArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - /** - * The data needed to create a Supplier. - */ - data: Prisma.XOR -} - -/** - * Supplier createMany - */ -export type SupplierCreateManyArgs = { - /** - * The data used to create many Suppliers. - */ - data: Prisma.SupplierCreateManyInput | Prisma.SupplierCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Supplier update - */ -export type SupplierUpdateArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - /** - * The data needed to update a Supplier. - */ - data: Prisma.XOR - /** - * Choose, which Supplier to update. - */ - where: Prisma.SupplierWhereUniqueInput -} - -/** - * Supplier updateMany - */ -export type SupplierUpdateManyArgs = { - /** - * The data used to update Suppliers. - */ - data: Prisma.XOR - /** - * Filter which Suppliers to update - */ - where?: Prisma.SupplierWhereInput - /** - * Limit how many Suppliers to update. - */ - limit?: number -} - -/** - * Supplier upsert - */ -export type SupplierUpsertArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - /** - * The filter to search for the Supplier to update in case it exists. - */ - where: Prisma.SupplierWhereUniqueInput - /** - * In case the Supplier found by the `where` argument doesn't exist, create a new Supplier with this data. - */ - create: Prisma.XOR - /** - * In case the Supplier was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * Supplier delete - */ -export type SupplierDeleteArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null - /** - * Filter which Supplier to delete. - */ - where: Prisma.SupplierWhereUniqueInput -} - -/** - * Supplier deleteMany - */ -export type SupplierDeleteManyArgs = { - /** - * Filter which Suppliers to delete - */ - where?: Prisma.SupplierWhereInput - /** - * Limit how many Suppliers to delete. - */ - limit?: number -} - -/** - * Supplier.stockMovements - */ -export type Supplier$stockMovementsArgs = { - /** - * Select specific fields to fetch from the StockMovement - */ - select?: Prisma.StockMovementSelect | null - /** - * Omit specific fields from the StockMovement - */ - omit?: Prisma.StockMovementOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.StockMovementInclude | null - where?: Prisma.StockMovementWhereInput - orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[] - cursor?: Prisma.StockMovementWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[] -} - -/** - * Supplier.receipts - */ -export type Supplier$receiptsArgs = { - /** - * Select specific fields to fetch from the PurchaseReceipt - */ - select?: Prisma.PurchaseReceiptSelect | null - /** - * Omit specific fields from the PurchaseReceipt - */ - omit?: Prisma.PurchaseReceiptOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.PurchaseReceiptInclude | null - where?: Prisma.PurchaseReceiptWhereInput - orderBy?: Prisma.PurchaseReceiptOrderByWithRelationInput | Prisma.PurchaseReceiptOrderByWithRelationInput[] - cursor?: Prisma.PurchaseReceiptWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.PurchaseReceiptScalarFieldEnum | Prisma.PurchaseReceiptScalarFieldEnum[] -} - -/** - * Supplier.ledger - */ -export type Supplier$ledgerArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - where?: Prisma.SupplierLedgerWhereInput - orderBy?: Prisma.SupplierLedgerOrderByWithRelationInput | Prisma.SupplierLedgerOrderByWithRelationInput[] - cursor?: Prisma.SupplierLedgerWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.SupplierLedgerScalarFieldEnum | Prisma.SupplierLedgerScalarFieldEnum[] -} - -/** - * Supplier without action - */ -export type SupplierDefaultArgs = { - /** - * Select specific fields to fetch from the Supplier - */ - select?: Prisma.SupplierSelect | null - /** - * Omit specific fields from the Supplier - */ - omit?: Prisma.SupplierOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierInclude | null -} diff --git a/src/generated/prisma/models/SupplierLedger.ts b/src/generated/prisma/models/SupplierLedger.ts deleted file mode 100644 index 04add61..0000000 --- a/src/generated/prisma/models/SupplierLedger.ts +++ /dev/null @@ -1,1423 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `SupplierLedger` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model SupplierLedger - * - */ -export type SupplierLedgerModel = runtime.Types.Result.DefaultSelection - -export type AggregateSupplierLedger = { - _count: SupplierLedgerCountAggregateOutputType | null - _avg: SupplierLedgerAvgAggregateOutputType | null - _sum: SupplierLedgerSumAggregateOutputType | null - _min: SupplierLedgerMinAggregateOutputType | null - _max: SupplierLedgerMaxAggregateOutputType | null -} - -export type SupplierLedgerAvgAggregateOutputType = { - id: number | null - debit: runtime.Decimal | null - credit: runtime.Decimal | null - balance: runtime.Decimal | null - sourceId: number | null - supplierId: number | null -} - -export type SupplierLedgerSumAggregateOutputType = { - id: number | null - debit: runtime.Decimal | null - credit: runtime.Decimal | null - balance: runtime.Decimal | null - sourceId: number | null - supplierId: number | null -} - -export type SupplierLedgerMinAggregateOutputType = { - id: number | null - description: string | null - debit: runtime.Decimal | null - credit: runtime.Decimal | null - balance: runtime.Decimal | null - sourceType: $Enums.LedgerSourceType | null - sourceId: number | null - createdAt: Date | null - supplierId: number | null -} - -export type SupplierLedgerMaxAggregateOutputType = { - id: number | null - description: string | null - debit: runtime.Decimal | null - credit: runtime.Decimal | null - balance: runtime.Decimal | null - sourceType: $Enums.LedgerSourceType | null - sourceId: number | null - createdAt: Date | null - supplierId: number | null -} - -export type SupplierLedgerCountAggregateOutputType = { - id: number - description: number - debit: number - credit: number - balance: number - sourceType: number - sourceId: number - createdAt: number - supplierId: number - _all: number -} - - -export type SupplierLedgerAvgAggregateInputType = { - id?: true - debit?: true - credit?: true - balance?: true - sourceId?: true - supplierId?: true -} - -export type SupplierLedgerSumAggregateInputType = { - id?: true - debit?: true - credit?: true - balance?: true - sourceId?: true - supplierId?: true -} - -export type SupplierLedgerMinAggregateInputType = { - id?: true - description?: true - debit?: true - credit?: true - balance?: true - sourceType?: true - sourceId?: true - createdAt?: true - supplierId?: true -} - -export type SupplierLedgerMaxAggregateInputType = { - id?: true - description?: true - debit?: true - credit?: true - balance?: true - sourceType?: true - sourceId?: true - createdAt?: true - supplierId?: true -} - -export type SupplierLedgerCountAggregateInputType = { - id?: true - description?: true - debit?: true - credit?: true - balance?: true - sourceType?: true - sourceId?: true - createdAt?: true - supplierId?: true - _all?: true -} - -export type SupplierLedgerAggregateArgs = { - /** - * Filter which SupplierLedger to aggregate. - */ - where?: Prisma.SupplierLedgerWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SupplierLedgers to fetch. - */ - orderBy?: Prisma.SupplierLedgerOrderByWithRelationInput | Prisma.SupplierLedgerOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.SupplierLedgerWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SupplierLedgers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SupplierLedgers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned SupplierLedgers - **/ - _count?: true | SupplierLedgerCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: SupplierLedgerAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: SupplierLedgerSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: SupplierLedgerMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: SupplierLedgerMaxAggregateInputType -} - -export type GetSupplierLedgerAggregateType = { - [P in keyof T & keyof AggregateSupplierLedger]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type SupplierLedgerGroupByArgs = { - where?: Prisma.SupplierLedgerWhereInput - orderBy?: Prisma.SupplierLedgerOrderByWithAggregationInput | Prisma.SupplierLedgerOrderByWithAggregationInput[] - by: Prisma.SupplierLedgerScalarFieldEnum[] | Prisma.SupplierLedgerScalarFieldEnum - having?: Prisma.SupplierLedgerScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: SupplierLedgerCountAggregateInputType | true - _avg?: SupplierLedgerAvgAggregateInputType - _sum?: SupplierLedgerSumAggregateInputType - _min?: SupplierLedgerMinAggregateInputType - _max?: SupplierLedgerMaxAggregateInputType -} - -export type SupplierLedgerGroupByOutputType = { - id: number - description: string | null - debit: runtime.Decimal - credit: runtime.Decimal - balance: runtime.Decimal - sourceType: $Enums.LedgerSourceType - sourceId: number - createdAt: Date - supplierId: number - _count: SupplierLedgerCountAggregateOutputType | null - _avg: SupplierLedgerAvgAggregateOutputType | null - _sum: SupplierLedgerSumAggregateOutputType | null - _min: SupplierLedgerMinAggregateOutputType | null - _max: SupplierLedgerMaxAggregateOutputType | null -} - -type GetSupplierLedgerGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof SupplierLedgerGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type SupplierLedgerWhereInput = { - AND?: Prisma.SupplierLedgerWhereInput | Prisma.SupplierLedgerWhereInput[] - OR?: Prisma.SupplierLedgerWhereInput[] - NOT?: Prisma.SupplierLedgerWhereInput | Prisma.SupplierLedgerWhereInput[] - id?: Prisma.IntFilter<"SupplierLedger"> | number - description?: Prisma.StringNullableFilter<"SupplierLedger"> | string | null - debit?: Prisma.DecimalFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFilter<"SupplierLedger"> | $Enums.LedgerSourceType - sourceId?: Prisma.IntFilter<"SupplierLedger"> | number - createdAt?: Prisma.DateTimeFilter<"SupplierLedger"> | Date | string - supplierId?: Prisma.IntFilter<"SupplierLedger"> | number - supplier?: Prisma.XOR -} - -export type SupplierLedgerOrderByWithRelationInput = { - id?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - debit?: Prisma.SortOrder - credit?: Prisma.SortOrder - balance?: Prisma.SortOrder - sourceType?: Prisma.SortOrder - sourceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - supplier?: Prisma.SupplierOrderByWithRelationInput - _relevance?: Prisma.SupplierLedgerOrderByRelevanceInput -} - -export type SupplierLedgerWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.SupplierLedgerWhereInput | Prisma.SupplierLedgerWhereInput[] - OR?: Prisma.SupplierLedgerWhereInput[] - NOT?: Prisma.SupplierLedgerWhereInput | Prisma.SupplierLedgerWhereInput[] - description?: Prisma.StringNullableFilter<"SupplierLedger"> | string | null - debit?: Prisma.DecimalFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFilter<"SupplierLedger"> | $Enums.LedgerSourceType - sourceId?: Prisma.IntFilter<"SupplierLedger"> | number - createdAt?: Prisma.DateTimeFilter<"SupplierLedger"> | Date | string - supplierId?: Prisma.IntFilter<"SupplierLedger"> | number - supplier?: Prisma.XOR -}, "id"> - -export type SupplierLedgerOrderByWithAggregationInput = { - id?: Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - debit?: Prisma.SortOrder - credit?: Prisma.SortOrder - balance?: Prisma.SortOrder - sourceType?: Prisma.SortOrder - sourceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - _count?: Prisma.SupplierLedgerCountOrderByAggregateInput - _avg?: Prisma.SupplierLedgerAvgOrderByAggregateInput - _max?: Prisma.SupplierLedgerMaxOrderByAggregateInput - _min?: Prisma.SupplierLedgerMinOrderByAggregateInput - _sum?: Prisma.SupplierLedgerSumOrderByAggregateInput -} - -export type SupplierLedgerScalarWhereWithAggregatesInput = { - AND?: Prisma.SupplierLedgerScalarWhereWithAggregatesInput | Prisma.SupplierLedgerScalarWhereWithAggregatesInput[] - OR?: Prisma.SupplierLedgerScalarWhereWithAggregatesInput[] - NOT?: Prisma.SupplierLedgerScalarWhereWithAggregatesInput | Prisma.SupplierLedgerScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"SupplierLedger"> | number - description?: Prisma.StringNullableWithAggregatesFilter<"SupplierLedger"> | string | null - debit?: Prisma.DecimalWithAggregatesFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalWithAggregatesFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalWithAggregatesFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeWithAggregatesFilter<"SupplierLedger"> | $Enums.LedgerSourceType - sourceId?: Prisma.IntWithAggregatesFilter<"SupplierLedger"> | number - createdAt?: Prisma.DateTimeWithAggregatesFilter<"SupplierLedger"> | Date | string - supplierId?: Prisma.IntWithAggregatesFilter<"SupplierLedger"> | number -} - -export type SupplierLedgerCreateInput = { - description?: string | null - debit?: runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: runtime.Decimal | runtime.DecimalJsLike | number | string - balance: runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType: $Enums.LedgerSourceType - sourceId: number - createdAt?: Date | string - supplier: Prisma.SupplierCreateNestedOneWithoutLedgerInput -} - -export type SupplierLedgerUncheckedCreateInput = { - id?: number - description?: string | null - debit?: runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: runtime.Decimal | runtime.DecimalJsLike | number | string - balance: runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType: $Enums.LedgerSourceType - sourceId: number - createdAt?: Date | string - supplierId: number -} - -export type SupplierLedgerUpdateInput = { - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - debit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType - sourceId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - supplier?: Prisma.SupplierUpdateOneRequiredWithoutLedgerNestedInput -} - -export type SupplierLedgerUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - debit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType - sourceId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - supplierId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type SupplierLedgerCreateManyInput = { - id?: number - description?: string | null - debit?: runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: runtime.Decimal | runtime.DecimalJsLike | number | string - balance: runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType: $Enums.LedgerSourceType - sourceId: number - createdAt?: Date | string - supplierId: number -} - -export type SupplierLedgerUpdateManyMutationInput = { - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - debit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType - sourceId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type SupplierLedgerUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - debit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType - sourceId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - supplierId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type SupplierLedgerListRelationFilter = { - every?: Prisma.SupplierLedgerWhereInput - some?: Prisma.SupplierLedgerWhereInput - none?: Prisma.SupplierLedgerWhereInput -} - -export type SupplierLedgerOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type SupplierLedgerOrderByRelevanceInput = { - fields: Prisma.SupplierLedgerOrderByRelevanceFieldEnum | Prisma.SupplierLedgerOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type SupplierLedgerCountOrderByAggregateInput = { - id?: Prisma.SortOrder - description?: Prisma.SortOrder - debit?: Prisma.SortOrder - credit?: Prisma.SortOrder - balance?: Prisma.SortOrder - sourceType?: Prisma.SortOrder - sourceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type SupplierLedgerAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - debit?: Prisma.SortOrder - credit?: Prisma.SortOrder - balance?: Prisma.SortOrder - sourceId?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type SupplierLedgerMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - description?: Prisma.SortOrder - debit?: Prisma.SortOrder - credit?: Prisma.SortOrder - balance?: Prisma.SortOrder - sourceType?: Prisma.SortOrder - sourceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type SupplierLedgerMinOrderByAggregateInput = { - id?: Prisma.SortOrder - description?: Prisma.SortOrder - debit?: Prisma.SortOrder - credit?: Prisma.SortOrder - balance?: Prisma.SortOrder - sourceType?: Prisma.SortOrder - sourceId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type SupplierLedgerSumOrderByAggregateInput = { - id?: Prisma.SortOrder - debit?: Prisma.SortOrder - credit?: Prisma.SortOrder - balance?: Prisma.SortOrder - sourceId?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type SupplierLedgerCreateNestedManyWithoutSupplierInput = { - create?: Prisma.XOR | Prisma.SupplierLedgerCreateWithoutSupplierInput[] | Prisma.SupplierLedgerUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.SupplierLedgerCreateOrConnectWithoutSupplierInput | Prisma.SupplierLedgerCreateOrConnectWithoutSupplierInput[] - createMany?: Prisma.SupplierLedgerCreateManySupplierInputEnvelope - connect?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] -} - -export type SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput = { - create?: Prisma.XOR | Prisma.SupplierLedgerCreateWithoutSupplierInput[] | Prisma.SupplierLedgerUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.SupplierLedgerCreateOrConnectWithoutSupplierInput | Prisma.SupplierLedgerCreateOrConnectWithoutSupplierInput[] - createMany?: Prisma.SupplierLedgerCreateManySupplierInputEnvelope - connect?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] -} - -export type SupplierLedgerUpdateManyWithoutSupplierNestedInput = { - create?: Prisma.XOR | Prisma.SupplierLedgerCreateWithoutSupplierInput[] | Prisma.SupplierLedgerUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.SupplierLedgerCreateOrConnectWithoutSupplierInput | Prisma.SupplierLedgerCreateOrConnectWithoutSupplierInput[] - upsert?: Prisma.SupplierLedgerUpsertWithWhereUniqueWithoutSupplierInput | Prisma.SupplierLedgerUpsertWithWhereUniqueWithoutSupplierInput[] - createMany?: Prisma.SupplierLedgerCreateManySupplierInputEnvelope - set?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] - disconnect?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] - delete?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] - connect?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] - update?: Prisma.SupplierLedgerUpdateWithWhereUniqueWithoutSupplierInput | Prisma.SupplierLedgerUpdateWithWhereUniqueWithoutSupplierInput[] - updateMany?: Prisma.SupplierLedgerUpdateManyWithWhereWithoutSupplierInput | Prisma.SupplierLedgerUpdateManyWithWhereWithoutSupplierInput[] - deleteMany?: Prisma.SupplierLedgerScalarWhereInput | Prisma.SupplierLedgerScalarWhereInput[] -} - -export type SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput = { - create?: Prisma.XOR | Prisma.SupplierLedgerCreateWithoutSupplierInput[] | Prisma.SupplierLedgerUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.SupplierLedgerCreateOrConnectWithoutSupplierInput | Prisma.SupplierLedgerCreateOrConnectWithoutSupplierInput[] - upsert?: Prisma.SupplierLedgerUpsertWithWhereUniqueWithoutSupplierInput | Prisma.SupplierLedgerUpsertWithWhereUniqueWithoutSupplierInput[] - createMany?: Prisma.SupplierLedgerCreateManySupplierInputEnvelope - set?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] - disconnect?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] - delete?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] - connect?: Prisma.SupplierLedgerWhereUniqueInput | Prisma.SupplierLedgerWhereUniqueInput[] - update?: Prisma.SupplierLedgerUpdateWithWhereUniqueWithoutSupplierInput | Prisma.SupplierLedgerUpdateWithWhereUniqueWithoutSupplierInput[] - updateMany?: Prisma.SupplierLedgerUpdateManyWithWhereWithoutSupplierInput | Prisma.SupplierLedgerUpdateManyWithWhereWithoutSupplierInput[] - deleteMany?: Prisma.SupplierLedgerScalarWhereInput | Prisma.SupplierLedgerScalarWhereInput[] -} - -export type EnumLedgerSourceTypeFieldUpdateOperationsInput = { - set?: $Enums.LedgerSourceType -} - -export type SupplierLedgerCreateWithoutSupplierInput = { - description?: string | null - debit?: runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: runtime.Decimal | runtime.DecimalJsLike | number | string - balance: runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType: $Enums.LedgerSourceType - sourceId: number - createdAt?: Date | string -} - -export type SupplierLedgerUncheckedCreateWithoutSupplierInput = { - id?: number - description?: string | null - debit?: runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: runtime.Decimal | runtime.DecimalJsLike | number | string - balance: runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType: $Enums.LedgerSourceType - sourceId: number - createdAt?: Date | string -} - -export type SupplierLedgerCreateOrConnectWithoutSupplierInput = { - where: Prisma.SupplierLedgerWhereUniqueInput - create: Prisma.XOR -} - -export type SupplierLedgerCreateManySupplierInputEnvelope = { - data: Prisma.SupplierLedgerCreateManySupplierInput | Prisma.SupplierLedgerCreateManySupplierInput[] - skipDuplicates?: boolean -} - -export type SupplierLedgerUpsertWithWhereUniqueWithoutSupplierInput = { - where: Prisma.SupplierLedgerWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type SupplierLedgerUpdateWithWhereUniqueWithoutSupplierInput = { - where: Prisma.SupplierLedgerWhereUniqueInput - data: Prisma.XOR -} - -export type SupplierLedgerUpdateManyWithWhereWithoutSupplierInput = { - where: Prisma.SupplierLedgerScalarWhereInput - data: Prisma.XOR -} - -export type SupplierLedgerScalarWhereInput = { - AND?: Prisma.SupplierLedgerScalarWhereInput | Prisma.SupplierLedgerScalarWhereInput[] - OR?: Prisma.SupplierLedgerScalarWhereInput[] - NOT?: Prisma.SupplierLedgerScalarWhereInput | Prisma.SupplierLedgerScalarWhereInput[] - id?: Prisma.IntFilter<"SupplierLedger"> | number - description?: Prisma.StringNullableFilter<"SupplierLedger"> | string | null - debit?: Prisma.DecimalFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFilter<"SupplierLedger"> | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFilter<"SupplierLedger"> | $Enums.LedgerSourceType - sourceId?: Prisma.IntFilter<"SupplierLedger"> | number - createdAt?: Prisma.DateTimeFilter<"SupplierLedger"> | Date | string - supplierId?: Prisma.IntFilter<"SupplierLedger"> | number -} - -export type SupplierLedgerCreateManySupplierInput = { - id?: number - description?: string | null - debit?: runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: runtime.Decimal | runtime.DecimalJsLike | number | string - balance: runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType: $Enums.LedgerSourceType - sourceId: number - createdAt?: Date | string -} - -export type SupplierLedgerUpdateWithoutSupplierInput = { - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - debit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType - sourceId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type SupplierLedgerUncheckedUpdateWithoutSupplierInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - debit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType - sourceId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type SupplierLedgerUncheckedUpdateManyWithoutSupplierInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - debit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - credit?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - balance?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - sourceType?: Prisma.EnumLedgerSourceTypeFieldUpdateOperationsInput | $Enums.LedgerSourceType - sourceId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - - - -export type SupplierLedgerSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - description?: boolean - debit?: boolean - credit?: boolean - balance?: boolean - sourceType?: boolean - sourceId?: boolean - createdAt?: boolean - supplierId?: boolean - supplier?: boolean | Prisma.SupplierDefaultArgs -}, ExtArgs["result"]["supplierLedger"]> - - - -export type SupplierLedgerSelectScalar = { - id?: boolean - description?: boolean - debit?: boolean - credit?: boolean - balance?: boolean - sourceType?: boolean - sourceId?: boolean - createdAt?: boolean - supplierId?: boolean -} - -export type SupplierLedgerOmit = runtime.Types.Extensions.GetOmit<"id" | "description" | "debit" | "credit" | "balance" | "sourceType" | "sourceId" | "createdAt" | "supplierId", ExtArgs["result"]["supplierLedger"]> -export type SupplierLedgerInclude = { - supplier?: boolean | Prisma.SupplierDefaultArgs -} - -export type $SupplierLedgerPayload = { - name: "SupplierLedger" - objects: { - supplier: Prisma.$SupplierPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - description: string | null - debit: runtime.Decimal - credit: runtime.Decimal - balance: runtime.Decimal - sourceType: $Enums.LedgerSourceType - sourceId: number - createdAt: Date - supplierId: number - }, ExtArgs["result"]["supplierLedger"]> - composites: {} -} - -export type SupplierLedgerGetPayload = runtime.Types.Result.GetResult - -export type SupplierLedgerCountArgs = - Omit & { - select?: SupplierLedgerCountAggregateInputType | true - } - -export interface SupplierLedgerDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['SupplierLedger'], meta: { name: 'SupplierLedger' } } - /** - * Find zero or one SupplierLedger that matches the filter. - * @param {SupplierLedgerFindUniqueArgs} args - Arguments to find a SupplierLedger - * @example - * // Get one SupplierLedger - * const supplierLedger = await prisma.supplierLedger.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierLedgerClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one SupplierLedger that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {SupplierLedgerFindUniqueOrThrowArgs} args - Arguments to find a SupplierLedger - * @example - * // Get one SupplierLedger - * const supplierLedger = await prisma.supplierLedger.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierLedgerClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first SupplierLedger that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierLedgerFindFirstArgs} args - Arguments to find a SupplierLedger - * @example - * // Get one SupplierLedger - * const supplierLedger = await prisma.supplierLedger.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__SupplierLedgerClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first SupplierLedger that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierLedgerFindFirstOrThrowArgs} args - Arguments to find a SupplierLedger - * @example - * // Get one SupplierLedger - * const supplierLedger = await prisma.supplierLedger.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__SupplierLedgerClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more SupplierLedgers that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierLedgerFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all SupplierLedgers - * const supplierLedgers = await prisma.supplierLedger.findMany() - * - * // Get first 10 SupplierLedgers - * const supplierLedgers = await prisma.supplierLedger.findMany({ take: 10 }) - * - * // Only select the `id` - * const supplierLedgerWithIdOnly = await prisma.supplierLedger.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a SupplierLedger. - * @param {SupplierLedgerCreateArgs} args - Arguments to create a SupplierLedger. - * @example - * // Create one SupplierLedger - * const SupplierLedger = await prisma.supplierLedger.create({ - * data: { - * // ... data to create a SupplierLedger - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierLedgerClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many SupplierLedgers. - * @param {SupplierLedgerCreateManyArgs} args - Arguments to create many SupplierLedgers. - * @example - * // Create many SupplierLedgers - * const supplierLedger = await prisma.supplierLedger.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a SupplierLedger. - * @param {SupplierLedgerDeleteArgs} args - Arguments to delete one SupplierLedger. - * @example - * // Delete one SupplierLedger - * const SupplierLedger = await prisma.supplierLedger.delete({ - * where: { - * // ... filter to delete one SupplierLedger - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierLedgerClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one SupplierLedger. - * @param {SupplierLedgerUpdateArgs} args - Arguments to update one SupplierLedger. - * @example - * // Update one SupplierLedger - * const supplierLedger = await prisma.supplierLedger.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierLedgerClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more SupplierLedgers. - * @param {SupplierLedgerDeleteManyArgs} args - Arguments to filter SupplierLedgers to delete. - * @example - * // Delete a few SupplierLedgers - * const { count } = await prisma.supplierLedger.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more SupplierLedgers. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierLedgerUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many SupplierLedgers - * const supplierLedger = await prisma.supplierLedger.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one SupplierLedger. - * @param {SupplierLedgerUpsertArgs} args - Arguments to update or create a SupplierLedger. - * @example - * // Update or create a SupplierLedger - * const supplierLedger = await prisma.supplierLedger.upsert({ - * create: { - * // ... data to create a SupplierLedger - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the SupplierLedger we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__SupplierLedgerClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of SupplierLedgers. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierLedgerCountArgs} args - Arguments to filter SupplierLedgers to count. - * @example - * // Count the number of SupplierLedgers - * const count = await prisma.supplierLedger.count({ - * where: { - * // ... the filter for the SupplierLedgers we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a SupplierLedger. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierLedgerAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by SupplierLedger. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {SupplierLedgerGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends SupplierLedgerGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: SupplierLedgerGroupByArgs['orderBy'] } - : { orderBy?: SupplierLedgerGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetSupplierLedgerGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the SupplierLedger model - */ -readonly fields: SupplierLedgerFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for SupplierLedger. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__SupplierLedgerClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - supplier = {}>(args?: Prisma.Subset>): Prisma.Prisma__SupplierClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the SupplierLedger model - */ -export interface SupplierLedgerFieldRefs { - readonly id: Prisma.FieldRef<"SupplierLedger", 'Int'> - readonly description: Prisma.FieldRef<"SupplierLedger", 'String'> - readonly debit: Prisma.FieldRef<"SupplierLedger", 'Decimal'> - readonly credit: Prisma.FieldRef<"SupplierLedger", 'Decimal'> - readonly balance: Prisma.FieldRef<"SupplierLedger", 'Decimal'> - readonly sourceType: Prisma.FieldRef<"SupplierLedger", 'LedgerSourceType'> - readonly sourceId: Prisma.FieldRef<"SupplierLedger", 'Int'> - readonly createdAt: Prisma.FieldRef<"SupplierLedger", 'DateTime'> - readonly supplierId: Prisma.FieldRef<"SupplierLedger", 'Int'> -} - - -// Custom InputTypes -/** - * SupplierLedger findUnique - */ -export type SupplierLedgerFindUniqueArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - /** - * Filter, which SupplierLedger to fetch. - */ - where: Prisma.SupplierLedgerWhereUniqueInput -} - -/** - * SupplierLedger findUniqueOrThrow - */ -export type SupplierLedgerFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - /** - * Filter, which SupplierLedger to fetch. - */ - where: Prisma.SupplierLedgerWhereUniqueInput -} - -/** - * SupplierLedger findFirst - */ -export type SupplierLedgerFindFirstArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - /** - * Filter, which SupplierLedger to fetch. - */ - where?: Prisma.SupplierLedgerWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SupplierLedgers to fetch. - */ - orderBy?: Prisma.SupplierLedgerOrderByWithRelationInput | Prisma.SupplierLedgerOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SupplierLedgers. - */ - cursor?: Prisma.SupplierLedgerWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SupplierLedgers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SupplierLedgers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SupplierLedgers. - */ - distinct?: Prisma.SupplierLedgerScalarFieldEnum | Prisma.SupplierLedgerScalarFieldEnum[] -} - -/** - * SupplierLedger findFirstOrThrow - */ -export type SupplierLedgerFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - /** - * Filter, which SupplierLedger to fetch. - */ - where?: Prisma.SupplierLedgerWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SupplierLedgers to fetch. - */ - orderBy?: Prisma.SupplierLedgerOrderByWithRelationInput | Prisma.SupplierLedgerOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for SupplierLedgers. - */ - cursor?: Prisma.SupplierLedgerWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SupplierLedgers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SupplierLedgers. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of SupplierLedgers. - */ - distinct?: Prisma.SupplierLedgerScalarFieldEnum | Prisma.SupplierLedgerScalarFieldEnum[] -} - -/** - * SupplierLedger findMany - */ -export type SupplierLedgerFindManyArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - /** - * Filter, which SupplierLedgers to fetch. - */ - where?: Prisma.SupplierLedgerWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of SupplierLedgers to fetch. - */ - orderBy?: Prisma.SupplierLedgerOrderByWithRelationInput | Prisma.SupplierLedgerOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing SupplierLedgers. - */ - cursor?: Prisma.SupplierLedgerWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` SupplierLedgers from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` SupplierLedgers. - */ - skip?: number - distinct?: Prisma.SupplierLedgerScalarFieldEnum | Prisma.SupplierLedgerScalarFieldEnum[] -} - -/** - * SupplierLedger create - */ -export type SupplierLedgerCreateArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - /** - * The data needed to create a SupplierLedger. - */ - data: Prisma.XOR -} - -/** - * SupplierLedger createMany - */ -export type SupplierLedgerCreateManyArgs = { - /** - * The data used to create many SupplierLedgers. - */ - data: Prisma.SupplierLedgerCreateManyInput | Prisma.SupplierLedgerCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * SupplierLedger update - */ -export type SupplierLedgerUpdateArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - /** - * The data needed to update a SupplierLedger. - */ - data: Prisma.XOR - /** - * Choose, which SupplierLedger to update. - */ - where: Prisma.SupplierLedgerWhereUniqueInput -} - -/** - * SupplierLedger updateMany - */ -export type SupplierLedgerUpdateManyArgs = { - /** - * The data used to update SupplierLedgers. - */ - data: Prisma.XOR - /** - * Filter which SupplierLedgers to update - */ - where?: Prisma.SupplierLedgerWhereInput - /** - * Limit how many SupplierLedgers to update. - */ - limit?: number -} - -/** - * SupplierLedger upsert - */ -export type SupplierLedgerUpsertArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - /** - * The filter to search for the SupplierLedger to update in case it exists. - */ - where: Prisma.SupplierLedgerWhereUniqueInput - /** - * In case the SupplierLedger found by the `where` argument doesn't exist, create a new SupplierLedger with this data. - */ - create: Prisma.XOR - /** - * In case the SupplierLedger was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * SupplierLedger delete - */ -export type SupplierLedgerDeleteArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null - /** - * Filter which SupplierLedger to delete. - */ - where: Prisma.SupplierLedgerWhereUniqueInput -} - -/** - * SupplierLedger deleteMany - */ -export type SupplierLedgerDeleteManyArgs = { - /** - * Filter which SupplierLedgers to delete - */ - where?: Prisma.SupplierLedgerWhereInput - /** - * Limit how many SupplierLedgers to delete. - */ - limit?: number -} - -/** - * SupplierLedger without action - */ -export type SupplierLedgerDefaultArgs = { - /** - * Select specific fields to fetch from the SupplierLedger - */ - select?: Prisma.SupplierLedgerSelect | null - /** - * Omit specific fields from the SupplierLedger - */ - omit?: Prisma.SupplierLedgerOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.SupplierLedgerInclude | null -} diff --git a/src/generated/prisma/models/User.ts b/src/generated/prisma/models/User.ts deleted file mode 100644 index fc21d83..0000000 --- a/src/generated/prisma/models/User.ts +++ /dev/null @@ -1,1566 +0,0 @@ - -/* !!! This is code generated by Prisma. Do not edit directly. !!! */ -/* eslint-disable */ -// biome-ignore-all lint: generated file -// @ts-nocheck -/* - * This file exports the `User` model and its related types. - * - * 🟢 You can import this file directly. - */ -import type * as runtime from "@prisma/client/runtime/client" -import type * as $Enums from "../enums.js" -import type * as Prisma from "../internal/prismaNamespace.js" - -/** - * Model User - * - */ -export type UserModel = runtime.Types.Result.DefaultSelection - -export type AggregateUser = { - _count: UserCountAggregateOutputType | null - _avg: UserAvgAggregateOutputType | null - _sum: UserSumAggregateOutputType | null - _min: UserMinAggregateOutputType | null - _max: UserMaxAggregateOutputType | null -} - -export type UserAvgAggregateOutputType = { - id: number | null - roleId: number | null -} - -export type UserSumAggregateOutputType = { - id: number | null - roleId: number | null -} - -export type UserMinAggregateOutputType = { - id: number | null - mobileNumber: string | null - password: string | null - firstName: string | null - lastName: string | null - roleId: number | null - createdAt: Date | null - deletedAt: Date | null - updatedAt: Date | null -} - -export type UserMaxAggregateOutputType = { - id: number | null - mobileNumber: string | null - password: string | null - firstName: string | null - lastName: string | null - roleId: number | null - createdAt: Date | null - deletedAt: Date | null - updatedAt: Date | null -} - -export type UserCountAggregateOutputType = { - id: number - mobileNumber: number - password: number - firstName: number - lastName: number - roleId: number - createdAt: number - deletedAt: number - updatedAt: number - _all: number -} - - -export type UserAvgAggregateInputType = { - id?: true - roleId?: true -} - -export type UserSumAggregateInputType = { - id?: true - roleId?: true -} - -export type UserMinAggregateInputType = { - id?: true - mobileNumber?: true - password?: true - firstName?: true - lastName?: true - roleId?: true - createdAt?: true - deletedAt?: true - updatedAt?: true -} - -export type UserMaxAggregateInputType = { - id?: true - mobileNumber?: true - password?: true - firstName?: true - lastName?: true - roleId?: true - createdAt?: true - deletedAt?: true - updatedAt?: true -} - -export type UserCountAggregateInputType = { - id?: true - mobileNumber?: true - password?: true - firstName?: true - lastName?: true - roleId?: true - createdAt?: true - deletedAt?: true - updatedAt?: true - _all?: true -} - -export type UserAggregateArgs = { - /** - * Filter which User to aggregate. - */ - where?: Prisma.UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Users - **/ - _count?: true | UserCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: UserAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: UserSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: UserMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: UserMaxAggregateInputType -} - -export type GetUserAggregateType = { - [P in keyof T & keyof AggregateUser]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type UserGroupByArgs = { - where?: Prisma.UserWhereInput - orderBy?: Prisma.UserOrderByWithAggregationInput | Prisma.UserOrderByWithAggregationInput[] - by: Prisma.UserScalarFieldEnum[] | Prisma.UserScalarFieldEnum - having?: Prisma.UserScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: UserCountAggregateInputType | true - _avg?: UserAvgAggregateInputType - _sum?: UserSumAggregateInputType - _min?: UserMinAggregateInputType - _max?: UserMaxAggregateInputType -} - -export type UserGroupByOutputType = { - id: number - mobileNumber: string - password: string - firstName: string - lastName: string - roleId: number - createdAt: Date - deletedAt: Date | null - updatedAt: Date - _count: UserCountAggregateOutputType | null - _avg: UserAvgAggregateOutputType | null - _sum: UserSumAggregateOutputType | null - _min: UserMinAggregateOutputType | null - _max: UserMaxAggregateOutputType | null -} - -type GetUserGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof UserGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type UserWhereInput = { - AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[] - OR?: Prisma.UserWhereInput[] - NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[] - id?: Prisma.IntFilter<"User"> | number - mobileNumber?: Prisma.StringFilter<"User"> | string - password?: Prisma.StringFilter<"User"> | string - firstName?: Prisma.StringFilter<"User"> | string - lastName?: Prisma.StringFilter<"User"> | string - roleId?: Prisma.IntFilter<"User"> | number - createdAt?: Prisma.DateTimeFilter<"User"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null - updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string - refreshTokens?: Prisma.RefreshTokenListRelationFilter - role?: Prisma.XOR -} - -export type UserOrderByWithRelationInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - password?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - roleId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - updatedAt?: Prisma.SortOrder - refreshTokens?: Prisma.RefreshTokenOrderByRelationAggregateInput - role?: Prisma.RoleOrderByWithRelationInput - _relevance?: Prisma.UserOrderByRelevanceInput -} - -export type UserWhereUniqueInput = Prisma.AtLeast<{ - id?: number - mobileNumber?: string - AND?: Prisma.UserWhereInput | Prisma.UserWhereInput[] - OR?: Prisma.UserWhereInput[] - NOT?: Prisma.UserWhereInput | Prisma.UserWhereInput[] - password?: Prisma.StringFilter<"User"> | string - firstName?: Prisma.StringFilter<"User"> | string - lastName?: Prisma.StringFilter<"User"> | string - roleId?: Prisma.IntFilter<"User"> | number - createdAt?: Prisma.DateTimeFilter<"User"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null - updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string - refreshTokens?: Prisma.RefreshTokenListRelationFilter - role?: Prisma.XOR -}, "id" | "mobileNumber"> - -export type UserOrderByWithAggregationInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - password?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - roleId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - updatedAt?: Prisma.SortOrder - _count?: Prisma.UserCountOrderByAggregateInput - _avg?: Prisma.UserAvgOrderByAggregateInput - _max?: Prisma.UserMaxOrderByAggregateInput - _min?: Prisma.UserMinOrderByAggregateInput - _sum?: Prisma.UserSumOrderByAggregateInput -} - -export type UserScalarWhereWithAggregatesInput = { - AND?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[] - OR?: Prisma.UserScalarWhereWithAggregatesInput[] - NOT?: Prisma.UserScalarWhereWithAggregatesInput | Prisma.UserScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"User"> | number - mobileNumber?: Prisma.StringWithAggregatesFilter<"User"> | string - password?: Prisma.StringWithAggregatesFilter<"User"> | string - firstName?: Prisma.StringWithAggregatesFilter<"User"> | string - lastName?: Prisma.StringWithAggregatesFilter<"User"> | string - roleId?: Prisma.IntWithAggregatesFilter<"User"> | number - createdAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"User"> | Date | string | null - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"User"> | Date | string -} - -export type UserCreateInput = { - mobileNumber: string - password: string - firstName: string - lastName: string - createdAt?: Date | string - deletedAt?: Date | string | null - updatedAt?: Date | string - refreshTokens?: Prisma.RefreshTokenCreateNestedManyWithoutUserInput - role: Prisma.RoleCreateNestedOneWithoutUsersInput -} - -export type UserUncheckedCreateInput = { - id?: number - mobileNumber: string - password: string - firstName: string - lastName: string - roleId: number - createdAt?: Date | string - deletedAt?: Date | string | null - updatedAt?: Date | string - refreshTokens?: Prisma.RefreshTokenUncheckedCreateNestedManyWithoutUserInput -} - -export type UserUpdateInput = { - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - password?: Prisma.StringFieldUpdateOperationsInput | string - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - refreshTokens?: Prisma.RefreshTokenUpdateManyWithoutUserNestedInput - role?: Prisma.RoleUpdateOneRequiredWithoutUsersNestedInput -} - -export type UserUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - password?: Prisma.StringFieldUpdateOperationsInput | string - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - roleId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - refreshTokens?: Prisma.RefreshTokenUncheckedUpdateManyWithoutUserNestedInput -} - -export type UserCreateManyInput = { - id?: number - mobileNumber: string - password: string - firstName: string - lastName: string - roleId: number - createdAt?: Date | string - deletedAt?: Date | string | null - updatedAt?: Date | string -} - -export type UserUpdateManyMutationInput = { - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - password?: Prisma.StringFieldUpdateOperationsInput | string - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type UserUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - password?: Prisma.StringFieldUpdateOperationsInput | string - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - roleId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type UserOrderByRelevanceInput = { - fields: Prisma.UserOrderByRelevanceFieldEnum | Prisma.UserOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type UserCountOrderByAggregateInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - password?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - roleId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type UserAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - roleId?: Prisma.SortOrder -} - -export type UserMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - password?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - roleId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type UserMinOrderByAggregateInput = { - id?: Prisma.SortOrder - mobileNumber?: Prisma.SortOrder - password?: Prisma.SortOrder - firstName?: Prisma.SortOrder - lastName?: Prisma.SortOrder - roleId?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type UserSumOrderByAggregateInput = { - id?: Prisma.SortOrder - roleId?: Prisma.SortOrder -} - -export type UserListRelationFilter = { - every?: Prisma.UserWhereInput - some?: Prisma.UserWhereInput - none?: Prisma.UserWhereInput -} - -export type UserOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type UserScalarRelationFilter = { - is?: Prisma.UserWhereInput - isNot?: Prisma.UserWhereInput -} - -export type StringFieldUpdateOperationsInput = { - set?: string -} - -export type DateTimeFieldUpdateOperationsInput = { - set?: Date | string -} - -export type NullableDateTimeFieldUpdateOperationsInput = { - set?: Date | string | null -} - -export type IntFieldUpdateOperationsInput = { - set?: number - increment?: number - decrement?: number - multiply?: number - divide?: number -} - -export type UserCreateNestedManyWithoutRoleInput = { - create?: Prisma.XOR | Prisma.UserCreateWithoutRoleInput[] | Prisma.UserUncheckedCreateWithoutRoleInput[] - connectOrCreate?: Prisma.UserCreateOrConnectWithoutRoleInput | Prisma.UserCreateOrConnectWithoutRoleInput[] - createMany?: Prisma.UserCreateManyRoleInputEnvelope - connect?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] -} - -export type UserUncheckedCreateNestedManyWithoutRoleInput = { - create?: Prisma.XOR | Prisma.UserCreateWithoutRoleInput[] | Prisma.UserUncheckedCreateWithoutRoleInput[] - connectOrCreate?: Prisma.UserCreateOrConnectWithoutRoleInput | Prisma.UserCreateOrConnectWithoutRoleInput[] - createMany?: Prisma.UserCreateManyRoleInputEnvelope - connect?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] -} - -export type UserUpdateManyWithoutRoleNestedInput = { - create?: Prisma.XOR | Prisma.UserCreateWithoutRoleInput[] | Prisma.UserUncheckedCreateWithoutRoleInput[] - connectOrCreate?: Prisma.UserCreateOrConnectWithoutRoleInput | Prisma.UserCreateOrConnectWithoutRoleInput[] - upsert?: Prisma.UserUpsertWithWhereUniqueWithoutRoleInput | Prisma.UserUpsertWithWhereUniqueWithoutRoleInput[] - createMany?: Prisma.UserCreateManyRoleInputEnvelope - set?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] - disconnect?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] - delete?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] - connect?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] - update?: Prisma.UserUpdateWithWhereUniqueWithoutRoleInput | Prisma.UserUpdateWithWhereUniqueWithoutRoleInput[] - updateMany?: Prisma.UserUpdateManyWithWhereWithoutRoleInput | Prisma.UserUpdateManyWithWhereWithoutRoleInput[] - deleteMany?: Prisma.UserScalarWhereInput | Prisma.UserScalarWhereInput[] -} - -export type UserUncheckedUpdateManyWithoutRoleNestedInput = { - create?: Prisma.XOR | Prisma.UserCreateWithoutRoleInput[] | Prisma.UserUncheckedCreateWithoutRoleInput[] - connectOrCreate?: Prisma.UserCreateOrConnectWithoutRoleInput | Prisma.UserCreateOrConnectWithoutRoleInput[] - upsert?: Prisma.UserUpsertWithWhereUniqueWithoutRoleInput | Prisma.UserUpsertWithWhereUniqueWithoutRoleInput[] - createMany?: Prisma.UserCreateManyRoleInputEnvelope - set?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] - disconnect?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] - delete?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] - connect?: Prisma.UserWhereUniqueInput | Prisma.UserWhereUniqueInput[] - update?: Prisma.UserUpdateWithWhereUniqueWithoutRoleInput | Prisma.UserUpdateWithWhereUniqueWithoutRoleInput[] - updateMany?: Prisma.UserUpdateManyWithWhereWithoutRoleInput | Prisma.UserUpdateManyWithWhereWithoutRoleInput[] - deleteMany?: Prisma.UserScalarWhereInput | Prisma.UserScalarWhereInput[] -} - -export type UserCreateNestedOneWithoutRefreshTokensInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.UserCreateOrConnectWithoutRefreshTokensInput - connect?: Prisma.UserWhereUniqueInput -} - -export type UserUpdateOneRequiredWithoutRefreshTokensNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.UserCreateOrConnectWithoutRefreshTokensInput - upsert?: Prisma.UserUpsertWithoutRefreshTokensInput - connect?: Prisma.UserWhereUniqueInput - update?: Prisma.XOR, Prisma.UserUncheckedUpdateWithoutRefreshTokensInput> -} - -export type UserCreateWithoutRoleInput = { - mobileNumber: string - password: string - firstName: string - lastName: string - createdAt?: Date | string - deletedAt?: Date | string | null - updatedAt?: Date | string - refreshTokens?: Prisma.RefreshTokenCreateNestedManyWithoutUserInput -} - -export type UserUncheckedCreateWithoutRoleInput = { - id?: number - mobileNumber: string - password: string - firstName: string - lastName: string - createdAt?: Date | string - deletedAt?: Date | string | null - updatedAt?: Date | string - refreshTokens?: Prisma.RefreshTokenUncheckedCreateNestedManyWithoutUserInput -} - -export type UserCreateOrConnectWithoutRoleInput = { - where: Prisma.UserWhereUniqueInput - create: Prisma.XOR -} - -export type UserCreateManyRoleInputEnvelope = { - data: Prisma.UserCreateManyRoleInput | Prisma.UserCreateManyRoleInput[] - skipDuplicates?: boolean -} - -export type UserUpsertWithWhereUniqueWithoutRoleInput = { - where: Prisma.UserWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type UserUpdateWithWhereUniqueWithoutRoleInput = { - where: Prisma.UserWhereUniqueInput - data: Prisma.XOR -} - -export type UserUpdateManyWithWhereWithoutRoleInput = { - where: Prisma.UserScalarWhereInput - data: Prisma.XOR -} - -export type UserScalarWhereInput = { - AND?: Prisma.UserScalarWhereInput | Prisma.UserScalarWhereInput[] - OR?: Prisma.UserScalarWhereInput[] - NOT?: Prisma.UserScalarWhereInput | Prisma.UserScalarWhereInput[] - id?: Prisma.IntFilter<"User"> | number - mobileNumber?: Prisma.StringFilter<"User"> | string - password?: Prisma.StringFilter<"User"> | string - firstName?: Prisma.StringFilter<"User"> | string - lastName?: Prisma.StringFilter<"User"> | string - roleId?: Prisma.IntFilter<"User"> | number - createdAt?: Prisma.DateTimeFilter<"User"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null - updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string -} - -export type UserCreateWithoutRefreshTokensInput = { - mobileNumber: string - password: string - firstName: string - lastName: string - createdAt?: Date | string - deletedAt?: Date | string | null - updatedAt?: Date | string - role: Prisma.RoleCreateNestedOneWithoutUsersInput -} - -export type UserUncheckedCreateWithoutRefreshTokensInput = { - id?: number - mobileNumber: string - password: string - firstName: string - lastName: string - roleId: number - createdAt?: Date | string - deletedAt?: Date | string | null - updatedAt?: Date | string -} - -export type UserCreateOrConnectWithoutRefreshTokensInput = { - where: Prisma.UserWhereUniqueInput - create: Prisma.XOR -} - -export type UserUpsertWithoutRefreshTokensInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.UserWhereInput -} - -export type UserUpdateToOneWithWhereWithoutRefreshTokensInput = { - where?: Prisma.UserWhereInput - data: Prisma.XOR -} - -export type UserUpdateWithoutRefreshTokensInput = { - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - password?: Prisma.StringFieldUpdateOperationsInput | string - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - role?: Prisma.RoleUpdateOneRequiredWithoutUsersNestedInput -} - -export type UserUncheckedUpdateWithoutRefreshTokensInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - password?: Prisma.StringFieldUpdateOperationsInput | string - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - roleId?: Prisma.IntFieldUpdateOperationsInput | number - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - -export type UserCreateManyRoleInput = { - id?: number - mobileNumber: string - password: string - firstName: string - lastName: string - createdAt?: Date | string - deletedAt?: Date | string | null - updatedAt?: Date | string -} - -export type UserUpdateWithoutRoleInput = { - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - password?: Prisma.StringFieldUpdateOperationsInput | string - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - refreshTokens?: Prisma.RefreshTokenUpdateManyWithoutUserNestedInput -} - -export type UserUncheckedUpdateWithoutRoleInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - password?: Prisma.StringFieldUpdateOperationsInput | string - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - refreshTokens?: Prisma.RefreshTokenUncheckedUpdateManyWithoutUserNestedInput -} - -export type UserUncheckedUpdateManyWithoutRoleInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string - password?: Prisma.StringFieldUpdateOperationsInput | string - firstName?: Prisma.StringFieldUpdateOperationsInput | string - lastName?: Prisma.StringFieldUpdateOperationsInput | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string -} - - -/** - * Count Type UserCountOutputType - */ - -export type UserCountOutputType = { - refreshTokens: number -} - -export type UserCountOutputTypeSelect = { - refreshTokens?: boolean | UserCountOutputTypeCountRefreshTokensArgs -} - -/** - * UserCountOutputType without action - */ -export type UserCountOutputTypeDefaultArgs = { - /** - * Select specific fields to fetch from the UserCountOutputType - */ - select?: Prisma.UserCountOutputTypeSelect | null -} - -/** - * UserCountOutputType without action - */ -export type UserCountOutputTypeCountRefreshTokensArgs = { - where?: Prisma.RefreshTokenWhereInput -} - - -export type UserSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - mobileNumber?: boolean - password?: boolean - firstName?: boolean - lastName?: boolean - roleId?: boolean - createdAt?: boolean - deletedAt?: boolean - updatedAt?: boolean - refreshTokens?: boolean | Prisma.User$refreshTokensArgs - role?: boolean | Prisma.RoleDefaultArgs - _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs -}, ExtArgs["result"]["user"]> - - - -export type UserSelectScalar = { - id?: boolean - mobileNumber?: boolean - password?: boolean - firstName?: boolean - lastName?: boolean - roleId?: boolean - createdAt?: boolean - deletedAt?: boolean - updatedAt?: boolean -} - -export type UserOmit = runtime.Types.Extensions.GetOmit<"id" | "mobileNumber" | "password" | "firstName" | "lastName" | "roleId" | "createdAt" | "deletedAt" | "updatedAt", ExtArgs["result"]["user"]> -export type UserInclude = { - refreshTokens?: boolean | Prisma.User$refreshTokensArgs - role?: boolean | Prisma.RoleDefaultArgs - _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs -} - -export type $UserPayload = { - name: "User" - objects: { - refreshTokens: Prisma.$RefreshTokenPayload[] - role: Prisma.$RolePayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - mobileNumber: string - password: string - firstName: string - lastName: string - roleId: number - createdAt: Date - deletedAt: Date | null - updatedAt: Date - }, ExtArgs["result"]["user"]> - composites: {} -} - -export type UserGetPayload = runtime.Types.Result.GetResult - -export type UserCountArgs = - Omit & { - select?: UserCountAggregateInputType | true - } - -export interface UserDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['User'], meta: { name: 'User' } } - /** - * Find zero or one User that matches the filter. - * @param {UserFindUniqueArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one User that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {UserFindUniqueOrThrowArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first User that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindFirstArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first User that matches the filter or - * throw `PrismaKnownClientError` with `P2025` code if no matches were found. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindFirstOrThrowArgs} args - Arguments to find a User - * @example - * // Get one User - * const user = await prisma.user.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Users that matches the filter. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Users - * const users = await prisma.user.findMany() - * - * // Get first 10 Users - * const users = await prisma.user.findMany({ take: 10 }) - * - * // Only select the `id` - * const userWithIdOnly = await prisma.user.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a User. - * @param {UserCreateArgs} args - Arguments to create a User. - * @example - * // Create one User - * const User = await prisma.user.create({ - * data: { - * // ... data to create a User - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Users. - * @param {UserCreateManyArgs} args - Arguments to create many Users. - * @example - * // Create many Users - * const user = await prisma.user.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a User. - * @param {UserDeleteArgs} args - Arguments to delete one User. - * @example - * // Delete one User - * const User = await prisma.user.delete({ - * where: { - * // ... filter to delete one User - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one User. - * @param {UserUpdateArgs} args - Arguments to update one User. - * @example - * // Update one User - * const user = await prisma.user.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Users. - * @param {UserDeleteManyArgs} args - Arguments to filter Users to delete. - * @example - * // Delete a few Users - * const { count } = await prisma.user.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Users. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Users - * const user = await prisma.user.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one User. - * @param {UserUpsertArgs} args - Arguments to update or create a User. - * @example - * // Update or create a User - * const user = await prisma.user.upsert({ - * create: { - * // ... data to create a User - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the User we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__UserClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Users. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserCountArgs} args - Arguments to filter Users to count. - * @example - * // Count the number of Users - * const count = await prisma.user.count({ - * where: { - * // ... the filter for the Users we want to count - * } - * }) - **/ - count( - args?: Prisma.Subset, - ): Prisma.PrismaPromise< - T extends runtime.Types.Utils.Record<'select', any> - ? T['select'] extends true - ? number - : Prisma.GetScalarType - : number - > - - /** - * Allows you to perform aggregations operations on a User. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserAggregateArgs} args - Select which aggregations you would like to apply and on what fields. - * @example - * // Ordered by age ascending - * // Where email contains prisma.io - * // Limited to the 10 users - * const aggregations = await prisma.user.aggregate({ - * _avg: { - * age: true, - * }, - * where: { - * email: { - * contains: "prisma.io", - * }, - * }, - * orderBy: { - * age: "asc", - * }, - * take: 10, - * }) - **/ - aggregate(args: Prisma.Subset): Prisma.PrismaPromise> - - /** - * Group by User. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {UserGroupByArgs} args - Group by arguments. - * @example - * // Group by city, order by createdAt, get count - * const result = await prisma.user.groupBy({ - * by: ['city', 'createdAt'], - * orderBy: { - * createdAt: true - * }, - * _count: { - * _all: true - * }, - * }) - * - **/ - groupBy< - T extends UserGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: UserGroupByArgs['orderBy'] } - : { orderBy?: UserGroupByArgs['orderBy'] }, - OrderFields extends Prisma.ExcludeUnderscoreKeys>>, - ByFields extends Prisma.MaybeTupleToUnion, - ByValid extends Prisma.Has, - HavingFields extends Prisma.GetHavingFields, - HavingValid extends Prisma.Has, - ByEmpty extends T['by'] extends never[] ? Prisma.True : Prisma.False, - InputErrors extends ByEmpty extends Prisma.True - ? `Error: "by" must not be empty.` - : HavingValid extends Prisma.False - ? { - [P in HavingFields]: P extends ByFields - ? never - : P extends string - ? `Error: Field "${P}" used in "having" needs to be provided in "by".` - : [ - Error, - 'Field ', - P, - ` in "having" needs to be provided in "by"`, - ] - }[HavingFields] - : 'take' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "take", you also need to provide "orderBy"' - : 'skip' extends Prisma.Keys - ? 'orderBy' extends Prisma.Keys - ? ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - : 'Error: If you provide "skip", you also need to provide "orderBy"' - : ByValid extends Prisma.True - ? {} - : { - [P in OrderFields]: P extends ByFields - ? never - : `Error: Field "${P}" in "orderBy" needs to be provided in "by"` - }[OrderFields] - >(args: Prisma.SubsetIntersection & InputErrors): {} extends InputErrors ? GetUserGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the User model - */ -readonly fields: UserFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for User. - * Why is this prefixed with `Prisma__`? - * Because we want to prevent naming conflicts as mentioned in - * https://github.com/prisma/prisma-client-js/issues/707 - */ -export interface Prisma__UserClient extends Prisma.PrismaPromise { - readonly [Symbol.toStringTag]: "PrismaPromise" - refreshTokens = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - role = {}>(args?: Prisma.Subset>): Prisma.Prisma__RoleClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> - /** - * Attaches callbacks for the resolution and/or rejection of the Promise. - * @param onfulfilled The callback to execute when the Promise is resolved. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of which ever callback is executed. - */ - then(onfulfilled?: ((value: T) => TResult1 | PromiseLike) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback for only the rejection of the Promise. - * @param onrejected The callback to execute when the Promise is rejected. - * @returns A Promise for the completion of the callback. - */ - catch(onrejected?: ((reason: any) => TResult | PromiseLike) | undefined | null): runtime.Types.Utils.JsPromise - /** - * Attaches a callback that is invoked when the Promise is settled (fulfilled or rejected). The - * resolved value cannot be modified from the callback. - * @param onfinally The callback to execute when the Promise is settled (fulfilled or rejected). - * @returns A Promise for the completion of the callback. - */ - finally(onfinally?: (() => void) | undefined | null): runtime.Types.Utils.JsPromise -} - - - - -/** - * Fields of the User model - */ -export interface UserFieldRefs { - readonly id: Prisma.FieldRef<"User", 'Int'> - readonly mobileNumber: Prisma.FieldRef<"User", 'String'> - readonly password: Prisma.FieldRef<"User", 'String'> - readonly firstName: Prisma.FieldRef<"User", 'String'> - readonly lastName: Prisma.FieldRef<"User", 'String'> - readonly roleId: Prisma.FieldRef<"User", 'Int'> - readonly createdAt: Prisma.FieldRef<"User", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"User", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"User", 'DateTime'> -} - - -// Custom InputTypes -/** - * User findUnique - */ -export type UserFindUniqueArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - /** - * Filter, which User to fetch. - */ - where: Prisma.UserWhereUniqueInput -} - -/** - * User findUniqueOrThrow - */ -export type UserFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - /** - * Filter, which User to fetch. - */ - where: Prisma.UserWhereUniqueInput -} - -/** - * User findFirst - */ -export type UserFindFirstArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - /** - * Filter, which User to fetch. - */ - where?: Prisma.UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Users. - */ - cursor?: Prisma.UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Users. - */ - distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] -} - -/** - * User findFirstOrThrow - */ -export type UserFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - /** - * Filter, which User to fetch. - */ - where?: Prisma.UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Users. - */ - cursor?: Prisma.UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Users. - */ - distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] -} - -/** - * User findMany - */ -export type UserFindManyArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - /** - * Filter, which Users to fetch. - */ - where?: Prisma.UserWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Users to fetch. - */ - orderBy?: Prisma.UserOrderByWithRelationInput | Prisma.UserOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Users. - */ - cursor?: Prisma.UserWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Users from the position of the cursor. - */ - take?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Skip the first `n` Users. - */ - skip?: number - distinct?: Prisma.UserScalarFieldEnum | Prisma.UserScalarFieldEnum[] -} - -/** - * User create - */ -export type UserCreateArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - /** - * The data needed to create a User. - */ - data: Prisma.XOR -} - -/** - * User createMany - */ -export type UserCreateManyArgs = { - /** - * The data used to create many Users. - */ - data: Prisma.UserCreateManyInput | Prisma.UserCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * User update - */ -export type UserUpdateArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - /** - * The data needed to update a User. - */ - data: Prisma.XOR - /** - * Choose, which User to update. - */ - where: Prisma.UserWhereUniqueInput -} - -/** - * User updateMany - */ -export type UserUpdateManyArgs = { - /** - * The data used to update Users. - */ - data: Prisma.XOR - /** - * Filter which Users to update - */ - where?: Prisma.UserWhereInput - /** - * Limit how many Users to update. - */ - limit?: number -} - -/** - * User upsert - */ -export type UserUpsertArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - /** - * The filter to search for the User to update in case it exists. - */ - where: Prisma.UserWhereUniqueInput - /** - * In case the User found by the `where` argument doesn't exist, create a new User with this data. - */ - create: Prisma.XOR - /** - * In case the User was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * User delete - */ -export type UserDeleteArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null - /** - * Filter which User to delete. - */ - where: Prisma.UserWhereUniqueInput -} - -/** - * User deleteMany - */ -export type UserDeleteManyArgs = { - /** - * Filter which Users to delete - */ - where?: Prisma.UserWhereInput - /** - * Limit how many Users to delete. - */ - limit?: number -} - -/** - * User.refreshTokens - */ -export type User$refreshTokensArgs = { - /** - * Select specific fields to fetch from the RefreshToken - */ - select?: Prisma.RefreshTokenSelect | null - /** - * Omit specific fields from the RefreshToken - */ - omit?: Prisma.RefreshTokenOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.RefreshTokenInclude | null - where?: Prisma.RefreshTokenWhereInput - orderBy?: Prisma.RefreshTokenOrderByWithRelationInput | Prisma.RefreshTokenOrderByWithRelationInput[] - cursor?: Prisma.RefreshTokenWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.RefreshTokenScalarFieldEnum | Prisma.RefreshTokenScalarFieldEnum[] -} - -/** - * User without action - */ -export type UserDefaultArgs = { - /** - * Select specific fields to fetch from the User - */ - select?: Prisma.UserSelect | null - /** - * Omit specific fields from the User - */ - omit?: Prisma.UserOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.UserInclude | null -} diff --git a/src/inventory-transfer-items/dto/create-inventory-transfer-item.dto.ts b/src/inventory-transfer-items/dto/create-inventory-transfer-item.dto.ts deleted file mode 100644 index b883e9e..0000000 --- a/src/inventory-transfer-items/dto/create-inventory-transfer-item.dto.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { ApiProperty } from '@nestjs/swagger' -import { Type } from 'class-transformer' -import { IsInt, IsNumber } from 'class-validator' - -export class CreateInventoryTransferItemDto { - @ApiProperty() - @Type(() => Number) - @IsNumber() - count: number - - @ApiProperty() - @Type(() => Number) - @IsInt() - productId: number - - @ApiProperty() - @Type(() => Number) - @IsInt() - transferId: number -} diff --git a/src/inventory-transfer-items/dto/update-inventory-transfer-item.dto.ts b/src/inventory-transfer-items/dto/update-inventory-transfer-item.dto.ts deleted file mode 100644 index d54b1cf..0000000 --- a/src/inventory-transfer-items/dto/update-inventory-transfer-item.dto.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ApiPropertyOptional } from '@nestjs/swagger' -import { Type } from 'class-transformer' -import { IsInt, IsNumber, IsOptional } from 'class-validator' - -export class UpdateInventoryTransferItemDto { - @ApiPropertyOptional() - @IsOptional() - @Type(() => Number) - @IsNumber() - count?: number - - @ApiPropertyOptional() - @IsOptional() - @Type(() => Number) - @IsInt() - productId?: number - - @ApiPropertyOptional() - @IsOptional() - @Type(() => Number) - @IsInt() - transferId?: number -} diff --git a/src/inventory-transfer-items/inventory-transfer-items.controller.ts b/src/inventory-transfer-items/inventory-transfer-items.controller.ts deleted file mode 100644 index ba2de37..0000000 --- a/src/inventory-transfer-items/inventory-transfer-items.controller.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateInventoryTransferItemDto } from './dto/create-inventory-transfer-item.dto' -import { UpdateInventoryTransferItemDto } from './dto/update-inventory-transfer-item.dto' -import { InventoryTransferItemsService } from './inventory-transfer-items.service' - -@Controller('inventory-transfers/:transferId/items') -export class InventoryTransferItemsController { - constructor(private readonly service: InventoryTransferItemsService) {} - - @Post() - create( - @Param('transferId') transferId: string, - @Body() dto: CreateInventoryTransferItemDto, - ) { - // ensure transferId from route is used - return this.service.createForTransfer(Number(transferId), dto) - } - - @Get() - findAll(@Param('transferId') transferId: string) { - return this.service.findAllForTransfer(Number(transferId)) - } - - @Get(':id') - findOne(@Param('transferId') transferId: string, @Param('id') id: string) { - return this.service.findOneForTransfer(Number(transferId), Number(id)) - } - - @Patch(':id') - update( - @Param('transferId') transferId: string, - @Param('id') id: string, - @Body() dto: UpdateInventoryTransferItemDto, - ) { - return this.service.updateForTransfer(Number(transferId), Number(id), dto) - } - - @Delete(':id') - remove(@Param('transferId') transferId: string, @Param('id') id: string) { - return this.service.removeForTransfer(Number(transferId), Number(id)) - } -} diff --git a/src/inventory-transfer-items/inventory-transfer-items.module.ts b/src/inventory-transfer-items/inventory-transfer-items.module.ts deleted file mode 100644 index f1e8c1c..0000000 --- a/src/inventory-transfer-items/inventory-transfer-items.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { InventoryTransferItemsController } from './inventory-transfer-items.controller' -import { InventoryTransferItemsService } from './inventory-transfer-items.service' - -@Module({ - imports: [PrismaModule], - controllers: [InventoryTransferItemsController], - providers: [InventoryTransferItemsService], -}) -export class InventoryTransferItemsModule {} diff --git a/src/inventory-transfer-items/inventory-transfer-items.service.ts b/src/inventory-transfer-items/inventory-transfer-items.service.ts deleted file mode 100644 index 2638641..0000000 --- a/src/inventory-transfer-items/inventory-transfer-items.service.ts +++ /dev/null @@ -1,101 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' -import { CreateInventoryTransferItemDto } from './dto/create-inventory-transfer-item.dto' - -@Injectable() -export class InventoryTransferItemsService { - constructor(private prisma: PrismaService) {} - - async create(dto: CreateInventoryTransferItemDto) { - const payload: any = { ...dto } - if (Object.prototype.hasOwnProperty.call(payload, 'productId')) { - payload.product = { connect: { id: Number(payload.productId) } } - delete payload.productId - } - if (Object.prototype.hasOwnProperty.call(payload, 'transferId')) { - payload.transfer = { connect: { id: Number(payload.transferId) } } - delete payload.transferId - } - - const item = await this.prisma.inventoryTransferItem.create({ data: payload }) - return ResponseMapper.create(item) - } - - async findAll(transferId?: number) { - const where = transferId ? { transferId: Number(transferId) } : undefined - const items = await this.prisma.inventoryTransferItem.findMany({ - where, - include: { product: true }, - }) - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.inventoryTransferItem.findUnique({ - where: { id }, - include: { product: true, transfer: true }, - }) - if (!item) return null - return ResponseMapper.single(item) - } - - // scoped helpers for nested routes - async createForTransfer(transferId: number, dto: CreateInventoryTransferItemDto) { - const payload: any = { ...dto, transferId } - return this.create(payload) - } - - async findAllForTransfer(transferId: number) { - return this.findAll(transferId) - } - - async findOneForTransfer(transferId: number, id: number) { - const item = await this.prisma.inventoryTransferItem.findFirst({ - where: { id, transferId }, - include: { product: true, transfer: true }, - }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const payload: any = { ...data } - if (Object.prototype.hasOwnProperty.call(payload, 'productId')) { - payload.product = { connect: { id: Number(payload.productId) } } - delete payload.productId - } - if (Object.prototype.hasOwnProperty.call(payload, 'transferId')) { - payload.transfer = { connect: { id: Number(payload.transferId) } } - delete payload.transferId - } - - const item = await this.prisma.inventoryTransferItem.update({ - where: { id }, - data: payload, - }) - return ResponseMapper.update(item) - } - - async updateForTransfer(transferId: number, id: number, data: any) { - // ensure the item belongs to the transfer - const existing = await this.prisma.inventoryTransferItem.findFirst({ - where: { id, transferId }, - }) - if (!existing) return null - return this.update(id, data) - } - - async remove(id: number) { - const item = await this.prisma.inventoryTransferItem.delete({ where: { id } }) - return ResponseMapper.single(item) - } - - async removeForTransfer(transferId: number, id: number) { - const existing = await this.prisma.inventoryTransferItem.findFirst({ - where: { id, transferId }, - }) - if (!existing) return null - return this.remove(id) - } -} diff --git a/src/inventory-transfers/dto/create-inventory-transfer.dto.ts b/src/inventory-transfers/dto/create-inventory-transfer.dto.ts deleted file mode 100644 index 4411cc3..0000000 --- a/src/inventory-transfers/dto/create-inventory-transfer.dto.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger' -import { Type } from 'class-transformer' -import { ArrayMinSize, IsInt, IsOptional, IsString } from 'class-validator' -import { CreateInventoryTransferItemDto } from '../../inventory-transfer-items/dto/create-inventory-transfer-item.dto' - -export class CreateInventoryTransferDto { - @ApiProperty() - @IsString() - code: string - - @ApiPropertyOptional() - @IsOptional() - @IsString() - description?: string - - @ApiProperty() - @Type(() => Number) - @IsInt() - fromInventoryId: number - - @ApiProperty() - @Type(() => Number) - @IsInt() - toInventoryId: number - - @ApiProperty({ type: [CreateInventoryTransferItemDto] }) - @Type(() => Array) - @ArrayMinSize(1) - items: Array> -} diff --git a/src/inventory-transfers/dto/update-inventory-transfer.dto.ts b/src/inventory-transfers/dto/update-inventory-transfer.dto.ts deleted file mode 100644 index f433db3..0000000 --- a/src/inventory-transfers/dto/update-inventory-transfer.dto.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { ApiPropertyOptional } from '@nestjs/swagger' -import { Type } from 'class-transformer' -import { IsInt, IsOptional, IsString } from 'class-validator' - -export class UpdateInventoryTransferDto { - @ApiPropertyOptional() - @IsOptional() - @IsString() - code?: string - - @ApiPropertyOptional() - @IsOptional() - @IsString() - description?: string - - @ApiPropertyOptional() - @IsOptional() - @Type(() => Number) - @IsInt() - fromInventoryId?: number | null - - @ApiPropertyOptional() - @IsOptional() - @Type(() => Number) - @IsInt() - toInventoryId?: number | null -} diff --git a/src/inventory-transfers/inventory-transfers.controller.ts b/src/inventory-transfers/inventory-transfers.controller.ts deleted file mode 100644 index 37d02c9..0000000 --- a/src/inventory-transfers/inventory-transfers.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateInventoryTransferDto } from './dto/create-inventory-transfer.dto' -import { UpdateInventoryTransferDto } from './dto/update-inventory-transfer.dto' -import { InventoryTransfersService } from './inventory-transfers.service' - -@Controller('inventories/transfers') -export class InventoryTransfersController { - constructor(private readonly service: InventoryTransfersService) {} - - @Post() - create(@Body() dto: CreateInventoryTransferDto) { - return this.service.create(dto) - } - - @Get() - findAll() { - return this.service.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.service.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateInventoryTransferDto) { - return this.service.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.service.remove(Number(id)) - } -} diff --git a/src/inventory-transfers/inventory-transfers.module.ts b/src/inventory-transfers/inventory-transfers.module.ts deleted file mode 100644 index be4fbfc..0000000 --- a/src/inventory-transfers/inventory-transfers.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { InventoryTransfersController } from './inventory-transfers.controller' -import { InventoryTransfersService } from './inventory-transfers.service' - -@Module({ - imports: [PrismaModule], - controllers: [InventoryTransfersController], - providers: [InventoryTransfersService], -}) -export class InventoryTransfersModule {} diff --git a/src/inventory-transfers/inventory-transfers.service.ts b/src/inventory-transfers/inventory-transfers.service.ts deleted file mode 100644 index ec8798b..0000000 --- a/src/inventory-transfers/inventory-transfers.service.ts +++ /dev/null @@ -1,74 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' -import { CreateInventoryTransferDto } from './dto/create-inventory-transfer.dto' - -@Injectable() -export class InventoryTransfersService { - constructor(private prisma: PrismaService) {} - - async create(dto: CreateInventoryTransferDto) { - const payload: any = { ...dto } - if (Object.prototype.hasOwnProperty.call(payload, 'fromInventoryId')) { - payload.fromInventory = { connect: { id: Number(payload.fromInventoryId) } } - delete payload.fromInventoryId - } - if (Object.prototype.hasOwnProperty.call(payload, 'toInventoryId')) { - payload.toInventory = { connect: { id: Number(payload.toInventoryId) } } - delete payload.toInventoryId - } - - if (Object.prototype.hasOwnProperty.call(payload, 'items')) { - payload.items = { - create: payload.items.map((item: any) => ({ - product: { connect: { id: Number(item.productId) } }, - count: item.count, - })), - } - } - - const item = await this.prisma.inventoryTransfer.create({ data: payload }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.inventoryTransfer.findMany({ - include: { fromInventory: true, toInventory: true }, - }) - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.inventoryTransfer.findUnique({ - where: { id }, - include: { items: true, fromInventory: true, toInventory: true }, - }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const payload: any = { ...data } - if (Object.prototype.hasOwnProperty.call(payload, 'fromInventoryId')) { - if (payload.fromInventoryId === null) payload.fromInventory = { disconnect: true } - else payload.fromInventory = { connect: { id: Number(payload.fromInventoryId) } } - delete payload.fromInventoryId - } - if (Object.prototype.hasOwnProperty.call(payload, 'toInventoryId')) { - if (payload.toInventoryId === null) payload.toInventory = { disconnect: true } - else payload.toInventory = { connect: { id: Number(payload.toInventoryId) } } - delete payload.toInventoryId - } - - const item = await this.prisma.inventoryTransfer.update({ - where: { id }, - data: payload, - }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.inventoryTransfer.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/auth/auth.controller.ts b/src/modules/auth/auth.controller.ts similarity index 100% rename from src/auth/auth.controller.ts rename to src/modules/auth/auth.controller.ts diff --git a/src/auth/auth.module.ts b/src/modules/auth/auth.module.ts similarity index 100% rename from src/auth/auth.module.ts rename to src/modules/auth/auth.module.ts diff --git a/src/auth/auth.service.ts b/src/modules/auth/auth.service.ts similarity index 100% rename from src/auth/auth.service.ts rename to src/modules/auth/auth.service.ts diff --git a/src/auth/current-user.decorator.ts b/src/modules/auth/current-user.decorator.ts similarity index 100% rename from src/auth/current-user.decorator.ts rename to src/modules/auth/current-user.decorator.ts diff --git a/src/auth/dto/login.dto.ts b/src/modules/auth/dto/login.dto.ts similarity index 100% rename from src/auth/dto/login.dto.ts rename to src/modules/auth/dto/login.dto.ts diff --git a/src/auth/dto/refresh-token.dto.ts b/src/modules/auth/dto/refresh-token.dto.ts similarity index 100% rename from src/auth/dto/refresh-token.dto.ts rename to src/modules/auth/dto/refresh-token.dto.ts diff --git a/src/auth/dto/send-code.dto.ts b/src/modules/auth/dto/send-code.dto.ts similarity index 100% rename from src/auth/dto/send-code.dto.ts rename to src/modules/auth/dto/send-code.dto.ts diff --git a/src/auth/dto/verify-code.dto.ts b/src/modules/auth/dto/verify-code.dto.ts similarity index 100% rename from src/auth/dto/verify-code.dto.ts rename to src/modules/auth/dto/verify-code.dto.ts diff --git a/src/auth/jwt-auth.guard.ts b/src/modules/auth/jwt-auth.guard.ts similarity index 100% rename from src/auth/jwt-auth.guard.ts rename to src/modules/auth/jwt-auth.guard.ts diff --git a/src/modules/bank-accounts/bank-accounts.controller.ts b/src/modules/bank-accounts/bank-accounts.controller.ts deleted file mode 100644 index 897ebed..0000000 --- a/src/modules/bank-accounts/bank-accounts.controller.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { BankAccountsService } from './bank-accounts.service' -import { CreateBankAccountDto } from './dto/create-bank-account.dto' -import { UpdateBankAccountDto } from './dto/update-bank-account.dto' - -@Controller('bank-accounts') -export class BankAccountsController { - constructor(private readonly bankAccountsService: BankAccountsService) {} - - @Post() - create(@Body() dto: CreateBankAccountDto) { - return this.bankAccountsService.create(dto) - } - - @Get() - findAll() { - return this.bankAccountsService.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.bankAccountsService.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateBankAccountDto) { - return this.bankAccountsService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.bankAccountsService.remove(Number(id)) - } - - @Get(':id/transactions') - getTransactions(@Param('id') id: string) { - return this.bankAccountsService.getTransactions(Number(id)) - } -} diff --git a/src/modules/bank-accounts/bank-accounts.module.ts b/src/modules/bank-accounts/bank-accounts.module.ts deleted file mode 100644 index 3ce5f18..0000000 --- a/src/modules/bank-accounts/bank-accounts.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../prisma/prisma.module' -import { BankAccountsController } from './bank-accounts.controller' -import { BankAccountsService } from './bank-accounts.service' -import { BankAccountsWorkflow } from './bank-accounts.workflow' - -@Module({ - imports: [PrismaModule], - controllers: [BankAccountsController], - providers: [BankAccountsService, BankAccountsWorkflow], - exports: [BankAccountsWorkflow], -}) -export class BankAccountsModule {} diff --git a/src/modules/bank-accounts/bank-accounts.service.ts b/src/modules/bank-accounts/bank-accounts.service.ts deleted file mode 100644 index 9575408..0000000 --- a/src/modules/bank-accounts/bank-accounts.service.ts +++ /dev/null @@ -1,153 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../common/response/response-mapper' -import { BankTransactionRefType } from '../../generated/prisma/enums' -import { PrismaService } from '../../prisma/prisma.service' - -@Injectable() -export class BankAccountsService { - constructor(private prisma: PrismaService) {} - - private readonly bankAccountQuery = { - include: { - branch: { - select: { - id: true, - name: true, - code: true, - bank: { - select: { id: true, name: true, shortName: true }, - }, - }, - }, - bankAccountTransactions: { - take: 1, - select: { id: true, createdAt: true, balanceAfter: true }, - orderBy: { createdAt: 'desc' as const }, - }, - }, - omit: { - branchId: true, - }, - } - - async create(data: any) { - const item = await this.prisma.bankAccount.create({ data }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.bankAccount.findMany(this.bankAccountQuery) - const mappedData = items.map(({ bankAccountTransactions, ...rest }) => ({ - ...rest, - currentBalance: Number(bankAccountTransactions[0]?.balanceAfter || 0), - })) - - return ResponseMapper.list(mappedData) - } - - async findOne(id: number) { - const item = await this.prisma.bankAccount.findUniqueOrThrow({ - ...this.bankAccountQuery, - where: { id }, - }) - - const { bankAccountTransactions, ...rest } = item - return ResponseMapper.single({ - ...rest, - currentBalance: Number(bankAccountTransactions[0]?.balanceAfter || 0), - }) - } - - async update(id: number, data: any) { - const item = await this.prisma.bankAccount.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.bankAccount.delete({ where: { id } }) - return ResponseMapper.single(item) - } - - async getTransactions(bankAccountId: number, page = 1, pageSize = 50) { - const query = { - where: { bankAccountId }, - orderBy: { createdAt: 'desc' as const }, - skip: (page - 1) * pageSize, - take: pageSize, - } - - const [items, count] = await this.prisma.$transaction([ - this.prisma.bankAccountTransaction.findMany({ - ...query, - omit: { bankAccountId: true }, - }), - this.prisma.bankAccountTransaction.count({ where: { bankAccountId } }), - ]) - - const PosReferenceIds = [] as number[] - const purchaseReferenceIds = [] as number[] - - items.forEach(({ referenceType, referenceId }) => { - if (referenceId && referenceType) { - if ( - referenceType === BankTransactionRefType.POS_SALE || - referenceType === BankTransactionRefType.POS_REFUND - ) { - PosReferenceIds.push(referenceId) - } else if ( - referenceType === BankTransactionRefType.PURCHASE_PAYMENT || - referenceType === BankTransactionRefType.PURCHASE_REFUND - ) { - purchaseReferenceIds.push(referenceId) - } - } - }) - - const posRecords = await this.prisma.salesInvoice.findMany({ - where: { id: { in: PosReferenceIds } }, - select: { - id: true, - code: true, - totalAmount: true, - posAccount: { - select: { id: true, name: true }, - }, - customer: { - select: { id: true, firstName: true, lastName: true }, - }, - }, - }) - - const purchaseRecords = await this.prisma.purchaseReceipt.findMany({ - where: { id: { in: purchaseReferenceIds } }, - select: { - id: true, - code: true, - totalAmount: true, - supplier: { - select: { id: true, firstName: true, lastName: true }, - }, - }, - }) - - const mappedItems = items.map(tx => { - let reference = null as any - if (tx.referenceId && tx.referenceType) { - if ( - tx.referenceType === BankTransactionRefType.POS_SALE || - tx.referenceType === BankTransactionRefType.POS_REFUND - ) { - reference = posRecords.find(r => r.id === tx.referenceId) || null - } else if ( - tx.referenceType === BankTransactionRefType.PURCHASE_PAYMENT || - tx.referenceType === BankTransactionRefType.PURCHASE_REFUND - ) { - reference = purchaseRecords.find(r => r.id === tx.referenceId) || null - } - } - return { ...tx, reference } - }) - - return ResponseMapper.paginate(mappedItems, count, page, pageSize) - } -} diff --git a/src/modules/bank-accounts/bank-accounts.workflow.ts b/src/modules/bank-accounts/bank-accounts.workflow.ts deleted file mode 100644 index 798fa96..0000000 --- a/src/modules/bank-accounts/bank-accounts.workflow.ts +++ /dev/null @@ -1,39 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { Prisma } from '../../generated/prisma/client' -import { AddTransactionToBankAccountDto } from './dto/add-transaction.dto' - -@Injectable() -export class BankAccountsWorkflow { - async addTransaction( - tx: Prisma.TransactionClient, - payload: AddTransactionToBankAccountDto, - ) { - const item = await tx.bankAccountTransaction.findFirst({ - where: { - bankAccountId: payload.bankAccountId, - }, - }) - - const balance = item ? Number(item?.balanceAfter) : 0 - - const newBalance = item - ? payload.type === 'DEPOSIT' - ? balance + payload.amount - : balance - payload.amount - : payload.type === 'DEPOSIT' - ? payload.amount - : -payload.amount - - await tx.bankAccountTransaction.create({ - data: { - bankAccount: { connect: { id: payload.bankAccountId } }, - amount: payload.amount, - type: payload.type, - balanceAfter: newBalance, - - referenceId: payload.referenceId, - referenceType: payload.referenceType, - }, - }) - } -} diff --git a/src/modules/bank-accounts/dto/add-transaction.dto.ts b/src/modules/bank-accounts/dto/add-transaction.dto.ts deleted file mode 100644 index af7d314..0000000 --- a/src/modules/bank-accounts/dto/add-transaction.dto.ts +++ /dev/null @@ -1,22 +0,0 @@ -import { IsEnum, IsInt } from 'class-validator' -import { - BankAccountTransactionType, - BankTransactionRefType, -} from '../../../generated/prisma/enums' - -export class AddTransactionToBankAccountDto { - @IsInt() - bankAccountId: number - - @IsInt() - amount: number - - @IsInt() - referenceId: number - - @IsEnum(BankTransactionRefType) - referenceType: BankTransactionRefType - - @IsEnum(BankAccountTransactionType) - type: BankAccountTransactionType -} diff --git a/src/modules/bank-accounts/dto/create-bank-account.dto.ts b/src/modules/bank-accounts/dto/create-bank-account.dto.ts deleted file mode 100644 index 5f3c1ff..0000000 --- a/src/modules/bank-accounts/dto/create-bank-account.dto.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { IsInt, IsOptional, IsString } from 'class-validator' - -export class CreateBankAccountDto { - @IsString() - accountNumber: string - - @IsString() - name: string - - @IsString() - iban: string - - @IsInt() - branchId: number - - @IsOptional() - @IsString() - createdAt?: string - - @IsOptional() - @IsString() - updatedAt?: string - - @IsOptional() - @IsString() - deletedAt?: string -} diff --git a/src/modules/bank-accounts/dto/update-bank-account.dto.ts b/src/modules/bank-accounts/dto/update-bank-account.dto.ts deleted file mode 100644 index 8238c4c..0000000 --- a/src/modules/bank-accounts/dto/update-bank-account.dto.ts +++ /dev/null @@ -1,4 +0,0 @@ -import { PartialType } from '@nestjs/swagger' -import { CreateBankAccountDto } from './create-bank-account.dto' - -export class UpdateBankAccountDto extends PartialType(CreateBankAccountDto) {} diff --git a/src/modules/bank-branches/bank-branches.controller.ts b/src/modules/bank-branches/bank-branches.controller.ts deleted file mode 100644 index 5724edd..0000000 --- a/src/modules/bank-branches/bank-branches.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { BankBranchesService } from './bank-branches.service' -import { CreateBankBranchDto } from './dto/create-bank-branches.dto' -import { UpdateBankBranchDto } from './dto/update-bank-branches.dto' - -@Controller('bank-branches') -export class BankBranchesController { - constructor(private readonly bankBranchesService: BankBranchesService) {} - - @Post() - create(@Body() dto: CreateBankBranchDto) { - return this.bankBranchesService.create(dto) - } - - @Get() - findAll() { - return this.bankBranchesService.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.bankBranchesService.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateBankBranchDto) { - return this.bankBranchesService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.bankBranchesService.remove(Number(id)) - } -} diff --git a/src/modules/bank-branches/bank-branches.module.ts b/src/modules/bank-branches/bank-branches.module.ts deleted file mode 100644 index 45c59f2..0000000 --- a/src/modules/bank-branches/bank-branches.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../prisma/prisma.module' -import { BankBranchesController } from './bank-branches.controller' -import { BankBranchesService } from './bank-branches.service' - -@Module({ - imports: [PrismaModule], - controllers: [BankBranchesController], - providers: [BankBranchesService], -}) -export class BankBranchesModule {} diff --git a/src/modules/bank-branches/dto/create-bank-branches.dto.ts b/src/modules/bank-branches/dto/create-bank-branches.dto.ts deleted file mode 100644 index 8bdd3de..0000000 --- a/src/modules/bank-branches/dto/create-bank-branches.dto.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { IsInt, IsString } from 'class-validator' - -export class CreateBankBranchDto { - @IsString() - name: string - - @IsString() - code: string - - @IsInt() - bankId: number -} diff --git a/src/modules/bank-branches/dto/update-bank-branches.dto.ts b/src/modules/bank-branches/dto/update-bank-branches.dto.ts deleted file mode 100644 index ed95696..0000000 --- a/src/modules/bank-branches/dto/update-bank-branches.dto.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IsOptional, IsString } from 'class-validator' - -export class UpdateBankBranchDto { - @IsOptional() - @IsString() - name?: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @IsString() - imageUrl?: string -} diff --git a/src/modules/banks/banks.controller.ts b/src/modules/banks/banks.controller.ts deleted file mode 100644 index 7ab9d20..0000000 --- a/src/modules/banks/banks.controller.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Controller, Get } from '@nestjs/common' -import { BanksService } from './banks.service' - -@Controller('banks') -export class BanksController { - constructor(private readonly banksService: BanksService) {} - - @Get() - findAll() { - return this.banksService.findAll() - } -} diff --git a/src/modules/banks/banks.module.ts b/src/modules/banks/banks.module.ts deleted file mode 100644 index ab0a454..0000000 --- a/src/modules/banks/banks.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../prisma/prisma.module' -import { BanksController } from './banks.controller' -import { BanksService } from './banks.service' - -@Module({ - imports: [PrismaModule], - controllers: [BanksController], - providers: [BanksService], -}) -export class BanksModule {} diff --git a/src/modules/banks/banks.service.ts b/src/modules/banks/banks.service.ts deleted file mode 100644 index 8b5eb91..0000000 --- a/src/modules/banks/banks.service.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../common/response/response-mapper' -import { PrismaService } from '../../prisma/prisma.service' - -@Injectable() -export class BanksService { - constructor(private prisma: PrismaService) {} - - async findAll() { - const items = await this.prisma.bank.findMany({ - select: { id: true, name: true, shortName: true }, - }) - return ResponseMapper.list(items) - } -} diff --git a/src/modules/cardex/cardex.controller.ts b/src/modules/cardex/cardex.controller.ts deleted file mode 100644 index 098004d..0000000 --- a/src/modules/cardex/cardex.controller.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Controller, Get, Query } from '@nestjs/common' -import { ApiQuery } from '@nestjs/swagger' -import { CardexService } from './cardex.service' - -@Controller('cardex') -export class CardexController { - constructor(private readonly service: CardexService) {} - - @Get('') - @ApiQuery({ name: 'startDate', required: true, type: Date }) - @ApiQuery({ name: 'endDate', required: false, type: Date }) - @ApiQuery({ name: 'inventoryId', required: false, type: Number }) - @ApiQuery({ name: 'productId', required: false, type: Number }) - async getStock( - @Query('startDate') startDate: Date, - @Query('endDate') endDate: Date, - @Query('inventoryId') inventoryId: number, - @Query('productId') productId: number, - ) { - return this.service.getCardex({ - startDate, - endDate, - inventoryId, - productId, - }) - } -} diff --git a/src/modules/cardex/cardex.module.ts b/src/modules/cardex/cardex.module.ts deleted file mode 100644 index 4a9ea50..0000000 --- a/src/modules/cardex/cardex.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../prisma/prisma.module' -import { CardexController } from './cardex.controller' -import { CardexService } from './cardex.service' - -@Module({ - imports: [PrismaModule], - controllers: [CardexController], - providers: [CardexService], -}) -export class CardexModule {} diff --git a/src/modules/cardex/cardex.service.ts b/src/modules/cardex/cardex.service.ts deleted file mode 100644 index 6a0c160..0000000 --- a/src/modules/cardex/cardex.service.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Injectable } from '@nestjs/common' -import dayjs from 'dayjs' -import { ResponseMapper } from '../../common/response/response-mapper' -import { Prisma } from '../../generated/prisma/client' -import { PrismaService } from '../../prisma/prisma.service' -import { ReadCardexDto } from './dto/read-cardex.dto' - -@Injectable() -export class CardexService { - constructor(private prisma: PrismaService) {} - - async getCardex({ startDate, endDate, inventoryId, productId }: ReadCardexDto) { - if (!endDate) { - endDate = dayjs(startDate).add(1, 'months').toDate() - } - const where: Prisma.StockMovementWhereInput = {} - - if (inventoryId !== undefined) where.inventoryId = inventoryId - if (productId !== undefined) where.productId = productId - - if (startDate || endDate) { - where.createdAt = {} - if (startDate) where.createdAt.gte = new Date(startDate) - if (endDate) where.createdAt.lte = new Date(endDate) - } - - const items = await this.prisma.stockMovement.findMany({ - where, - include: { - product: { select: { id: true, name: true, sku: true } }, - inventory: { select: { id: true, name: true } }, - counterInventory: { - select: { id: true, name: true }, - }, - supplier: { - select: { id: true, firstName: true, lastName: true }, - }, - customer: { - select: { id: true, firstName: true, lastName: true }, - }, - }, - omit: { - productId: true, - inventoryId: true, - counterInventoryId: true, - supplierId: true, - customerId: true, - }, - orderBy: { createdAt: 'desc' }, - }) - - return ResponseMapper.list(items) - } -} diff --git a/src/modules/cardex/dto/read-cardex.dto.ts b/src/modules/cardex/dto/read-cardex.dto.ts deleted file mode 100644 index be8ac56..0000000 --- a/src/modules/cardex/dto/read-cardex.dto.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { ApiPropertyOptional } from '@nestjs/swagger' -import { IsDateString, IsNumber, IsOptional } from 'class-validator' - -export class ReadCardexDto { - @ApiPropertyOptional() - @IsDateString() - startDate: Date - - @ApiPropertyOptional() - @IsOptional() - @IsDateString() - endDate?: Date - - @ApiPropertyOptional() - @IsOptional() - @IsNumber() - inventoryId?: number - - @ApiPropertyOptional() - @IsOptional() - @IsNumber() - productId?: number -} diff --git a/src/customers/customers.controller.ts b/src/modules/customers/customers.controller.ts similarity index 100% rename from src/customers/customers.controller.ts rename to src/modules/customers/customers.controller.ts diff --git a/src/customers/customers.module.ts b/src/modules/customers/customers.module.ts similarity index 83% rename from src/customers/customers.module.ts rename to src/modules/customers/customers.module.ts index 5157900..0e521ea 100644 --- a/src/customers/customers.module.ts +++ b/src/modules/customers/customers.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' +import { PrismaModule } from '../../prisma/prisma.module' import { CustomersController } from './customers.controller' import { CustomersService } from './customers.service' diff --git a/src/customers/customers.service.ts b/src/modules/customers/customers.service.ts similarity index 86% rename from src/customers/customers.service.ts rename to src/modules/customers/customers.service.ts index 81e4f8c..eba19bc 100644 --- a/src/customers/customers.service.ts +++ b/src/modules/customers/customers.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' +import { ResponseMapper } from '../../common/response/response-mapper' +import { PrismaService } from '../../prisma/prisma.service' @Injectable() export class CustomersService { diff --git a/src/customers/dto/create-customer.dto.ts b/src/modules/customers/dto/create-customer.dto.ts similarity index 100% rename from src/customers/dto/create-customer.dto.ts rename to src/modules/customers/dto/create-customer.dto.ts diff --git a/src/customers/dto/update-customer.dto.ts b/src/modules/customers/dto/update-customer.dto.ts similarity index 100% rename from src/customers/dto/update-customer.dto.ts rename to src/modules/customers/dto/update-customer.dto.ts diff --git a/src/modules/inventories/bank-accounts/dto/update-inventory-bank-account.dto.ts b/src/modules/inventories/bank-accounts/dto/update-inventory-bank-account.dto.ts deleted file mode 100644 index da7da72..0000000 --- a/src/modules/inventories/bank-accounts/dto/update-inventory-bank-account.dto.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { IsNumber } from 'class-validator' - -export class UpdateInventoryBankAccountDto { - @IsNumber() - bankAccountId: number -} diff --git a/src/modules/inventories/bank-accounts/inventory-bank-accounts.controller.ts b/src/modules/inventories/bank-accounts/inventory-bank-accounts.controller.ts deleted file mode 100644 index 06d1dec..0000000 --- a/src/modules/inventories/bank-accounts/inventory-bank-accounts.controller.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { Body, Controller, Get, Param, Post } from '@nestjs/common' -import { CreateBankAccountDto } from '../../bank-accounts/dto/create-bank-account.dto' -import { UpdateInventoryBankAccountDto } from './dto/update-inventory-bank-account.dto' -import { InventoryBankAccountsService } from './inventory-bank-accounts.service' - -@Controller('inventories/:inventoryId/bank-accounts') -export class InventoryBankAccountsController { - constructor(private readonly bankAccountsService: InventoryBankAccountsService) {} - - @Post() - create( - @Param('inventoryId') inventoryId: string, - @Body() bankAccount: CreateBankAccountDto, - ) { - return this.bankAccountsService.create(Number(inventoryId), bankAccount) - } - - @Get() - findAll(@Param('inventoryId') inventoryId: string) { - return this.bankAccountsService.findAll(Number(inventoryId)) - } - - @Post('/assign') - assign( - @Param('inventoryId') inventoryId: string, - @Body() dto: UpdateInventoryBankAccountDto, - ) { - return this.bankAccountsService.assign(Number(inventoryId), dto.bankAccountId) - } - - @Post('/unassign') - unassign( - @Param('inventoryId') inventoryId: string, - @Body() dto: UpdateInventoryBankAccountDto, - ) { - return this.bankAccountsService.unassign(Number(inventoryId), dto.bankAccountId) - } -} diff --git a/src/modules/inventories/bank-accounts/inventory-bank-accounts.module.ts b/src/modules/inventories/bank-accounts/inventory-bank-accounts.module.ts deleted file mode 100644 index fbe1075..0000000 --- a/src/modules/inventories/bank-accounts/inventory-bank-accounts.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../../prisma/prisma.module' -import { InventoryBankAccountsController } from './inventory-bank-accounts.controller' -import { InventoryBankAccountsService } from './inventory-bank-accounts.service' - -@Module({ - imports: [PrismaModule], - controllers: [InventoryBankAccountsController], - providers: [InventoryBankAccountsService], -}) -export class InventoryBankAccountsModule {} diff --git a/src/modules/inventories/bank-accounts/inventory-bank-accounts.service.ts b/src/modules/inventories/bank-accounts/inventory-bank-accounts.service.ts deleted file mode 100644 index 8a0994a..0000000 --- a/src/modules/inventories/bank-accounts/inventory-bank-accounts.service.ts +++ /dev/null @@ -1,76 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { PrismaService } from '../../../prisma/prisma.service' -import { CreateBankAccountDto } from '../../bank-accounts/dto/create-bank-account.dto' - -@Injectable() -export class InventoryBankAccountsService { - constructor(private prisma: PrismaService) {} - - async create(inventoryId: number, bankAccount: CreateBankAccountDto) { - return this.prisma.bankAccount - .create({ - data: bankAccount, - }) - .then(async res => { - await this.prisma.inventoryBankAccount.create({ - data: { - inventoryId, - bankAccountId: res.id, - }, - }) - return ResponseMapper.create(res) - }) - } - - async findAll(inventoryId: number) { - const items = await this.prisma.inventoryBankAccount.findMany({ - where: { - inventoryId, - }, - include: { - bankAccount: { - include: { - branch: { - include: { - bank: { - select: { id: true, name: true, shortName: true }, - }, - }, - }, - }, - }, - posAccounts: { - select: { id: true, name: true, code: true }, - }, - }, - omit: { - bankAccountId: true, - inventoryId: true, - }, - }) - return ResponseMapper.list( - items.map(item => ({ posAccounts: item.posAccounts, ...item.bankAccount })), - ) - } - - async assign(inventoryId: number, bankAccountId: number) { - const item = await this.prisma.inventoryBankAccount.create({ - data: { - inventoryId, - bankAccountId, - }, - }) - return ResponseMapper.create(item) - } - - async unassign(inventoryId: number, bankAccountId: number) { - const item = await this.prisma.inventoryBankAccount.deleteMany({ - where: { - inventoryId, - bankAccountId, - }, - }) - return ResponseMapper.single(item) - } -} diff --git a/src/modules/inventories/index/dto/create-inventory.dto.ts b/src/modules/inventories/index/dto/create-inventory.dto.ts deleted file mode 100644 index 53264b2..0000000 --- a/src/modules/inventories/index/dto/create-inventory.dto.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger' -import { IsOptional, IsString } from 'class-validator' - -export class CreateInventoryDto { - @ApiProperty() - @IsString() - name: string - - @ApiPropertyOptional() - @IsOptional() - @IsString() - location?: string -} diff --git a/src/modules/inventories/index/dto/update-inventory.dto.ts b/src/modules/inventories/index/dto/update-inventory.dto.ts deleted file mode 100644 index 259366c..0000000 --- a/src/modules/inventories/index/dto/update-inventory.dto.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ApiPropertyOptional } from '@nestjs/swagger' -import { Type } from 'class-transformer' -import { IsBoolean, IsOptional, IsString } from 'class-validator' - -export class UpdateInventoryDto { - @ApiPropertyOptional() - @IsOptional() - @IsString() - name?: string - - @ApiPropertyOptional() - @IsOptional() - @IsString() - location?: string - - @ApiPropertyOptional() - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isActive?: boolean -} diff --git a/src/modules/inventories/index/inventories.controller.ts b/src/modules/inventories/index/inventories.controller.ts deleted file mode 100644 index 59c71dd..0000000 --- a/src/modules/inventories/index/inventories.controller.ts +++ /dev/null @@ -1,59 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post, Query } from '@nestjs/common' -import { ApiQuery } from '@nestjs/swagger' -import { MovementType } from '../../../generated/prisma/enums' -import { CreateInventoryDto } from './dto/create-inventory.dto' -import { UpdateInventoryDto } from './dto/update-inventory.dto' -import { InventoriesService } from './inventories.service' - -@Controller('inventories') -export class InventoriesController { - constructor(private readonly inventoriesService: InventoriesService) {} - - @Post() - create(@Body() dto: CreateInventoryDto) { - return this.inventoriesService.create(dto) - } - - @Get() - @ApiQuery({ name: 'isPointOfSale', required: false, type: Boolean }) - findAll(@Query('isPointOfSale') isPointOfSale?: boolean) { - return this.inventoriesService.findAll(isPointOfSale) - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.inventoriesService.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateInventoryDto) { - return this.inventoriesService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.inventoriesService.remove(Number(id)) - } - - @Get(':id/movements') - @ApiQuery({ name: 'type', required: false, enum: MovementType }) - findInventoryMovements(@Param('id') id: string, @Query('type') type?: MovementType) { - return this.inventoriesService.findInventoryMovements(Number(id), type ?? undefined) - } - - @Get(':id/stock') - @ApiQuery({ name: 'isAvailable', required: false, type: Boolean }) - getStock(@Param('id') id: string, @Query('isAvailable') isAvailable?: boolean) { - return this.inventoriesService.getStock(Number(id), isAvailable ?? undefined) - } - - @Get(':id/products/:productId/cardex') - getProductCardex(@Param('id') id: string, @Param('productId') productId: string) { - return this.inventoriesService.getProductCardex(Number(id), Number(productId)) - } - - @Get(':id/cardex') - getCardex(@Param('id') id: string) { - return this.inventoriesService.getCardex(Number(id)) - } -} diff --git a/src/modules/inventories/index/inventories.service.ts b/src/modules/inventories/index/inventories.service.ts deleted file mode 100644 index 9d385bf..0000000 --- a/src/modules/inventories/index/inventories.service.ts +++ /dev/null @@ -1,211 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { MovementType } from '../../../generated/prisma/enums' -import { PrismaService } from '../../../prisma/prisma.service' - -@Injectable() -export class InventoriesService { - constructor(private prisma: PrismaService) {} - async create(data: any) { - const item = await this.prisma.inventory.create({ data }) - return ResponseMapper.create(item) - } - - async findAll(isPointOfSale?: boolean) { - const items = await this.prisma.inventory.findMany({ - where: isPointOfSale !== undefined ? { isPointOfSale } : undefined, - }) - - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.inventory.findUnique({ - where: { id }, - include: { - stockBalances: { - where: { quantity: { gt: 0 } }, - select: { quantity: true, totalCost: true }, - }, - }, - }) - if (!item) return null - - const { stockBalances, ...rest } = item - return ResponseMapper.single({ - ...rest, - availableProductTypes: stockBalances.length, - availableProductCount: stockBalances.reduce( - (acc, sb) => acc + Number(sb.quantity), - 0, - ), - availableProductsCost: stockBalances.reduce( - (acc, sb) => acc + Number(sb.totalCost), - 0, - ), - }) - } - - async update(id: number, data: any) { - const item = await this.prisma.inventory.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.inventory.delete({ where: { id } }) - return ResponseMapper.single(item) - } - - async findInventoryMovements( - inventoryId: number, - type?: MovementType, - page = 1, - pageSize = 10, - ) { - const groups = await this.prisma.stockMovement.groupBy({ - by: ['referenceId', 'referenceType'], - where: { inventoryId, type }, - _count: { id: true }, - orderBy: { referenceId: 'desc' }, - skip: (page - 1) * pageSize, - take: pageSize, - }) - - const result = await Promise.all( - groups.map(async group => { - const movements = await this.prisma.stockMovement.findMany({ - where: { - inventoryId, - AND: { - referenceId: group.referenceId, - AND: { referenceType: group.referenceType }, - }, - }, - include: { - product: true, - counterInventory: { - select: { id: true, name: true }, - }, - }, - }) - let info = null as any - - const mapped = movements.map(movement => { - const { id, quantity, unitPrice, totalCost, avgCost, product } = movement - if (info === null) { - info = { - date: movement.createdAt, - type: movement.type, - quantity: Number(movement.quantity), - unitPrice: Number(movement.unitPrice), - totalCost: Number(movement.totalCost), - referenceType: movement.referenceType, - referenceId: movement.referenceId, - counterInventory: movement.counterInventory, - createdAt: movement.createdAt, - } - } else { - info.quantity += Number(movement.quantity) - info.unitPrice += Number(movement.unitPrice) - info.totalCost += Number(movement.totalCost) - } - return { - id, - quantity: Number(quantity), - unitPrice: Number(unitPrice), - totalCost: Number(totalCost), - avgCost: Number(avgCost), - product, - } - }) - return { - receiptId: group.referenceId, - count: group._count.id, - info, - movements: mapped, - } - }), - ) - return ResponseMapper.list(result) - } - - async getStock(inventoryId: number, isAvailable?: boolean, page = 1, pageSize = 10) { - const items = await this.prisma.stockBalance.findMany({ - where: { - inventoryId, - quantity: - isAvailable === true - ? { gt: 0 } - : isAvailable === false - ? { lte: 0 } - : undefined, - }, - include: { - product: true, - }, - orderBy: { - updatedAt: 'desc', - }, - skip: (page - 1) * pageSize, - take: pageSize, - }) - - const mapped = items.map(item => ({ - id: item.id, - quantity: Number(item.quantity), - avgCost: Number(item.avgCost), - product: item.product, - })) - - return ResponseMapper.list(mapped) - } - - async getCardex(inventoryId: number) { - const movements = await this.prisma.stockMovement.findMany({ - where: { inventoryId }, - orderBy: { createdAt: 'asc' }, - include: { - customer: { select: { id: true, firstName: true, lastName: true } }, - supplier: { select: { id: true, firstName: true, lastName: true } }, - counterInventory: { - select: { id: true, name: true }, - }, - product: { - select: { id: true, name: true, sku: true }, - }, - }, - omit: { - inventoryId: true, - productId: true, - customerId: true, - supplierId: true, - counterInventoryId: true, - }, - }) - - return ResponseMapper.list(movements) - } - - async getProductCardex(inventoryId: number, productId: number) { - const movements = await this.prisma.stockMovement.findMany({ - where: { productId, inventoryId }, - orderBy: { createdAt: 'asc' }, - include: { - customer: { select: { id: true, firstName: true, lastName: true } }, - supplier: { select: { id: true, firstName: true, lastName: true } }, - counterInventory: { - select: { id: true, name: true }, - }, - }, - }) - - return ResponseMapper.list(movements) - } - - async getInventoryBankAccounts(inventoryId: number) { - const items = await this.prisma.bankAccount.findMany({ - where: { inventoryBankAccounts: { some: { inventoryId } } }, - }) - return ResponseMapper.list(items) - } -} diff --git a/src/modules/inventories/index/models/response-inventory.dto.ts b/src/modules/inventories/index/models/response-inventory.dto.ts deleted file mode 100644 index b65a3e6..0000000 --- a/src/modules/inventories/index/models/response-inventory.dto.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface IInventoryResponse { - name: string - location?: string - isActive: boolean -} diff --git a/src/modules/inventories/inventories.module.ts b/src/modules/inventories/inventories.module.ts deleted file mode 100644 index 443d1d7..0000000 --- a/src/modules/inventories/inventories.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../prisma/prisma.module' -import { InventoryBankAccountsModule } from './bank-accounts/inventory-bank-accounts.module' -import { InventoriesController } from './index/inventories.controller' -import { InventoriesService } from './index/inventories.service' -import { PosAccountsModule } from './pos-accounts/pos-accounts.module' - -@Module({ - imports: [PrismaModule, InventoryBankAccountsModule, PosAccountsModule], - controllers: [InventoriesController], - providers: [InventoriesService], -}) -export class InventoriesModule {} diff --git a/src/modules/inventories/pos-accounts/dto/create-pos-accounts.dto.ts b/src/modules/inventories/pos-accounts/dto/create-pos-accounts.dto.ts deleted file mode 100644 index 704550a..0000000 --- a/src/modules/inventories/pos-accounts/dto/create-pos-accounts.dto.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { IsInt, IsOptional, IsString } from 'class-validator' - -export class CreatePosAccountDto { - @IsString() - name: string - - @IsString() - code: string - - @IsOptional() - @IsString() - description?: string - - @IsInt() - bankAccountId: number -} diff --git a/src/modules/inventories/pos-accounts/dto/update-pos-accounts.dto.ts b/src/modules/inventories/pos-accounts/dto/update-pos-accounts.dto.ts deleted file mode 100644 index 3445d65..0000000 --- a/src/modules/inventories/pos-accounts/dto/update-pos-accounts.dto.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { PartialType } from '@nestjs/swagger' -import { IsInt } from 'class-validator' -import { CreatePosAccountDto } from './create-pos-accounts.dto' - -export class UpdatePosAccountDto extends PartialType(CreatePosAccountDto) { - @IsInt() - bankAccountId: number -} diff --git a/src/modules/inventories/pos-accounts/pos-accounts.controller.ts b/src/modules/inventories/pos-accounts/pos-accounts.controller.ts deleted file mode 100644 index 168031f..0000000 --- a/src/modules/inventories/pos-accounts/pos-accounts.controller.ts +++ /dev/null @@ -1,45 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreatePosAccountDto } from './dto/create-pos-accounts.dto' -import { UpdatePosAccountDto } from './dto/update-pos-accounts.dto' -import { PosAccountsService } from './pos-accounts.service' - -@Controller('inventories/:inventoryId/pos-accounts') -export class PosAccountsController { - constructor(private readonly posAccountsService: PosAccountsService) {} - - @Post() - create( - @Param('inventoryId') inventoryId: string, - @Body() createPosAccountDto: CreatePosAccountDto, - ) { - return this.posAccountsService.create(Number(inventoryId), createPosAccountDto) - } - - @Get() - findAll(@Param('inventoryId') inventoryId: string) { - return this.posAccountsService.findAll(Number(inventoryId)) - } - - @Get(':id') - findOne(@Param('inventoryId') inventoryId: string, @Param('id') id: string) { - return this.posAccountsService.findOne(Number(inventoryId), Number(id)) - } - - @Patch(':id') - update( - @Param('inventoryId') inventoryId: string, - @Param('id') id: string, - @Body() updatePosAccountDto: UpdatePosAccountDto, - ) { - return this.posAccountsService.update( - Number(inventoryId), - Number(id), - updatePosAccountDto, - ) - } - - @Delete(':id') - remove(@Param('inventoryId') inventoryId: string, @Param('id') id: string) { - return this.posAccountsService.remove(Number(inventoryId), Number(id)) - } -} diff --git a/src/modules/inventories/pos-accounts/pos-accounts.module.ts b/src/modules/inventories/pos-accounts/pos-accounts.module.ts deleted file mode 100644 index 0f9d179..0000000 --- a/src/modules/inventories/pos-accounts/pos-accounts.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../../prisma/prisma.module' -import { PosAccountsController } from './pos-accounts.controller' -import { PosAccountsService } from './pos-accounts.service' - -@Module({ - imports: [PrismaModule], - controllers: [PosAccountsController], - providers: [PosAccountsService], -}) -export class PosAccountsModule {} diff --git a/src/modules/inventories/pos-accounts/pos-accounts.service.ts b/src/modules/inventories/pos-accounts/pos-accounts.service.ts deleted file mode 100644 index 5bbef67..0000000 --- a/src/modules/inventories/pos-accounts/pos-accounts.service.ts +++ /dev/null @@ -1,157 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { PrismaService } from '../../../prisma/prisma.service' -import { CreatePosAccountDto } from './dto/create-pos-accounts.dto' -import { UpdatePosAccountDto } from './dto/update-pos-accounts.dto' - -@Injectable() -export class PosAccountsService { - constructor(private prisma: PrismaService) {} - - private async validateBankAccountInventoryLink( - inventoryId: number, - bankAccountId: number, - ) { - const link = await this.prisma.inventoryBankAccount.findUnique({ - where: { - inventoryId_bankAccountId: { - inventoryId, - bankAccountId, - }, - }, - }) - if (!link) { - throw new Error('حساب بانکی به این انبار متصل نیست') - } - } - - async create(inventoryId: number, dto: CreatePosAccountDto) { - if (dto.bankAccountId) { - await this.validateBankAccountInventoryLink(inventoryId, dto.bankAccountId) - } - const item = await this.prisma.posAccount.create({ - data: { - ...dto, - inventoryId, - }, - }) - return ResponseMapper.create(item) - } - - async findAll(inventoryId: number) { - const items = await this.prisma.posAccount.findMany({ - where: { - inventoryId, - }, - include: { - inventoryBankAccount: { - include: { - bankAccount: { - select: { - id: true, - name: true, - accountNumber: true, - branch: { - select: { - id: true, - name: true, - bank: { select: { id: true, name: true } }, - }, - }, - }, - }, - }, - }, - salesInvoices: { - where: { - createdAt: { gte: new Date(new Date().setHours(0, 0, 0, 0)) }, - }, - select: { - id: true, - code: true, - totalAmount: true, - createdAt: true, - }, - }, - }, - omit: { - inventoryId: true, - bankAccountId: true, - }, - }) - - return ResponseMapper.list( - items.map(item => { - const { inventoryBankAccount, salesInvoices, ...rest } = item - return { - ...rest, - bankAccount: inventoryBankAccount?.bankAccount, - todaySalesInfo: { - salesCount: salesInvoices.length, - salesTotal: salesInvoices.reduce( - (acc, si) => acc + Number(si.totalAmount), - 0, - ), - }, - } - }), - ) - } - - async findOne(inventoryId: number, id: number) { - const item = await this.prisma.posAccount.findFirst({ - where: { - id, - inventoryId, - }, - include: { - inventoryBankAccount: { - include: { - bankAccount: { - select: { - id: true, - name: true, - accountNumber: true, - branch: { - select: { - id: true, - name: true, - bank: { select: { id: true, name: true } }, - }, - }, - }, - }, - }, - }, - }, - omit: { - inventoryId: true, - bankAccountId: true, - }, - }) - return ResponseMapper.single( - item ? { ...item, bankAccount: item.inventoryBankAccount?.bankAccount } : null, - ) - } - - async update(inventoryId: number, id: number, dto: UpdatePosAccountDto) { - await this.validateBankAccountInventoryLink(inventoryId, dto.bankAccountId) - - const item = await this.prisma.posAccount.update({ - where: { - id, - }, - data: dto, - }) - return ResponseMapper.update(item) - } - - async remove(inventoryId: number, id: number) { - const item = await this.prisma.posAccount.delete({ - where: { - id, - }, - }) - return ResponseMapper.delete(item) - } -} diff --git a/src/modules/pos/dto/update-pos.dto.ts b/src/modules/pos/dto/update-pos.dto.ts deleted file mode 100644 index 259366c..0000000 --- a/src/modules/pos/dto/update-pos.dto.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { ApiPropertyOptional } from '@nestjs/swagger' -import { Type } from 'class-transformer' -import { IsBoolean, IsOptional, IsString } from 'class-validator' - -export class UpdateInventoryDto { - @ApiPropertyOptional() - @IsOptional() - @IsString() - name?: string - - @ApiPropertyOptional() - @IsOptional() - @IsString() - location?: string - - @ApiPropertyOptional() - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isActive?: boolean -} diff --git a/src/modules/pos/orders/dto/create-order-item.dto.ts b/src/modules/pos/orders/dto/create-order-item.dto.ts deleted file mode 100644 index 719c4c0..0000000 --- a/src/modules/pos/orders/dto/create-order-item.dto.ts +++ /dev/null @@ -1,37 +0,0 @@ -import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger' -import { Type } from 'class-transformer' -import { ArrayMinSize, IsInt, IsNumber, IsOptional, IsString } from 'class-validator' - -export class CreateOrderDto { - @ApiPropertyOptional() - @IsOptional() - @IsInt() - @Type(() => Number) - customerId?: number - - @ApiPropertyOptional() - @IsOptional() - @IsString() - description?: string - - @ApiProperty() - @ArrayMinSize(1) - items: CreateOrderItemDto[] -} - -export class CreateOrderItemDto { - @ApiProperty() - @IsInt() - @Type(() => Number) - productId: number - - @ApiProperty() - @IsNumber() - @Type(() => Number) - count: number - - @ApiProperty() - @IsNumber() - @Type(() => Number) - unitPrice: number -} diff --git a/src/modules/pos/orders/orders.controller.ts b/src/modules/pos/orders/orders.controller.ts deleted file mode 100644 index 31a2b87..0000000 --- a/src/modules/pos/orders/orders.controller.ts +++ /dev/null @@ -1,44 +0,0 @@ -import { Body, Controller, Get, Param, Post } from '@nestjs/common' -import { OrderStatus } from '../../../generated/prisma/enums' -import { CreateOrderDto } from './dto/create-order-item.dto' -import { PosOrdersService } from './orders.service' - -@Controller('pos/:posId/orders') -export class PosOrdersController { - constructor(private readonly posOrdersService: PosOrdersService) {} - - @Get('') - get(@Param('posId') posId: string) { - return this.posOrdersService.getOrders(Number(posId)) - } - - @Get('/held') - getHeld(@Param('posId') posId: string) { - return this.posOrdersService.getOrders(Number(posId), OrderStatus.PENDING) - } - - @Post('') - async createOrder(@Param('posId') posId: string, @Body() dto: CreateOrderDto) { - return this.posOrdersService.createOrder(Number(posId), dto) - } - - @Get('/:orderId') - getOrderDetails(@Param('posId') posId: string, @Param('orderId') orderId: string) { - return this.posOrdersService.getOrderDetails(Number(posId), Number(orderId)) - } - - @Post('/:orderId/reject') - async rejectOrder(@Param('posId') posId: string, @Param('orderId') orderId: string) { - return this.posOrdersService.rejectOrder(Number(posId), Number(orderId)) - } - - @Post('/:orderId/done') - async completeOrder(@Param('posId') posId: string, @Param('orderId') orderId: string) { - return this.posOrdersService.completeOrder(Number(posId), Number(orderId)) - } - - @Post('/:orderId/cancel') - async cancelOrder(@Param('posId') posId: string, @Param('orderId') orderId: string) { - return this.posOrdersService.cancelOrder(Number(posId), Number(orderId)) - } -} diff --git a/src/modules/pos/orders/orders.module.ts b/src/modules/pos/orders/orders.module.ts deleted file mode 100644 index b7d6f94..0000000 --- a/src/modules/pos/orders/orders.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../../prisma/prisma.module' -import { SalesInvoicesModule } from '../../sales-invoices/sales-invoices.module' -import { PosOrdersController } from './orders.controller' -import { PosOrdersService } from './orders.service' -import { PosOrdersWorkflow } from './orders.workflow' - -@Module({ - imports: [PrismaModule, SalesInvoicesModule], - controllers: [PosOrdersController], - providers: [PosOrdersService, PosOrdersWorkflow], -}) -export class PosOrdersModule {} diff --git a/src/modules/pos/orders/orders.service.ts b/src/modules/pos/orders/orders.service.ts deleted file mode 100644 index 5dd4d46..0000000 --- a/src/modules/pos/orders/orders.service.ts +++ /dev/null @@ -1,145 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { Prisma } from '../../../generated/prisma/client' -import { OrderStatus } from '../../../generated/prisma/enums' -import { OrderCreateInput } from '../../../generated/prisma/models' -import { PrismaService } from '../../../prisma/prisma.service' -import { CreateOrderDto } from './dto/create-order-item.dto' -import { PosOrdersWorkflow } from './orders.workflow' - -@Injectable() -export class PosOrdersService { - constructor( - private prisma: PrismaService, - private posWorkflow: PosOrdersWorkflow, - ) {} - - async createOrder(posId: number, data: CreateOrderDto) { - const { customerId, items, ...rest } = data - const lastCode = await this.prisma.order - .findFirst({ - where: { posAccountId: posId }, - orderBy: { orderNumber: 'desc' }, - select: { orderNumber: true }, - }) - .then(si => si?.orderNumber || '0') - - const newCode = String(Number(lastCode) + 1) - - const totalAmount = data.items.reduce( - (acc, item) => acc + item.count * item.unitPrice, - 0, - ) - - const preparedOrder: OrderCreateInput = { - ...rest, - orderNumber: newCode, - posAccount: { connect: { id: posId } }, - customer: customerId ? { connect: { id: customerId } } : undefined, - totalAmount, - orderItems: { - create: items.map(item => ({ - product: { connect: { id: Number(item.productId) } }, - quantity: item.count, - unitPrice: item.unitPrice, - totalAmount: item.count * item.unitPrice, - })), - }, - } - - const item = await this.prisma.$transaction(async tx => { - const order = await tx.order.create({ data: preparedOrder }) - - await this.posWorkflow.onCreateOrder(tx, order.id, posId) - }) - return ResponseMapper.create(item) - } - - async createAndConfirmOrder(posId: number, data: CreateOrderDto) {} - - async rejectOrder(posAccountId: number, orderId: number) { - const item = await this.prisma.$transaction(async tx => { - const order = await tx.order.update({ - where: { id: orderId, posAccountId }, - data: { status: OrderStatus.REJECTED }, - }) - await this.posWorkflow.onRejectOrder(tx, orderId) - return order - }) - return ResponseMapper.single(item) - } - - async completeOrder(posAccountId: number, orderId: number) { - const item = await this.prisma.$transaction(async tx => { - const order = await tx.order.update({ - where: { id: orderId, posAccountId }, - data: { status: OrderStatus.DONE }, - }) - await this.posWorkflow.onConfirmOrder(tx, orderId) - return order - }) - return ResponseMapper.single(item) - } - - async cancelOrder(posAccountId: number, orderId: number) { - const item = await this.prisma.$transaction(async tx => { - const order = await tx.order.update({ - where: { id: orderId, posAccountId }, - data: { status: OrderStatus.CANCELED }, - }) - await this.posWorkflow.onCancelOrder(tx, orderId) - return order - }) - return ResponseMapper.single(item) - } - - async getOrders(posId: number, status?: OrderStatus) { - const where: Prisma.OrderWhereInput = { - posAccountId: posId, - status, - } - if (status) { - where.status = status - } - const items = await this.prisma.order.findMany({ - where, - include: { - customer: { - select: { - id: true, - firstName: true, - lastName: true, - }, - }, - orderItems: { - include: { - product: true, - }, - }, - }, - orderBy: { createdAt: 'desc' }, - }) - return ResponseMapper.list(items) - } - - async getOrderDetails(posAccountId: number, orderId: number) { - const item = await this.prisma.order.findUniqueOrThrow({ - where: { id: orderId, posAccountId }, - include: { - customer: { - select: { - id: true, - firstName: true, - lastName: true, - }, - }, - orderItems: { - include: { - product: true, - }, - }, - }, - }) - return ResponseMapper.single(item) - } -} diff --git a/src/modules/pos/orders/orders.workflow.ts b/src/modules/pos/orders/orders.workflow.ts deleted file mode 100644 index bf895a8..0000000 --- a/src/modules/pos/orders/orders.workflow.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { Prisma } from '../../../generated/prisma/client' -import { SalesInvoicesWorkflow } from '../../sales-invoices/sales-invoices.workflow' - -@Injectable() -export class PosOrdersWorkflow { - constructor(private salesInvoicesWorkflow: SalesInvoicesWorkflow) {} - - async onCreateOrder(tx: Prisma.TransactionClient, orderId: number, posId: number) { - const { inventoryId } = await tx.posAccount.findUniqueOrThrow({ - where: { id: posId }, - select: { inventoryId: true }, - }) - - const orderItems = await tx.orderItem.findMany({ - where: { orderId }, - select: { - product: true, - quantity: true, - }, - }) - - await tx.stockReservation.createMany({ - data: orderItems.map(item => ({ - orderId, - productId: item.product.id, - quantity: item.quantity, - inventoryId, - })), - }) - } - - async onRejectOrder(tx: Prisma.TransactionClient, orderId: number) { - const orderItemIds = await tx.orderItem - .findMany({ - where: { orderId }, - select: { - productId: true, - }, - }) - .then(items => items.map(i => i.productId)) - - await tx.stockReservation.deleteMany({ - where: { - orderId, - productId: { in: orderItemIds }, - }, - }) - } - - async onConfirmOrder(tx: Prisma.TransactionClient, orderId: number) { - const orderItems = await tx.orderItem.findMany({ - where: { orderId }, - select: { - product: true, - quantity: true, - }, - }) - - await tx.stockReservation.deleteMany({ - where: { - orderId, - productId: { in: orderItems.map(i => i.product.id) }, - }, - }) - - await this.salesInvoicesWorkflow.onCreateByOrder(tx, orderId) - } - - async onCancelOrder(tx: Prisma.TransactionClient, orderId: number) { - const orderItemIds = await tx.orderItem - .findMany({ - where: { orderId }, - select: { - productId: true, - }, - }) - .then(items => items.map(i => i.productId)) - - await tx.stockReservation.deleteMany({ - where: { - orderId, - productId: { in: orderItemIds }, - }, - }) - } -} diff --git a/src/modules/pos/pos.controller.ts b/src/modules/pos/pos.controller.ts deleted file mode 100644 index ad7aba6..0000000 --- a/src/modules/pos/pos.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Controller, Get, Param, Query } from '@nestjs/common' -import { PosService } from './pos.service' - -@Controller('pos') -export class PosController { - constructor(private readonly posService: PosService) {} - - @Get('/:posId') - getInfo(@Param('posId') posId: string) { - return this.posService.getInfo(Number(posId)) - } - - @Get('/:posId/stock') - async getStock( - @Param('posId') posId: string, - @Query('isAvailable') isAvailable?: string, - @Query('page') page?: string, - @Query('pageSize') pageSize?: string, - @Query('q') q?: string, - ) { - const options = { - isAvailable: isAvailable ? isAvailable === 'true' : undefined, - page: page ? Number(page) : undefined, - pageSize: pageSize ? Number(pageSize) : undefined, - q, - } - return this.posService.getStock(Number(posId), options) - } - - @Get('/:posId/product-categories') - async getProductCategories(@Param('posId') posId: string) { - return this.posService.getProductCategories(Number(posId)) - } -} diff --git a/src/modules/pos/pos.module.ts b/src/modules/pos/pos.module.ts deleted file mode 100644 index b62789b..0000000 --- a/src/modules/pos/pos.module.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../prisma/prisma.module' -import { PosOrdersModule } from './orders/orders.module' -import { PosController } from './pos.controller' -import { PosService } from './pos.service' - -@Module({ - imports: [PrismaModule, PosOrdersModule], - controllers: [PosController], - providers: [PosService], -}) -export class PosModule {} diff --git a/src/modules/pos/pos.service.ts b/src/modules/pos/pos.service.ts deleted file mode 100644 index c0053dc..0000000 --- a/src/modules/pos/pos.service.ts +++ /dev/null @@ -1,154 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../common/response/response-mapper' -import { PrismaService } from '../../prisma/prisma.service' - -@Injectable() -export class PosService { - constructor(private prisma: PrismaService) {} - - async getInfo(posId: number) { - const info = await this.prisma.posAccount.findUniqueOrThrow({ - where: { id: posId }, - include: { - inventoryBankAccount: { - include: { - bankAccount: { - select: { - id: true, - name: true, - accountNumber: true, - branch: { - select: { - id: true, - name: true, - bank: { select: { id: true, name: true } }, - }, - }, - }, - }, - inventory: { - select: { id: true, name: true }, - }, - }, - }, - }, - }) - - const { inventoryBankAccount, ...rest } = info - - return ResponseMapper.single({ - ...rest, - bankAccount: inventoryBankAccount?.bankAccount, - inventory: inventoryBankAccount?.inventory, - }) - } - - async getStock( - posId: number, - options: { - isAvailable?: boolean - page?: number - pageSize?: number - q?: string - productIds?: number[] - } = {}, - ) { - const { isAvailable, page = 1, pageSize = 50, q, productIds } = options - const pos = await this.prisma.posAccount.findUniqueOrThrow({ - where: { id: posId }, - select: { inventoryId: true }, - }) - const inventoryId = pos.inventoryId - - let sql = ` - SELECT sb.productId, sb.quantity - COALESCE(SUM(sr.quantity), 0) as availableQuantity, p.id, p.name, p.sku, p.description, p.salePrice, p.categoryId - FROM Stock_Balance sb - LEFT JOIN Stock_Reservations sr ON sb.productId = sr.productId AND sb.inventoryId = sr.inventoryId - LEFT JOIN Products p ON sb.productId = p.id - WHERE sb.inventoryId = ? - ` - const params: any[] = [inventoryId] - - if (productIds && productIds.length > 0) { - sql += ` AND sb.productId IN (${productIds.map(() => '?').join(',')})` - params.push(...productIds) - } - - if (q) { - sql += ` AND (p.name LIKE ? OR p.sku LIKE ?)` - params.push(`%${q}%`, `%${q}%`) - } - - sql += ` GROUP BY sb.productId` - - if (isAvailable !== undefined) { - sql += isAvailable - ? ` HAVING availableQuantity > 0` - : ` HAVING availableQuantity <= 0` - } - - sql += ` ORDER BY sb.quantity DESC` - - const items = await this.prisma.$queryRawUnsafe(sql, ...params) - - const mapped = (items as any[]).map(item => ({ - id: item.productId, - quantity: Number(item.availableQuantity), - product: { - id: item.id, - name: item.name, - sku: item.sku, - description: item.description, - salePrice: item.salePrice, - categoryId: item.categoryId, - }, - })) - - const count = mapped.length - const paginated = mapped.slice((page - 1) * pageSize, page * pageSize) - - return ResponseMapper.paginate(paginated, count, page, pageSize) - } - - async getProductCategories(posId: number) { - const pos = await this.prisma.posAccount.findUniqueOrThrow({ - where: { id: posId }, - select: { inventoryId: true }, - }) - const inventoryId = pos.inventoryId - - const balances = await this.prisma.stockBalance.findMany({ - where: { inventoryId }, - select: { - product: { select: { id: true, category: { select: { id: true, name: true } } } }, - quantity: true, - }, - }) - - const map = new Map< - number, - { id: number; name: string; totalQuantity: number; productCount: number } - >() - - for (const b of balances) { - const product = b.product - const cat = product?.category - if (!cat) continue // skip products without category - const existing = map.get(cat.id) - if (existing) { - existing.totalQuantity += Number(b.quantity) - existing.productCount += 1 - } else { - map.set(cat.id, { - id: cat.id, - name: cat.name, - totalQuantity: Number(b.quantity), - productCount: 1, - }) - } - } - - const categories = Array.from(map.values()) - return ResponseMapper.list(categories) - } -} diff --git a/src/product-categories/dto/create-product-category.dto.ts b/src/modules/product-categories/dto/create-product-category.dto.ts similarity index 100% rename from src/product-categories/dto/create-product-category.dto.ts rename to src/modules/product-categories/dto/create-product-category.dto.ts diff --git a/src/product-categories/dto/update-product-category.dto.ts b/src/modules/product-categories/dto/update-product-category.dto.ts similarity index 100% rename from src/product-categories/dto/update-product-category.dto.ts rename to src/modules/product-categories/dto/update-product-category.dto.ts diff --git a/src/product-categories/product-categories.controller.ts b/src/modules/product-categories/product-categories.controller.ts similarity index 100% rename from src/product-categories/product-categories.controller.ts rename to src/modules/product-categories/product-categories.controller.ts diff --git a/src/product-categories/product-categories.module.ts b/src/modules/product-categories/product-categories.module.ts similarity index 86% rename from src/product-categories/product-categories.module.ts rename to src/modules/product-categories/product-categories.module.ts index 2c6f7bd..f6eeb0f 100644 --- a/src/product-categories/product-categories.module.ts +++ b/src/modules/product-categories/product-categories.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' +import { PrismaModule } from '../../prisma/prisma.module' import { ProductCategoriesController } from './product-categories.controller' import { ProductCategoriesService } from './product-categories.service' diff --git a/src/modules/bank-branches/bank-branches.service.ts b/src/modules/product-categories/product-categories.service.ts similarity index 55% rename from src/modules/bank-branches/bank-branches.service.ts rename to src/modules/product-categories/product-categories.service.ts index 5d7e6bb..ef25fc7 100644 --- a/src/modules/bank-branches/bank-branches.service.ts +++ b/src/modules/product-categories/product-categories.service.ts @@ -3,37 +3,31 @@ import { ResponseMapper } from '../../common/response/response-mapper' import { PrismaService } from '../../prisma/prisma.service' @Injectable() -export class BankBranchesService { +export class ProductCategoriesService { constructor(private prisma: PrismaService) {} async create(data: any) { - const item = await this.prisma.bankBranch.create({ data }) + const item = await this.prisma.goodCategory.create({ data }) return ResponseMapper.create(item) } async findAll() { - const items = await this.prisma.bankBranch.findMany({ - include: { - bank: { - select: { id: true, name: true, shortName: true }, - }, - }, - }) + const items = await this.prisma.goodCategory.findMany() return ResponseMapper.list(items) } async findOne(id: number) { - const item = await this.prisma.bankBranch.findUnique({ where: { id } }) + const item = await this.prisma.goodCategory.findUnique({ where: { id } }) if (!item) return null return ResponseMapper.single(item) } async update(id: number, data: any) { - const item = await this.prisma.bankBranch.update({ where: { id }, data }) + const item = await this.prisma.goodCategory.update({ where: { id }, data }) return ResponseMapper.update(item) } async remove(id: number) { - const item = await this.prisma.bankBranch.delete({ where: { id } }) + const item = await this.prisma.goodCategory.delete({ where: { id } }) return ResponseMapper.single(item) } } diff --git a/src/products/dto/create-product.dto.ts b/src/modules/products/dto/create-product.dto.ts similarity index 100% rename from src/products/dto/create-product.dto.ts rename to src/modules/products/dto/create-product.dto.ts diff --git a/src/products/dto/update-product.dto.ts b/src/modules/products/dto/update-product.dto.ts similarity index 100% rename from src/products/dto/update-product.dto.ts rename to src/modules/products/dto/update-product.dto.ts diff --git a/src/products/products.controller.ts b/src/modules/products/products.controller.ts similarity index 100% rename from src/products/products.controller.ts rename to src/modules/products/products.controller.ts diff --git a/src/products/products.module.ts b/src/modules/products/products.module.ts similarity index 83% rename from src/products/products.module.ts rename to src/modules/products/products.module.ts index 80ae502..18404ce 100644 --- a/src/products/products.module.ts +++ b/src/modules/products/products.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' +import { PrismaModule } from '../../prisma/prisma.module' import { ProductsController } from './products.controller' import { ProductsService } from './products.service' diff --git a/src/products/products.service.ts b/src/modules/products/products.service.ts similarity index 93% rename from src/products/products.service.ts rename to src/modules/products/products.service.ts index bab0432..72b9014 100644 --- a/src/products/products.service.ts +++ b/src/modules/products/products.service.ts @@ -1,8 +1,8 @@ import { Injectable } from '@nestjs/common' -import { ShortEntity } from '../common/interfaces/response-models' -import { ResponseMapper } from '../common/response/response-mapper' -import { Prisma } from '../generated/prisma/client' -import { PrismaService } from '../prisma/prisma.service' +import { ShortEntity } from '../../common/interfaces/response-models' +import { ResponseMapper } from '../../common/response/response-mapper' +import { Prisma } from '../../generated/prisma/client' +import { PrismaService } from '../../prisma/prisma.service' import { CreateProductDto } from './dto/create-product.dto' import { UpdateProductDto } from './dto/update-product.dto' diff --git a/src/modules/purchase-receipts/index/dto/create-purchase-receipt.dto.ts b/src/modules/purchase-receipts/index/dto/create-purchase-receipt.dto.ts deleted file mode 100644 index 35e4d6a..0000000 --- a/src/modules/purchase-receipts/index/dto/create-purchase-receipt.dto.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { Type } from 'class-transformer' -import { ArrayMinSize, IsInt, IsNumber, IsOptional, IsString } from 'class-validator' -import { CreatePurchaseReceiptItemDto } from '../../purchase-receipt-items/dto/create-purchase-receipt-item.dto' - -export class CreatePurchaseReceiptDto { - @IsString() - code: string - - @Type(() => Number) - @IsNumber() - totalAmount: number - - @Type(() => Number) - @IsNumber() - paidAmount: number - - @IsOptional() - @IsString() - description?: string - - @Type(() => Number) - @IsInt() - supplierId: number - - @Type(() => Number) - @IsInt() - inventoryId: number - - @Type(() => Array) - @ArrayMinSize(1) - items: Array> -} diff --git a/src/modules/purchase-receipts/index/dto/update-purchase-receipt.dto.ts b/src/modules/purchase-receipts/index/dto/update-purchase-receipt.dto.ts deleted file mode 100644 index 07a2cda..0000000 --- a/src/modules/purchase-receipts/index/dto/update-purchase-receipt.dto.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { Type } from 'class-transformer' -import { IsInt, IsNumber, IsOptional, IsString } from 'class-validator' - -export class UpdatePurchaseReceiptDto { - @IsOptional() - @IsString() - code?: string - - @IsOptional() - @Type(() => Number) - @IsNumber() - totalAmount?: number - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @Type(() => Number) - @IsInt() - supplierId?: number | null - - @IsOptional() - @Type(() => Number) - @IsInt() - inventoryId?: number | null -} diff --git a/src/modules/purchase-receipts/index/purchase-receipts.controller.ts b/src/modules/purchase-receipts/index/purchase-receipts.controller.ts deleted file mode 100644 index ed95505..0000000 --- a/src/modules/purchase-receipts/index/purchase-receipts.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreatePurchaseReceiptDto } from './dto/create-purchase-receipt.dto' -import { UpdatePurchaseReceiptDto } from './dto/update-purchase-receipt.dto' -import { PurchaseReceiptsService } from './purchase-receipts.service' - -@Controller('purchase-receipts') -export class PurchaseReceiptsController { - constructor(private readonly service: PurchaseReceiptsService) {} - - @Post() - create(@Body() dto: CreatePurchaseReceiptDto) { - return this.service.create(dto) - } - - @Get() - findAll() { - return this.service.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.service.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdatePurchaseReceiptDto) { - return this.service.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.service.remove(Number(id)) - } -} diff --git a/src/modules/purchase-receipts/index/purchase-receipts.service.ts b/src/modules/purchase-receipts/index/purchase-receipts.service.ts deleted file mode 100644 index 7644151..0000000 --- a/src/modules/purchase-receipts/index/purchase-receipts.service.ts +++ /dev/null @@ -1,114 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { withTransaction } from '../../../common/database/transaction.helper' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { Prisma } from '../../../generated/prisma/client' -import { PrismaService } from '../../../prisma/prisma.service' -import { CreatePurchaseReceiptDto } from './dto/create-purchase-receipt.dto' -import { PurchaseReceiptWorkflow } from './purchase-receipts.workflow' - -@Injectable() -export class PurchaseReceiptsService { - constructor( - private prisma: PrismaService, - private purchaseReceiptWorkflow: PurchaseReceiptWorkflow, - ) {} - - async create(dto: CreatePurchaseReceiptDto) { - const data: Prisma.PurchaseReceiptCreateInput = { - code: dto.code, - totalAmount: new Prisma.Decimal(dto.totalAmount), - description: dto.description ?? null, - supplier: { connect: { id: dto.supplierId } }, - inventory: { connect: { id: dto.inventoryId } }, - - items: dto.items?.length - ? { - create: dto.items.map((item, idx) => { - const mapped = { - count: new Prisma.Decimal(item.count ?? 0), - unitPrice: new Prisma.Decimal(item.unitPrice ?? 0), - totalAmount: new Prisma.Decimal(item.totalAmount ?? 0), - description: item.description ?? null, - product: { connect: { id: item.productId } }, - } - return mapped - }), - } - : undefined, - } - - return withTransaction(this.prisma, async tx => { - const item = await tx.purchaseReceipt.create({ - data, - include: { items: true }, - omit: { - supplierId: true, - inventoryId: true, - }, - }) - await this.purchaseReceiptWorkflow.onCreatePurchaseReceipt( - tx, - dto.supplierId, - dto.totalAmount, - item.id, - ) - return ResponseMapper.create(item) - }) - } - - async findAll() { - const items = await this.prisma.purchaseReceipt.findMany({ - include: { supplier: true, inventory: true }, - }) - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.purchaseReceipt.findUnique({ - where: { id }, - include: { - supplier: { - select: { - id: true, - firstName: true, - lastName: true, - }, - }, - inventory: { - select: { - id: true, - name: true, - }, - }, - items: true, - }, - }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const payload: any = { ...data } - if (Object.prototype.hasOwnProperty.call(payload, 'supplierId')) { - if (payload.supplierId === null) payload.supplier = { disconnect: true } - else payload.supplier = { connect: { id: Number(payload.supplierId) } } - delete payload.supplierId - } - if (Object.prototype.hasOwnProperty.call(payload, 'inventoryId')) { - if (payload.inventoryId === null) payload.inventory = { disconnect: true } - else payload.inventory = { connect: { id: Number(payload.inventoryId) } } - delete payload.inventoryId - } - - const item = await this.prisma.purchaseReceipt.update({ - where: { id }, - data: payload, - }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.purchaseReceipt.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/modules/purchase-receipts/index/purchase-receipts.workflow.ts b/src/modules/purchase-receipts/index/purchase-receipts.workflow.ts deleted file mode 100644 index b5780de..0000000 --- a/src/modules/purchase-receipts/index/purchase-receipts.workflow.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { Prisma } from '../../../generated/prisma/client' -import { SupplierLedgerWorkflow } from '../../suppliers/ledger/supplier-ledger.workflow' - -@Injectable() -export class PurchaseReceiptWorkflow { - constructor(private supplierLedgerWorkflow: SupplierLedgerWorkflow) {} - - async onCreatePurchaseReceipt( - tx: Prisma.TransactionClient, - supplierId: number, - amount: number, - sourceId: number, - ) { - await this.supplierLedgerWorkflow.updateLedgerBalance( - tx, - supplierId, - amount, - sourceId, - 'PURCHASE', - ) - } -} diff --git a/src/modules/purchase-receipts/purchase-receipt-items/dto/create-purchase-receipt-item.dto.ts b/src/modules/purchase-receipts/purchase-receipt-items/dto/create-purchase-receipt-item.dto.ts deleted file mode 100644 index 8f6f87d..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-items/dto/create-purchase-receipt-item.dto.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { Type } from 'class-transformer' -import { IsNotEmpty, IsNumber, Min } from 'class-validator' - -export class CreatePurchaseReceiptItemDto { - @Type(() => Number) - @IsNumber() - @Min(0) - count: number - - @Type(() => Number) - @IsNumber() - @Min(0) - unitPrice: number - - @Type(() => Number) - @IsNumber() - @Min(0) - totalAmount: number - - @Type(() => Number) - @IsNotEmpty() - productId: number - - description?: string -} diff --git a/src/modules/purchase-receipts/purchase-receipt-items/dto/update-purchase-receipt-item.dto.ts b/src/modules/purchase-receipts/purchase-receipt-items/dto/update-purchase-receipt-item.dto.ts deleted file mode 100644 index 7c9395f..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-items/dto/update-purchase-receipt-item.dto.ts +++ /dev/null @@ -1,29 +0,0 @@ -import { Type } from 'class-transformer' -import { IsInt, IsNumber, IsOptional } from 'class-validator' - -export class UpdatePurchaseReceiptItemDto { - @IsOptional() - @Type(() => Number) - @IsNumber() - count?: number - - @IsOptional() - @Type(() => Number) - @IsNumber() - unitPrice?: number - - @IsOptional() - @Type(() => Number) - @IsNumber() - totalAmount?: number - - @IsOptional() - @Type(() => Number) - @IsInt() - receiptId?: number - - @IsOptional() - @Type(() => Number) - @IsInt() - productId?: number -} diff --git a/src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.controller.ts b/src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.controller.ts deleted file mode 100644 index 6d95a91..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.controller.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreatePurchaseReceiptItemDto } from './dto/create-purchase-receipt-item.dto' -import { UpdatePurchaseReceiptItemDto } from './dto/update-purchase-receipt-item.dto' -import { PurchaseReceiptItemsService } from './purchase-receipt-items.service' - -@Controller('purchase-receipts/:receiptId/items') -export class PurchaseReceiptItemsController { - constructor(private readonly service: PurchaseReceiptItemsService) {} - - @Post() - create( - @Param('receiptId') receiptId: string, - @Body() dto: CreatePurchaseReceiptItemDto, - ) { - return this.service.createForReceipt(Number(receiptId), dto) - } - - @Get() - findAll(@Param('receiptId') receiptId: string) { - return this.service.findAllForReceipt(Number(receiptId)) - } - - @Get(':id') - findOne(@Param('receiptId') receiptId: string, @Param('id') id: string) { - return this.service.findOneForReceipt(Number(receiptId), Number(id)) - } - - @Patch(':id') - update( - @Param('receiptId') receiptId: string, - @Param('id') id: string, - @Body() dto: UpdatePurchaseReceiptItemDto, - ) { - return this.service.updateForReceipt(Number(receiptId), Number(id), dto) - } - - @Delete(':id') - remove(@Param('receiptId') receiptId: string, @Param('id') id: string) { - return this.service.removeForReceipt(Number(receiptId), Number(id)) - } -} diff --git a/src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.module.ts b/src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.module.ts deleted file mode 100644 index 83cd162..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../../prisma/prisma.module' -import { PurchaseReceiptItemsController } from './purchase-receipt-items.controller' -import { PurchaseReceiptItemsService } from './purchase-receipt-items.service' - -@Module({ - imports: [PrismaModule], - controllers: [PurchaseReceiptItemsController], - providers: [PurchaseReceiptItemsService], -}) -export class PurchaseReceiptItemsModule {} diff --git a/src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.service.ts b/src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.service.ts deleted file mode 100644 index 90d23d5..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-items/purchase-receipt-items.service.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { PrismaService } from '../../../prisma/prisma.service' -import { CreatePurchaseReceiptItemDto } from './dto/create-purchase-receipt-item.dto' - -@Injectable() -export class PurchaseReceiptItemsService { - constructor(private prisma: PrismaService) {} - - async create(dto: CreatePurchaseReceiptItemDto) { - const payload: any = { ...dto } - if (Object.prototype.hasOwnProperty.call(payload, 'productId')) { - payload.product = { connect: { id: Number(payload.productId) } } - delete payload.productId - } - if (Object.prototype.hasOwnProperty.call(payload, 'receiptId')) { - payload.receipt = { connect: { id: Number(payload.receiptId) } } - delete payload.receiptId - } - payload.unitPrice = String(payload.unitPrice) - payload.count = String(payload.count) - payload.totalAmount = String(payload.totalAmount) - const item = await this.prisma.purchaseReceiptItem.create({ data: payload }) - return ResponseMapper.create(item) - } - async findAll(receiptId: number) { - const where = { receiptId: Number(receiptId) } - const items = await this.prisma.purchaseReceiptItem.findMany({ - where, - include: { product: true }, - }) - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.purchaseReceiptItem.findUnique({ - where: { id }, - include: { product: true, receipt: true }, - }) - if (!item) return null - return ResponseMapper.single(item) - } - - async createForReceipt(receiptId: number, dto: CreatePurchaseReceiptItemDto) { - const payload: any = { ...dto, receiptId } - return this.create(payload) - } - - async findAllForReceipt(receiptId: number) { - return this.findAll(receiptId) - } - - async findOneForReceipt(receiptId: number, id: number) { - const item = await this.prisma.purchaseReceiptItem.findFirst({ - where: { id, receiptId }, - include: { product: true, receipt: true }, - }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const payload: any = { ...data } - if (Object.prototype.hasOwnProperty.call(payload, 'productId')) { - payload.product = { connect: { id: Number(payload.productId) } } - delete payload.productId - } - if (Object.prototype.hasOwnProperty.call(payload, 'receiptId')) { - payload.receipt = { connect: { id: Number(payload.receiptId) } } - delete payload.receiptId - } - - const item = await this.prisma.purchaseReceiptItem.update({ - where: { id }, - data: payload, - }) - return ResponseMapper.update(item) - } - - async updateForReceipt(receiptId: number, id: number, data: any) { - const existing = await this.prisma.purchaseReceiptItem.findFirst({ - where: { id, receiptId }, - }) - if (!existing) return null - return this.update(id, data) - } - - async remove(id: number) { - const item = await this.prisma.purchaseReceiptItem.delete({ where: { id } }) - return ResponseMapper.single(item) - } - - async removeForReceipt(receiptId: number, id: number) { - const existing = await this.prisma.purchaseReceiptItem.findFirst({ - where: { id, receiptId }, - }) - if (!existing) return null - return this.remove(id) - } -} diff --git a/src/modules/purchase-receipts/purchase-receipt-payments/dto/create-purchase-receipt-payment.dto.ts b/src/modules/purchase-receipts/purchase-receipt-payments/dto/create-purchase-receipt-payment.dto.ts deleted file mode 100644 index 093fde9..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-payments/dto/create-purchase-receipt-payment.dto.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { IsEnum, IsInt, IsNumber, IsOptional, IsString } from 'class-validator' -import { PaymentMethodType, PaymentType } from '../../../../generated/prisma/enums' - -export class CreatePurchaseReceiptPaymentDto { - @IsNumber() - amount: number - - @IsEnum(PaymentMethodType) - paymentMethod: PaymentMethodType - - @IsEnum(PaymentType) - type: PaymentType - - @IsInt() - bankAccountId: number - - @IsInt() - receiptId: number - - @IsString() - payedAt: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @IsString() - createdAt?: string -} diff --git a/src/modules/purchase-receipts/purchase-receipt-payments/dto/update-purchase-receipt-payment.dto.ts b/src/modules/purchase-receipts/purchase-receipt-payments/dto/update-purchase-receipt-payment.dto.ts deleted file mode 100644 index 93e51bb..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-payments/dto/update-purchase-receipt-payment.dto.ts +++ /dev/null @@ -1,6 +0,0 @@ -import { PartialType } from '@nestjs/swagger' -import { CreatePurchaseReceiptPaymentDto } from './create-purchase-receipt-payment.dto' - -export class UpdatePurchaseReceiptPaymentDto extends PartialType( - CreatePurchaseReceiptPaymentDto, -) {} diff --git a/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.controller.ts b/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.controller.ts deleted file mode 100644 index 1eba93e..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.controller.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreatePurchaseReceiptPaymentDto } from './dto/create-purchase-receipt-payment.dto' -import { UpdatePurchaseReceiptPaymentDto } from './dto/update-purchase-receipt-payment.dto' -import { PurchaseReceiptPaymentsService } from './purchase-receipt-payments.service' - -@Controller('purchase-receipt-payments') -export class PurchaseReceiptPaymentsController { - constructor( - private readonly purchaseReceiptPaymentsService: PurchaseReceiptPaymentsService, - ) {} - - @Post() - create(@Body() dto: CreatePurchaseReceiptPaymentDto) { - return this.purchaseReceiptPaymentsService.create(dto) - } - - @Get() - findAll() { - return this.purchaseReceiptPaymentsService.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.purchaseReceiptPaymentsService.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdatePurchaseReceiptPaymentDto) { - return this.purchaseReceiptPaymentsService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.purchaseReceiptPaymentsService.remove(Number(id)) - } -} diff --git a/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.module.ts b/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.module.ts deleted file mode 100644 index cc5d2d8..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.module.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { Module } from '@nestjs/common' - -import { PrismaModule } from '../../../prisma/prisma.module' -import { BankAccountsModule } from '../../bank-accounts/bank-accounts.module' -import { PurchaseReceiptPaymentsController } from './purchase-receipt-payments.controller' -import { PurchaseReceiptPaymentsService } from './purchase-receipt-payments.service' -import { PurchaseReceiptPaymentsWorkflow } from './purchase-receipt-payments.workflow' - -@Module({ - imports: [PrismaModule, BankAccountsModule], - controllers: [PurchaseReceiptPaymentsController], - providers: [PurchaseReceiptPaymentsService, PurchaseReceiptPaymentsWorkflow], - exports: [PurchaseReceiptPaymentsWorkflow], -}) -export class PurchaseReceiptPaymentsModule {} diff --git a/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.service.ts b/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.service.ts deleted file mode 100644 index b1f713b..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.service.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { withTransaction } from '../../../common/database/transaction.helper' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { PrismaService } from '../../../prisma/prisma.service' -import { CreatePurchaseReceiptPaymentDto } from './dto/create-purchase-receipt-payment.dto' -import { PurchaseReceiptPaymentsWorkflow } from './purchase-receipt-payments.workflow' - -@Injectable() -export class PurchaseReceiptPaymentsService { - constructor( - private prisma: PrismaService, - private purchaseReceiptPaymentsWorkflow: PurchaseReceiptPaymentsWorkflow, - ) {} - - async create(data: CreatePurchaseReceiptPaymentDto) { - return withTransaction(this.prisma, async tx => { - const item = await tx.purchaseReceiptPayments.create({ data }) - await this.purchaseReceiptPaymentsWorkflow.onAddPayment( - tx, - data.bankAccountId, - data.receiptId, - data.amount, - data.type, - ) - return ResponseMapper.create(item) - }) - } - - async findAll() { - const items = await this.prisma.purchaseReceiptPayments.findMany({ - include: { - receipt: { - select: { - id: true, - code: true, - totalAmount: true, - paidAmount: true, - status: true, - supplier: { - select: { id: true, firstName: true, lastName: true }, - }, - }, - }, - }, - }) - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.purchaseReceiptPayments.findUnique({ - where: { id }, - include: { - receipt: { - select: { - id: true, - code: true, - totalAmount: true, - paidAmount: true, - status: true, - supplier: { - select: { id: true, firstName: true, lastName: true }, - }, - }, - }, - }, - }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const item = await this.prisma.purchaseReceiptPayments.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.purchaseReceiptPayments.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.workflow.ts b/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.workflow.ts deleted file mode 100644 index 0de3175..0000000 --- a/src/modules/purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.workflow.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { Prisma } from '../../../generated/prisma/client' -import { PaymentType } from '../../../generated/prisma/enums' -import { BankAccountsWorkflow } from '../../bank-accounts/bank-accounts.workflow' - -@Injectable() -export class PurchaseReceiptPaymentsWorkflow { - constructor(private bankAccountsWorkflow: BankAccountsWorkflow) {} - - async onAddPayment( - tx: Prisma.TransactionClient, - bankAccountId: number, - receiptId: number, - amount: number, - type: PaymentType, - ) { - const { paidAmount, totalAmount } = await tx.purchaseReceipt.findUniqueOrThrow({ - where: { id: receiptId }, - }) - - if (type === 'PAYMENT' && Number(paidAmount) + Number(amount) > Number(totalAmount)) { - throw new Error('مجموع مبلغ پرداختی بیشتر از مبلغ فاکتور است.') - } - - if (type === 'REFUND' && Number(paidAmount) - Number(amount) < 0) { - throw new Error( - 'مجموع مبلغ بازپرداختی بیشتر از مبلغ پرداخت‌ شده در این فاکتور است.', - ) - } - - await this.bankAccountsWorkflow.addTransaction(tx, { - bankAccountId: bankAccountId, - amount: amount, - type: type === 'PAYMENT' ? 'WITHDRAWAL' : 'DEPOSIT', - referenceId: receiptId, - referenceType: type === 'PAYMENT' ? 'PURCHASE_PAYMENT' : 'PURCHASE_REFUND', - }) - - const newPaidAmount = - type === 'PAYMENT' - ? Number(paidAmount) + Number(amount) - : Number(paidAmount) - Number(amount) - const newStatus = - newPaidAmount === 0 - ? 'UNPAID' - : newPaidAmount >= Number(totalAmount) - ? 'PAID' - : 'PARTIALLY_PAID' - - await tx.purchaseReceipt.update({ - where: { id: receiptId }, - data: { - paidAmount: newPaidAmount, - status: newStatus, - }, - }) - } -} diff --git a/src/modules/purchase-receipts/purchase-receipts.module.ts b/src/modules/purchase-receipts/purchase-receipts.module.ts deleted file mode 100644 index 96f3068..0000000 --- a/src/modules/purchase-receipts/purchase-receipts.module.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../prisma/prisma.module' -import { SupplierLedgerModule } from '../suppliers/ledger/supplier-ledger.module' -import { PurchaseReceiptsController } from './index/purchase-receipts.controller' -import { PurchaseReceiptsService } from './index/purchase-receipts.service' -import { PurchaseReceiptWorkflow } from './index/purchase-receipts.workflow' -import { PurchaseReceiptItemsModule } from './purchase-receipt-items/purchase-receipt-items.module' -import { PurchaseReceiptPaymentsModule } from './purchase-receipt-payments/purchase-receipt-payments.module' - -@Module({ - imports: [ - PrismaModule, - PurchaseReceiptItemsModule, - PurchaseReceiptPaymentsModule, - SupplierLedgerModule, - ], - controllers: [PurchaseReceiptsController], - providers: [PurchaseReceiptsService, PurchaseReceiptWorkflow], - exports: [PurchaseReceiptWorkflow], -}) -export class PurchaseReceiptsModule {} diff --git a/src/sales-invoice-items/dto/create-sales-invoice-item.dto.ts b/src/modules/sales-invoice-items/dto/create-sales-invoice-item.dto.ts similarity index 100% rename from src/sales-invoice-items/dto/create-sales-invoice-item.dto.ts rename to src/modules/sales-invoice-items/dto/create-sales-invoice-item.dto.ts diff --git a/src/sales-invoice-items/dto/update-sales-invoice-item.dto.ts b/src/modules/sales-invoice-items/dto/update-sales-invoice-item.dto.ts similarity index 100% rename from src/sales-invoice-items/dto/update-sales-invoice-item.dto.ts rename to src/modules/sales-invoice-items/dto/update-sales-invoice-item.dto.ts diff --git a/src/sales-invoice-items/sales-invoice-items.controller.ts b/src/modules/sales-invoice-items/sales-invoice-items.controller.ts similarity index 100% rename from src/sales-invoice-items/sales-invoice-items.controller.ts rename to src/modules/sales-invoice-items/sales-invoice-items.controller.ts diff --git a/src/sales-invoice-items/sales-invoice-items.module.ts b/src/modules/sales-invoice-items/sales-invoice-items.module.ts similarity index 86% rename from src/sales-invoice-items/sales-invoice-items.module.ts rename to src/modules/sales-invoice-items/sales-invoice-items.module.ts index 8eacaa3..ab4ec21 100644 --- a/src/sales-invoice-items/sales-invoice-items.module.ts +++ b/src/modules/sales-invoice-items/sales-invoice-items.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' +import { PrismaModule } from '../../prisma/prisma.module' import { SalesInvoiceItemsController } from './sales-invoice-items.controller' import { SalesInvoiceItemsService } from './sales-invoice-items.service' diff --git a/src/sales-invoice-items/sales-invoice-items.service.ts b/src/modules/sales-invoice-items/sales-invoice-items.service.ts similarity index 95% rename from src/sales-invoice-items/sales-invoice-items.service.ts rename to src/modules/sales-invoice-items/sales-invoice-items.service.ts index 72d1931..c5147a8 100644 --- a/src/sales-invoice-items/sales-invoice-items.service.ts +++ b/src/modules/sales-invoice-items/sales-invoice-items.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' +import { ResponseMapper } from '../../common/response/response-mapper' +import { PrismaService } from '../../prisma/prisma.service' import { CreateSalesInvoiceItemDto } from './dto/create-sales-invoice-item.dto' @Injectable() diff --git a/src/stock-balance/stock-balance.controller.ts b/src/modules/stock-balance/stock-balance.controller.ts similarity index 100% rename from src/stock-balance/stock-balance.controller.ts rename to src/modules/stock-balance/stock-balance.controller.ts diff --git a/src/stock-balance/stock-balance.module.ts b/src/modules/stock-balance/stock-balance.module.ts similarity index 84% rename from src/stock-balance/stock-balance.module.ts rename to src/modules/stock-balance/stock-balance.module.ts index ceefccd..61de72f 100644 --- a/src/stock-balance/stock-balance.module.ts +++ b/src/modules/stock-balance/stock-balance.module.ts @@ -1,5 +1,5 @@ import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' +import { PrismaModule } from '../../prisma/prisma.module' import { StockBalanceController } from './stock-balance.controller' import { StockBalanceService } from './stock-balance.service' diff --git a/src/stock-balance/stock-balance.service.ts b/src/modules/stock-balance/stock-balance.service.ts similarity index 78% rename from src/stock-balance/stock-balance.service.ts rename to src/modules/stock-balance/stock-balance.service.ts index ae60681..68c0439 100644 --- a/src/stock-balance/stock-balance.service.ts +++ b/src/modules/stock-balance/stock-balance.service.ts @@ -1,6 +1,6 @@ import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' +import { ResponseMapper } from '../../common/response/response-mapper' +import { PrismaService } from '../../prisma/prisma.service' @Injectable() export class StockBalanceService { diff --git a/src/modules/suppliers/index/dto/create-supplier.dto.ts b/src/modules/suppliers/index/dto/create-supplier.dto.ts deleted file mode 100644 index 1fc0584..0000000 --- a/src/modules/suppliers/index/dto/create-supplier.dto.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { IsEmail, IsOptional, IsString } from 'class-validator' - -export class CreateSupplierDto { - @IsString() - firstName: string - - @IsString() - lastName: string - - @IsOptional() - @IsEmail() - email?: string - - @IsOptional() - @IsString() - mobileNumber?: string - - @IsOptional() - @IsString() - address?: string - - @IsOptional() - @IsString() - city?: string - - @IsOptional() - @IsString() - state?: string - - @IsOptional() - @IsString() - country?: string -} diff --git a/src/modules/suppliers/index/dto/update-supplier.dto.ts b/src/modules/suppliers/index/dto/update-supplier.dto.ts deleted file mode 100644 index eb99cec..0000000 --- a/src/modules/suppliers/index/dto/update-supplier.dto.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Type } from 'class-transformer' -import { IsBoolean, IsEmail, IsOptional, IsString } from 'class-validator' - -export class UpdateSupplierDto { - @IsOptional() - @IsString() - firstName?: string - - @IsOptional() - @IsString() - lastName?: string - - @IsOptional() - @IsEmail() - email?: string - - @IsOptional() - @IsString() - mobileNumber?: string - - @IsOptional() - @IsString() - address?: string - - @IsOptional() - @IsString() - city?: string - - @IsOptional() - @IsString() - state?: string - - @IsOptional() - @IsString() - country?: string - - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isActive?: boolean -} diff --git a/src/modules/suppliers/index/suppliers.controller.ts b/src/modules/suppliers/index/suppliers.controller.ts deleted file mode 100644 index 9ea9ac6..0000000 --- a/src/modules/suppliers/index/suppliers.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateSupplierDto } from './dto/create-supplier.dto' -import { UpdateSupplierDto } from './dto/update-supplier.dto' -import { SuppliersService } from './suppliers.service' - -@Controller('suppliers') -export class SuppliersController { - constructor(private readonly suppliersService: SuppliersService) {} - - @Post() - create(@Body() dto: CreateSupplierDto) { - return this.suppliersService.create(dto) - } - - @Get() - findAll() { - return this.suppliersService.findAll() - } - - @Get(':supplierId') - findOne(@Param('supplierId') supplierId: string) { - return this.suppliersService.findOne(Number(supplierId)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateSupplierDto) { - return this.suppliersService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.suppliersService.remove(Number(id)) - } -} diff --git a/src/modules/suppliers/index/suppliers.service.ts b/src/modules/suppliers/index/suppliers.service.ts deleted file mode 100644 index b638246..0000000 --- a/src/modules/suppliers/index/suppliers.service.ts +++ /dev/null @@ -1,49 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { PrismaService } from '../../../prisma/prisma.service' - -@Injectable() -export class SuppliersService { - constructor(private prisma: PrismaService) {} - async create(data: any) { - const item = await this.prisma.supplier.create({ data }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.supplier.findMany() - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.supplier.findUnique({ where: { id } }) - if (!item) return null - const receiptsInfo = await this.prisma.purchaseReceipt.aggregate({ - where: { - supplierId: id, - }, - _count: true, - _sum: { - totalAmount: true, - }, - }) - - return ResponseMapper.single({ - ...item, - receiptsOverview: { - totalPayment: receiptsInfo._sum.totalAmount, - count: receiptsInfo._count, - }, - }) - } - - async update(id: number, data: any) { - const item = await this.prisma.supplier.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.supplier.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/modules/suppliers/invoices/dto/create-receipt-payment.dto.ts b/src/modules/suppliers/invoices/dto/create-receipt-payment.dto.ts deleted file mode 100644 index 0544120..0000000 --- a/src/modules/suppliers/invoices/dto/create-receipt-payment.dto.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { - IsDateString, - IsEnum, - IsInt, - IsNumber, - IsOptional, - IsString, -} from 'class-validator' -import { PaymentMethodType, PaymentType } from '../../../../generated/prisma/enums' - -export class CreateReceiptPaymentDto { - @IsNumber() - amount: number - - @IsEnum(PaymentMethodType) - paymentMethod: PaymentMethodType - - @IsEnum(PaymentType) - type: PaymentType - - @IsInt() - bankAccountId: number - - @IsDateString() - payedAt: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @IsString() - createdAt?: string -} diff --git a/src/modules/suppliers/invoices/invoices.controller.ts b/src/modules/suppliers/invoices/invoices.controller.ts deleted file mode 100644 index da49ecf..0000000 --- a/src/modules/suppliers/invoices/invoices.controller.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Body, Controller, Get, Param, Post } from '@nestjs/common' -import { CreateReceiptPaymentDto } from './dto/create-receipt-payment.dto' -import { SupplierInvoicesService } from './invoices.service' - -@Controller('suppliers/:supplierId/invoices') -export class SupplierInvoicesController { - constructor(private readonly supplierInvoicesService: SupplierInvoicesService) {} - - @Get() - getInvoices(@Param('supplierId') supplierId: string) { - return this.supplierInvoicesService.findAll(Number(supplierId)) - } - - @Get(':invoiceId') - getInvoice( - @Param('supplierId') supplierId: string, - @Param('invoiceId') invoiceId: string, - ) { - return this.supplierInvoicesService.findOne(Number(supplierId), Number(invoiceId)) - } - - @Post(':invoiceId/pay') - createPayment( - @Param('supplierId') supplierId: string, - @Param('invoiceId') invoiceId: string, - @Body() data: CreateReceiptPaymentDto, - ) { - return this.supplierInvoicesService.createPayment( - Number(supplierId), - Number(invoiceId), - data, - ) - } - - @Get(':invoiceId/payments') - getInvoicePayments( - @Param('supplierId') supplierId: string, - @Param('invoiceId') invoiceId: string, - ) { - return this.supplierInvoicesService.findPayments(Number(invoiceId)) - } - - @Get('payments') - getPayments(@Param('supplierId') supplierId: string) { - return this.supplierInvoicesService.findPayments(Number(supplierId)) - } -} diff --git a/src/modules/suppliers/invoices/invoices.module.ts b/src/modules/suppliers/invoices/invoices.module.ts deleted file mode 100644 index 71a4fd1..0000000 --- a/src/modules/suppliers/invoices/invoices.module.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../../prisma/prisma.module' -import { PurchaseReceiptPaymentsModule } from '../../purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.module' -import { SupplierLedgerModule } from '../ledger/supplier-ledger.module' -import { SupplierInvoicesController } from './invoices.controller' -import { SupplierInvoicesService } from './invoices.service' -import { SupplierInvoicesWorkflow } from './invoices.workflow' - -@Module({ - imports: [PrismaModule, PurchaseReceiptPaymentsModule, SupplierLedgerModule], - controllers: [SupplierInvoicesController], - providers: [SupplierInvoicesService, SupplierInvoicesWorkflow], -}) -export class SupplierInvoicesModule {} diff --git a/src/modules/suppliers/invoices/invoices.service.ts b/src/modules/suppliers/invoices/invoices.service.ts deleted file mode 100644 index 88750c7..0000000 --- a/src/modules/suppliers/invoices/invoices.service.ts +++ /dev/null @@ -1,196 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { withTransaction } from '../../../common/database/transaction.helper' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { PrismaService } from '../../../prisma/prisma.service' -import { CreateReceiptPaymentDto } from './dto/create-receipt-payment.dto' -import { SupplierInvoicesWorkflow } from './invoices.workflow' - -@Injectable() -export class SupplierInvoicesService { - constructor( - private prisma: PrismaService, - private supplierInvoicesWorkflow: SupplierInvoicesWorkflow, - ) {} - - async findAll(supplierId: number) { - const items = await this.prisma.purchaseReceipt.findMany({ - where: { - supplierId, - }, - include: { - inventory: { - select: { - id: true, - name: true, - }, - }, - items: { - select: { - id: true, - count: true, - unitPrice: true, - totalAmount: true, - product: { - select: { - id: true, - name: true, - sku: true, - }, - }, - }, - }, - payments: { - select: { - id: true, - amount: true, - }, - }, - }, - omit: { - inventoryId: true, - supplierId: true, - }, - }) - return ResponseMapper.list(items) - } - - async findOne(supplierId: number, invoiceId: number) { - const invoice = await this.prisma.purchaseReceipt.findUnique({ - where: { - id: invoiceId, - supplierId, - }, - include: { - inventory: { - select: { - id: true, - name: true, - }, - }, - items: true, - }, - omit: { - inventoryId: true, - supplierId: true, - }, - }) - return ResponseMapper.single(invoice) - } - - async findPayments(invoiceId: number) { - const items = await this.prisma.purchaseReceiptPayments.findMany({ - where: { - receipt: { - id: invoiceId, - }, - }, - include: { - receipt: { - include: { - inventory: { - select: { - id: true, - name: true, - }, - }, - }, - }, - bankAccount: { - select: { - branch: { - select: { - id: true, - name: true, - bank: { - select: { - id: true, - name: true, - shortName: true, - }, - }, - }, - }, - accountNumber: true, - cardNumber: true, - name: true, - id: true, - iban: true, - }, - }, - }, - omit: { - receiptId: true, - }, - orderBy: { - payedAt: 'desc', - }, - }) - return ResponseMapper.list(items) - } - - async findAllPayments(supplierId: number) { - const items = await this.prisma.purchaseReceiptPayments.findMany({ - where: { - receipt: { - supplierId, - }, - }, - include: { - receipt: { - select: { - id: true, - totalAmount: true, - status: true, - paidAmount: true, - }, - }, - }, - omit: { - receiptId: true, - }, - }) - return ResponseMapper.list(items) - } - - async createPayment( - supplierId: number, - invoiceId: number, - data: CreateReceiptPaymentDto, - ) { - const { bankAccountId, ...rest } = data - - return withTransaction(this.prisma, async tx => { - await this.supplierInvoicesWorkflow.onPaymentCreated( - tx, - supplierId, - data.amount, - invoiceId, - bankAccountId, - ) - - const payment = await tx.purchaseReceiptPayments.create({ - data: { - ...rest, - payedAt: new Date(data.payedAt), - receipt: { - connect: { - id: invoiceId, - }, - }, - bankAccount: { - connect: { - id: bankAccountId, - }, - }, - }, - include: { - receipt: true, - }, - omit: { - receiptId: true, - }, - }) - return ResponseMapper.create(payment) - }) - } -} diff --git a/src/modules/suppliers/invoices/invoices.workflow.ts b/src/modules/suppliers/invoices/invoices.workflow.ts deleted file mode 100644 index 2985314..0000000 --- a/src/modules/suppliers/invoices/invoices.workflow.ts +++ /dev/null @@ -1,36 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { Prisma } from '../../../generated/prisma/client' -import { PurchaseReceiptPaymentsWorkflow } from '../../purchase-receipts/purchase-receipt-payments/purchase-receipt-payments.workflow' -import { SupplierLedgerWorkflow } from '../ledger/supplier-ledger.workflow' - -@Injectable() -export class SupplierInvoicesWorkflow { - constructor( - private supplierLedgerWorkflow: SupplierLedgerWorkflow, - private purchaseReceiptPaymentWorkflow: PurchaseReceiptPaymentsWorkflow, - ) {} - - async onPaymentCreated( - tx: Prisma.TransactionClient, - supplierId: number, - amount: number, - invoiceId: number, - bankAccountId: number, - ) { - await this.supplierLedgerWorkflow.updateLedgerBalance( - tx, - supplierId, - amount, - invoiceId, - 'PAYMENT', - ) - - await this.purchaseReceiptPaymentWorkflow.onAddPayment( - tx, - bankAccountId, - invoiceId, - amount, - 'PAYMENT', - ) - } -} diff --git a/src/modules/suppliers/ledger/supplier-ledger.controller.ts b/src/modules/suppliers/ledger/supplier-ledger.controller.ts deleted file mode 100644 index ffb333a..0000000 --- a/src/modules/suppliers/ledger/supplier-ledger.controller.ts +++ /dev/null @@ -1,12 +0,0 @@ -import { Controller, Get, Param } from '@nestjs/common' -import { SupplierLedgerService } from './supplier-ledger.service' - -@Controller('suppliers/:supplierId/ledger') -export class SupplierLedgerController { - constructor(private readonly supplierLedgerService: SupplierLedgerService) {} - - @Get('') - getLedger(@Param('supplierId') supplierId: string) { - return this.supplierLedgerService.findAll(Number(supplierId)) - } -} diff --git a/src/modules/suppliers/ledger/supplier-ledger.module.ts b/src/modules/suppliers/ledger/supplier-ledger.module.ts deleted file mode 100644 index 13692ac..0000000 --- a/src/modules/suppliers/ledger/supplier-ledger.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../../prisma/prisma.module' -import { SupplierLedgerController } from './supplier-ledger.controller' -import { SupplierLedgerService } from './supplier-ledger.service' -import { SupplierLedgerWorkflow } from './supplier-ledger.workflow' - -@Module({ - imports: [PrismaModule], - controllers: [SupplierLedgerController], - providers: [SupplierLedgerService, SupplierLedgerWorkflow], - exports: [SupplierLedgerWorkflow], -}) -export class SupplierLedgerModule {} diff --git a/src/modules/suppliers/ledger/supplier-ledger.service.ts b/src/modules/suppliers/ledger/supplier-ledger.service.ts deleted file mode 100644 index bcb929f..0000000 --- a/src/modules/suppliers/ledger/supplier-ledger.service.ts +++ /dev/null @@ -1,23 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../../../common/response/response-mapper' -import { PrismaService } from '../../../prisma/prisma.service' - -@Injectable() -export class SupplierLedgerService { - constructor(private prisma: PrismaService) {} - - async findAll(supplierId: number) { - const items = await this.prisma.supplierLedger.findMany({ - where: { - supplierId, - }, - omit: { - supplierId: true, - }, - orderBy: { - createdAt: 'desc', - }, - }) - return ResponseMapper.list(items) - } -} diff --git a/src/modules/suppliers/ledger/supplier-ledger.workflow.ts b/src/modules/suppliers/ledger/supplier-ledger.workflow.ts deleted file mode 100644 index 026fdb6..0000000 --- a/src/modules/suppliers/ledger/supplier-ledger.workflow.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { Prisma } from '../../../generated/prisma/client' -import { LedgerSourceType } from '../../../generated/prisma/enums' - -@Injectable() -export class SupplierLedgerWorkflow { - async updateLedgerBalance( - tx: Prisma.TransactionClient, - supplierId: number, - amount: number, - sourceId: number, - sourceType: LedgerSourceType, - ) { - const lastSupplierLedgerBalance = await tx.supplierLedger - .findFirstOrThrow({ - where: { supplierId }, - orderBy: { createdAt: 'desc' }, - }) - .then(sl => (sl ? sl.balance : 0)) - - let newBalance = Number(lastSupplierLedgerBalance) - let credit = 0 - let debit = 0 - let description = '' - - switch (sourceType) { - case 'PURCHASE': - newBalance += amount - credit = amount - description = `خرید به مبلغ ${amount} بابت خرید شماره ${sourceId}` - break - case 'REFUND': - case 'PAYMENT': - newBalance -= amount - debit = amount - description = `پرداخت به مبلغ ${amount} بابت پرداخت شماره ${sourceId}` - break - case 'ADJUSTMENT': - newBalance = amount - description = `اصلاح حساب به مبلغ ${amount} بابت پرداخت شماره ${sourceId}` - - break - } - - return await tx.supplierLedger.create({ - data: { - supplierId, - debit, - credit, - balance: newBalance, - sourceId, - sourceType, - description, - }, - }) - } -} diff --git a/src/modules/suppliers/suppliers.module.ts b/src/modules/suppliers/suppliers.module.ts deleted file mode 100644 index f717480..0000000 --- a/src/modules/suppliers/suppliers.module.ts +++ /dev/null @@ -1,13 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../../prisma/prisma.module' -import { SuppliersController } from './index/suppliers.controller' -import { SuppliersService } from './index/suppliers.service' -import { SupplierInvoicesModule } from './invoices/invoices.module' -import { SupplierLedgerModule } from './ledger/supplier-ledger.module' - -@Module({ - imports: [PrismaModule, SupplierInvoicesModule, SupplierLedgerModule], - controllers: [SuppliersController], - providers: [SuppliersService], -}) -export class SuppliersModule {} diff --git a/src/modules/uploads/image-uploader.service.ts b/src/modules/uploads/image-uploader.service.ts new file mode 100644 index 0000000..d63b8d3 --- /dev/null +++ b/src/modules/uploads/image-uploader.service.ts @@ -0,0 +1,21 @@ +import { Injectable } from '@nestjs/common' +import { File } from 'multer' +import { UploaderService } from './uploader.service' + +@Injectable() +export class ImageUploaderService { + constructor(private readonly uploaderService: UploaderService) {} + + async uploadImage( + file: File, + accountId: string, + type: string, + ): Promise { + return this.uploaderService.uploadFile( + file.buffer, + file.originalname, + accountId, + type, + ) + } +} diff --git a/src/modules/uploads/uploader.service.ts b/src/modules/uploads/uploader.service.ts new file mode 100644 index 0000000..2687daa --- /dev/null +++ b/src/modules/uploads/uploader.service.ts @@ -0,0 +1,25 @@ +import { Injectable } from '@nestjs/common' +import { promises as fs } from 'fs' +import { join } from 'path' +import { v4 as uuidv4 } from 'uuid' + +@Injectable() +export class UploaderService { + private uploadDir = join(process.cwd(), 'uploads') + + async uploadFile( + buffer: Buffer, + originalname: string, + accountId: string, + type: string, + ): Promise { + const ext = originalname.split('.').pop() + const filename = `${uuidv4()}.${ext}` + const dirPath = join(this.uploadDir, accountId, type) + const filePath = join(dirPath, filename) + await fs.mkdir(dirPath, { recursive: true }) + await fs.writeFile(filePath, buffer) + // Return a URL path, e.g. /uploads/{accountId}/{type}/{filename} + return `/uploads/${accountId}/${type}/${filename}` + } +} diff --git a/src/modules/uploads/uploads.controller.ts b/src/modules/uploads/uploads.controller.ts new file mode 100644 index 0000000..f30cf67 --- /dev/null +++ b/src/modules/uploads/uploads.controller.ts @@ -0,0 +1,19 @@ +import { Body, Controller, Post, UploadedFile, UseInterceptors } from '@nestjs/common' +import { FileInterceptor } from '@nestjs/platform-express' +import { ImageUploaderService } from './image-uploader.service' + +@Controller('uploads') +export class UploadsController { + constructor(private readonly imageUploaderService: ImageUploaderService) {} + + @Post('image') + @UseInterceptors(FileInterceptor('file')) + async uploadImage( + @UploadedFile() file: Express.Multer.File, + @Body('accountId') accountId: string, + @Body('type') type: string, + ) { + const url = await this.imageUploaderService.uploadImage(file, accountId, type) + return { url } + } +} diff --git a/src/modules/uploads/uploads.module.ts b/src/modules/uploads/uploads.module.ts new file mode 100644 index 0000000..333a1ae --- /dev/null +++ b/src/modules/uploads/uploads.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common' +import { ImageUploaderService } from './image-uploader.service' +import { UploaderService } from './uploader.service' +import { UploadsController } from './uploads.controller' + +@Module({ + providers: [UploaderService, ImageUploaderService], + controllers: [UploadsController], + exports: [UploaderService, ImageUploaderService], +}) +export class UploadsModule {} diff --git a/src/product-brands/dto/create-product-brand.dto.ts b/src/product-brands/dto/create-product-brand.dto.ts deleted file mode 100644 index 1a4556f..0000000 --- a/src/product-brands/dto/create-product-brand.dto.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IsOptional, IsString } from 'class-validator' - -export class CreateProductBrandDto { - @IsString() - name: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @IsString() - imageUrl?: string -} diff --git a/src/product-brands/dto/update-product-brand.dto.ts b/src/product-brands/dto/update-product-brand.dto.ts deleted file mode 100644 index 342c6ef..0000000 --- a/src/product-brands/dto/update-product-brand.dto.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IsOptional, IsString } from 'class-validator' - -export class UpdateProductBrandDto { - @IsOptional() - @IsString() - name?: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @IsString() - imageUrl?: string -} diff --git a/src/product-brands/product-brands.controller.ts b/src/product-brands/product-brands.controller.ts deleted file mode 100644 index 7c327e1..0000000 --- a/src/product-brands/product-brands.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateProductBrandDto } from './dto/create-product-brand.dto' -import { UpdateProductBrandDto } from './dto/update-product-brand.dto' -import { ProductBrandsService } from './product-brands.service' - -@Controller('product-brands') -export class ProductBrandsController { - constructor(private readonly productBrandsService: ProductBrandsService) {} - - @Post() - create(@Body() dto: CreateProductBrandDto) { - return this.productBrandsService.create(dto) - } - - @Get() - findAll() { - return this.productBrandsService.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.productBrandsService.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateProductBrandDto) { - return this.productBrandsService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.productBrandsService.remove(Number(id)) - } -} diff --git a/src/product-brands/product-brands.module.ts b/src/product-brands/product-brands.module.ts deleted file mode 100644 index c379e44..0000000 --- a/src/product-brands/product-brands.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { ProductBrandsController } from './product-brands.controller' -import { ProductBrandsService } from './product-brands.service' - -@Module({ - imports: [PrismaModule], - controllers: [ProductBrandsController], - providers: [ProductBrandsService], -}) -export class ProductBrandsModule {} diff --git a/src/product-brands/product-brands.service.ts b/src/product-brands/product-brands.service.ts deleted file mode 100644 index 25aa22b..0000000 --- a/src/product-brands/product-brands.service.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' - -@Injectable() -export class ProductBrandsService { - constructor(private prisma: PrismaService) {} - async create(data: any) { - const item = await this.prisma.productBrand.create({ data }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.productBrand.findMany() - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.productBrand.findUnique({ where: { id } }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const item = await this.prisma.productBrand.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.productBrand.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/product-categories/product-categories.service.ts b/src/product-categories/product-categories.service.ts deleted file mode 100644 index e22e373..0000000 --- a/src/product-categories/product-categories.service.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' - -@Injectable() -export class ProductCategoriesService { - constructor(private prisma: PrismaService) {} - async create(data: any) { - const item = await this.prisma.productCategory.create({ data }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.productCategory.findMany() - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.productCategory.findUnique({ where: { id } }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const item = await this.prisma.productCategory.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.productCategory.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/product-variants/dto/create-product-variant.dto.ts b/src/product-variants/dto/create-product-variant.dto.ts deleted file mode 100644 index 332a5d8..0000000 --- a/src/product-variants/dto/create-product-variant.dto.ts +++ /dev/null @@ -1,50 +0,0 @@ -import { Type } from 'class-transformer' -import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator' - -export class CreateProductVariantDto { - @IsString() - name: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @IsString() - sku?: string - - @IsOptional() - @IsString() - barcode?: string - - @IsOptional() - @IsString() - imageUrl?: string - - @IsOptional() - @Type(() => Number) - @IsInt() - attachmentId?: number - - @IsString() - unit: string - - @IsOptional() - @Type(() => Number) - @IsInt() - alertQuantity?: number - - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isActive?: boolean - - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isFeatured?: boolean - - @Type(() => Number) - @IsInt() - productId: number -} diff --git a/src/product-variants/dto/update-product-variant.dto.ts b/src/product-variants/dto/update-product-variant.dto.ts deleted file mode 100644 index 5ef7a85..0000000 --- a/src/product-variants/dto/update-product-variant.dto.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Type } from 'class-transformer' -import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator' - -export class UpdateProductVariantDto { - @IsOptional() - @IsString() - name?: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @IsString() - sku?: string - - @IsOptional() - @IsString() - barcode?: string - - @IsOptional() - @IsString() - imageUrl?: string - - @IsOptional() - @Type(() => Number) - @IsInt() - attachmentId?: number - - @IsOptional() - @IsString() - unit?: string - - @IsOptional() - @Type(() => Number) - @IsInt() - discount?: number - - @IsOptional() - @Type(() => Number) - @IsInt() - quantity?: number - - @IsOptional() - @Type(() => Number) - @IsInt() - alertQuantity?: number - - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isActive?: boolean - - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isFeatured?: boolean - - @IsOptional() - @Type(() => Number) - @IsInt() - productId?: number -} diff --git a/src/product-variants/product-variants.controller.ts b/src/product-variants/product-variants.controller.ts deleted file mode 100644 index d6624f0..0000000 --- a/src/product-variants/product-variants.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateProductVariantDto } from './dto/create-product-variant.dto' -import { UpdateProductVariantDto } from './dto/update-product-variant.dto' -import { ProductVariantsService } from './product-variants.service' - -@Controller('product-variants') -export class ProductVariantsController { - constructor(private readonly productVariantsService: ProductVariantsService) {} - - @Post() - create(@Body() dto: CreateProductVariantDto) { - return this.productVariantsService.create(dto) - } - - @Get() - findAll() { - return this.productVariantsService.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.productVariantsService.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateProductVariantDto) { - return this.productVariantsService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.productVariantsService.remove(Number(id)) - } -} diff --git a/src/product-variants/product-variants.module.ts b/src/product-variants/product-variants.module.ts deleted file mode 100644 index 05bc55d..0000000 --- a/src/product-variants/product-variants.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { ProductVariantsController } from './product-variants.controller' -import { ProductVariantsService } from './product-variants.service' - -@Module({ - imports: [PrismaModule], - controllers: [ProductVariantsController], - providers: [ProductVariantsService], -}) -export class ProductVariantsModule {} diff --git a/src/product-variants/product-variants.service.ts b/src/product-variants/product-variants.service.ts deleted file mode 100644 index 6751f85..0000000 --- a/src/product-variants/product-variants.service.ts +++ /dev/null @@ -1,43 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' - -@Injectable() -export class ProductVariantsService { - constructor(private prisma: PrismaService) {} - async create(data: any) { - const item = await this.prisma.productVariant.create({ data }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.productVariant.findMany({ - include: { product: true }, - }) - const mapped = items.map(p => { - const { productId, ...rest } = p as any - return { ...rest, product: p.product } - }) - return ResponseMapper.list(mapped) - } - - async findOne(id: number) { - const p = await this.prisma.productVariant.findUnique({ - where: { id }, - include: { product: true }, - }) - if (!p) return null - const { productId, ...rest } = p as any - return ResponseMapper.single({ ...rest, product: p.product }) - } - - async update(id: number, data: any) { - const item = await this.prisma.productVariant.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.productVariant.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/roles/dto/create-role.dto.ts b/src/roles/dto/create-role.dto.ts deleted file mode 100644 index c1b07ff..0000000 --- a/src/roles/dto/create-role.dto.ts +++ /dev/null @@ -1,14 +0,0 @@ -import { IsObject, IsOptional, IsString } from 'class-validator' - -export class CreateRoleDto { - @IsString() - name: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @IsObject() - permissions?: any -} diff --git a/src/roles/dto/update-role.dto.ts b/src/roles/dto/update-role.dto.ts deleted file mode 100644 index 8ed3ea9..0000000 --- a/src/roles/dto/update-role.dto.ts +++ /dev/null @@ -1,15 +0,0 @@ -import { IsObject, IsOptional, IsString } from 'class-validator' - -export class UpdateRoleDto { - @IsOptional() - @IsString() - name?: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @IsObject() - permissions?: any -} diff --git a/src/roles/roles.controller.ts b/src/roles/roles.controller.ts deleted file mode 100644 index 5feca69..0000000 --- a/src/roles/roles.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateRoleDto } from './dto/create-role.dto' -import { UpdateRoleDto } from './dto/update-role.dto' -import { RolesService } from './roles.service' - -@Controller('roles') -export class RolesController { - constructor(private readonly rolesService: RolesService) {} - - @Post() - create(@Body() dto: CreateRoleDto) { - return this.rolesService.create(dto) - } - - @Get() - findAll() { - return this.rolesService.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.rolesService.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateRoleDto) { - return this.rolesService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.rolesService.remove(Number(id)) - } -} diff --git a/src/roles/roles.module.ts b/src/roles/roles.module.ts deleted file mode 100644 index e21a078..0000000 --- a/src/roles/roles.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { RolesController } from './roles.controller' -import { RolesService } from './roles.service' - -@Module({ - imports: [PrismaModule], - controllers: [RolesController], - providers: [RolesService], -}) -export class RolesModule {} diff --git a/src/roles/roles.service.ts b/src/roles/roles.service.ts deleted file mode 100644 index 4fa5eab..0000000 --- a/src/roles/roles.service.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' - -@Injectable() -export class RolesService { - constructor(private prisma: PrismaService) {} - async create(data: any) { - const item = await this.prisma.role.create({ data }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.role.findMany() - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.role.findUnique({ where: { id } }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const item = await this.prisma.role.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.role.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/stock-adjustments/dto/create-stock-adjustment.dto.ts b/src/stock-adjustments/dto/create-stock-adjustment.dto.ts deleted file mode 100644 index d79c788..0000000 --- a/src/stock-adjustments/dto/create-stock-adjustment.dto.ts +++ /dev/null @@ -1,16 +0,0 @@ -import { Type } from 'class-transformer' -import { IsInt, IsNumber } from 'class-validator' - -export class CreateStockAdjustmentDto { - @Type(() => Number) - @IsNumber() - adjustedQuantity: number - - @Type(() => Number) - @IsInt() - productId: number - - @Type(() => Number) - @IsInt() - inventoryId: number -} diff --git a/src/stock-adjustments/dto/update-stock-adjustment.dto.ts b/src/stock-adjustments/dto/update-stock-adjustment.dto.ts deleted file mode 100644 index 8bd1e45..0000000 --- a/src/stock-adjustments/dto/update-stock-adjustment.dto.ts +++ /dev/null @@ -1,19 +0,0 @@ -import { Type } from 'class-transformer' -import { IsInt, IsNumber, IsOptional } from 'class-validator' - -export class UpdateStockAdjustmentDto { - @IsOptional() - @Type(() => Number) - @IsNumber() - adjustedQuantity?: number - - @IsOptional() - @Type(() => Number) - @IsInt() - productId?: number - - @IsOptional() - @Type(() => Number) - @IsInt() - inventoryId?: number -} diff --git a/src/stock-adjustments/stock-adjustments.controller.ts b/src/stock-adjustments/stock-adjustments.controller.ts deleted file mode 100644 index de4d122..0000000 --- a/src/stock-adjustments/stock-adjustments.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateStockAdjustmentDto } from './dto/create-stock-adjustment.dto' -import { UpdateStockAdjustmentDto } from './dto/update-stock-adjustment.dto' -import { StockAdjustmentsService } from './stock-adjustments.service' - -@Controller('stock-adjustments') -export class StockAdjustmentsController { - constructor(private readonly service: StockAdjustmentsService) {} - - @Post() - create(@Body() dto: CreateStockAdjustmentDto) { - return this.service.create(dto) - } - - @Get() - findAll() { - return this.service.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.service.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateStockAdjustmentDto) { - return this.service.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.service.remove(Number(id)) - } -} diff --git a/src/stock-adjustments/stock-adjustments.module.ts b/src/stock-adjustments/stock-adjustments.module.ts deleted file mode 100644 index 0934cdb..0000000 --- a/src/stock-adjustments/stock-adjustments.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { StockAdjustmentsController } from './stock-adjustments.controller' -import { StockAdjustmentsService } from './stock-adjustments.service' - -@Module({ - imports: [PrismaModule], - controllers: [StockAdjustmentsController], - providers: [StockAdjustmentsService], -}) -export class StockAdjustmentsModule {} diff --git a/src/stock-adjustments/stock-adjustments.service.ts b/src/stock-adjustments/stock-adjustments.service.ts deleted file mode 100644 index aba7349..0000000 --- a/src/stock-adjustments/stock-adjustments.service.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' -import { CreateStockAdjustmentDto } from './dto/create-stock-adjustment.dto' - -@Injectable() -export class StockAdjustmentsService { - constructor(private prisma: PrismaService) {} - - async create(dto: CreateStockAdjustmentDto) { - const payload: any = { ...dto } - if (Object.prototype.hasOwnProperty.call(payload, 'productId')) { - payload.product = { connect: { id: Number(payload.productId) } } - delete payload.productId - } - if (Object.prototype.hasOwnProperty.call(payload, 'inventoryId')) { - payload.inventory = { connect: { id: Number(payload.inventoryId) } } - delete payload.inventoryId - } - - const item = await this.prisma.stockAdjustment.create({ data: payload }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.stockAdjustment.findMany({ - include: { product: true, inventory: true }, - }) - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.stockAdjustment.findUnique({ - where: { id }, - include: { product: true, inventory: true }, - }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const payload: any = { ...data } - if (Object.prototype.hasOwnProperty.call(payload, 'productId')) { - payload.product = { connect: { id: Number(payload.productId) } } - delete payload.productId - } - if (Object.prototype.hasOwnProperty.call(payload, 'inventoryId')) { - payload.inventory = { connect: { id: Number(payload.inventoryId) } } - delete payload.inventoryId - } - - const item = await this.prisma.stockAdjustment.update({ - where: { id }, - data: payload, - }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.stockAdjustment.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/stock-movements/dto/create-stock-movement.dto.ts b/src/stock-movements/dto/create-stock-movement.dto.ts deleted file mode 100644 index a3d4c2a..0000000 --- a/src/stock-movements/dto/create-stock-movement.dto.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Type } from 'class-transformer' -import { IsEnum, IsInt, IsNumber, IsString } from 'class-validator' -import { MovementReferenceType, MovementType } from '../../generated/prisma/enums' - -export class CreateStockMovementDto { - @IsEnum(MovementType) - type: MovementType - - @Type(() => Number) - @IsNumber() - quantity: number - - @Type(() => Number) - @IsNumber() - unitPrice: number - - @Type(() => Number) - @IsNumber() - totalCost: number - - @IsEnum(MovementReferenceType) - referenceType: MovementReferenceType - - @IsString() - referenceId: string - - @Type(() => Number) - @IsInt() - productId: number - - @Type(() => Number) - @IsInt() - inventoryId: number -} diff --git a/src/stock-movements/dto/update-stock-movement.dto.ts b/src/stock-movements/dto/update-stock-movement.dto.ts deleted file mode 100644 index 33edb05..0000000 --- a/src/stock-movements/dto/update-stock-movement.dto.ts +++ /dev/null @@ -1,42 +0,0 @@ -import { Type } from 'class-transformer' -import { IsEnum, IsInt, IsNumber, IsOptional, IsString } from 'class-validator' -import { MovementReferenceType, MovementType } from '../../generated/prisma/enums' - -export class UpdateStockMovementDto { - @IsOptional() - @IsEnum(MovementType) - type?: MovementType - - @IsOptional() - @Type(() => Number) - @IsNumber() - quantity?: number - - @IsOptional() - @Type(() => Number) - @IsNumber() - unitCost?: number - - @IsOptional() - @Type(() => Number) - @IsNumber() - totalCost?: number - - @IsOptional() - @IsEnum(MovementReferenceType) - referenceType?: MovementReferenceType - - @IsOptional() - @IsString() - referenceId?: string - - @IsOptional() - @Type(() => Number) - @IsInt() - productId?: number - - @IsOptional() - @Type(() => Number) - @IsInt() - inventoryId?: number -} diff --git a/src/stock-movements/stock-movements.controller.ts b/src/stock-movements/stock-movements.controller.ts deleted file mode 100644 index 54aa8fb..0000000 --- a/src/stock-movements/stock-movements.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateStockMovementDto } from './dto/create-stock-movement.dto' -import { UpdateStockMovementDto } from './dto/update-stock-movement.dto' -import { StockMovementsService } from './stock-movements.service' - -@Controller('stock-movements') -export class StockMovementsController { - constructor(private readonly service: StockMovementsService) {} - - @Post() - create(@Body() dto: CreateStockMovementDto) { - return this.service.create(dto) - } - - @Get() - findAll() { - return this.service.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.service.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateStockMovementDto) { - return this.service.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.service.remove(Number(id)) - } -} diff --git a/src/stock-movements/stock-movements.module.ts b/src/stock-movements/stock-movements.module.ts deleted file mode 100644 index 6b86471..0000000 --- a/src/stock-movements/stock-movements.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { StockMovementsController } from './stock-movements.controller' -import { StockMovementsService } from './stock-movements.service' - -@Module({ - imports: [PrismaModule], - controllers: [StockMovementsController], - providers: [StockMovementsService], -}) -export class StockMovementsModule {} diff --git a/src/stock-movements/stock-movements.service.ts b/src/stock-movements/stock-movements.service.ts deleted file mode 100644 index 9aa696b..0000000 --- a/src/stock-movements/stock-movements.service.ts +++ /dev/null @@ -1,60 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' -import { CreateStockMovementDto } from './dto/create-stock-movement.dto' - -@Injectable() -export class StockMovementsService { - constructor(private prisma: PrismaService) {} - - async create(dto: CreateStockMovementDto) { - const payload: any = { ...dto } - if (Object.prototype.hasOwnProperty.call(payload, 'productId')) { - payload.product = { connect: { id: Number(payload.productId) } } - delete payload.productId - } - if (Object.prototype.hasOwnProperty.call(payload, 'inventoryId')) { - payload.inventory = { connect: { id: Number(payload.inventoryId) } } - delete payload.inventoryId - } - - const item = await this.prisma.stockMovement.create({ data: payload }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.stockMovement.findMany({ - include: { product: true, inventory: true }, - }) - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.stockMovement.findUnique({ - where: { id }, - include: { product: true, inventory: true }, - }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const payload: any = { ...data } - if (Object.prototype.hasOwnProperty.call(payload, 'productId')) { - payload.product = { connect: { id: Number(payload.productId) } } - delete payload.productId - } - if (Object.prototype.hasOwnProperty.call(payload, 'inventoryId')) { - payload.inventory = { connect: { id: Number(payload.inventoryId) } } - delete payload.inventoryId - } - - const item = await this.prisma.stockMovement.update({ where: { id }, data: payload }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.stockMovement.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/users/dto/create-user.dto.ts b/src/users/dto/create-user.dto.ts deleted file mode 100644 index f95d398..0000000 --- a/src/users/dto/create-user.dto.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { Type } from 'class-transformer' -import { IsInt, IsString } from 'class-validator' - -export class CreateUserDto { - @IsString() - mobileNumber: string - - @IsString() - password: string - - @IsString() - firstName: string - - @IsString() - lastName: string - - @Type(() => Number) - @IsInt() - roleId: number -} diff --git a/src/users/dto/update-user.dto.ts b/src/users/dto/update-user.dto.ts deleted file mode 100644 index 3388c3d..0000000 --- a/src/users/dto/update-user.dto.ts +++ /dev/null @@ -1,30 +0,0 @@ -import { Type } from 'class-transformer' -import { IsBoolean, IsInt, IsOptional, IsString } from 'class-validator' - -export class UpdateUserDto { - @IsOptional() - @IsString() - mobileNumber?: string - - @IsOptional() - @IsString() - password?: string - - @IsOptional() - @IsString() - firstName?: string - - @IsOptional() - @IsString() - lastName?: string - - @IsOptional() - @Type(() => Number) - @IsInt() - roleId?: number - - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isActive?: boolean -} diff --git a/src/users/users.controller.ts b/src/users/users.controller.ts deleted file mode 100644 index 00a81dc..0000000 --- a/src/users/users.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateUserDto } from './dto/create-user.dto' -import { UpdateUserDto } from './dto/update-user.dto' -import { UsersService } from './users.service' - -@Controller('users') -export class UsersController { - constructor(private readonly usersService: UsersService) {} - - @Post() - create(@Body() dto: CreateUserDto) { - return this.usersService.create(dto) - } - - @Get() - findAll() { - return this.usersService.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.usersService.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateUserDto) { - return this.usersService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.usersService.remove(Number(id)) - } -} diff --git a/src/users/users.module.ts b/src/users/users.module.ts deleted file mode 100644 index bc27de9..0000000 --- a/src/users/users.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { UsersController } from './users.controller' -import { UsersService } from './users.service' - -@Module({ - imports: [PrismaModule], - controllers: [UsersController], - providers: [UsersService], -}) -export class UsersModule {} diff --git a/src/users/users.service.ts b/src/users/users.service.ts deleted file mode 100644 index b00ef65..0000000 --- a/src/users/users.service.ts +++ /dev/null @@ -1,41 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' - -@Injectable() -export class UsersService { - constructor(private prisma: PrismaService) {} - async create(data: any) { - const item = await this.prisma.user.create({ data }) - return ResponseMapper.create(item) - } - - async findAll() { - const users = await this.prisma.user.findMany({ include: { role: true } }) - const mapped = users.map(u => { - const { roleId, ...rest } = u as any - return { ...rest, role: u.role } - }) - return ResponseMapper.list(mapped) - } - - async findOne(id: number) { - const user = await this.prisma.user.findUnique({ - where: { id }, - include: { role: true }, - }) - if (!user) return null - const { roleId, ...rest } = user as any - return ResponseMapper.single({ ...rest, role: user.role }) - } - - async update(id: number, data: any) { - const item = await this.prisma.user.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.user.delete({ where: { id } }) - return ResponseMapper.single(item) - } -}