From cbe51b93436ef3efb8c0a9547f880764f91710e6 Mon Sep 17 00:00:00 2001 From: ahasani194 Date: Wed, 24 Dec 2025 21:24:59 +0330 Subject: [PATCH] feat: implement bank accounts, branches, and banks modules with CRUD operations - Added BankAccountsController, BankAccountsService, and related DTOs for managing bank accounts. - Implemented BankBranchesController, BankBranchesService, and related DTOs for managing bank branches. - Created BanksController and BanksService for retrieving bank information. - Integrated Prisma for database operations across all modules. - Added response mapping for consistent API responses. --- .vscode/settings.json | 5 +- package.json | 1 + prisma.config.ts | 2 +- .../20251211143626_init/migration.sql | 12 - .../20251211153929_init/migration.sql | 21 - .../20251211173939_init/migration.sql | 2 - .../20251211190602_init/migration.sql | 2 - .../20251213115515_init/migration.sql | 77 - .../20251213121359_init/migration.sql | 12 - .../20251213132032_init/migration.sql | 40 - .../20251213151216_init/migration.sql | 8 - .../20251213151547_init/migration.sql | 2 - .../20251214090742_init/migration.sql | 2 - .../20251221091624_init/migration.sql | 37 - .../migration.sql | 584 ++-- .../20251224165307_triggers/migration.sql | 1 + .../migration.sql | 71 +- .../migration.sql => triggers.sql} | 13 - prisma/schema.prisma | 522 --- prisma/schema/auth.prisma | 54 + prisma/schema/bank.prisma | 35 + prisma/schema/enum.prisma | 33 + prisma/schema/info.prisma | 1 + prisma/schema/inventory.prisma | 85 + prisma/schema/mdm.prisma | 12 + prisma/schema/others.prisma | 118 + prisma/schema/product.prisma | 76 + prisma/schema/purchase.prisma | 55 + prisma/schema/schema.prisma | 9 + prisma/schema/stock.prisma | 61 + prisma/seed.ts | 397 ++- prisma/triggers/auto_dump_triggers.sql | 5 + prisma/views/pos/StockMovements_View.sql | 17 - prisma/views/pos/inventory_overview.sql | 8 - prisma/views/pos/stock_cardex.sql | 18 - prisma/views/pos/stock_view.sql | 18 - queries/Query.sql | 0 queries/Query_1.sql | 3 - .../seedTransactions.ts | 0 src/app.module.ts | 10 +- src/generated/prisma/browser.ts | 164 +- src/generated/prisma/client.ts | 164 +- src/generated/prisma/commonInputTypes.ts | 332 +- src/generated/prisma/enums.ts | 44 +- src/generated/prisma/internal/class.ts | 336 +- .../prisma/internal/prismaNamespace.ts | 2850 +++++++++-------- .../prisma/internal/prismaNamespaceBrowser.ts | 728 +++-- src/generated/prisma/models.ts | 34 +- src/generated/prisma/models/Bank.ts | 1283 ++++++++ src/generated/prisma/models/BankAccount.ts | 2016 ++++++++++++ src/generated/prisma/models/BankBranch.ts | 1509 +++++++++ src/generated/prisma/models/Inventory.ts | 2260 ++++++++----- .../prisma/models/InventoryBankAccount.ts | 1398 ++++++++ .../prisma/models/InventoryTransferItem.ts | 190 +- src/generated/prisma/models/Order.ts | 83 +- src/generated/prisma/models/OtpCode.ts | 4 + src/generated/prisma/models/PosAccount.ts | 1720 ++++++++++ src/generated/prisma/models/Product.ts | 850 ++--- src/generated/prisma/models/ProductCharge.ts | 1881 ----------- src/generated/prisma/models/ProductVariant.ts | 12 - .../prisma/models/PurchaseReceipt.ts | 462 ++- .../prisma/models/PurchaseReceiptItem.ts | 18 +- .../prisma/models/PurchaseReceiptPayments.ts | 1525 +++++++++ src/generated/prisma/models/SalesInvoice.ts | 288 +- .../prisma/models/SalesInvoiceItem.ts | 222 +- .../prisma/models/StockAdjustment.ts | 198 +- src/generated/prisma/models/StockBalance.ts | 594 ++-- src/generated/prisma/models/StockMovement.ts | 1104 +++---- src/generated/prisma/models/Store.ts | 1131 ------- src/generated/prisma/models/Supplier.ts | 142 +- src/generated/prisma/models/SupplierLedger.ts | 1423 ++++++++ src/generated/prisma/models/TriggerLog.ts | 54 +- src/generated/prisma/models/User.ts | 18 +- .../prisma/models/inventory_overview.ts | 713 ----- src/generated/prisma/models/stock_cardex.ts | 803 ----- src/generated/prisma/models/stock_view.ts | 671 ---- src/inventories/inventories.service.ts | 7 + .../bank-accounts/bank-accounts.controller.ts | 34 + .../bank-accounts/bank-accounts.module.ts | 11 + .../bank-accounts/bank-accounts.service.ts | 49 + .../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 + .../bank-branches/bank-branches.service.ts | 39 + .../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.service.ts | 2 +- .../{read-pos.dto.ts => read-cardex.dto.ts} | 0 src/modules/pos/pos.controller.ts | 43 - .../dto/create-product-charge.dto.ts | 47 - .../dto/update-product-charge.dto.ts | 54 - .../product-charges.controller.ts | 34 - src/product-charges/product-charges.module.ts | 11 - .../product-charges.service.ts | 104 - .../dto/create-purchase-receipt.dto.ts | 17 +- .../purchase-receipts.service.ts | 1 + src/stores/dto/create-store.dto.ts | 10 - src/stores/dto/update-store.dto.ts | 17 - src/stores/stores.controller.ts | 34 - src/stores/stores.module.ts | 11 - src/stores/stores.service.ts | 33 - 105 files changed, 18512 insertions(+), 11840 deletions(-) delete mode 100644 prisma/migrations/20251211143626_init/migration.sql delete mode 100644 prisma/migrations/20251211153929_init/migration.sql delete mode 100644 prisma/migrations/20251211173939_init/migration.sql delete mode 100644 prisma/migrations/20251211190602_init/migration.sql delete mode 100644 prisma/migrations/20251213115515_init/migration.sql delete mode 100644 prisma/migrations/20251213121359_init/migration.sql delete mode 100644 prisma/migrations/20251213132032_init/migration.sql delete mode 100644 prisma/migrations/20251213151216_init/migration.sql delete mode 100644 prisma/migrations/20251213151547_init/migration.sql delete mode 100644 prisma/migrations/20251214090742_init/migration.sql delete mode 100644 prisma/migrations/20251221091624_init/migration.sql rename prisma/migrations/{20251210121824_init => 20251224163703_init}/migration.sql (61%) create mode 100644 prisma/migrations/20251224165307_triggers/migration.sql rename prisma/migrations/{20251215085308_init => 20251224172938_triggers}/migration.sql (79%) rename prisma/migrations/{20251222153356_init/migration.sql => triggers.sql} (94%) delete mode 100644 prisma/schema.prisma create mode 100644 prisma/schema/auth.prisma create mode 100644 prisma/schema/bank.prisma create mode 100644 prisma/schema/enum.prisma create mode 100644 prisma/schema/info.prisma create mode 100644 prisma/schema/inventory.prisma create mode 100644 prisma/schema/mdm.prisma create mode 100644 prisma/schema/others.prisma create mode 100644 prisma/schema/product.prisma create mode 100644 prisma/schema/purchase.prisma create mode 100644 prisma/schema/schema.prisma create mode 100644 prisma/schema/stock.prisma create mode 100644 prisma/triggers/auto_dump_triggers.sql delete mode 100644 prisma/views/pos/StockMovements_View.sql delete mode 100644 prisma/views/pos/inventory_overview.sql delete mode 100644 prisma/views/pos/stock_cardex.sql delete mode 100644 prisma/views/pos/stock_view.sql delete mode 100644 queries/Query.sql delete mode 100644 queries/Query_1.sql rename prisma/migrations/20251213_create_logs_table.sql => scripts/seedTransactions.ts (100%) create mode 100644 src/generated/prisma/models/Bank.ts create mode 100644 src/generated/prisma/models/BankAccount.ts create mode 100644 src/generated/prisma/models/BankBranch.ts create mode 100644 src/generated/prisma/models/InventoryBankAccount.ts create mode 100644 src/generated/prisma/models/PosAccount.ts delete mode 100644 src/generated/prisma/models/ProductCharge.ts create mode 100644 src/generated/prisma/models/PurchaseReceiptPayments.ts delete mode 100644 src/generated/prisma/models/Store.ts create mode 100644 src/generated/prisma/models/SupplierLedger.ts delete mode 100644 src/generated/prisma/models/inventory_overview.ts delete mode 100644 src/generated/prisma/models/stock_cardex.ts delete mode 100644 src/generated/prisma/models/stock_view.ts create mode 100644 src/modules/bank-accounts/bank-accounts.controller.ts create mode 100644 src/modules/bank-accounts/bank-accounts.module.ts create mode 100644 src/modules/bank-accounts/bank-accounts.service.ts create mode 100644 src/modules/bank-accounts/dto/create-bank-account.dto.ts create mode 100644 src/modules/bank-accounts/dto/update-bank-account.dto.ts create mode 100644 src/modules/bank-branches/bank-branches.controller.ts create mode 100644 src/modules/bank-branches/bank-branches.module.ts create mode 100644 src/modules/bank-branches/bank-branches.service.ts create mode 100644 src/modules/bank-branches/dto/create-bank-branches.dto.ts create mode 100644 src/modules/bank-branches/dto/update-bank-branches.dto.ts create mode 100644 src/modules/banks/banks.controller.ts create mode 100644 src/modules/banks/banks.module.ts create mode 100644 src/modules/banks/banks.service.ts rename src/modules/cardex/dto/{read-pos.dto.ts => read-cardex.dto.ts} (100%) delete mode 100644 src/product-charges/dto/create-product-charge.dto.ts delete mode 100644 src/product-charges/dto/update-product-charge.dto.ts delete mode 100644 src/product-charges/product-charges.controller.ts delete mode 100644 src/product-charges/product-charges.module.ts delete mode 100644 src/product-charges/product-charges.service.ts delete mode 100644 src/stores/dto/create-store.dto.ts delete mode 100644 src/stores/dto/update-store.dto.ts delete mode 100644 src/stores/stores.controller.ts delete mode 100644 src/stores/stores.module.ts delete mode 100644 src/stores/stores.service.ts diff --git a/.vscode/settings.json b/.vscode/settings.json index 2ba1ef7..ef38a3e 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -13,6 +13,9 @@ }, "editor.formatOnSave": true, "cSpell.words": [ - "Cardex" + "autoincrement", + "Cardex", + "fkey", + "iban" ] } diff --git a/package.json b/package.json index 7116078..7fa25a5 100644 --- a/package.json +++ b/package.json @@ -69,6 +69,7 @@ "private": true, "scripts": { "build": "nest build", + "db:reset": "tsx scripts/dump-triggers.ts && npx prisma migrate reset --force", "dump-triggers": "tsx scripts/dump-triggers.ts", "format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"", "generate:permissions": "tsx scripts/generate-permissions.ts", diff --git a/prisma.config.ts b/prisma.config.ts index 0867741..9670e19 100644 --- a/prisma.config.ts +++ b/prisma.config.ts @@ -4,7 +4,7 @@ import 'dotenv/config' import { defineConfig, env } from 'prisma/config' export default defineConfig({ - schema: 'prisma/schema.prisma', + schema: 'prisma/schema', migrations: { path: 'prisma/migrations', seed: 'tsx prisma/seed.ts', diff --git a/prisma/migrations/20251211143626_init/migration.sql b/prisma/migrations/20251211143626_init/migration.sql deleted file mode 100644 index 203d4d4..0000000 --- a/prisma/migrations/20251211143626_init/migration.sql +++ /dev/null @@ -1,12 +0,0 @@ -/* - Warnings: - - - You are about to alter the column `quantity` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`. - - You are about to alter the column `totalCost` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`. - - You are about to alter the column `avgCost` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`. - -*/ --- AlterTable -ALTER TABLE `Stock_Balance` MODIFY `quantity` DECIMAL(10, 2) NOT NULL, - MODIFY `totalCost` DECIMAL(10, 2) NOT NULL, - MODIFY `avgCost` DECIMAL(10, 2) NOT NULL; diff --git a/prisma/migrations/20251211153929_init/migration.sql b/prisma/migrations/20251211153929_init/migration.sql deleted file mode 100644 index b5c1d09..0000000 --- a/prisma/migrations/20251211153929_init/migration.sql +++ /dev/null @@ -1,21 +0,0 @@ -/* - Warnings: - - - The primary key for the `Stock_Balance` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to drop the column `ProductId` on the `Stock_Balance` table. All the data in the column will be lost. - - Added the required column `inventoryId` to the `Stock_Balance` table without a default value. This is not possible if the table is not empty. - - Added the required column `productId` to the `Stock_Balance` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE `Stock_Balance` DROP PRIMARY KEY, - DROP COLUMN `ProductId`, - ADD COLUMN `inventoryId` INTEGER NOT NULL, - ADD COLUMN `productId` INTEGER NOT NULL, - ADD PRIMARY KEY (`productId`); - --- 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_Balance` ADD CONSTRAINT `Stock_Balance_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/20251211173939_init/migration.sql b/prisma/migrations/20251211173939_init/migration.sql deleted file mode 100644 index 33bccc5..0000000 --- a/prisma/migrations/20251211173939_init/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE `Inventories` ADD COLUMN `isPointOfSale` BOOLEAN NOT NULL DEFAULT false; diff --git a/prisma/migrations/20251211190602_init/migration.sql b/prisma/migrations/20251211190602_init/migration.sql deleted file mode 100644 index 97d5b8f..0000000 --- a/prisma/migrations/20251211190602_init/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE `Stock_Movements` MODIFY `referenceType` ENUM('PURCHASE', 'SALES', 'ADJUSTMENT', 'INVENTORY_TRANSFER') NOT NULL; diff --git a/prisma/migrations/20251213115515_init/migration.sql b/prisma/migrations/20251213115515_init/migration.sql deleted file mode 100644 index 223aeec..0000000 --- a/prisma/migrations/20251213115515_init/migration.sql +++ /dev/null @@ -1,77 +0,0 @@ -/* - Warnings: - - - The primary key for the `Stock_Balance` table will be changed. If it partially fails, the table could be left without primary key constraint. - - You are about to alter the column `quantity` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(14,3)`. - - You are about to alter the column `totalCost` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(14,2)`. - - You are about to alter the column `avgCost` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(14,2)`. - - A unique constraint covering the columns `[productId,inventoryId]` on the table `Stock_Balance` will be added. If there are existing duplicate values, this will fail. - - Added the required column `id` to the `Stock_Balance` table without a default value. This is not possible if the table is not empty. - -*/ --- DropForeignKey -ALTER TABLE `Stock_Balance` DROP FOREIGN KEY `Stock_Balance_inventoryId_fkey`; - --- DropForeignKey -ALTER TABLE `Stock_Balance` DROP FOREIGN KEY `Stock_Balance_productId_fkey`; - --- AlterTable -ALTER TABLE `Products` ADD COLUMN `stockBalanceId` INTEGER NULL; - --- AlterTable -ALTER TABLE `Stock_Balance` DROP PRIMARY KEY, - ADD COLUMN `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), - ADD COLUMN `id` INTEGER NOT NULL AUTO_INCREMENT, - MODIFY `quantity` DECIMAL(14, 3) NOT NULL DEFAULT 0, - MODIFY `totalCost` DECIMAL(14, 2) NOT NULL DEFAULT 0, - MODIFY `updatedAt` DATETIME(3) NOT NULL, - MODIFY `avgCost` DECIMAL(14, 2) NOT NULL DEFAULT 0, - ADD PRIMARY KEY (`id`); - --- CreateTable -CREATE TABLE `Trigger_Logs` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `message` TEXT NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `_StockBalance_product` ( - `A` INTEGER NOT NULL, - `B` INTEGER NOT NULL, - - UNIQUE INDEX `_StockBalance_product_AB_unique`(`A`, `B`), - INDEX `_StockBalance_product_B_index`(`B`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `_StockBalance_inventory` ( - `A` INTEGER NOT NULL, - `B` INTEGER NOT NULL, - - UNIQUE INDEX `_StockBalance_inventory_AB_unique`(`A`, `B`), - INDEX `_StockBalance_inventory_B_index`(`B`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateIndex -CREATE INDEX `Stock_Balance_productId_idx` ON `Stock_Balance`(`productId`); - --- CreateIndex -CREATE UNIQUE INDEX `Stock_Balance_productId_inventoryId_key` ON `Stock_Balance`(`productId`, `inventoryId`); - --- AddForeignKey -ALTER TABLE `_StockBalance_product` ADD CONSTRAINT `_StockBalance_product_A_fkey` FOREIGN KEY (`A`) REFERENCES `Products`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `_StockBalance_product` ADD CONSTRAINT `_StockBalance_product_B_fkey` FOREIGN KEY (`B`) REFERENCES `Stock_Balance`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `_StockBalance_inventory` ADD CONSTRAINT `_StockBalance_inventory_A_fkey` FOREIGN KEY (`A`) REFERENCES `Inventories`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; - --- AddForeignKey -ALTER TABLE `_StockBalance_inventory` ADD CONSTRAINT `_StockBalance_inventory_B_fkey` FOREIGN KEY (`B`) REFERENCES `Stock_Balance`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; - --- RenameIndex -ALTER TABLE `Stock_Balance` RENAME INDEX `Stock_Balance_inventoryId_fkey` TO `Stock_Balance_inventoryId_idx`; diff --git a/prisma/migrations/20251213121359_init/migration.sql b/prisma/migrations/20251213121359_init/migration.sql deleted file mode 100644 index 9fc391c..0000000 --- a/prisma/migrations/20251213121359_init/migration.sql +++ /dev/null @@ -1,12 +0,0 @@ -/* - Warnings: - - - Added the required column `name` to the `Trigger_Logs` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE `Stock_Balance` MODIFY `updatedAt` TIMESTAMP(0) NOT NULL, - MODIFY `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0); - --- AlterTable -ALTER TABLE `Trigger_Logs` ADD COLUMN `name` TEXT NOT NULL; diff --git a/prisma/migrations/20251213132032_init/migration.sql b/prisma/migrations/20251213132032_init/migration.sql deleted file mode 100644 index fa991f4..0000000 --- a/prisma/migrations/20251213132032_init/migration.sql +++ /dev/null @@ -1,40 +0,0 @@ -/* - Warnings: - - - You are about to drop the column `stockBalanceId` on the `Products` table. All the data in the column will be lost. - - You are about to drop the `_StockBalance_inventory` table. If the table is not empty, all the data it contains will be lost. - - You are about to drop the `_StockBalance_product` table. If the table is not empty, all the data it contains will be lost. - -*/ --- DropForeignKey -ALTER TABLE `_StockBalance_inventory` DROP FOREIGN KEY `_StockBalance_inventory_A_fkey`; - --- DropForeignKey -ALTER TABLE `_StockBalance_inventory` DROP FOREIGN KEY `_StockBalance_inventory_B_fkey`; - --- DropForeignKey -ALTER TABLE `_StockBalance_product` DROP FOREIGN KEY `_StockBalance_product_A_fkey`; - --- DropForeignKey -ALTER TABLE `_StockBalance_product` DROP FOREIGN KEY `_StockBalance_product_B_fkey`; - --- AlterTable -ALTER TABLE `Products` DROP COLUMN `stockBalanceId`; - --- AlterTable -ALTER TABLE `Stock_Movements` ADD COLUMN `supplierId` INTEGER NULL; - --- DropTable -DROP TABLE `_StockBalance_inventory`; - --- DropTable -DROP TABLE `_StockBalance_product`; - --- 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_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT 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; diff --git a/prisma/migrations/20251213151216_init/migration.sql b/prisma/migrations/20251213151216_init/migration.sql deleted file mode 100644 index a3812bd..0000000 --- a/prisma/migrations/20251213151216_init/migration.sql +++ /dev/null @@ -1,8 +0,0 @@ -/* - Warnings: - - - Added the required column `remainedInStock` to the `Stock_Movements` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE `Stock_Movements` ADD COLUMN `remainedInStock` DECIMAL(10, 2) NOT NULL; diff --git a/prisma/migrations/20251213151547_init/migration.sql b/prisma/migrations/20251213151547_init/migration.sql deleted file mode 100644 index 13cd5c4..0000000 --- a/prisma/migrations/20251213151547_init/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE `Stock_Movements` MODIFY `remainedInStock` DECIMAL(10, 2) NOT NULL DEFAULT 0; diff --git a/prisma/migrations/20251214090742_init/migration.sql b/prisma/migrations/20251214090742_init/migration.sql deleted file mode 100644 index 2751875..0000000 --- a/prisma/migrations/20251214090742_init/migration.sql +++ /dev/null @@ -1,2 +0,0 @@ --- AlterTable -ALTER TABLE `Products` ADD COLUMN `salePrice` DECIMAL(10, 2) NOT NULL DEFAULT 0.00; diff --git a/prisma/migrations/20251221091624_init/migration.sql b/prisma/migrations/20251221091624_init/migration.sql deleted file mode 100644 index 61fc3de..0000000 --- a/prisma/migrations/20251221091624_init/migration.sql +++ /dev/null @@ -1,37 +0,0 @@ -/* - Warnings: - - - A unique constraint covering the columns `[name]` on the table `Roles` will be added. If there are existing duplicate values, this will fail. - -*/ --- 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; - --- CreateIndex -CREATE UNIQUE INDEX `Roles_name_key` ON `Roles`(`name`); - --- AddForeignKey -ALTER TABLE `Refresh_Tokens` ADD CONSTRAINT `Refresh_Tokens_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `Users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; diff --git a/prisma/migrations/20251210121824_init/migration.sql b/prisma/migrations/20251224163703_init/migration.sql similarity index 61% rename from prisma/migrations/20251210121824_init/migration.sql rename to prisma/migrations/20251224163703_init/migration.sql index f60ffa2..aa8cceb 100644 --- a/prisma/migrations/20251210121824_init/migration.sql +++ b/prisma/migrations/20251224163703_init/migration.sql @@ -25,6 +25,261 @@ CREATE TABLE `Roles` ( `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`), + PRIMARY KEY (`id`) +) 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, + `bankAccountId` INTEGER NULL, + + 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, 2) 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 `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 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`), + 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 `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(10, 2) NOT NULL, + `credit` DECIMAL(10, 2) NOT NULL, + `balance` DECIMAL(10, 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_fkey`(`supplierId`), + 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 `Orders` ( + `id` INTEGER NOT NULL AUTO_INCREMENT, + `orderNumber` VARCHAR(100) NOT NULL, + `status` ENUM('PENDING', 'REJECT', 'DONE') NOT NULL DEFAULT 'PENDING', + `paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL DEFAULT 'CARD', + `totalAmount` DECIMAL(10, 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 NOT NULL, + + UNIQUE INDEX `Orders_orderNumber_key`(`orderNumber`), + INDEX `Orders_customerId_fkey`(`customerId`), + 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(10, 2) NOT NULL, + `description` TEXT NULL, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `updatedAt` TIMESTAMP(0) NOT NULL, + `customerId` INTEGER NULL, + `inventoryId` INTEGER NOT NULL, + + UNIQUE INDEX `Sales_Invoices_code_key`(`code`), + INDEX `Sales_Invoices_inventoryId_fkey`(`inventoryId`), + INDEX `Sales_Invoices_customerId_fkey`(`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, 2) NOT NULL, + `fee` DECIMAL(10, 2) NOT NULL, + `total` DECIMAL(10, 2) NOT NULL, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `invoiceId` INTEGER NOT NULL, + `productId` INTEGER NOT NULL, + + INDEX `Sales_Invoice_Items_invoiceId_fkey`(`invoiceId`), + INDEX `Sales_Invoice_Items_productId_fkey`(`productId`), + 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; @@ -64,6 +319,7 @@ CREATE TABLE `Products` ( `deletedAt` TIMESTAMP(0) NULL, `brandId` INTEGER NULL, `categoryId` INTEGER NULL, + `salePrice` DECIMAL(10, 2) NOT NULL DEFAULT 0.00, UNIQUE INDEX `products_sku_unique`(`sku`), UNIQUE INDEX `products_barcode_unique`(`barcode`), @@ -98,116 +354,13 @@ CREATE TABLE `Product_categories` ( 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 `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 `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, - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Stores` ( - `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, - - PRIMARY KEY (`id`) -) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - --- CreateTable -CREATE TABLE `Product_Charges` ( - `id` INTEGER NOT NULL AUTO_INCREMENT, - `count` DECIMAL(10, 2) NOT NULL, - `fee` DECIMAL(10, 2) NOT NULL, - `totalAmount` DECIMAL(10, 2) NOT NULL, - `isSettled` BOOLEAN NOT NULL DEFAULT false, - `buyAt` TIMESTAMP(0) NULL, - `description` TEXT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - `productId` INTEGER NOT NULL, - `inventoryId` INTEGER NOT NULL, - `supplierId` INTEGER NOT NULL, - - INDEX `Product_Charges_inventoryId_fkey`(`inventoryId`), - INDEX `Product_Charges_productId_fkey`(`productId`), - INDEX `Product_Charges_supplierId_fkey`(`supplierId`), - 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', - `paymentMethod` ENUM('cash', 'card') NOT NULL DEFAULT 'card', - `totalAmount` DECIMAL(10, 2) NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `updatedAt` TIMESTAMP(0) NOT NULL, - `deletedAt` TIMESTAMP(0) NULL, - `customerId` INTEGER NOT NULL, - - UNIQUE INDEX `Orders_orderNumber_key`(`orderNumber`), - INDEX `Orders_customerId_fkey`(`customerId`), - 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(10, 2) NOT NULL, + `paidAmount` DECIMAL(10, 2) NOT NULL DEFAULT 0.00, + `isSettled` BOOLEAN NOT NULL DEFAULT false, `description` TEXT NULL, `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), `updatedAt` TIMESTAMP(0) NOT NULL, @@ -237,32 +390,18 @@ CREATE TABLE `Purchase_Receipt_Items` ( ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; -- CreateTable -CREATE TABLE `Sales_Invoices` ( +CREATE TABLE `Purchase_Receipt_Payments` ( `id` INTEGER NOT NULL AUTO_INCREMENT, - `code` VARCHAR(100) NOT NULL, - `totalAmount` DECIMAL(10, 2) NOT NULL, + `amount` DECIMAL(10, 2) NOT NULL, + `paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL, + `bankAccountId` INTEGER NULL, `description` TEXT NULL, + `payedAt` TIMESTAMP(0) NOT NULL, + `receiptId` INTEGER NOT 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_fkey`(`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, 2) NOT NULL, - `fee` DECIMAL(10, 2) NOT NULL, - `total` DECIMAL(10, 2) NOT NULL, - `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `invoiceId` INTEGER NOT NULL, - `productId` INTEGER NOT NULL, - - INDEX `Sales_Invoice_Items_invoiceId_fkey`(`invoiceId`), - INDEX `Sales_Invoice_Items_productId_fkey`(`productId`), + INDEX `Purchase_Receipt_Payments_receiptId_fkey`(`receiptId`), + INDEX `Purchase_Receipt_Payments_bankAccountId_fkey`(`bankAccountId`), PRIMARY KEY (`id`) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; @@ -273,53 +412,39 @@ CREATE TABLE `Stock_Movements` ( `quantity` DECIMAL(10, 2) NOT NULL, `fee` DECIMAL(10, 2) NOT NULL, `totalCost` DECIMAL(10, 2) NOT NULL, - `referenceType` ENUM('PURCHASE', 'SALES', 'ADJUSTMENT') 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(10, 2) NOT NULL, + `supplierId` INTEGER NULL, + `remainedInStock` DECIMAL(10, 2) 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(65, 30) NOT NULL, - `totalCost` DECIMAL(65, 30) NOT NULL, - `updatedAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), - `ProductId` INTEGER NOT NULL, - `avgCost` DECIMAL(65, 30) NOT NULL, - - PRIMARY KEY (`ProductId`) -) 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, 2) NOT NULL, + `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, - `transferId` INTEGER NOT NULL, + `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0), + `id` INTEGER NOT NULL AUTO_INCREMENT, - INDEX `Inventory_Transfer_Items_productId_fkey`(`productId`), - INDEX `Inventory_Transfer_Items_transferId_fkey`(`transferId`), + 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; @@ -336,56 +461,26 @@ CREATE TABLE `Stock_Adjustments` ( PRIMARY KEY (`id`) ) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; +-- CreateTable +CREATE TABLE `_Bank_Accounts_inventoryId_fkey` ( + `A` INTEGER NOT NULL, + `B` INTEGER NOT NULL, + + UNIQUE INDEX `_Bank_Accounts_inventoryId_fkey_AB_unique`(`A`, `B`), + INDEX `_Bank_Accounts_inventoryId_fkey_B_index`(`B`) +) 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 `Product_Variants` ADD CONSTRAINT `Product_Variants_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; +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 `Products` ADD CONSTRAINT `Products_brandId_fkey` FOREIGN KEY (`brandId`) REFERENCES `Product_brands`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION; +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 `Products` ADD CONSTRAINT `Products_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Product_categories`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Product_Charges` ADD CONSTRAINT `Product_Charges_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Product_Charges` ADD CONSTRAINT `Product_Charges_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Product_Charges` ADD CONSTRAINT `Product_Charges_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; - --- AddForeignKey -ALTER TABLE `Orders` ADD CONSTRAINT `Orders_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE RESTRICT 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 `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_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT 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; +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 `Inventory_Transfers` ADD CONSTRAINT `Inventory_Transfers_fromInventoryId_fkey` FOREIGN KEY (`fromInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; @@ -399,8 +494,95 @@ ALTER TABLE `Inventory_Transfer_Items` ADD CONSTRAINT `Inventory_Transfer_Items_ -- 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 `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_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE `Pos_Accounts` ADD CONSTRAINT `Pos_Accounts_bankAccountId_inventoryId_fkey` FOREIGN KEY (`bankAccountId`, `inventoryId`) REFERENCES `Inventory_Bank_Accounts`(`bankAccountId`, `inventoryId`) ON DELETE RESTRICT ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE `Pos_Accounts` ADD CONSTRAINT `Pos_Accounts_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE SET NULL 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; + +-- AddForeignKey +ALTER TABLE `Orders` ADD CONSTRAINT `Orders_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION; + +-- 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_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`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 `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 SET NULL 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 `_Bank_Accounts_inventoryId_fkey` ADD CONSTRAINT `_Bank_Accounts_inventoryId_fkey_A_fkey` FOREIGN KEY (`A`) REFERENCES `Bank_Accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; + +-- AddForeignKey +ALTER TABLE `_Bank_Accounts_inventoryId_fkey` ADD CONSTRAINT `_Bank_Accounts_inventoryId_fkey_B_fkey` FOREIGN KEY (`B`) REFERENCES `Inventories`(`id`) ON DELETE CASCADE ON UPDATE CASCADE; diff --git a/prisma/migrations/20251224165307_triggers/migration.sql b/prisma/migrations/20251224165307_triggers/migration.sql new file mode 100644 index 0000000..af5102c --- /dev/null +++ b/prisma/migrations/20251224165307_triggers/migration.sql @@ -0,0 +1 @@ +-- This is an empty migration. \ No newline at end of file diff --git a/prisma/migrations/20251215085308_init/migration.sql b/prisma/migrations/20251224172938_triggers/migration.sql similarity index 79% rename from prisma/migrations/20251215085308_init/migration.sql rename to prisma/migrations/20251224172938_triggers/migration.sql index c6c8ff0..5ba5e78 100644 --- a/prisma/migrations/20251215085308_init/migration.sql +++ b/prisma/migrations/20251224172938_triggers/migration.sql @@ -1,25 +1,14 @@ -/* -Warnings: - -- Added the required column `inventoryId` to the `Sales_Invoices` table without a default value. This is not possible if the table is not empty. - -*/ --- AlterTable -ALTER TABLE `Sales_Invoices` -ADD COLUMN `inventoryId` INTEGER NOT NULL; - --- CreateIndex -CREATE INDEX `Sales_Invoices_inventoryId_fkey` ON `Sales_Invoices` (`inventoryId`); - --- AddForeignKey -ALTER TABLE `Sales_Invoices` -ADD CONSTRAINT `Sales_Invoices_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE; +-- AUTO-GENERATED MYSQL TRIGGER DUMP +-- Generated at: 2025-12-22T15:32:20.184Z +-- ------------------------------------------ +-- 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 +CREATE TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin DECLARE fromInv INT; DECLARE toInv INT; @@ -39,15 +28,15 @@ DECLARE fromInv INT; -- OUT from source INSERT INTO Stock_Movements - (type, quantity, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, createdAt, remainedInStock) + (type, quantity, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, cuonterInventoryId, createdAt, remainedInStock) VALUES - ('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, NOW(), latestQuantityInOrigin-NEW.count); + ('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, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, createdAt, remainedInStock) + (type, quantity, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, cuonterInventoryId, createdAt, remainedInStock) VALUES - ('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, NOW(), latestQuantityInOrigin-NEW.count); + ('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, fromInv, NOW(), latestQuantityInOrigin-NEW.count); end; -- ------------------------------------------ @@ -57,9 +46,7 @@ end; -- ------------------------------------------ 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; +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; @@ -122,9 +109,7 @@ END; -- ------------------------------------------ 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); +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; @@ -154,14 +139,13 @@ end; -- ------------------------------------------ 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); +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 INTO inventory_id + SELECT inventoryId , customerId INTO inventory_id, customer_id FROM Sales_Invoices si WHERE si.id = NEW.invoiceId LIMIT 1; @@ -184,6 +168,7 @@ DECLARE inventory_id INT; inventoryId, avgCost, remainedInStock, + customerId, createdAt ) VALUES ( @@ -195,12 +180,16 @@ DECLARE inventory_id INT; NEW.invoiceId, NEW.productId, inventory_id, + CASE WHEN NEW.count = 0 THEN 0 ELSE NEW.total / NEW.count - END + END, + current_stock + NEW.count, + customer_id, + NOW() + ); -, current_stock + NEW.count, NOW() ); END; @@ -211,9 +200,7 @@ END; -- ------------------------------------------ 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 +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, @@ -296,9 +283,7 @@ END; -- ------------------------------------------ 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 +CREATE TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN INSERT INTO Stock_Balance ( @@ -333,9 +318,7 @@ END; -- ------------------------------------------ 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 +CREATE TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN INSERT INTO Stock_Balance ( diff --git a/prisma/migrations/20251222153356_init/migration.sql b/prisma/migrations/triggers.sql similarity index 94% rename from prisma/migrations/20251222153356_init/migration.sql rename to prisma/migrations/triggers.sql index e114e58..33aa1aa 100644 --- a/prisma/migrations/20251222153356_init/migration.sql +++ b/prisma/migrations/triggers.sql @@ -1,16 +1,3 @@ --- AlterTable -ALTER TABLE `Stock_Movements` -ADD COLUMN `counterInventoryId` INTEGER NULL, -ADD COLUMN `customerId` INTEGER NULL; - --- 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_counterInventoryId_fkey` FOREIGN KEY (`counterInventoryId`) REFERENCES `Inventories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE; - -- ------------------------------------------ -- Trigger: trg_transfer_item_after_insert -- Event: INSERT diff --git a/prisma/schema.prisma b/prisma/schema.prisma deleted file mode 100644 index ba08d00..0000000 --- a/prisma/schema.prisma +++ /dev/null @@ -1,522 +0,0 @@ -generator client { - provider = "prisma-client" - output = "../src/generated/prisma" - previewFeatures = ["views"] - moduleFormat = "cjs" -} - -datasource db { - provider = "mysql" -} - -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) - role Role @relation("User_Role", fields: [roleId], references: [id], onUpdate: NoAction) - refreshTokens RefreshToken[] - - @@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 ProductVariant { - id Int @id @default(autoincrement()) - name String @db.VarChar(255) - basePrice Decimal @db.Decimal(10, 2) - salePrice Decimal @db.Decimal(10, 2) - description String? @db.Text - barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100) - imageUrl String? @db.VarChar(255) - unit String? @db.VarChar(10) - quantity Decimal? @default(0.00) @db.Decimal(10, 2) - alertQuantity Decimal? @default(5.00) @db.Decimal(10, 2) - 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(map: "products_sku_unique") @db.VarChar(100) - barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - salePrice Decimal @default(0.00) @db.Decimal(10, 2) - brandId Int? - categoryId Int? - inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product") - productCharges ProductCharge[] @relation("Product_Charges") - 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") - salesInvoiceItems SalesInvoiceItem[] @relation("Product_SalesInvoiceItems") - stockAdjustments StockAdjustment[] @relation("Product_Stock_Adjustments") - stockMovements StockMovement[] @relation("StockMovement_Product") - - stockBalances StockBalance[] @relation("StockBalance_Product") - - @@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") -} - -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) - productCharges ProductCharge[] @relation("Supplier_Product_Charges") - purchaseReceipts PurchaseReceipt[] - stockMovements StockMovement[] @relation("StockMovement_Supplier") - - @@map("Suppliers") -} - -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("Customer_Orders") - salesInvoices SalesInvoice[] @relation("Customer_Sales_Invoices") - - @@map("Customers") - stockMovements StockMovement[] @relation("StockMovement_Customer") -} - -model Inventory { - id Int @id @default(autoincrement()) - name String @db.VarChar(255) - location String? @db.VarChar(255) - isActive Boolean @default(true) - isPointOfSale Boolean @default(false) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - inventoryTransfersFrom InventoryTransfer[] @relation("Inventory_From") - inventoryTransfersTo InventoryTransfer[] @relation("Inventory_To") - productCharges ProductCharge[] @relation("Inventory_Product_Charges") - purchaseReceipts PurchaseReceipt[] - stockAdjustments StockAdjustment[] @relation("Inventory_Stock_Adjustments") - stockMovements StockMovement[] @relation("StockMovement_Inventory") - counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory") - stockBalances StockBalance[] @relation("StockBalance_inventory") - salesInvoices SalesInvoice[] @relation("Inventory_SalesInvoices") - - @@map("Inventories") -} - -model Store { - 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) - - @@map("Stores") -} - -model ProductCharge { - id Int @id @default(autoincrement()) - count Decimal @db.Decimal(10, 2) - fee Decimal @db.Decimal(10, 2) - totalAmount Decimal @db.Decimal(10, 2) - isSettled Boolean @default(false) - buyAt DateTime? @db.Timestamp(0) - description String? @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - productId Int - inventoryId Int - supplierId Int - inventory Inventory @relation("Inventory_Product_Charges", fields: [inventoryId], references: [id], onUpdate: NoAction) - product Product @relation("Product_Charges", fields: [productId], references: [id], onUpdate: NoAction) - supplier Supplier @relation("Supplier_Product_Charges", fields: [supplierId], references: [id], onUpdate: NoAction) - - @@index([inventoryId], map: "Product_Charges_inventoryId_fkey") - @@index([productId], map: "Product_Charges_productId_fkey") - @@index([supplierId], map: "Product_Charges_supplierId_fkey") - @@map("Product_Charges") -} - -model Order { - id Int @id @default(autoincrement()) - orderNumber String @unique @db.VarChar(100) - status OrderStatus @default(pending) - paymentMethod paymentMethod @default(card) - totalAmount Decimal @db.Decimal(10, 2) - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - deletedAt DateTime? @db.Timestamp(0) - customerId Int - customer Customer @relation("Customer_Orders", fields: [customerId], references: [id], onUpdate: NoAction) - - @@index([customerId], map: "Orders_customerId_fkey") - @@map("Orders") -} - -model PurchaseReceipt { - id Int @id @default(autoincrement()) - code String @unique @db.VarChar(100) - totalAmount Decimal @db.Decimal(10, 2) - description String? @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - supplierId Int - inventoryId Int - items PurchaseReceiptItem[] @relation("PurchaseReceipt_Items") - inventory Inventory @relation(fields: [inventoryId], references: [id]) - supplier Supplier @relation(fields: [supplierId], references: [id]) - - @@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, 2) - fee Decimal @db.Decimal(10, 2) - total Decimal @db.Decimal(10, 2) - description String? @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - receiptId Int - productId Int - receipt PurchaseReceipt @relation("PurchaseReceipt_Items", fields: [receiptId], references: [id]) - product Product @relation("Product_PurchaseReceiptItems", fields: [productId], references: [id]) - - @@index([productId], map: "Purchase_Receipt_Items_productId_fkey") - @@index([receiptId], map: "Purchase_Receipt_Items_receiptId_fkey") - @@map("Purchase_Receipt_Items") -} - -model SalesInvoice { - id Int @id @default(autoincrement()) - code String @unique @db.VarChar(100) - totalAmount Decimal @db.Decimal(10, 2) - description String? @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - customerId Int? - inventoryId Int - items SalesInvoiceItem[] @relation("SalesInvoice_Items") - customer Customer? @relation("Customer_Sales_Invoices", fields: [customerId], references: [id]) - inventory Inventory @relation("Inventory_SalesInvoices", fields: [inventoryId], references: [id]) - - @@index([inventoryId], map: "Sales_Invoices_inventoryId_fkey") - @@index([customerId], map: "Sales_Invoices_customerId_fkey") - @@map("Sales_Invoices") -} - -model SalesInvoiceItem { - id Int @id @default(autoincrement()) - count Decimal @db.Decimal(10, 2) - fee Decimal @db.Decimal(10, 2) - total Decimal @db.Decimal(10, 2) - createdAt DateTime @default(now()) @db.Timestamp(0) - invoiceId Int - productId Int - invoice SalesInvoice @relation("SalesInvoice_Items", fields: [invoiceId], references: [id]) - product Product @relation("Product_SalesInvoiceItems", fields: [productId], references: [id]) - - @@index([invoiceId], map: "Sales_Invoice_Items_invoiceId_fkey") - @@index([productId], map: "Sales_Invoice_Items_productId_fkey") - @@map("Sales_Invoice_Items") -} - -model StockMovement { - id Int @id @default(autoincrement()) - type MovementType - quantity Decimal @db.Decimal(10, 2) - fee Decimal @db.Decimal(10, 2) - totalCost Decimal @db.Decimal(10, 2) - referenceType MovementReferenceType - referenceId String - createdAt DateTime @default(now()) @db.Timestamp(0) - productId Int - inventoryId Int - avgCost Decimal @db.Decimal(10, 2) - remainedInStock Decimal @default(0) @db.Decimal(10, 2) - inventory Inventory @relation("StockMovement_Inventory", fields: [inventoryId], references: [id]) - product Product @relation("StockMovement_Product", fields: [productId], references: [id]) - supplierId Int? - supplier Supplier? @relation("StockMovement_Supplier", fields: [supplierId], references: [id]) - customerId Int? - customer Customer? @relation("StockMovement_Customer", fields: [customerId], references: [id]) - counterInventoryId Int? - counterInventory Inventory? @relation("StockMovement_CounterInventory", fields: [counterInventoryId], references: [id]) - - @@index([inventoryId], map: "Stock_Movements_inventoryId_fkey") - @@index([productId], map: "Stock_Movements_productId_fkey") - @@map("Stock_Movements") -} - -model StockBalance { - id Int @id @default(autoincrement()) - - productId Int - inventoryId Int - - quantity Decimal @default(0) @db.Decimal(14, 3) - - avgCost Decimal @default(0) @db.Decimal(14, 2) - totalCost Decimal @default(0) @db.Decimal(14, 2) - - createdAt DateTime @default(now()) @db.Timestamp(0) - updatedAt DateTime @updatedAt @db.Timestamp(0) - - product Product @relation("StockBalance_Product", fields: [productId], references: [id]) - inventory Inventory @relation("StockBalance_inventory", fields: [inventoryId], references: [id]) - - @@unique([productId, inventoryId]) - @@index([productId]) - @@index([inventoryId]) - @@map("Stock_Balance") -} - -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") -} - -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, 2) - 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") -} - -model StockAdjustment { - id Int @id @default(autoincrement()) - adjustedQuantity Decimal @db.Decimal(10, 2) - 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") -} - -view StockMovements_View { - id Int @default(0) - productId Int - type stock_movements_view_type - quantity Decimal @db.Decimal(10, 2) - fee Decimal @db.Decimal(10, 2) - totalCost Decimal @db.Decimal(10, 2) - referenceId String - referenceType stock_movements_view_referenceType - createdAt DateTime @default(now()) @db.Timestamp(0) - current_stock Decimal? - current_avg_cost Decimal? - - @@map("Stock_Movements_View") - @@ignore -} - -view inventory_overview { - ProductId Int - stock_quantity Decimal - avgCost Decimal - totalCost Decimal - updatedAt DateTime @default(now()) @db.Timestamp(0) - - @@map("Inventory_Overview") -} - -view stock_cardex { - productId Int - movement_id Int @default(0) - type stock_cardex_type - quantity Decimal @db.Decimal(10, 2) - fee Decimal @db.Decimal(10, 2) - totalCost Decimal @db.Decimal(10, 2) - balance_quantity Decimal? - balance_avg_cost Decimal? - createdAt DateTime @default(now()) @db.Timestamp(0) - - @@map("Stock_Cardex") -} - -view stock_view { - productId Int - inventoryId Int - stock Decimal? @db.Decimal(32, 2) - - @@map("Stock_View") -} - -enum OrderStatus { - pending - reject - done -} - -enum paymentMethod { - cash - card -} - -enum MovementType { - IN - OUT - ADJUST -} - -enum MovementReferenceType { - PURCHASE - SALES - ADJUSTMENT - INVENTORY_TRANSFER -} - -enum stock_cardex_type { - IN - OUT - ADJUST -} - -enum stock_movements_view_type { - IN - OUT - ADJUST -} - -enum stock_movements_view_referenceType { - PURCHASE - SALES - ADJUSTMENT -} - -model TriggerLog { - id Int @id @default(autoincrement()) - name String @db.Text - message String @db.Text - createdAt DateTime @default(now()) @db.Timestamp(0) - - @@map("Trigger_Logs") -} diff --git a/prisma/schema/auth.prisma b/prisma/schema/auth.prisma new file mode 100644 index 0000000..61b09c5 --- /dev/null +++ b/prisma/schema/auth.prisma @@ -0,0 +1,54 @@ +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 new file mode 100644 index 0000000..d05f259 --- /dev/null +++ b/prisma/schema/bank.prisma @@ -0,0 +1,35 @@ +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? @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]) + inventories Inventory[] @relation("Bank_Accounts_inventoryId_fkey") + purchaseReceiptPayments PurchaseReceiptPayments[] + posAccounts PosAccount[] + inventoryBankAccounts InventoryBankAccount[] @relation("Inventory_Bank_Accounts_bankAccountId_fkey") + + @@map("Bank_Accounts") +} diff --git a/prisma/schema/enum.prisma b/prisma/schema/enum.prisma new file mode 100644 index 0000000..27545d7 --- /dev/null +++ b/prisma/schema/enum.prisma @@ -0,0 +1,33 @@ +enum OrderStatus { + PENDING + REJECT + DONE +} + +enum MovementType { + IN + OUT + ADJUST +} + +enum MovementReferenceType { + PURCHASE + SALES + ADJUSTMENT + INVENTORY_TRANSFER +} + +enum payment_method_type { + CASH + CARD + BANK + CHECK + OTHER +} + +enum ledgerSourceType { + PURCHASE + PAYMENT + ADJUSTMENT + REFUND +} diff --git a/prisma/schema/info.prisma b/prisma/schema/info.prisma new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/prisma/schema/info.prisma @@ -0,0 +1 @@ + diff --git a/prisma/schema/inventory.prisma b/prisma/schema/inventory.prisma new file mode 100644 index 0000000..f8166ed --- /dev/null +++ b/prisma/schema/inventory.prisma @@ -0,0 +1,85 @@ +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") + // productCharges ProductCharge[] @relation("Inventory_Product_Charges") + purchaseReceipts PurchaseReceipt[] + salesInvoices SalesInvoice[] @relation("Inventory_SalesInvoices") + stockAdjustments StockAdjustment[] @relation("Inventory_Stock_Adjustments") + stockBalances StockBalance[] @relation("StockBalance_inventory") + counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory") + stockMovements StockMovement[] @relation("StockMovement_Inventory") + bankAccountId Int? + bankAccounts BankAccount[] @relation("Bank_Accounts_inventoryId_fkey") + posAccounts PosAccount[] @relation("Inventory_PosAccounts") + inventoryBankAccounts InventoryBankAccount[] @relation("Inventory_Bank_Accounts_inventoryId_fkey") + + @@map("Inventories") +} + +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, 2) + 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") +} + +model InventoryBankAccount { + inventoryId Int + bankAccountId Int + + inventory Inventory @relation("Inventory_Bank_Accounts_inventoryId_fkey", fields: [inventoryId], references: [id]) + bankAccount BankAccount @relation("Inventory_Bank_Accounts_bankAccountId_fkey", fields: [bankAccountId], references: [id]) + posAccounts PosAccount[] @relation("Pos_Accounts_inventoryBankAccountId_fkey") + + @@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) + + inventory Inventory @relation("Inventory_PosAccounts", fields: [inventoryId], references: [id]) + inventoryBankAccount InventoryBankAccount? @relation("Pos_Accounts_inventoryBankAccountId_fkey", fields: [bankAccountId, inventoryId], references: [bankAccountId, inventoryId]) + bankAccount BankAccount? @relation(fields: [bankAccountId], references: [id]) + + @@map("Pos_Accounts") +} diff --git a/prisma/schema/mdm.prisma b/prisma/schema/mdm.prisma new file mode 100644 index 0000000..0a4aa03 --- /dev/null +++ b/prisma/schema/mdm.prisma @@ -0,0 +1,12 @@ +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/others.prisma b/prisma/schema/others.prisma new file mode 100644 index 0000000..637d6a4 --- /dev/null +++ b/prisma/schema/others.prisma @@ -0,0 +1,118 @@ +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) + purchaseReceipts PurchaseReceipt[] + stockMovements StockMovement[] @relation("StockMovement_Supplier") + supplierLedgers SupplierLedger[] + + @@map("Suppliers") +} + +model SupplierLedger { + id Int @id @default(autoincrement()) + description String? @db.Text + debit Decimal @db.Decimal(10, 2) + credit Decimal @db.Decimal(10, 2) + balance Decimal @db.Decimal(10, 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_supplierId_fkey") + @@map("Supplier_Ledger") +} + +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("Customer_Orders") + salesInvoices SalesInvoice[] @relation("Customer_Sales_Invoices") + stockMovements StockMovement[] @relation("StockMovement_Customer") + + @@map("Customers") +} + +model Order { + id Int @id @default(autoincrement()) + orderNumber String @unique @db.VarChar(100) + status OrderStatus @default(PENDING) + paymentMethod payment_method_type @default(CARD) + totalAmount Decimal @db.Decimal(10, 2) + description String? @db.Text + createdAt DateTime @default(now()) @db.Timestamp(0) + updatedAt DateTime @updatedAt @db.Timestamp(0) + deletedAt DateTime? @db.Timestamp(0) + customerId Int + customer Customer @relation("Customer_Orders", fields: [customerId], references: [id], onUpdate: NoAction) + + @@index([customerId], map: "Orders_customerId_fkey") + @@map("Orders") +} + +model SalesInvoice { + id Int @id @default(autoincrement()) + code String @unique @db.VarChar(100) + totalAmount Decimal @db.Decimal(10, 2) + description String? @db.Text + createdAt DateTime @default(now()) @db.Timestamp(0) + updatedAt DateTime @updatedAt @db.Timestamp(0) + customerId Int? + inventoryId Int + items SalesInvoiceItem[] @relation("SalesInvoice_Items") + customer Customer? @relation("Customer_Sales_Invoices", fields: [customerId], references: [id]) + inventory Inventory @relation("Inventory_SalesInvoices", fields: [inventoryId], references: [id]) + + @@index([inventoryId], map: "Sales_Invoices_inventoryId_fkey") + @@index([customerId], map: "Sales_Invoices_customerId_fkey") + @@map("Sales_Invoices") +} + +model SalesInvoiceItem { + id Int @id @default(autoincrement()) + count Decimal @db.Decimal(10, 2) + fee Decimal @db.Decimal(10, 2) + total Decimal @db.Decimal(10, 2) + createdAt DateTime @default(now()) @db.Timestamp(0) + invoiceId Int + productId Int + invoice SalesInvoice @relation("SalesInvoice_Items", fields: [invoiceId], references: [id]) + product Product @relation("Product_SalesInvoiceItems", fields: [productId], references: [id]) + + @@index([invoiceId], map: "Sales_Invoice_Items_invoiceId_fkey") + @@index([productId], map: "Sales_Invoice_Items_productId_fkey") + @@map("Sales_Invoice_Items") +} + +model TriggerLog { + id Int @id @default(autoincrement()) + message String @db.Text + createdAt DateTime @default(now()) @db.Timestamp(0) + name String @db.Text + + @@map("Trigger_Logs") +} diff --git a/prisma/schema/product.prisma b/prisma/schema/product.prisma new file mode 100644 index 0000000..ca7b0f0 --- /dev/null +++ b/prisma/schema/product.prisma @@ -0,0 +1,76 @@ +model ProductVariant { + id Int @id @default(autoincrement()) + name String @db.VarChar(255) + basePrice Decimal @db.Decimal(10, 2) + salePrice Decimal @db.Decimal(10, 2) + description String? @db.Text + barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100) + imageUrl String? @db.VarChar(255) + unit String? @db.VarChar(10) + quantity Decimal? @default(0.00) @db.Decimal(10, 2) + alertQuantity Decimal? @default(5.00) @db.Decimal(10, 2) + 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(map: "products_sku_unique") @db.VarChar(100) + barcode String? @unique(map: "products_barcode_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(10, 2) + inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product") + // productCharges ProductCharge[] @relation("Product_Charges") + 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") + salesInvoiceItems SalesInvoiceItem[] @relation("Product_SalesInvoiceItems") + stockAdjustments StockAdjustment[] @relation("Product_Stock_Adjustments") + stockBalances StockBalance[] @relation("StockBalance_Product") + stockMovements StockMovement[] @relation("StockMovement_Product") + + @@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 new file mode 100644 index 0000000..ea449ba --- /dev/null +++ b/prisma/schema/purchase.prisma @@ -0,0 +1,55 @@ +model PurchaseReceipt { + id Int @id @default(autoincrement()) + code String @unique @db.VarChar(100) + totalAmount Decimal @db.Decimal(10, 2) + paidAmount Decimal @default(0.00) @db.Decimal(10, 2) + isSettled Boolean @default(false) + description String? @db.Text + createdAt DateTime @default(now()) @db.Timestamp(0) + updatedAt DateTime @updatedAt @db.Timestamp(0) + supplierId Int + inventoryId Int + items PurchaseReceiptItem[] @relation("PurchaseReceipt_Items") + inventory Inventory @relation(fields: [inventoryId], references: [id]) + supplier Supplier @relation(fields: [supplierId], references: [id]) + purchaseReceiptPayments 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, 2) + fee Decimal @db.Decimal(10, 2) + total Decimal @db.Decimal(10, 2) + description String? @db.Text + createdAt DateTime @default(now()) @db.Timestamp(0) + receiptId Int + productId Int + 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(10, 2) + paymentMethod payment_method_type + bankAccountId Int? + description String? @db.Text + payedAt DateTime @db.Timestamp(0) + receiptId Int + createdAt DateTime @default(now()) @db.Timestamp(0) + + purchaseReceipt PurchaseReceipt @relation(fields: [receiptId], references: [id]) + bankAccount BankAccount? @relation(fields: [bankAccountId], references: [id]) + + @@index([receiptId], map: "Purchase_Receipt_Payments_receiptId_fkey") + @@index([bankAccountId], map: "Purchase_Receipt_Payments_bankAccountId_fkey") + @@map("Purchase_Receipt_Payments") +} diff --git a/prisma/schema/schema.prisma b/prisma/schema/schema.prisma new file mode 100644 index 0000000..0e3edb1 --- /dev/null +++ b/prisma/schema/schema.prisma @@ -0,0 +1,9 @@ +generator client { + provider = "prisma-client" + output = "../../src/generated/prisma" + moduleFormat = "cjs" +} + +datasource db { + provider = "mysql" +} diff --git a/prisma/schema/stock.prisma b/prisma/schema/stock.prisma new file mode 100644 index 0000000..ae275e6 --- /dev/null +++ b/prisma/schema/stock.prisma @@ -0,0 +1,61 @@ +model StockMovement { + id Int @id @default(autoincrement()) + type MovementType + quantity Decimal @db.Decimal(10, 2) + fee Decimal @db.Decimal(10, 2) + totalCost Decimal @db.Decimal(10, 2) + referenceType MovementReferenceType + referenceId String + createdAt DateTime @default(now()) @db.Timestamp(0) + productId Int + inventoryId Int + avgCost Decimal @db.Decimal(10, 2) + supplierId Int? + remainedInStock Decimal @default(0.00) @db.Decimal(10, 2) + counterInventoryId Int? + customerId Int? + counterInventory Inventory? @relation("StockMovement_CounterInventory", fields: [counterInventoryId], references: [id]) + customer Customer? @relation("StockMovement_Customer", 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, 2) + 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") +} diff --git a/prisma/seed.ts b/prisma/seed.ts index fa80320..4be71e7 100644 --- a/prisma/seed.ts +++ b/prisma/seed.ts @@ -1,111 +1,304 @@ import { prisma } from '../src/lib/prisma' +import { PurchaseReceiptsService } from '../src/purchase-receipts/purchase-receipts.service' async function main() { - if ((await prisma.role.count()) === 0) { - await prisma.role.upsert({ - where: { id: 0, name: 'Admin' }, - update: {}, - create: { - name: 'Admin', - }, - }) - } - - if ((await prisma.user.count()) === 0) { - const adminRole = await prisma.role.findUnique({ where: { name: 'Admin' } }) - if (!adminRole) { - return - } - await prisma.user.upsert({ - where: { id: 1, firstName: 'عباس', lastName: 'حسنی' }, - update: {}, - create: { - firstName: 'عباس', - lastName: 'حسنی', - roleId: adminRole.id, - mobileNumber: '09120258156', - password: '12345678', - }, - }) - } - - if ((await prisma.inventory.count()) === 0) { - await prisma.inventory.createMany({ - data: [ - { name: 'انبار مرکزی', location: 'تهران', isPointOfSale: false, isActive: true }, - { - name: 'فروشگاه حضوری', - location: 'مرکز شهر', - isPointOfSale: true, - isActive: true, - }, - { - name: 'فروشگاه اینترنتی', - location: 'مرکز شهر', - isPointOfSale: true, - isActive: true, - }, - ], - }) - } - - if ((await prisma.productCategory.count()) === 0) { - await prisma.productCategory.createMany({ - data: Array.from({ length: 10 }, (_, i) => ({ name: `دسته‌ی ${i + 1}` })), - }) - } - - if ((await prisma.productBrand.count()) === 0) { - await prisma.productBrand.createMany({ - data: Array.from({ length: 10 }, (_, i) => ({ name: `برند ${i + 1}` })), - }) - } - - if ((await prisma.supplier.count()) === 0) { - await prisma.supplier.createMany({ - data: Array.from({ length: 9 }, (_, i) => ({ - firstName: 'تامین‌', - lastName: `کننده ${i + 1}`, - mobileNumber: `0912000000${i + 1}`, - email: `supplier${i + 1}@example.com`, - })), - }) - } - - if ((await prisma.customer.count()) === 0) { - await prisma.customer.createMany({ - data: Array.from({ length: 5 }, (_, i) => ({ - firstName: 'مشتری', - lastName: `${i + 1}`, - mobileNumber: `0913000000${i + 1}`, - email: `customer${i + 1}@example.com`, - })), - }) - } - - if ((await prisma.product.count()) === 0) { - const categories = await prisma.productCategory.findMany() - const brands = await prisma.productBrand.findMany() - await prisma.product.createMany({ - data: Array.from({ length: 100 }, (_, i) => ({ - name: `کالای ${i + 1}`, - sku: `SKU-${1000 + i + 1}`, - salePrice: parseInt((Math.random() * (100 - 10) + 10).toString()) * 10000, - categoryId: categories[i % categories.length].id, - brandId: brands[i % brands.length].id, - })), - }) - } - - // const products = await prisma.product.findMany() - // for (const product of products) { - // await prisma.product.update({ - // where: { id: product.id }, - // data: { - // salePrice: parseInt((Math.random() * (100 - 10) + 10).toString()) * 10000, + // if ((await prisma.role.count()) === 0) { + // await prisma.role.upsert({ + // where: { id: 0, name: 'Admin' }, + // update: {}, + // create: { + // name: 'Admin', // }, // }) // } + + // if ((await prisma.user.count()) === 0) { + // const adminRole = await prisma.role.findUnique({ where: { name: 'Admin' } }) + // if (!adminRole) { + // return + // } + // await prisma.user.upsert({ + // where: { id: 1, firstName: 'عباس', lastName: 'حسنی' }, + // update: {}, + // create: { + // firstName: 'عباس', + // lastName: 'حسنی', + // roleId: adminRole.id, + // mobileNumber: '09120258156', + // password: '12345678', + // }, + // }) + // } + + // if ((await prisma.inventory.count()) === 0) { + // await prisma.inventory.createMany({ + // data: [ + // { name: 'انبار مرکزی', location: 'تهران', isPointOfSale: false, isActive: true }, + // { + // name: 'فروشگاه حضوری', + // location: 'مرکز شهر', + // isPointOfSale: true, + // isActive: true, + // }, + // { + // name: 'فروشگاه اینترنتی', + // location: 'مرکز شهر', + // isPointOfSale: true, + // isActive: true, + // }, + // ], + // }) + // } + + // if ((await prisma.productCategory.count()) === 0) { + // await prisma.productCategory.createMany({ + // data: Array.from({ length: 10 }, (_, i) => ({ name: `دسته‌ی ${i + 1}` })), + // }) + // } + + // if ((await prisma.productBrand.count()) === 0) { + // await prisma.productBrand.createMany({ + // data: Array.from({ length: 10 }, (_, i) => ({ name: `برند ${i + 1}` })), + // }) + // } + + // if ((await prisma.supplier.count()) === 0) { + // await prisma.supplier.createMany({ + // data: Array.from({ length: 9 }, (_, i) => ({ + // firstName: 'تامین‌', + // lastName: `کننده ${i + 1}`, + // mobileNumber: `0912000000${i + 1}`, + // email: `supplier${i + 1}@example.com`, + // })), + // }) + // } + + // if ((await prisma.customer.count()) === 0) { + // await prisma.customer.createMany({ + // data: Array.from({ length: 5 }, (_, i) => ({ + // firstName: 'مشتری', + // lastName: `${i + 1}`, + // mobileNumber: `0913000000${i + 1}`, + // email: `customer${i + 1}@example.com`, + // })), + // }) + // } + + // if ((await prisma.product.count()) === 0) { + // const categories = await prisma.productCategory.findMany() + // const brands = await prisma.productBrand.findMany() + // await prisma.product.createMany({ + // data: Array.from({ length: 100 }, (_, i) => ({ + // name: `کالای ${i + 1}`, + // sku: `SKU-${1000 + i + 1}`, + // salePrice: parseInt((Math.random() * (100 - 10) + 10).toString()) * 10000, + // categoryId: categories[i % categories.length].id, + // brandId: brands[i % brands.length].id, + // })), + // }) + // } + + // if ((await prisma.bank.count()) === 0) { + // await prisma.bank.createMany({ + // data: [ + // { + // name: 'آینده', + // shortName: 'ain', + // }, + // { + // name: 'ایران زمین', + // shortName: 'irz', + // }, + // { + // name: 'اقتصاد نوین', + // shortName: 'eqn', + // }, + // { + // name: 'انصار', + // shortName: 'ans', + // }, + // { + // name: 'پاسارگاد', + // shortName: 'pas', + // }, + // { + // name: 'پارسیان', + // shortName: 'prs', + // }, + // { + // name: 'پست‌ بانک ایران', + // shortName: 'pbi', + // }, + // { + // name: 'تجارت', + // shortName: 'tej', + // }, + // { + // name: 'توسعه تعاون', + // shortName: 'tav', + // }, + // { + // name: 'توسعه صادرات', + // shortName: 'tes', + // }, + // { + // name: 'حکمت ایرانیان', + // shortName: 'hek', + // }, + // { + // name: 'رفاه کارگران', + // shortName: 'ref', + // }, + // { + // name: 'قرض‌الحسنه رسالت', + // shortName: 'res', + // }, + // { + // name: 'قرض‌الحسنه مهر ایران', + // shortName: 'meh', + // }, + // { + // name: 'قوامین', + // shortName: 'qva', + // }, + // { + // name: 'کشاورزی', + // shortName: 'kes', + // }, + // { + // name: 'کوثر', + // shortName: 'kos', + // }, + // { + // name: 'دی', + // shortName: 'diy', + // }, + // { + // name: 'صنعت و معدن', + // shortName: 'san', + // }, + // { + // name: 'سینا', + // shortName: 'sin', + // }, + // { + // name: 'سرمایه', + // shortName: 'sar', + // }, + // { + // name: 'سپه', + // shortName: 'sep', + // }, + // { + // name: 'شهر', + // shortName: 'shr', + // }, + // { + // name: 'صادرات ایران', + // shortName: 'sir', + // }, + // { + // name: 'سامان', + // shortName: 'sam', + // }, + // { + // name: 'مرکزی', + // shortName: 'mar', + // }, + // { + // name: 'مسکن', + // shortName: 'mas', + // }, + // { + // name: 'ملت', + // shortName: 'mel', + // }, + // { + // name: 'ملی ایران', + // shortName: 'mli', + // }, + // { + // name: 'مهر اقتصاد', + // shortName: 'meg', + // }, + // { + // name: 'کارآفرین', + // shortName: 'kar', + // }, + // { + // name: 'تات', + // shortName: 'tat', + // }, + // ], + // }) + // } + + // if ((await prisma.bankBranch.count()) === 0) { + // await prisma.bankBranch.createMany({ + // data: [ + // { + // bankId: 1, + // name: 'شعبه مرکزی', + // code: '001', + // }, + // { + // bankId: 2, + // name: 'شعبه مرکزی', + // code: '002', + // }, + // { + // bankId: 1, + // name: 'شعبه ونک', + // code: '003', + // }, + // ], + // }) + // } + + // if ((await prisma.bankAccount.count()) === 0) { + // await prisma.bankAccount.createMany({ + // data: [ + // { + // branchId: 4, + // accountNumber: '1234567890', + // name: 'حساب اصلی آینده', + // iban: 'IR000123456789012345678901', + // }, + // { + // branchId: 5, + // accountNumber: '0987654321', + // name: 'حساب اصلی ایران زمین', + // iban: 'IR000987654321098765432109', + // }, + // { + // branchId: 6, + // accountNumber: '1122334455', + // name: 'حساب ونک آینده', + // iban: 'IR000112233445566778899001', + // }, + // ], + // }) + // } + // // Seed purchase, transfer, and sales transactions + const inventories = await prisma.inventory.findMany() + const products = await prisma.product.findMany({ take: 5 }) // select 5 products for demo + const supplier = await prisma.supplier.findFirst() + const customers = await prisma.customer.findMany({ take: 2 }) + if (supplier && customers.length > 0) { + PurchaseReceiptsService.prototype.create({ + code: '123123', + inventoryId: inventories[0].id, + supplierId: supplier.id, + paidAmount: 0, + totalAmount: products.reduce((acc, a) => (acc += Number(a.salePrice) * 10), 0), + items: products.map(product => ({ + productId: product.id, + count: 10, + fee: Number(product.salePrice), + total: 10 * Number(product.salePrice), + })), + }) + } } main() diff --git a/prisma/triggers/auto_dump_triggers.sql b/prisma/triggers/auto_dump_triggers.sql new file mode 100644 index 0000000..9987177 --- /dev/null +++ b/prisma/triggers/auto_dump_triggers.sql @@ -0,0 +1,5 @@ +-- Auto-generated trigger dump +DELIMITER 8488 +-- Trigger: 1 +8488 +DELIMITER ; diff --git a/prisma/views/pos/StockMovements_View.sql b/prisma/views/pos/StockMovements_View.sql deleted file mode 100644 index a24a303..0000000 --- a/prisma/views/pos/StockMovements_View.sql +++ /dev/null @@ -1,17 +0,0 @@ -SELECT - `sm`.`id` AS `id`, - `sm`.`productId` AS `productId`, - `sm`.`type` AS `type`, - `sm`.`quantity` AS `quantity`, - `sm`.`fee` AS `fee`, - `sm`.`totalCost` AS `totalCost`, - `sm`.`referenceId` AS `referenceId`, - `sm`.`referenceType` AS `referenceType`, - `sm`.`createdAt` AS `createdAt`, - `sb`.`quantity` AS `current_stock`, - `sb`.`avgCost` AS `current_avg_cost` -FROM - ( - `pos`.`Stock_Movements` `sm` - LEFT JOIN `pos`.`stock_balance` `sb` ON((`sb`.`ProductId` = `sm`.`productId`)) - ) \ No newline at end of file diff --git a/prisma/views/pos/inventory_overview.sql b/prisma/views/pos/inventory_overview.sql deleted file mode 100644 index c6501d8..0000000 --- a/prisma/views/pos/inventory_overview.sql +++ /dev/null @@ -1,8 +0,0 @@ -SELECT - `pos`.`stock_balance`.`ProductId` AS `ProductId`, - `pos`.`stock_balance`.`quantity` AS `stock_quantity`, - `pos`.`stock_balance`.`avgCost` AS `avgCost`, - `pos`.`stock_balance`.`totalCost` AS `totalCost`, - `pos`.`stock_balance`.`updatedAt` AS `updatedAt` -FROM - `pos`.`stock_balance` \ No newline at end of file diff --git a/prisma/views/pos/stock_cardex.sql b/prisma/views/pos/stock_cardex.sql deleted file mode 100644 index 03f36eb..0000000 --- a/prisma/views/pos/stock_cardex.sql +++ /dev/null @@ -1,18 +0,0 @@ -SELECT - `sm`.`productId` AS `productId`, - `sm`.`id` AS `movement_id`, - `sm`.`type` AS `type`, - `sm`.`quantity` AS `quantity`, - `sm`.`fee` AS `fee`, - `sm`.`totalCost` AS `totalCost`, - `sb`.`quantity` AS `balance_quantity`, - `sb`.`avgCost` AS `balance_avg_cost`, - `sm`.`createdAt` AS `createdAt` -FROM - ( - `pos`.`Stock_Movements` `sm` - LEFT JOIN `pos`.`stock_balance` `sb` ON((`sb`.`ProductId` = `sm`.`productId`)) - ) -ORDER BY - `sm`.`productId`, - `sm`.`createdAt` \ No newline at end of file diff --git a/prisma/views/pos/stock_view.sql b/prisma/views/pos/stock_view.sql deleted file mode 100644 index 4ad031b..0000000 --- a/prisma/views/pos/stock_view.sql +++ /dev/null @@ -1,18 +0,0 @@ -SELECT - `pos`.`Stock_Movements`.`productId` AS `productId`, - `pos`.`Stock_Movements`.`inventoryId` AS `inventoryId`, - sum( - ( - CASE - WHEN (`pos`.`Stock_Movements`.`type` = 'IN') THEN `pos`.`Stock_Movements`.`quantity` - WHEN (`pos`.`Stock_Movements`.`type` = 'OUT') THEN -(`pos`.`Stock_Movements`.`quantity`) - WHEN (`pos`.`Stock_Movements`.`type` = 'ADJUST') THEN `pos`.`Stock_Movements`.`quantity` - ELSE 0 - END - ) - ) AS `stock` -FROM - `pos`.`Stock_Movements` -GROUP BY - `pos`.`Stock_Movements`.`productId`, - `pos`.`Stock_Movements`.`inventoryId` \ No newline at end of file diff --git a/queries/Query.sql b/queries/Query.sql deleted file mode 100644 index e69de29..0000000 diff --git a/queries/Query_1.sql b/queries/Query_1.sql deleted file mode 100644 index b285df7..0000000 --- a/queries/Query_1.sql +++ /dev/null @@ -1,3 +0,0 @@ - -SELECT avgCost FROM Stock_Balance -WHERE ProductId = 1 And inventoryId = 1; \ No newline at end of file diff --git a/prisma/migrations/20251213_create_logs_table.sql b/scripts/seedTransactions.ts similarity index 100% rename from prisma/migrations/20251213_create_logs_table.sql rename to scripts/seedTransactions.ts diff --git a/src/app.module.ts b/src/app.module.ts index 3f4c7bb..3568dd7 100644 --- a/src/app.module.ts +++ b/src/app.module.ts @@ -6,12 +6,14 @@ import { CustomersModule } from './customers/customers.module' import { InventoriesModule } from './inventories/inventories.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 { PosModule } from './modules/pos/pos.module' import { PrismaModule } from './prisma/prisma.module' import { ProductBrandsModule } from './product-brands/product-brands.module' import { ProductCategoriesModule } from './product-categories/product-categories.module' -import { ProductChargesModule } from './product-charges/product-charges.module' import { ProductVariantsModule } from './product-variants/product-variants.module' import { ProductsModule } from './products/products.module' import { PurchaseReceiptItemsModule } from './purchase-receipt-items/purchase-receipt-items.module' @@ -22,7 +24,6 @@ import { SalesInvoicesModule } from './sales-invoices/sales-invoices.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 { StoresModule } from './stores/stores.module' import { SuppliersModule } from './suppliers/suppliers.module' import { UsersModule } from './users/users.module' @@ -36,11 +37,9 @@ import { UsersModule } from './users/users.module' ProductVariantsModule, ProductBrandsModule, ProductCategoriesModule, - ProductChargesModule, SuppliersModule, CustomersModule, InventoriesModule, - StoresModule, PurchaseReceiptsModule, PurchaseReceiptItemsModule, SalesInvoicesModule, @@ -52,6 +51,9 @@ import { UsersModule } from './users/users.module' StockBalanceModule, PosModule, CardexModule, + BanksModule, + BankBranchesModule, + BankAccountsModule, ], controllers: [AppController], providers: [AppService], diff --git a/src/generated/prisma/browser.ts b/src/generated/prisma/browser.ts index 0e24962..f68d8c0 100644 --- a/src/generated/prisma/browser.ts +++ b/src/generated/prisma/browser.ts @@ -27,6 +27,91 @@ export type User = Prisma.UserModel * */ 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 Inventory + * + */ +export type Inventory = Prisma.InventoryModel +/** + * Model InventoryTransfer + * + */ +export type InventoryTransfer = Prisma.InventoryTransferModel +/** + * Model InventoryTransferItem + * + */ +export type InventoryTransferItem = Prisma.InventoryTransferItemModel +/** + * Model InventoryBankAccount + * + */ +export type InventoryBankAccount = Prisma.InventoryBankAccountModel +/** + * Model PosAccount + * + */ +export type PosAccount = Prisma.PosAccountModel +/** + * Model Bank + * + */ +export type Bank = Prisma.BankModel +/** + * Model Supplier + * + */ +export type Supplier = Prisma.SupplierModel +/** + * Model SupplierLedger + * + */ +export type SupplierLedger = Prisma.SupplierLedgerModel +/** + * Model Customer + * + */ +export type Customer = Prisma.CustomerModel +/** + * Model Order + * + */ +export type Order = Prisma.OrderModel +/** + * Model SalesInvoice + * + */ +export type SalesInvoice = Prisma.SalesInvoiceModel +/** + * Model SalesInvoiceItem + * + */ +export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel +/** + * Model TriggerLog + * + */ +export type TriggerLog = Prisma.TriggerLogModel /** * Model ProductVariant * @@ -47,36 +132,6 @@ export type ProductBrand = Prisma.ProductBrandModel * */ export type ProductCategory = Prisma.ProductCategoryModel -/** - * Model Supplier - * - */ -export type Supplier = Prisma.SupplierModel -/** - * Model Customer - * - */ -export type Customer = Prisma.CustomerModel -/** - * Model Inventory - * - */ -export type Inventory = Prisma.InventoryModel -/** - * Model Store - * - */ -export type Store = Prisma.StoreModel -/** - * Model ProductCharge - * - */ -export type ProductCharge = Prisma.ProductChargeModel -/** - * Model Order - * - */ -export type Order = Prisma.OrderModel /** * Model PurchaseReceipt * @@ -88,15 +143,10 @@ export type PurchaseReceipt = Prisma.PurchaseReceiptModel */ export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel /** - * Model SalesInvoice + * Model PurchaseReceiptPayments * */ -export type SalesInvoice = Prisma.SalesInvoiceModel -/** - * Model SalesInvoiceItem - * - */ -export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel +export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel /** * Model StockMovement * @@ -107,48 +157,8 @@ export type StockMovement = Prisma.StockMovementModel * */ export type StockBalance = Prisma.StockBalanceModel -/** - * Model OtpCode - * - */ -export type OtpCode = Prisma.OtpCodeModel -/** - * Model RefreshToken - * - */ -export type RefreshToken = Prisma.RefreshTokenModel -/** - * Model InventoryTransfer - * - */ -export type InventoryTransfer = Prisma.InventoryTransferModel -/** - * Model InventoryTransferItem - * - */ -export type InventoryTransferItem = Prisma.InventoryTransferItemModel /** * Model StockAdjustment * */ export type StockAdjustment = Prisma.StockAdjustmentModel -/** - * Model TriggerLog - * - */ -export type TriggerLog = Prisma.TriggerLogModel -/** - * Model inventory_overview - * - */ -export type inventory_overview = Prisma.inventory_overviewModel -/** - * Model stock_cardex - * - */ -export type stock_cardex = Prisma.stock_cardexModel -/** - * Model stock_view - * - */ -export type stock_view = Prisma.stock_viewModel diff --git a/src/generated/prisma/client.ts b/src/generated/prisma/client.ts index 3b960cf..7a66bf5 100644 --- a/src/generated/prisma/client.ts +++ b/src/generated/prisma/client.ts @@ -47,6 +47,91 @@ export type User = Prisma.UserModel * */ 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 Inventory + * + */ +export type Inventory = Prisma.InventoryModel +/** + * Model InventoryTransfer + * + */ +export type InventoryTransfer = Prisma.InventoryTransferModel +/** + * Model InventoryTransferItem + * + */ +export type InventoryTransferItem = Prisma.InventoryTransferItemModel +/** + * Model InventoryBankAccount + * + */ +export type InventoryBankAccount = Prisma.InventoryBankAccountModel +/** + * Model PosAccount + * + */ +export type PosAccount = Prisma.PosAccountModel +/** + * Model Bank + * + */ +export type Bank = Prisma.BankModel +/** + * Model Supplier + * + */ +export type Supplier = Prisma.SupplierModel +/** + * Model SupplierLedger + * + */ +export type SupplierLedger = Prisma.SupplierLedgerModel +/** + * Model Customer + * + */ +export type Customer = Prisma.CustomerModel +/** + * Model Order + * + */ +export type Order = Prisma.OrderModel +/** + * Model SalesInvoice + * + */ +export type SalesInvoice = Prisma.SalesInvoiceModel +/** + * Model SalesInvoiceItem + * + */ +export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel +/** + * Model TriggerLog + * + */ +export type TriggerLog = Prisma.TriggerLogModel /** * Model ProductVariant * @@ -67,36 +152,6 @@ export type ProductBrand = Prisma.ProductBrandModel * */ export type ProductCategory = Prisma.ProductCategoryModel -/** - * Model Supplier - * - */ -export type Supplier = Prisma.SupplierModel -/** - * Model Customer - * - */ -export type Customer = Prisma.CustomerModel -/** - * Model Inventory - * - */ -export type Inventory = Prisma.InventoryModel -/** - * Model Store - * - */ -export type Store = Prisma.StoreModel -/** - * Model ProductCharge - * - */ -export type ProductCharge = Prisma.ProductChargeModel -/** - * Model Order - * - */ -export type Order = Prisma.OrderModel /** * Model PurchaseReceipt * @@ -108,15 +163,10 @@ export type PurchaseReceipt = Prisma.PurchaseReceiptModel */ export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel /** - * Model SalesInvoice + * Model PurchaseReceiptPayments * */ -export type SalesInvoice = Prisma.SalesInvoiceModel -/** - * Model SalesInvoiceItem - * - */ -export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel +export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel /** * Model StockMovement * @@ -127,48 +177,8 @@ export type StockMovement = Prisma.StockMovementModel * */ export type StockBalance = Prisma.StockBalanceModel -/** - * Model OtpCode - * - */ -export type OtpCode = Prisma.OtpCodeModel -/** - * Model RefreshToken - * - */ -export type RefreshToken = Prisma.RefreshTokenModel -/** - * Model InventoryTransfer - * - */ -export type InventoryTransfer = Prisma.InventoryTransferModel -/** - * Model InventoryTransferItem - * - */ -export type InventoryTransferItem = Prisma.InventoryTransferItemModel /** * Model StockAdjustment * */ export type StockAdjustment = Prisma.StockAdjustmentModel -/** - * Model TriggerLog - * - */ -export type TriggerLog = Prisma.TriggerLogModel -/** - * Model inventory_overview - * - */ -export type inventory_overview = Prisma.inventory_overviewModel -/** - * Model stock_cardex - * - */ -export type stock_cardex = Prisma.stock_cardexModel -/** - * Model stock_view - * - */ -export type stock_view = Prisma.stock_viewModel diff --git a/src/generated/prisma/commonInputTypes.ts b/src/generated/prisma/commonInputTypes.ts index 57efbc4..5948e19 100644 --- a/src/generated/prisma/commonInputTypes.ts +++ b/src/generated/prisma/commonInputTypes.ts @@ -213,65 +213,11 @@ export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = { _max?: Prisma.NestedJsonNullableFilter<$PrismaModel> } -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 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 BoolFilter<$PrismaModel = never> = { equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean } -export type DecimalWithAggregatesFilter<$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 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 BoolWithAggregatesFilter<$PrismaModel = never> = { equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean @@ -307,6 +253,50 @@ export type IntNullableWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedIntNullableFilter<$PrismaModel> } +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 DecimalWithAggregatesFilter<$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 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 EnumOrderStatusFilter<$PrismaModel = never> = { equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel> in?: $Enums.OrderStatus[] @@ -314,11 +304,11 @@ export type EnumOrderStatusFilter<$PrismaModel = never> = { not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus } -export type EnumpaymentMethodFilter<$PrismaModel = never> = { - equals?: $Enums.paymentMethod | Prisma.EnumpaymentMethodFieldRefInput<$PrismaModel> - in?: $Enums.paymentMethod[] - notIn?: $Enums.paymentMethod[] - not?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel> | $Enums.paymentMethod +export type Enumpayment_method_typeFilter<$PrismaModel = never> = { + equals?: $Enums.payment_method_type | Prisma.Enumpayment_method_typeFieldRefInput<$PrismaModel> + in?: $Enums.payment_method_type[] + notIn?: $Enums.payment_method_type[] + not?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel> | $Enums.payment_method_type } export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = { @@ -331,14 +321,41 @@ export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> } -export type EnumpaymentMethodWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.paymentMethod | Prisma.EnumpaymentMethodFieldRefInput<$PrismaModel> - in?: $Enums.paymentMethod[] - notIn?: $Enums.paymentMethod[] - not?: Prisma.NestedEnumpaymentMethodWithAggregatesFilter<$PrismaModel> | $Enums.paymentMethod +export type Enumpayment_method_typeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.payment_method_type | Prisma.Enumpayment_method_typeFieldRefInput<$PrismaModel> + in?: $Enums.payment_method_type[] + notIn?: $Enums.payment_method_type[] + not?: Prisma.NestedEnumpayment_method_typeWithAggregatesFilter<$PrismaModel> | $Enums.payment_method_type _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel> - _max?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel> + _min?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel> + _max?: Prisma.NestedEnumpayment_method_typeFilter<$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 EnumMovementTypeFilter<$PrismaModel = never> = { @@ -375,23 +392,6 @@ export type EnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel = never> _max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> } -export type Enumstock_cardex_typeFilter<$PrismaModel = never> = { - equals?: $Enums.stock_cardex_type | Prisma.Enumstock_cardex_typeFieldRefInput<$PrismaModel> - in?: $Enums.stock_cardex_type[] - notIn?: $Enums.stock_cardex_type[] - not?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel> | $Enums.stock_cardex_type -} - -export type Enumstock_cardex_typeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.stock_cardex_type | Prisma.Enumstock_cardex_typeFieldRefInput<$PrismaModel> - in?: $Enums.stock_cardex_type[] - notIn?: $Enums.stock_cardex_type[] - not?: Prisma.NestedEnumstock_cardex_typeWithAggregatesFilter<$PrismaModel> | $Enums.stock_cardex_type - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel> - _max?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel> -} - export type NestedIntFilter<$PrismaModel = never> = { equals?: number | Prisma.IntFieldRefInput<$PrismaModel> in?: number[] @@ -581,65 +581,11 @@ export type NestedJsonNullableFilterBase<$PrismaModel = never> = { not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter } -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 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 - 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 NestedBoolFilter<$PrismaModel = never> = { equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean } -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 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 NestedBoolWithAggregatesFilter<$PrismaModel = never> = { equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean @@ -675,6 +621,50 @@ export type NestedFloatNullableFilter<$PrismaModel = never> = { not?: Prisma.NestedFloatNullableFilter<$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 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 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> +} + export type NestedEnumOrderStatusFilter<$PrismaModel = never> = { equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel> in?: $Enums.OrderStatus[] @@ -682,11 +672,11 @@ export type NestedEnumOrderStatusFilter<$PrismaModel = never> = { not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus } -export type NestedEnumpaymentMethodFilter<$PrismaModel = never> = { - equals?: $Enums.paymentMethod | Prisma.EnumpaymentMethodFieldRefInput<$PrismaModel> - in?: $Enums.paymentMethod[] - notIn?: $Enums.paymentMethod[] - not?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel> | $Enums.paymentMethod +export type NestedEnumpayment_method_typeFilter<$PrismaModel = never> = { + equals?: $Enums.payment_method_type | Prisma.Enumpayment_method_typeFieldRefInput<$PrismaModel> + in?: $Enums.payment_method_type[] + notIn?: $Enums.payment_method_type[] + not?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel> | $Enums.payment_method_type } export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = { @@ -699,14 +689,41 @@ export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = { _max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> } -export type NestedEnumpaymentMethodWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.paymentMethod | Prisma.EnumpaymentMethodFieldRefInput<$PrismaModel> - in?: $Enums.paymentMethod[] - notIn?: $Enums.paymentMethod[] - not?: Prisma.NestedEnumpaymentMethodWithAggregatesFilter<$PrismaModel> | $Enums.paymentMethod +export type NestedEnumpayment_method_typeWithAggregatesFilter<$PrismaModel = never> = { + equals?: $Enums.payment_method_type | Prisma.Enumpayment_method_typeFieldRefInput<$PrismaModel> + in?: $Enums.payment_method_type[] + notIn?: $Enums.payment_method_type[] + not?: Prisma.NestedEnumpayment_method_typeWithAggregatesFilter<$PrismaModel> | $Enums.payment_method_type _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel> - _max?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel> + _min?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel> + _max?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel> +} + +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 + 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 NestedEnumMovementTypeFilter<$PrismaModel = never> = { @@ -743,21 +760,4 @@ export type NestedEnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel = n _max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> } -export type NestedEnumstock_cardex_typeFilter<$PrismaModel = never> = { - equals?: $Enums.stock_cardex_type | Prisma.Enumstock_cardex_typeFieldRefInput<$PrismaModel> - in?: $Enums.stock_cardex_type[] - notIn?: $Enums.stock_cardex_type[] - not?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel> | $Enums.stock_cardex_type -} - -export type NestedEnumstock_cardex_typeWithAggregatesFilter<$PrismaModel = never> = { - equals?: $Enums.stock_cardex_type | Prisma.Enumstock_cardex_typeFieldRefInput<$PrismaModel> - in?: $Enums.stock_cardex_type[] - notIn?: $Enums.stock_cardex_type[] - not?: Prisma.NestedEnumstock_cardex_typeWithAggregatesFilter<$PrismaModel> | $Enums.stock_cardex_type - _count?: Prisma.NestedIntFilter<$PrismaModel> - _min?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel> - _max?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel> -} - diff --git a/src/generated/prisma/enums.ts b/src/generated/prisma/enums.ts index 4e67d54..3e25a82 100644 --- a/src/generated/prisma/enums.ts +++ b/src/generated/prisma/enums.ts @@ -10,22 +10,14 @@ */ export const OrderStatus = { - pending: 'pending', - reject: 'reject', - done: 'done' + PENDING: 'PENDING', + REJECT: 'REJECT', + DONE: 'DONE' } as const export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus] -export const paymentMethod = { - cash: 'cash', - card: 'card' -} as const - -export type paymentMethod = (typeof paymentMethod)[keyof typeof paymentMethod] - - export const MovementType = { IN: 'IN', OUT: 'OUT', @@ -45,28 +37,22 @@ export const MovementReferenceType = { export type MovementReferenceType = (typeof MovementReferenceType)[keyof typeof MovementReferenceType] -export const stock_cardex_type = { - IN: 'IN', - OUT: 'OUT', - ADJUST: 'ADJUST' +export const payment_method_type = { + CASH: 'CASH', + CARD: 'CARD', + BANK: 'BANK', + CHECK: 'CHECK', + OTHER: 'OTHER' } as const -export type stock_cardex_type = (typeof stock_cardex_type)[keyof typeof stock_cardex_type] +export type payment_method_type = (typeof payment_method_type)[keyof typeof payment_method_type] -export const stock_movements_view_type = { - IN: 'IN', - OUT: 'OUT', - ADJUST: 'ADJUST' -} as const - -export type stock_movements_view_type = (typeof stock_movements_view_type)[keyof typeof stock_movements_view_type] - - -export const stock_movements_view_referenceType = { +export const ledgerSourceType = { PURCHASE: 'PURCHASE', - SALES: 'SALES', - ADJUSTMENT: 'ADJUSTMENT' + PAYMENT: 'PAYMENT', + ADJUSTMENT: 'ADJUSTMENT', + REFUND: 'REFUND' } as const -export type stock_movements_view_referenceType = (typeof stock_movements_view_referenceType)[keyof typeof stock_movements_view_referenceType] +export type ledgerSourceType = (typeof ledgerSourceType)[keyof typeof ledgerSourceType] diff --git a/src/generated/prisma/internal/class.ts b/src/generated/prisma/internal/class.ts index 117ce7a..ab99231 100644 --- a/src/generated/prisma/internal/class.ts +++ b/src/generated/prisma/internal/class.ts @@ -16,13 +16,11 @@ import type * as Prisma from "./prismaNamespace.js" const config: runtime.GetPrismaClientConfig = { - "previewFeatures": [ - "views" - ], + "previewFeatures": [], "clientVersion": "7.1.0", "engineVersion": "ab635e6b9d606fa5c8fb8b1a7f909c3c3c1c98ba", "activeProvider": "mysql", - "inlineSchema": "generator client {\n provider = \"prisma-client\"\n output = \"../src/generated/prisma\"\n previewFeatures = [\"views\"]\n moduleFormat = \"cjs\"\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel 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 role Role @relation(\"User_Role\", fields: [roleId], references: [id], onUpdate: NoAction)\n refreshTokens RefreshToken[]\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 ProductVariant {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n basePrice Decimal @db.Decimal(10, 2)\n salePrice Decimal @db.Decimal(10, 2)\n description String? @db.Text\n barcode String? @unique(map: \"products_barcode_unique\") @db.VarChar(100)\n imageUrl String? @db.VarChar(255)\n unit String? @db.VarChar(10)\n quantity Decimal? @default(0.00) @db.Decimal(10, 2)\n alertQuantity Decimal? @default(5.00) @db.Decimal(10, 2)\n isActive Boolean @default(true)\n isFeatured Boolean @default(false)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n productId Int\n product Product @relation(\"Product_Variant\", fields: [productId], references: [id], onUpdate: NoAction)\n\n @@index([productId], map: \"Product_Variants_productId_fkey\")\n @@map(\"Product_Variants\")\n}\n\nmodel Product {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n description String? @db.Text\n sku String? @unique(map: \"products_sku_unique\") @db.VarChar(100)\n barcode String? @unique(map: \"products_barcode_unique\") @db.VarChar(100)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n salePrice Decimal @default(0.00) @db.Decimal(10, 2)\n brandId Int?\n categoryId Int?\n inventoryTransferItems InventoryTransferItem[] @relation(\"InventoryTransferItem_Product\")\n productCharges ProductCharge[] @relation(\"Product_Charges\")\n variants ProductVariant[] @relation(\"Product_Variant\")\n brand ProductBrand? @relation(\"Product_Brand\", fields: [brandId], references: [id], onUpdate: NoAction)\n category ProductCategory? @relation(\"Product_Category\", fields: [categoryId], references: [id], onUpdate: NoAction)\n purchaseReceiptItems PurchaseReceiptItem[] @relation(\"Product_PurchaseReceiptItems\")\n salesInvoiceItems SalesInvoiceItem[] @relation(\"Product_SalesInvoiceItems\")\n stockAdjustments StockAdjustment[] @relation(\"Product_Stock_Adjustments\")\n stockMovements StockMovement[] @relation(\"StockMovement_Product\")\n\n stockBalances StockBalance[] @relation(\"StockBalance_Product\")\n\n @@index([brandId], map: \"Products_brandId_fkey\")\n @@index([categoryId], map: \"Products_categoryId_fkey\")\n @@map(\"Products\")\n}\n\nmodel ProductBrand {\n id Int @id @default(autoincrement())\n name String @db.VarChar(100)\n description String? @db.Text\n imageUrl String? @db.VarChar(255)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n products Product[] @relation(\"Product_Brand\")\n\n @@map(\"Product_brands\")\n}\n\nmodel ProductCategory {\n id Int @id @default(autoincrement())\n name String @db.VarChar(100)\n description String? @db.Text\n imageUrl String? @db.VarChar(255)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n products Product[] @relation(\"Product_Category\")\n\n @@map(\"Product_categories\")\n}\n\nmodel 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 productCharges ProductCharge[] @relation(\"Supplier_Product_Charges\")\n purchaseReceipts PurchaseReceipt[]\n stockMovements StockMovement[] @relation(\"StockMovement_Supplier\")\n\n @@map(\"Suppliers\")\n}\n\nmodel Customer {\n id Int @id @default(autoincrement())\n firstName String @db.VarChar(255)\n lastName String @db.VarChar(255)\n email String? @db.VarChar(255)\n mobileNumber String @unique @db.Char(11)\n address String? @db.Text\n city String? @db.VarChar(100)\n state String? @db.VarChar(100)\n country String? @db.VarChar(100)\n isActive Boolean @default(true)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n orders Order[] @relation(\"Customer_Orders\")\n salesInvoices SalesInvoice[] @relation(\"Customer_Sales_Invoices\")\n stockMovements StockMovement[] @relation(\"StockMovement_Customer\")\n\n @@map(\"Customers\")\n}\n\nmodel 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 isPointOfSale 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 inventoryTransfersFrom InventoryTransfer[] @relation(\"Inventory_From\")\n inventoryTransfersTo InventoryTransfer[] @relation(\"Inventory_To\")\n productCharges ProductCharge[] @relation(\"Inventory_Product_Charges\")\n purchaseReceipts PurchaseReceipt[]\n stockAdjustments StockAdjustment[] @relation(\"Inventory_Stock_Adjustments\")\n stockMovements StockMovement[] @relation(\"StockMovement_Inventory\")\n counterStockMovements StockMovement[] @relation(\"StockMovement_CounterInventory\")\n stockBalances StockBalance[] @relation(\"StockBalance_inventory\")\n salesInvoices SalesInvoice[] @relation(\"Inventory_SalesInvoices\")\n\n @@map(\"Inventories\")\n}\n\nmodel Store {\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\n @@map(\"Stores\")\n}\n\nmodel ProductCharge {\n id Int @id @default(autoincrement())\n count Decimal @db.Decimal(10, 2)\n fee Decimal @db.Decimal(10, 2)\n totalAmount Decimal @db.Decimal(10, 2)\n isSettled Boolean @default(false)\n buyAt DateTime? @db.Timestamp(0)\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 productId Int\n inventoryId Int\n supplierId Int\n inventory Inventory @relation(\"Inventory_Product_Charges\", fields: [inventoryId], references: [id], onUpdate: NoAction)\n product Product @relation(\"Product_Charges\", fields: [productId], references: [id], onUpdate: NoAction)\n supplier Supplier @relation(\"Supplier_Product_Charges\", fields: [supplierId], references: [id], onUpdate: NoAction)\n\n @@index([inventoryId], map: \"Product_Charges_inventoryId_fkey\")\n @@index([productId], map: \"Product_Charges_productId_fkey\")\n @@index([supplierId], map: \"Product_Charges_supplierId_fkey\")\n @@map(\"Product_Charges\")\n}\n\nmodel Order {\n id Int @id @default(autoincrement())\n orderNumber String @unique @db.VarChar(100)\n status OrderStatus @default(pending)\n paymentMethod paymentMethod @default(card)\n totalAmount Decimal @db.Decimal(10, 2)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n customerId Int\n customer Customer @relation(\"Customer_Orders\", fields: [customerId], references: [id], onUpdate: NoAction)\n\n @@index([customerId], map: \"Orders_customerId_fkey\")\n @@map(\"Orders\")\n}\n\nmodel PurchaseReceipt {\n id Int @id @default(autoincrement())\n code String @unique @db.VarChar(100)\n totalAmount Decimal @db.Decimal(10, 2)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\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\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, 2)\n fee Decimal @db.Decimal(10, 2)\n total Decimal @db.Decimal(10, 2)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n receiptId Int\n productId Int\n receipt PurchaseReceipt @relation(\"PurchaseReceipt_Items\", fields: [receiptId], references: [id])\n product Product @relation(\"Product_PurchaseReceiptItems\", fields: [productId], 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 SalesInvoice {\n id Int @id @default(autoincrement())\n code String @unique @db.VarChar(100)\n totalAmount Decimal @db.Decimal(10, 2)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n customerId Int?\n inventoryId Int\n items SalesInvoiceItem[] @relation(\"SalesInvoice_Items\")\n customer Customer? @relation(\"Customer_Sales_Invoices\", fields: [customerId], references: [id])\n inventory Inventory @relation(\"Inventory_SalesInvoices\", fields: [inventoryId], references: [id])\n\n @@index([inventoryId], map: \"Sales_Invoices_inventoryId_fkey\")\n @@index([customerId], map: \"Sales_Invoices_customerId_fkey\")\n @@map(\"Sales_Invoices\")\n}\n\nmodel SalesInvoiceItem {\n id Int @id @default(autoincrement())\n count Decimal @db.Decimal(10, 2)\n fee Decimal @db.Decimal(10, 2)\n total Decimal @db.Decimal(10, 2)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n invoiceId Int\n productId Int\n invoice SalesInvoice @relation(\"SalesInvoice_Items\", fields: [invoiceId], references: [id])\n product Product @relation(\"Product_SalesInvoiceItems\", fields: [productId], references: [id])\n\n @@index([invoiceId], map: \"Sales_Invoice_Items_invoiceId_fkey\")\n @@index([productId], map: \"Sales_Invoice_Items_productId_fkey\")\n @@map(\"Sales_Invoice_Items\")\n}\n\nmodel StockMovement {\n id Int @id @default(autoincrement())\n type MovementType\n quantity Decimal @db.Decimal(10, 2)\n fee Decimal @db.Decimal(10, 2)\n totalCost Decimal @db.Decimal(10, 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(10, 2)\n remainedInStock Decimal @default(0) @db.Decimal(10, 2)\n inventory Inventory @relation(\"StockMovement_Inventory\", fields: [inventoryId], references: [id])\n product Product @relation(\"StockMovement_Product\", fields: [productId], references: [id])\n supplierId Int?\n supplier Supplier? @relation(\"StockMovement_Supplier\", fields: [supplierId], references: [id])\n customerId Int?\n customer Customer? @relation(\"StockMovement_Customer\", fields: [customerId], references: [id])\n counterInventoryId Int?\n counterInventory Inventory? @relation(\"StockMovement_CounterInventory\", fields: [counterInventoryId], references: [id])\n\n @@index([inventoryId], map: \"Stock_Movements_inventoryId_fkey\")\n @@index([productId], map: \"Stock_Movements_productId_fkey\")\n @@map(\"Stock_Movements\")\n}\n\nmodel StockBalance {\n id Int @id @default(autoincrement())\n\n productId Int\n inventoryId Int\n\n quantity Decimal @default(0) @db.Decimal(14, 3)\n\n avgCost Decimal @default(0) @db.Decimal(14, 2)\n totalCost Decimal @default(0) @db.Decimal(14, 2)\n\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n\n product Product @relation(\"StockBalance_Product\", fields: [productId], references: [id])\n inventory Inventory @relation(\"StockBalance_inventory\", fields: [inventoryId], references: [id])\n\n @@unique([productId, inventoryId])\n @@index([productId])\n @@index([inventoryId])\n @@map(\"Stock_Balance\")\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\n user User @relation(fields: [userId], references: [id])\n\n @@index([userId])\n @@map(\"Refresh_Tokens\")\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, 2)\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 StockAdjustment {\n id Int @id @default(autoincrement())\n adjustedQuantity Decimal @db.Decimal(10, 2)\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\nview StockMovements_View {\n id Int @default(0)\n productId Int\n type stock_movements_view_type\n quantity Decimal @db.Decimal(10, 2)\n fee Decimal @db.Decimal(10, 2)\n totalCost Decimal @db.Decimal(10, 2)\n referenceId String\n referenceType stock_movements_view_referenceType\n createdAt DateTime @default(now()) @db.Timestamp(0)\n current_stock Decimal?\n current_avg_cost Decimal?\n\n @@map(\"Stock_Movements_View\")\n @@ignore\n}\n\nview inventory_overview {\n ProductId Int\n stock_quantity Decimal\n avgCost Decimal\n totalCost Decimal\n updatedAt DateTime @default(now()) @db.Timestamp(0)\n\n @@map(\"Inventory_Overview\")\n}\n\nview stock_cardex {\n productId Int\n movement_id Int @default(0)\n type stock_cardex_type\n quantity Decimal @db.Decimal(10, 2)\n fee Decimal @db.Decimal(10, 2)\n totalCost Decimal @db.Decimal(10, 2)\n balance_quantity Decimal?\n balance_avg_cost Decimal?\n createdAt DateTime @default(now()) @db.Timestamp(0)\n\n @@map(\"Stock_Cardex\")\n}\n\nview stock_view {\n productId Int\n inventoryId Int\n stock Decimal? @db.Decimal(32, 2)\n\n @@map(\"Stock_View\")\n}\n\nenum OrderStatus {\n pending\n reject\n done\n}\n\nenum paymentMethod {\n cash\n card\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 stock_cardex_type {\n IN\n OUT\n ADJUST\n}\n\nenum stock_movements_view_type {\n IN\n OUT\n ADJUST\n}\n\nenum stock_movements_view_referenceType {\n PURCHASE\n SALES\n ADJUSTMENT\n}\n\nmodel TriggerLog {\n id Int @id @default(autoincrement())\n name String @db.Text\n message String @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n\n @@map(\"Trigger_Logs\")\n}\n", + "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? @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 inventories Inventory[] @relation(\"Bank_Accounts_inventoryId_fkey\")\n purchaseReceiptPayments PurchaseReceiptPayments[]\n posAccounts PosAccount[]\n inventoryBankAccounts InventoryBankAccount[] @relation(\"Inventory_Bank_Accounts_bankAccountId_fkey\")\n\n @@map(\"Bank_Accounts\")\n}\n\nenum OrderStatus {\n PENDING\n REJECT\n DONE\n}\n\nenum MovementType {\n IN\n OUT\n ADJUST\n}\n\nenum MovementReferenceType {\n PURCHASE\n SALES\n ADJUSTMENT\n INVENTORY_TRANSFER\n}\n\nenum payment_method_type {\n CASH\n CARD\n BANK\n CHECK\n OTHER\n}\n\nenum ledgerSourceType {\n PURCHASE\n PAYMENT\n ADJUSTMENT\n REFUND\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 // productCharges ProductCharge[] @relation(\"Inventory_Product_Charges\")\n purchaseReceipts PurchaseReceipt[]\n salesInvoices SalesInvoice[] @relation(\"Inventory_SalesInvoices\")\n stockAdjustments StockAdjustment[] @relation(\"Inventory_Stock_Adjustments\")\n stockBalances StockBalance[] @relation(\"StockBalance_inventory\")\n counterStockMovements StockMovement[] @relation(\"StockMovement_CounterInventory\")\n stockMovements StockMovement[] @relation(\"StockMovement_Inventory\")\n bankAccountId Int?\n bankAccounts BankAccount[] @relation(\"Bank_Accounts_inventoryId_fkey\")\n posAccounts PosAccount[] @relation(\"Inventory_PosAccounts\")\n inventoryBankAccounts InventoryBankAccount[] @relation(\"Inventory_Bank_Accounts_inventoryId_fkey\")\n\n @@map(\"Inventories\")\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, 2)\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 InventoryBankAccount {\n inventoryId Int\n bankAccountId Int\n\n inventory Inventory @relation(\"Inventory_Bank_Accounts_inventoryId_fkey\", fields: [inventoryId], references: [id])\n bankAccount BankAccount @relation(\"Inventory_Bank_Accounts_bankAccountId_fkey\", fields: [bankAccountId], references: [id])\n posAccounts PosAccount[] @relation(\"Pos_Accounts_inventoryBankAccountId_fkey\")\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 inventory Inventory @relation(\"Inventory_PosAccounts\", fields: [inventoryId], references: [id])\n inventoryBankAccount InventoryBankAccount? @relation(\"Pos_Accounts_inventoryBankAccountId_fkey\", fields: [bankAccountId, inventoryId], references: [bankAccountId, inventoryId])\n bankAccount BankAccount? @relation(fields: [bankAccountId], references: [id])\n\n @@map(\"Pos_Accounts\")\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 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 purchaseReceipts PurchaseReceipt[]\n stockMovements StockMovement[] @relation(\"StockMovement_Supplier\")\n supplierLedgers SupplierLedger[]\n\n @@map(\"Suppliers\")\n}\n\nmodel SupplierLedger {\n id Int @id @default(autoincrement())\n description String? @db.Text\n debit Decimal @db.Decimal(10, 2)\n credit Decimal @db.Decimal(10, 2)\n balance Decimal @db.Decimal(10, 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], map: \"Supplier_Ledger_supplierId_fkey\")\n @@map(\"Supplier_Ledger\")\n}\n\nmodel Customer {\n id Int @id @default(autoincrement())\n firstName String @db.VarChar(255)\n lastName String @db.VarChar(255)\n email String? @db.VarChar(255)\n mobileNumber String @unique @db.Char(11)\n address String? @db.Text\n city String? @db.VarChar(100)\n state String? @db.VarChar(100)\n country String? @db.VarChar(100)\n isActive Boolean @default(true)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n orders Order[] @relation(\"Customer_Orders\")\n salesInvoices SalesInvoice[] @relation(\"Customer_Sales_Invoices\")\n stockMovements StockMovement[] @relation(\"StockMovement_Customer\")\n\n @@map(\"Customers\")\n}\n\nmodel Order {\n id Int @id @default(autoincrement())\n orderNumber String @unique @db.VarChar(100)\n status OrderStatus @default(PENDING)\n paymentMethod payment_method_type @default(CARD)\n totalAmount Decimal @db.Decimal(10, 2)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n customerId Int\n customer Customer @relation(\"Customer_Orders\", fields: [customerId], references: [id], onUpdate: NoAction)\n\n @@index([customerId], map: \"Orders_customerId_fkey\")\n @@map(\"Orders\")\n}\n\nmodel SalesInvoice {\n id Int @id @default(autoincrement())\n code String @unique @db.VarChar(100)\n totalAmount Decimal @db.Decimal(10, 2)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n customerId Int?\n inventoryId Int\n items SalesInvoiceItem[] @relation(\"SalesInvoice_Items\")\n customer Customer? @relation(\"Customer_Sales_Invoices\", fields: [customerId], references: [id])\n inventory Inventory @relation(\"Inventory_SalesInvoices\", fields: [inventoryId], references: [id])\n\n @@index([inventoryId], map: \"Sales_Invoices_inventoryId_fkey\")\n @@index([customerId], map: \"Sales_Invoices_customerId_fkey\")\n @@map(\"Sales_Invoices\")\n}\n\nmodel SalesInvoiceItem {\n id Int @id @default(autoincrement())\n count Decimal @db.Decimal(10, 2)\n fee Decimal @db.Decimal(10, 2)\n total Decimal @db.Decimal(10, 2)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n invoiceId Int\n productId Int\n invoice SalesInvoice @relation(\"SalesInvoice_Items\", fields: [invoiceId], references: [id])\n product Product @relation(\"Product_SalesInvoiceItems\", fields: [productId], references: [id])\n\n @@index([invoiceId], map: \"Sales_Invoice_Items_invoiceId_fkey\")\n @@index([productId], map: \"Sales_Invoice_Items_productId_fkey\")\n @@map(\"Sales_Invoice_Items\")\n}\n\nmodel TriggerLog {\n id Int @id @default(autoincrement())\n message String @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n name String @db.Text\n\n @@map(\"Trigger_Logs\")\n}\n\nmodel ProductVariant {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n basePrice Decimal @db.Decimal(10, 2)\n salePrice Decimal @db.Decimal(10, 2)\n description String? @db.Text\n barcode String? @unique(map: \"products_barcode_unique\") @db.VarChar(100)\n imageUrl String? @db.VarChar(255)\n unit String? @db.VarChar(10)\n quantity Decimal? @default(0.00) @db.Decimal(10, 2)\n alertQuantity Decimal? @default(5.00) @db.Decimal(10, 2)\n isActive Boolean @default(true)\n isFeatured Boolean @default(false)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n productId Int\n product Product @relation(\"Product_Variant\", fields: [productId], references: [id], onUpdate: NoAction)\n\n @@index([productId], map: \"Product_Variants_productId_fkey\")\n @@map(\"Product_Variants\")\n}\n\nmodel Product {\n id Int @id @default(autoincrement())\n name String @db.VarChar(255)\n description String? @db.Text\n sku String? @unique(map: \"products_sku_unique\") @db.VarChar(100)\n barcode String? @unique(map: \"products_barcode_unique\") @db.VarChar(100)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n brandId Int?\n categoryId Int?\n salePrice Decimal @default(0.00) @db.Decimal(10, 2)\n inventoryTransferItems InventoryTransferItem[] @relation(\"InventoryTransferItem_Product\")\n // productCharges ProductCharge[] @relation(\"Product_Charges\")\n variants ProductVariant[] @relation(\"Product_Variant\")\n brand ProductBrand? @relation(\"Product_Brand\", fields: [brandId], references: [id], onUpdate: NoAction)\n category ProductCategory? @relation(\"Product_Category\", fields: [categoryId], references: [id], onUpdate: NoAction)\n purchaseReceiptItems PurchaseReceiptItem[] @relation(\"Product_PurchaseReceiptItems\")\n salesInvoiceItems SalesInvoiceItem[] @relation(\"Product_SalesInvoiceItems\")\n stockAdjustments StockAdjustment[] @relation(\"Product_Stock_Adjustments\")\n stockBalances StockBalance[] @relation(\"StockBalance_Product\")\n stockMovements StockMovement[] @relation(\"StockMovement_Product\")\n\n @@index([brandId], map: \"Products_brandId_fkey\")\n @@index([categoryId], map: \"Products_categoryId_fkey\")\n @@map(\"Products\")\n}\n\nmodel ProductBrand {\n id Int @id @default(autoincrement())\n name String @db.VarChar(100)\n description String? @db.Text\n imageUrl String? @db.VarChar(255)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n products Product[] @relation(\"Product_Brand\")\n\n @@map(\"Product_brands\")\n}\n\nmodel ProductCategory {\n id Int @id @default(autoincrement())\n name String @db.VarChar(100)\n description String? @db.Text\n imageUrl String? @db.VarChar(255)\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n deletedAt DateTime? @db.Timestamp(0)\n products Product[] @relation(\"Product_Category\")\n\n @@map(\"Product_categories\")\n}\n\nmodel PurchaseReceipt {\n id Int @id @default(autoincrement())\n code String @unique @db.VarChar(100)\n totalAmount Decimal @db.Decimal(10, 2)\n paidAmount Decimal @default(0.00) @db.Decimal(10, 2)\n isSettled Boolean @default(false)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\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 purchaseReceiptPayments 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, 2)\n fee Decimal @db.Decimal(10, 2)\n total Decimal @db.Decimal(10, 2)\n description String? @db.Text\n createdAt DateTime @default(now()) @db.Timestamp(0)\n receiptId Int\n productId Int\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(10, 2)\n paymentMethod payment_method_type\n bankAccountId Int?\n description String? @db.Text\n payedAt DateTime @db.Timestamp(0)\n receiptId Int\n createdAt DateTime @default(now()) @db.Timestamp(0)\n\n purchaseReceipt PurchaseReceipt @relation(fields: [receiptId], references: [id])\n bankAccount BankAccount? @relation(fields: [bankAccountId], references: [id])\n\n @@index([receiptId], map: \"Purchase_Receipt_Payments_receiptId_fkey\")\n @@index([bankAccountId], map: \"Purchase_Receipt_Payments_bankAccountId_fkey\")\n @@map(\"Purchase_Receipt_Payments\")\n}\n\ngenerator client {\n provider = \"prisma-client\"\n output = \"../../src/generated/prisma\"\n moduleFormat = \"cjs\"\n}\n\ndatasource db {\n provider = \"mysql\"\n}\n\nmodel StockMovement {\n id Int @id @default(autoincrement())\n type MovementType\n quantity Decimal @db.Decimal(10, 2)\n fee Decimal @db.Decimal(10, 2)\n totalCost Decimal @db.Decimal(10, 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(10, 2)\n supplierId Int?\n remainedInStock Decimal @default(0.00) @db.Decimal(10, 2)\n counterInventoryId Int?\n customerId Int?\n counterInventory Inventory? @relation(\"StockMovement_CounterInventory\", fields: [counterInventoryId], references: [id])\n customer Customer? @relation(\"StockMovement_Customer\", fields: [customerId], references: [id])\n inventory Inventory @relation(\"StockMovement_Inventory\", fields: [inventoryId], references: [id])\n product Product @relation(\"StockMovement_Product\", fields: [productId], references: [id])\n supplier Supplier? @relation(\"StockMovement_Supplier\", fields: [supplierId], references: [id])\n\n @@index([inventoryId], map: \"Stock_Movements_inventoryId_fkey\")\n @@index([productId], map: \"Stock_Movements_productId_fkey\")\n @@index([counterInventoryId], map: \"Stock_Movements_counterInventoryId_fkey\")\n @@index([customerId], map: \"Stock_Movements_customerId_fkey\")\n @@index([supplierId], map: \"Stock_Movements_supplierId_fkey\")\n @@map(\"Stock_Movements\")\n}\n\nmodel StockBalance {\n quantity Decimal @default(0.000) @db.Decimal(14, 3)\n totalCost Decimal @default(0.00) @db.Decimal(14, 2)\n updatedAt DateTime @updatedAt @db.Timestamp(0)\n avgCost Decimal @default(0.00) @db.Decimal(14, 2)\n inventoryId Int\n productId Int\n createdAt DateTime @default(now()) @db.Timestamp(0)\n id Int @id @default(autoincrement())\n inventory Inventory @relation(\"StockBalance_inventory\", fields: [inventoryId], references: [id])\n product Product @relation(\"StockBalance_Product\", fields: [productId], references: [id])\n\n @@unique([productId, inventoryId])\n @@index([productId])\n @@index([inventoryId])\n @@map(\"Stock_Balance\")\n}\n\nmodel StockAdjustment {\n id Int @id @default(autoincrement())\n adjustedQuantity Decimal @db.Decimal(10, 2)\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", "runtimeDataModel": { "models": {}, "enums": {}, @@ -30,7 +28,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\":\"role\",\"kind\":\"object\",\"type\":\"Role\",\"relationName\":\"User_Role\"},{\"name\":\"refreshTokens\",\"kind\":\"object\",\"type\":\"RefreshToken\",\"relationName\":\"RefreshTokenToUser\"}],\"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\"},\"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\":\"salePrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"brandId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryTransferItems\",\"kind\":\"object\",\"type\":\"InventoryTransferItem\",\"relationName\":\"InventoryTransferItem_Product\"},{\"name\":\"productCharges\",\"kind\":\"object\",\"type\":\"ProductCharge\",\"relationName\":\"Product_Charges\"},{\"name\":\"variants\",\"kind\":\"object\",\"type\":\"ProductVariant\",\"relationName\":\"Product_Variant\"},{\"name\":\"brand\",\"kind\":\"object\",\"type\":\"ProductBrand\",\"relationName\":\"Product_Brand\"},{\"name\":\"category\",\"kind\":\"object\",\"type\":\"ProductCategory\",\"relationName\":\"Product_Category\"},{\"name\":\"purchaseReceiptItems\",\"kind\":\"object\",\"type\":\"PurchaseReceiptItem\",\"relationName\":\"Product_PurchaseReceiptItems\"},{\"name\":\"salesInvoiceItems\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"Product_SalesInvoiceItems\"},{\"name\":\"stockAdjustments\",\"kind\":\"object\",\"type\":\"StockAdjustment\",\"relationName\":\"Product_Stock_Adjustments\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Product\"},{\"name\":\"stockBalances\",\"kind\":\"object\",\"type\":\"StockBalance\",\"relationName\":\"StockBalance_Product\"}],\"dbName\":\"Products\"},\"ProductBrand\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"products\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Brand\"}],\"dbName\":\"Product_brands\"},\"ProductCategory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"products\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Category\"}],\"dbName\":\"Product_categories\"},\"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\":\"productCharges\",\"kind\":\"object\",\"type\":\"ProductCharge\",\"relationName\":\"Supplier_Product_Charges\"},{\"name\":\"purchaseReceipts\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"PurchaseReceiptToSupplier\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Supplier\"}],\"dbName\":\"Suppliers\"},\"Customer\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mobileNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"orders\",\"kind\":\"object\",\"type\":\"Order\",\"relationName\":\"Customer_Orders\"},{\"name\":\"salesInvoices\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"Customer_Sales_Invoices\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Customer\"}],\"dbName\":\"Customers\"},\"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\":\"isPointOfSale\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"inventoryTransfersFrom\",\"kind\":\"object\",\"type\":\"InventoryTransfer\",\"relationName\":\"Inventory_From\"},{\"name\":\"inventoryTransfersTo\",\"kind\":\"object\",\"type\":\"InventoryTransfer\",\"relationName\":\"Inventory_To\"},{\"name\":\"productCharges\",\"kind\":\"object\",\"type\":\"ProductCharge\",\"relationName\":\"Inventory_Product_Charges\"},{\"name\":\"purchaseReceipts\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"InventoryToPurchaseReceipt\"},{\"name\":\"stockAdjustments\",\"kind\":\"object\",\"type\":\"StockAdjustment\",\"relationName\":\"Inventory_Stock_Adjustments\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Inventory\"},{\"name\":\"counterStockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_CounterInventory\"},{\"name\":\"stockBalances\",\"kind\":\"object\",\"type\":\"StockBalance\",\"relationName\":\"StockBalance_inventory\"},{\"name\":\"salesInvoices\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"Inventory_SalesInvoices\"}],\"dbName\":\"Inventories\"},\"Store\":{\"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\"}],\"dbName\":\"Stores\"},\"ProductCharge\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"isSettled\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"buyAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"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\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"supplierId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_Product_Charges\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Charges\"},{\"name\":\"supplier\",\"kind\":\"object\",\"type\":\"Supplier\",\"relationName\":\"Supplier_Product_Charges\"}],\"dbName\":\"Product_Charges\"},\"Order\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"orderNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"OrderStatus\"},{\"name\":\"paymentMethod\",\"kind\":\"enum\",\"type\":\"paymentMethod\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"Customer_Orders\"}],\"dbName\":\"Orders\"},\"PurchaseReceipt\":{\"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\":\"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\"}],\"dbName\":\"Purchase_Receipts\"},\"PurchaseReceiptItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"receiptId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"receipt\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"PurchaseReceipt_Items\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_PurchaseReceiptItems\"}],\"dbName\":\"Purchase_Receipt_Items\"},\"SalesInvoice\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"items\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"SalesInvoice_Items\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"Customer_Sales_Invoices\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_SalesInvoices\"}],\"dbName\":\"Sales_Invoices\"},\"SalesInvoiceItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"invoiceId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"invoice\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"SalesInvoice_Items\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_SalesInvoiceItems\"}],\"dbName\":\"Sales_Invoice_Items\"},\"StockMovement\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"MovementType\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"referenceType\",\"kind\":\"enum\",\"type\":\"MovementReferenceType\"},{\"name\":\"referenceId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"avgCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"remainedInStock\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"StockMovement_Inventory\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"StockMovement_Product\"},{\"name\":\"supplierId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"supplier\",\"kind\":\"object\",\"type\":\"Supplier\",\"relationName\":\"StockMovement_Supplier\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"StockMovement_Customer\"},{\"name\":\"counterInventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"counterInventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"StockMovement_CounterInventory\"}],\"dbName\":\"Stock_Movements\"},\"StockBalance\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"avgCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"StockBalance_Product\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"StockBalance_inventory\"}],\"dbName\":\"Stock_Balance\"},\"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\"},\"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\"},\"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\"},\"TriggerLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"Trigger_Logs\"},\"inventory_overview\":{\"fields\":[{\"name\":\"ProductId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"stock_quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"avgCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"Inventory_Overview\"},\"stock_cardex\":{\"fields\":[{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"movement_id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"stock_cardex_type\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"balance_quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"balance_avg_cost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"Stock_Cardex\"},\"stock_view\":{\"fields\":[{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"stock\",\"kind\":\"scalar\",\"type\":\"Decimal\"}],\"dbName\":\"Stock_View\"}},\"enums\":{},\"types\":{}}") +config.runtimeDataModel = JSON.parse("{\"models\":{\"User\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mobileNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"password\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"roleId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"refreshTokens\",\"kind\":\"object\",\"type\":\"RefreshToken\",\"relationName\":\"RefreshTokenToUser\"},{\"name\":\"role\",\"kind\":\"object\",\"type\":\"Role\",\"relationName\":\"User_Role\"}],\"dbName\":\"Users\"},\"Role\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"permissions\",\"kind\":\"scalar\",\"type\":\"Json\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"users\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"User_Role\"}],\"dbName\":\"Roles\"},\"OtpCode\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"mobileNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"used\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"}],\"dbName\":\"Otp_Codes\"},\"RefreshToken\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"tokenHash\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"userId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"revoked\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"expiresAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"user\",\"kind\":\"object\",\"type\":\"User\",\"relationName\":\"RefreshTokenToUser\"}],\"dbName\":\"Refresh_Tokens\"},\"BankBranch\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"bankId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bank\",\"kind\":\"object\",\"type\":\"Bank\",\"relationName\":\"bank_branches\"},{\"name\":\"bankAccounts\",\"kind\":\"object\",\"type\":\"BankAccount\",\"relationName\":\"Bank_Accounts_branchId_fkey\"}],\"dbName\":\"Bank_Branches\"},\"BankAccount\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"accountNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"cardNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"iban\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"branchId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"branch\",\"kind\":\"object\",\"type\":\"BankBranch\",\"relationName\":\"Bank_Accounts_branchId_fkey\"},{\"name\":\"inventories\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Bank_Accounts_inventoryId_fkey\"},{\"name\":\"purchaseReceiptPayments\",\"kind\":\"object\",\"type\":\"PurchaseReceiptPayments\",\"relationName\":\"BankAccountToPurchaseReceiptPayments\"},{\"name\":\"posAccounts\",\"kind\":\"object\",\"type\":\"PosAccount\",\"relationName\":\"BankAccountToPosAccount\"},{\"name\":\"inventoryBankAccounts\",\"kind\":\"object\",\"type\":\"InventoryBankAccount\",\"relationName\":\"Inventory_Bank_Accounts_bankAccountId_fkey\"}],\"dbName\":\"Bank_Accounts\"},\"Inventory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"location\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"isPointOfSale\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"inventoryTransfersFrom\",\"kind\":\"object\",\"type\":\"InventoryTransfer\",\"relationName\":\"Inventory_From\"},{\"name\":\"inventoryTransfersTo\",\"kind\":\"object\",\"type\":\"InventoryTransfer\",\"relationName\":\"Inventory_To\"},{\"name\":\"purchaseReceipts\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"InventoryToPurchaseReceipt\"},{\"name\":\"salesInvoices\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"Inventory_SalesInvoices\"},{\"name\":\"stockAdjustments\",\"kind\":\"object\",\"type\":\"StockAdjustment\",\"relationName\":\"Inventory_Stock_Adjustments\"},{\"name\":\"stockBalances\",\"kind\":\"object\",\"type\":\"StockBalance\",\"relationName\":\"StockBalance_inventory\"},{\"name\":\"counterStockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_CounterInventory\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Inventory\"},{\"name\":\"bankAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bankAccounts\",\"kind\":\"object\",\"type\":\"BankAccount\",\"relationName\":\"Bank_Accounts_inventoryId_fkey\"},{\"name\":\"posAccounts\",\"kind\":\"object\",\"type\":\"PosAccount\",\"relationName\":\"Inventory_PosAccounts\"},{\"name\":\"inventoryBankAccounts\",\"kind\":\"object\",\"type\":\"InventoryBankAccount\",\"relationName\":\"Inventory_Bank_Accounts_inventoryId_fkey\"}],\"dbName\":\"Inventories\"},\"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\"},\"InventoryBankAccount\":{\"fields\":[{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"bankAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_Bank_Accounts_inventoryId_fkey\"},{\"name\":\"bankAccount\",\"kind\":\"object\",\"type\":\"BankAccount\",\"relationName\":\"Inventory_Bank_Accounts_bankAccountId_fkey\"},{\"name\":\"posAccounts\",\"kind\":\"object\",\"type\":\"PosAccount\",\"relationName\":\"Pos_Accounts_inventoryBankAccountId_fkey\"}],\"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\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_PosAccounts\"},{\"name\":\"inventoryBankAccount\",\"kind\":\"object\",\"type\":\"InventoryBankAccount\",\"relationName\":\"Pos_Accounts_inventoryBankAccountId_fkey\"},{\"name\":\"bankAccount\",\"kind\":\"object\",\"type\":\"BankAccount\",\"relationName\":\"BankAccountToPosAccount\"}],\"dbName\":\"Pos_Accounts\"},\"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\"},\"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\":\"purchaseReceipts\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"PurchaseReceiptToSupplier\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Supplier\"},{\"name\":\"supplierLedgers\",\"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\"},\"Customer\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"firstName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"lastName\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"email\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"mobileNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"address\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"city\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"state\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"country\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"orders\",\"kind\":\"object\",\"type\":\"Order\",\"relationName\":\"Customer_Orders\"},{\"name\":\"salesInvoices\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"Customer_Sales_Invoices\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Customer\"}],\"dbName\":\"Customers\"},\"Order\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"orderNumber\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"status\",\"kind\":\"enum\",\"type\":\"OrderStatus\"},{\"name\":\"paymentMethod\",\"kind\":\"enum\",\"type\":\"payment_method_type\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"Customer_Orders\"}],\"dbName\":\"Orders\"},\"SalesInvoice\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"items\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"SalesInvoice_Items\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"Customer_Sales_Invoices\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_SalesInvoices\"}],\"dbName\":\"Sales_Invoices\"},\"SalesInvoiceItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"invoiceId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"invoice\",\"kind\":\"object\",\"type\":\"SalesInvoice\",\"relationName\":\"SalesInvoice_Items\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_SalesInvoiceItems\"}],\"dbName\":\"Sales_Invoice_Items\"},\"TriggerLog\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"message\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"}],\"dbName\":\"Trigger_Logs\"},\"ProductVariant\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"basePrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"salePrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"barcode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"unit\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"alertQuantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"isActive\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"isFeatured\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Variant\"}],\"dbName\":\"Product_Variants\"},\"Product\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"sku\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"barcode\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"brandId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"categoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"salePrice\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"inventoryTransferItems\",\"kind\":\"object\",\"type\":\"InventoryTransferItem\",\"relationName\":\"InventoryTransferItem_Product\"},{\"name\":\"variants\",\"kind\":\"object\",\"type\":\"ProductVariant\",\"relationName\":\"Product_Variant\"},{\"name\":\"brand\",\"kind\":\"object\",\"type\":\"ProductBrand\",\"relationName\":\"Product_Brand\"},{\"name\":\"category\",\"kind\":\"object\",\"type\":\"ProductCategory\",\"relationName\":\"Product_Category\"},{\"name\":\"purchaseReceiptItems\",\"kind\":\"object\",\"type\":\"PurchaseReceiptItem\",\"relationName\":\"Product_PurchaseReceiptItems\"},{\"name\":\"salesInvoiceItems\",\"kind\":\"object\",\"type\":\"SalesInvoiceItem\",\"relationName\":\"Product_SalesInvoiceItems\"},{\"name\":\"stockAdjustments\",\"kind\":\"object\",\"type\":\"StockAdjustment\",\"relationName\":\"Product_Stock_Adjustments\"},{\"name\":\"stockBalances\",\"kind\":\"object\",\"type\":\"StockBalance\",\"relationName\":\"StockBalance_Product\"},{\"name\":\"stockMovements\",\"kind\":\"object\",\"type\":\"StockMovement\",\"relationName\":\"StockMovement_Product\"}],\"dbName\":\"Products\"},\"ProductBrand\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"products\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Brand\"}],\"dbName\":\"Product_brands\"},\"ProductCategory\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"name\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"imageUrl\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"deletedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"products\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Category\"}],\"dbName\":\"Product_categories\"},\"PurchaseReceipt\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"code\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"totalAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"paidAmount\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"isSettled\",\"kind\":\"scalar\",\"type\":\"Boolean\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"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\":\"purchaseReceiptPayments\",\"kind\":\"object\",\"type\":\"PurchaseReceiptPayments\",\"relationName\":\"PurchaseReceiptToPurchaseReceiptPayments\"}],\"dbName\":\"Purchase_Receipts\"},\"PurchaseReceiptItem\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"count\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"total\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"receiptId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"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\":\"payment_method_type\"},{\"name\":\"bankAccountId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"description\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"payedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"receiptId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"purchaseReceipt\",\"kind\":\"object\",\"type\":\"PurchaseReceipt\",\"relationName\":\"PurchaseReceiptToPurchaseReceiptPayments\"},{\"name\":\"bankAccount\",\"kind\":\"object\",\"type\":\"BankAccount\",\"relationName\":\"BankAccountToPurchaseReceiptPayments\"}],\"dbName\":\"Purchase_Receipt_Payments\"},\"StockMovement\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"type\",\"kind\":\"enum\",\"type\":\"MovementType\"},{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"fee\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"referenceType\",\"kind\":\"enum\",\"type\":\"MovementReferenceType\"},{\"name\":\"referenceId\",\"kind\":\"scalar\",\"type\":\"String\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"avgCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"supplierId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"remainedInStock\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"counterInventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"customerId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"counterInventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"StockMovement_CounterInventory\"},{\"name\":\"customer\",\"kind\":\"object\",\"type\":\"Customer\",\"relationName\":\"StockMovement_Customer\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"StockMovement_Inventory\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"StockMovement_Product\"},{\"name\":\"supplier\",\"kind\":\"object\",\"type\":\"Supplier\",\"relationName\":\"StockMovement_Supplier\"}],\"dbName\":\"Stock_Movements\"},\"StockBalance\":{\"fields\":[{\"name\":\"quantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"totalCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"updatedAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"avgCost\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"StockBalance_inventory\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"StockBalance_Product\"}],\"dbName\":\"Stock_Balance\"},\"StockAdjustment\":{\"fields\":[{\"name\":\"id\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"adjustedQuantity\",\"kind\":\"scalar\",\"type\":\"Decimal\"},{\"name\":\"createdAt\",\"kind\":\"scalar\",\"type\":\"DateTime\"},{\"name\":\"productId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventoryId\",\"kind\":\"scalar\",\"type\":\"Int\"},{\"name\":\"inventory\",\"kind\":\"object\",\"type\":\"Inventory\",\"relationName\":\"Inventory_Stock_Adjustments\"},{\"name\":\"product\",\"kind\":\"object\",\"type\":\"Product\",\"relationName\":\"Product_Stock_Adjustments\"}],\"dbName\":\"Stock_Adjustments\"}},\"enums\":{},\"types\":{}}") async function decodeBase64AsWasm(wasmBase64: string): Promise { const { Buffer } = await import('node:buffer') @@ -196,6 +194,176 @@ export interface PrismaClient< */ 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.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.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.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.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.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.customer`: Exposes CRUD operations for the **Customer** model. + * Example usage: + * ```ts + * // Fetch zero or more Customers + * const customers = await prisma.customer.findMany() + * ``` + */ + get customer(): Prisma.CustomerDelegate; + + /** + * `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.salesInvoice`: Exposes CRUD operations for the **SalesInvoice** model. + * Example usage: + * ```ts + * // Fetch zero or more SalesInvoices + * const salesInvoices = await prisma.salesInvoice.findMany() + * ``` + */ + get salesInvoice(): Prisma.SalesInvoiceDelegate; + + /** + * `prisma.salesInvoiceItem`: Exposes CRUD operations for the **SalesInvoiceItem** model. + * Example usage: + * ```ts + * // Fetch zero or more SalesInvoiceItems + * const salesInvoiceItems = await prisma.salesInvoiceItem.findMany() + * ``` + */ + get salesInvoiceItem(): Prisma.SalesInvoiceItemDelegate; + + /** + * `prisma.triggerLog`: Exposes CRUD operations for the **TriggerLog** model. + * Example usage: + * ```ts + * // Fetch zero or more TriggerLogs + * const triggerLogs = await prisma.triggerLog.findMany() + * ``` + */ + get triggerLog(): Prisma.TriggerLogDelegate; + /** * `prisma.productVariant`: Exposes CRUD operations for the **ProductVariant** model. * Example usage: @@ -236,66 +404,6 @@ export interface PrismaClient< */ get productCategory(): Prisma.ProductCategoryDelegate; - /** - * `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.customer`: Exposes CRUD operations for the **Customer** model. - * Example usage: - * ```ts - * // Fetch zero or more Customers - * const customers = await prisma.customer.findMany() - * ``` - */ - get customer(): Prisma.CustomerDelegate; - - /** - * `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.store`: Exposes CRUD operations for the **Store** model. - * Example usage: - * ```ts - * // Fetch zero or more Stores - * const stores = await prisma.store.findMany() - * ``` - */ - get store(): Prisma.StoreDelegate; - - /** - * `prisma.productCharge`: Exposes CRUD operations for the **ProductCharge** model. - * Example usage: - * ```ts - * // Fetch zero or more ProductCharges - * const productCharges = await prisma.productCharge.findMany() - * ``` - */ - get productCharge(): Prisma.ProductChargeDelegate; - - /** - * `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.purchaseReceipt`: Exposes CRUD operations for the **PurchaseReceipt** model. * Example usage: @@ -317,24 +425,14 @@ export interface PrismaClient< get purchaseReceiptItem(): Prisma.PurchaseReceiptItemDelegate; /** - * `prisma.salesInvoice`: Exposes CRUD operations for the **SalesInvoice** model. + * `prisma.purchaseReceiptPayments`: Exposes CRUD operations for the **PurchaseReceiptPayments** model. * Example usage: * ```ts - * // Fetch zero or more SalesInvoices - * const salesInvoices = await prisma.salesInvoice.findMany() + * // Fetch zero or more PurchaseReceiptPayments + * const purchaseReceiptPayments = await prisma.purchaseReceiptPayments.findMany() * ``` */ - get salesInvoice(): Prisma.SalesInvoiceDelegate; - - /** - * `prisma.salesInvoiceItem`: Exposes CRUD operations for the **SalesInvoiceItem** model. - * Example usage: - * ```ts - * // Fetch zero or more SalesInvoiceItems - * const salesInvoiceItems = await prisma.salesInvoiceItem.findMany() - * ``` - */ - get salesInvoiceItem(): Prisma.SalesInvoiceItemDelegate; + get purchaseReceiptPayments(): Prisma.PurchaseReceiptPaymentsDelegate; /** * `prisma.stockMovement`: Exposes CRUD operations for the **StockMovement** model. @@ -356,46 +454,6 @@ export interface PrismaClient< */ get stockBalance(): Prisma.StockBalanceDelegate; - /** - * `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.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.stockAdjustment`: Exposes CRUD operations for the **StockAdjustment** model. * Example usage: @@ -405,46 +463,6 @@ export interface PrismaClient< * ``` */ get stockAdjustment(): Prisma.StockAdjustmentDelegate; - - /** - * `prisma.triggerLog`: Exposes CRUD operations for the **TriggerLog** model. - * Example usage: - * ```ts - * // Fetch zero or more TriggerLogs - * const triggerLogs = await prisma.triggerLog.findMany() - * ``` - */ - get triggerLog(): Prisma.TriggerLogDelegate; - - /** - * `prisma.inventory_overview`: Exposes CRUD operations for the **inventory_overview** model. - * Example usage: - * ```ts - * // Fetch zero or more Inventory_overviews - * const inventory_overviews = await prisma.inventory_overview.findMany() - * ``` - */ - get inventory_overview(): Prisma.inventory_overviewDelegate; - - /** - * `prisma.stock_cardex`: Exposes CRUD operations for the **stock_cardex** model. - * Example usage: - * ```ts - * // Fetch zero or more Stock_cardexes - * const stock_cardexes = await prisma.stock_cardex.findMany() - * ``` - */ - get stock_cardex(): Prisma.stock_cardexDelegate; - - /** - * `prisma.stock_view`: Exposes CRUD operations for the **stock_view** model. - * Example usage: - * ```ts - * // Fetch zero or more Stock_views - * const stock_views = await prisma.stock_view.findMany() - * ``` - */ - get stock_view(): Prisma.stock_viewDelegate; } export function getPrismaClientClass(): PrismaClientConstructor { diff --git a/src/generated/prisma/internal/prismaNamespace.ts b/src/generated/prisma/internal/prismaNamespace.ts index f3f923d..4a86f8f 100644 --- a/src/generated/prisma/internal/prismaNamespace.ts +++ b/src/generated/prisma/internal/prismaNamespace.ts @@ -386,31 +386,33 @@ type FieldRefInputType = Model extends never ? never : FieldRe export const ModelName = { User: 'User', Role: 'Role', + OtpCode: 'OtpCode', + RefreshToken: 'RefreshToken', + BankBranch: 'BankBranch', + BankAccount: 'BankAccount', + Inventory: 'Inventory', + InventoryTransfer: 'InventoryTransfer', + InventoryTransferItem: 'InventoryTransferItem', + InventoryBankAccount: 'InventoryBankAccount', + PosAccount: 'PosAccount', + Bank: 'Bank', + Supplier: 'Supplier', + SupplierLedger: 'SupplierLedger', + Customer: 'Customer', + Order: 'Order', + SalesInvoice: 'SalesInvoice', + SalesInvoiceItem: 'SalesInvoiceItem', + TriggerLog: 'TriggerLog', ProductVariant: 'ProductVariant', Product: 'Product', ProductBrand: 'ProductBrand', ProductCategory: 'ProductCategory', - Supplier: 'Supplier', - Customer: 'Customer', - Inventory: 'Inventory', - Store: 'Store', - ProductCharge: 'ProductCharge', - Order: 'Order', PurchaseReceipt: 'PurchaseReceipt', PurchaseReceiptItem: 'PurchaseReceiptItem', - SalesInvoice: 'SalesInvoice', - SalesInvoiceItem: 'SalesInvoiceItem', + PurchaseReceiptPayments: 'PurchaseReceiptPayments', StockMovement: 'StockMovement', StockBalance: 'StockBalance', - OtpCode: 'OtpCode', - RefreshToken: 'RefreshToken', - InventoryTransfer: 'InventoryTransfer', - InventoryTransferItem: 'InventoryTransferItem', - StockAdjustment: 'StockAdjustment', - TriggerLog: 'TriggerLog', - inventory_overview: 'inventory_overview', - stock_cardex: 'stock_cardex', - stock_view: 'stock_view' + StockAdjustment: 'StockAdjustment' } as const export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -426,7 +428,7 @@ export type TypeMap + 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 + } + } + } + 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 + } + } + } + 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 + } + } + } + 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 + } + } + } + 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 + } + } + } + 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 + } + } + } + Customer: { + payload: Prisma.$CustomerPayload + fields: Prisma.CustomerFieldRefs + operations: { + findUnique: { + args: Prisma.CustomerFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.CustomerFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.CustomerFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.CustomerFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.CustomerFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.CustomerCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.CustomerCreateManyArgs + result: BatchPayload + } + delete: { + args: Prisma.CustomerDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.CustomerUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.CustomerDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.CustomerUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.CustomerUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.CustomerAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.CustomerGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.CustomerCountArgs + 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 + } + } + } + SalesInvoice: { + payload: Prisma.$SalesInvoicePayload + fields: Prisma.SalesInvoiceFieldRefs + operations: { + findUnique: { + args: Prisma.SalesInvoiceFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.SalesInvoiceFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.SalesInvoiceFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.SalesInvoiceFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.SalesInvoiceFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.SalesInvoiceCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.SalesInvoiceCreateManyArgs + result: BatchPayload + } + delete: { + args: Prisma.SalesInvoiceDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.SalesInvoiceUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.SalesInvoiceDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.SalesInvoiceUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.SalesInvoiceUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.SalesInvoiceAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.SalesInvoiceGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.SalesInvoiceCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + SalesInvoiceItem: { + payload: Prisma.$SalesInvoiceItemPayload + fields: Prisma.SalesInvoiceItemFieldRefs + operations: { + findUnique: { + args: Prisma.SalesInvoiceItemFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.SalesInvoiceItemFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.SalesInvoiceItemFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.SalesInvoiceItemFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.SalesInvoiceItemFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.SalesInvoiceItemCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.SalesInvoiceItemCreateManyArgs + result: BatchPayload + } + delete: { + args: Prisma.SalesInvoiceItemDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.SalesInvoiceItemUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.SalesInvoiceItemDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.SalesInvoiceItemUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.SalesInvoiceItemUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.SalesInvoiceItemAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.SalesInvoiceItemGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.SalesInvoiceItemCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } + TriggerLog: { + payload: Prisma.$TriggerLogPayload + fields: Prisma.TriggerLogFieldRefs + operations: { + findUnique: { + args: Prisma.TriggerLogFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findUniqueOrThrow: { + args: Prisma.TriggerLogFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findFirst: { + args: Prisma.TriggerLogFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null + } + findFirstOrThrow: { + args: Prisma.TriggerLogFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult + } + findMany: { + args: Prisma.TriggerLogFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] + } + create: { + args: Prisma.TriggerLogCreateArgs + result: runtime.Types.Utils.PayloadToResult + } + createMany: { + args: Prisma.TriggerLogCreateManyArgs + result: BatchPayload + } + delete: { + args: Prisma.TriggerLogDeleteArgs + result: runtime.Types.Utils.PayloadToResult + } + update: { + args: Prisma.TriggerLogUpdateArgs + result: runtime.Types.Utils.PayloadToResult + } + deleteMany: { + args: Prisma.TriggerLogDeleteManyArgs + result: BatchPayload + } + updateMany: { + args: Prisma.TriggerLogUpdateManyArgs + result: BatchPayload + } + upsert: { + args: Prisma.TriggerLogUpsertArgs + result: runtime.Types.Utils.PayloadToResult + } + aggregate: { + args: Prisma.TriggerLogAggregateArgs + result: runtime.Types.Utils.Optional + } + groupBy: { + args: Prisma.TriggerLogGroupByArgs + result: runtime.Types.Utils.Optional[] + } + count: { + args: Prisma.TriggerLogCountArgs + result: runtime.Types.Utils.Optional | number + } + } + } ProductVariant: { payload: Prisma.$ProductVariantPayload fields: Prisma.ProductVariantFieldRefs @@ -826,402 +1950,6 @@ export type TypeMap - 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 - } - } - } - Customer: { - payload: Prisma.$CustomerPayload - fields: Prisma.CustomerFieldRefs - operations: { - findUnique: { - args: Prisma.CustomerFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.CustomerFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.CustomerFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.CustomerFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.CustomerFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.CustomerCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.CustomerCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.CustomerDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.CustomerUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.CustomerDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.CustomerUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.CustomerUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.CustomerAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.CustomerGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.CustomerCountArgs - 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 - } - } - } - Store: { - payload: Prisma.$StorePayload - fields: Prisma.StoreFieldRefs - operations: { - findUnique: { - args: Prisma.StoreFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.StoreFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.StoreFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.StoreFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.StoreFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.StoreCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.StoreCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.StoreDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.StoreUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.StoreDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.StoreUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.StoreUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.StoreAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.StoreGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.StoreCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - ProductCharge: { - payload: Prisma.$ProductChargePayload - fields: Prisma.ProductChargeFieldRefs - operations: { - findUnique: { - args: Prisma.ProductChargeFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.ProductChargeFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.ProductChargeFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.ProductChargeFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.ProductChargeFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.ProductChargeCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.ProductChargeCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.ProductChargeDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.ProductChargeUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.ProductChargeDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.ProductChargeUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.ProductChargeUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.ProductChargeAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.ProductChargeGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.ProductChargeCountArgs - 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 - } - } - } PurchaseReceipt: { payload: Prisma.$PurchaseReceiptPayload fields: Prisma.PurchaseReceiptFieldRefs @@ -1354,135 +2082,69 @@ export type TypeMap - fields: Prisma.SalesInvoiceFieldRefs + PurchaseReceiptPayments: { + payload: Prisma.$PurchaseReceiptPaymentsPayload + fields: Prisma.PurchaseReceiptPaymentsFieldRefs operations: { findUnique: { - args: Prisma.SalesInvoiceFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.PurchaseReceiptPaymentsFindUniqueArgs + result: runtime.Types.Utils.PayloadToResult | null } findUniqueOrThrow: { - args: Prisma.SalesInvoiceFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.PurchaseReceiptPaymentsFindUniqueOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findFirst: { - args: Prisma.SalesInvoiceFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null + args: Prisma.PurchaseReceiptPaymentsFindFirstArgs + result: runtime.Types.Utils.PayloadToResult | null } findFirstOrThrow: { - args: Prisma.SalesInvoiceFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.PurchaseReceiptPaymentsFindFirstOrThrowArgs + result: runtime.Types.Utils.PayloadToResult } findMany: { - args: Prisma.SalesInvoiceFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] + args: Prisma.PurchaseReceiptPaymentsFindManyArgs + result: runtime.Types.Utils.PayloadToResult[] } create: { - args: Prisma.SalesInvoiceCreateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.PurchaseReceiptPaymentsCreateArgs + result: runtime.Types.Utils.PayloadToResult } createMany: { - args: Prisma.SalesInvoiceCreateManyArgs + args: Prisma.PurchaseReceiptPaymentsCreateManyArgs result: BatchPayload } delete: { - args: Prisma.SalesInvoiceDeleteArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.PurchaseReceiptPaymentsDeleteArgs + result: runtime.Types.Utils.PayloadToResult } update: { - args: Prisma.SalesInvoiceUpdateArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.PurchaseReceiptPaymentsUpdateArgs + result: runtime.Types.Utils.PayloadToResult } deleteMany: { - args: Prisma.SalesInvoiceDeleteManyArgs + args: Prisma.PurchaseReceiptPaymentsDeleteManyArgs result: BatchPayload } updateMany: { - args: Prisma.SalesInvoiceUpdateManyArgs + args: Prisma.PurchaseReceiptPaymentsUpdateManyArgs result: BatchPayload } upsert: { - args: Prisma.SalesInvoiceUpsertArgs - result: runtime.Types.Utils.PayloadToResult + args: Prisma.PurchaseReceiptPaymentsUpsertArgs + result: runtime.Types.Utils.PayloadToResult } aggregate: { - args: Prisma.SalesInvoiceAggregateArgs - result: runtime.Types.Utils.Optional + args: Prisma.PurchaseReceiptPaymentsAggregateArgs + result: runtime.Types.Utils.Optional } groupBy: { - args: Prisma.SalesInvoiceGroupByArgs - result: runtime.Types.Utils.Optional[] + args: Prisma.PurchaseReceiptPaymentsGroupByArgs + result: runtime.Types.Utils.Optional[] } count: { - args: Prisma.SalesInvoiceCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - SalesInvoiceItem: { - payload: Prisma.$SalesInvoiceItemPayload - fields: Prisma.SalesInvoiceItemFieldRefs - operations: { - findUnique: { - args: Prisma.SalesInvoiceItemFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.SalesInvoiceItemFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.SalesInvoiceItemFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.SalesInvoiceItemFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.SalesInvoiceItemFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.SalesInvoiceItemCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.SalesInvoiceItemCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.SalesInvoiceItemDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.SalesInvoiceItemUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.SalesInvoiceItemDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.SalesInvoiceItemUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.SalesInvoiceItemUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.SalesInvoiceItemAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.SalesInvoiceItemGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.SalesInvoiceItemCountArgs - result: runtime.Types.Utils.Optional | number + args: Prisma.PurchaseReceiptPaymentsCountArgs + result: runtime.Types.Utils.Optional | number } } } @@ -1618,270 +2280,6 @@ export type TypeMap - 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 - } - } - } - 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 - } - } - } StockAdjustment: { payload: Prisma.$StockAdjustmentPayload fields: Prisma.StockAdjustmentFieldRefs @@ -1948,162 +2346,6 @@ export type TypeMap - fields: Prisma.TriggerLogFieldRefs - operations: { - findUnique: { - args: Prisma.TriggerLogFindUniqueArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findUniqueOrThrow: { - args: Prisma.TriggerLogFindUniqueOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findFirst: { - args: Prisma.TriggerLogFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.TriggerLogFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.TriggerLogFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - create: { - args: Prisma.TriggerLogCreateArgs - result: runtime.Types.Utils.PayloadToResult - } - createMany: { - args: Prisma.TriggerLogCreateManyArgs - result: BatchPayload - } - delete: { - args: Prisma.TriggerLogDeleteArgs - result: runtime.Types.Utils.PayloadToResult - } - update: { - args: Prisma.TriggerLogUpdateArgs - result: runtime.Types.Utils.PayloadToResult - } - deleteMany: { - args: Prisma.TriggerLogDeleteManyArgs - result: BatchPayload - } - updateMany: { - args: Prisma.TriggerLogUpdateManyArgs - result: BatchPayload - } - upsert: { - args: Prisma.TriggerLogUpsertArgs - result: runtime.Types.Utils.PayloadToResult - } - aggregate: { - args: Prisma.TriggerLogAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.TriggerLogGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.TriggerLogCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - inventory_overview: { - payload: Prisma.$inventory_overviewPayload - fields: Prisma.inventory_overviewFieldRefs - operations: { - findFirst: { - args: Prisma.inventory_overviewFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.inventory_overviewFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.inventory_overviewFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - aggregate: { - args: Prisma.Inventory_overviewAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.inventory_overviewGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.inventory_overviewCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - stock_cardex: { - payload: Prisma.$stock_cardexPayload - fields: Prisma.stock_cardexFieldRefs - operations: { - findFirst: { - args: Prisma.stock_cardexFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.stock_cardexFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.stock_cardexFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - aggregate: { - args: Prisma.Stock_cardexAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.stock_cardexGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.stock_cardexCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } - stock_view: { - payload: Prisma.$stock_viewPayload - fields: Prisma.stock_viewFieldRefs - operations: { - findFirst: { - args: Prisma.stock_viewFindFirstArgs - result: runtime.Types.Utils.PayloadToResult | null - } - findFirstOrThrow: { - args: Prisma.stock_viewFindFirstOrThrowArgs - result: runtime.Types.Utils.PayloadToResult - } - findMany: { - args: Prisma.stock_viewFindManyArgs - result: runtime.Types.Utils.PayloadToResult[] - } - aggregate: { - args: Prisma.Stock_viewAggregateArgs - result: runtime.Types.Utils.Optional - } - groupBy: { - args: Prisma.stock_viewGroupByArgs - result: runtime.Types.Utils.Optional[] - } - count: { - args: Prisma.stock_viewCountArgs - result: runtime.Types.Utils.Optional | number - } - } - } } } & { other: { @@ -2171,6 +2413,237 @@ export const RoleScalarFieldEnum = { 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 InventoryScalarFieldEnum = { + id: 'id', + name: 'name', + location: 'location', + isActive: 'isActive', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + deletedAt: 'deletedAt', + isPointOfSale: 'isPointOfSale', + bankAccountId: 'bankAccountId' +} as const + +export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum] + + +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 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 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 SupplierScalarFieldEnum = { + id: 'id', + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + mobileNumber: 'mobileNumber', + address: 'address', + city: 'city', + state: 'state', + country: 'country', + isActive: 'isActive', + 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 CustomerScalarFieldEnum = { + id: 'id', + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + mobileNumber: 'mobileNumber', + address: 'address', + city: 'city', + state: 'state', + country: 'country', + isActive: 'isActive', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + deletedAt: 'deletedAt' +} as const + +export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum] + + +export const OrderScalarFieldEnum = { + id: 'id', + orderNumber: 'orderNumber', + status: 'status', + paymentMethod: 'paymentMethod', + totalAmount: 'totalAmount', + description: 'description', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + deletedAt: 'deletedAt', + customerId: 'customerId' +} as const + +export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] + + +export const SalesInvoiceScalarFieldEnum = { + id: 'id', + code: 'code', + totalAmount: 'totalAmount', + description: 'description', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + customerId: 'customerId', + inventoryId: 'inventoryId' +} as const + +export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum] + + +export const SalesInvoiceItemScalarFieldEnum = { + id: 'id', + count: 'count', + fee: 'fee', + total: 'total', + createdAt: 'createdAt', + invoiceId: 'invoiceId', + productId: 'productId' +} as const + +export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum] + + +export const TriggerLogScalarFieldEnum = { + id: 'id', + message: 'message', + createdAt: 'createdAt', + name: 'name' +} as const + +export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum] + + export const ProductVariantScalarFieldEnum = { id: 'id', name: 'name', @@ -2202,9 +2675,9 @@ export const ProductScalarFieldEnum = { createdAt: 'createdAt', updatedAt: 'updatedAt', deletedAt: 'deletedAt', - salePrice: 'salePrice', brandId: 'brandId', - categoryId: 'categoryId' + categoryId: 'categoryId', + salePrice: 'salePrice' } as const export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] @@ -2236,109 +2709,12 @@ export const ProductCategoryScalarFieldEnum = { export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum] -export const SupplierScalarFieldEnum = { - id: 'id', - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum] - - -export const CustomerScalarFieldEnum = { - id: 'id', - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum] - - -export const InventoryScalarFieldEnum = { - id: 'id', - name: 'name', - location: 'location', - isActive: 'isActive', - isPointOfSale: 'isPointOfSale', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum] - - -export const StoreScalarFieldEnum = { - id: 'id', - name: 'name', - location: 'location', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type StoreScalarFieldEnum = (typeof StoreScalarFieldEnum)[keyof typeof StoreScalarFieldEnum] - - -export const ProductChargeScalarFieldEnum = { - id: 'id', - count: 'count', - fee: 'fee', - totalAmount: 'totalAmount', - isSettled: 'isSettled', - buyAt: 'buyAt', - description: 'description', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - productId: 'productId', - inventoryId: 'inventoryId', - supplierId: 'supplierId' -} as const - -export type ProductChargeScalarFieldEnum = (typeof ProductChargeScalarFieldEnum)[keyof typeof ProductChargeScalarFieldEnum] - - -export const OrderScalarFieldEnum = { - id: 'id', - orderNumber: 'orderNumber', - status: 'status', - paymentMethod: 'paymentMethod', - totalAmount: 'totalAmount', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - customerId: 'customerId' -} as const - -export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] - - export const PurchaseReceiptScalarFieldEnum = { id: 'id', code: 'code', totalAmount: 'totalAmount', + paidAmount: 'paidAmount', + isSettled: 'isSettled', description: 'description', createdAt: 'createdAt', updatedAt: 'updatedAt', @@ -2363,31 +2739,18 @@ export const PurchaseReceiptItemScalarFieldEnum = { export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum] -export const SalesInvoiceScalarFieldEnum = { +export const PurchaseReceiptPaymentsScalarFieldEnum = { id: 'id', - code: 'code', - totalAmount: 'totalAmount', + amount: 'amount', + paymentMethod: 'paymentMethod', + bankAccountId: 'bankAccountId', description: 'description', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - customerId: 'customerId', - inventoryId: 'inventoryId' + payedAt: 'payedAt', + receiptId: 'receiptId', + createdAt: 'createdAt' } as const -export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum] - - -export const SalesInvoiceItemScalarFieldEnum = { - id: 'id', - count: 'count', - fee: 'fee', - total: 'total', - createdAt: 'createdAt', - invoiceId: 'invoiceId', - productId: 'productId' -} as const - -export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum] +export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum] export const StockMovementScalarFieldEnum = { @@ -2402,75 +2765,29 @@ export const StockMovementScalarFieldEnum = { productId: 'productId', inventoryId: 'inventoryId', avgCost: 'avgCost', - remainedInStock: 'remainedInStock', supplierId: 'supplierId', - customerId: 'customerId', - counterInventoryId: 'counterInventoryId' + remainedInStock: 'remainedInStock', + counterInventoryId: 'counterInventoryId', + customerId: 'customerId' } as const export type StockMovementScalarFieldEnum = (typeof StockMovementScalarFieldEnum)[keyof typeof StockMovementScalarFieldEnum] export const StockBalanceScalarFieldEnum = { - id: 'id', - productId: 'productId', - inventoryId: 'inventoryId', quantity: 'quantity', - avgCost: 'avgCost', totalCost: 'totalCost', + updatedAt: 'updatedAt', + avgCost: 'avgCost', + inventoryId: 'inventoryId', + productId: 'productId', createdAt: 'createdAt', - updatedAt: 'updatedAt' + id: 'id' } as const export type StockBalanceScalarFieldEnum = (typeof StockBalanceScalarFieldEnum)[keyof typeof StockBalanceScalarFieldEnum] -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 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 StockAdjustmentScalarFieldEnum = { id: 'id', adjustedQuantity: 'adjustedQuantity', @@ -2482,51 +2799,6 @@ export const StockAdjustmentScalarFieldEnum = { export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum] -export const TriggerLogScalarFieldEnum = { - id: 'id', - name: 'name', - message: 'message', - createdAt: 'createdAt' -} as const - -export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum] - - -export const Inventory_overviewScalarFieldEnum = { - ProductId: 'ProductId', - stock_quantity: 'stock_quantity', - avgCost: 'avgCost', - totalCost: 'totalCost', - updatedAt: 'updatedAt' -} as const - -export type Inventory_overviewScalarFieldEnum = (typeof Inventory_overviewScalarFieldEnum)[keyof typeof Inventory_overviewScalarFieldEnum] - - -export const Stock_cardexScalarFieldEnum = { - productId: 'productId', - movement_id: 'movement_id', - type: 'type', - quantity: 'quantity', - fee: 'fee', - totalCost: 'totalCost', - balance_quantity: 'balance_quantity', - balance_avg_cost: 'balance_avg_cost', - createdAt: 'createdAt' -} as const - -export type Stock_cardexScalarFieldEnum = (typeof Stock_cardexScalarFieldEnum)[keyof typeof Stock_cardexScalarFieldEnum] - - -export const Stock_viewScalarFieldEnum = { - productId: 'productId', - inventoryId: 'inventoryId', - stock: 'stock' -} as const - -export type Stock_viewScalarFieldEnum = (typeof Stock_viewScalarFieldEnum)[keyof typeof Stock_viewScalarFieldEnum] - - export const SortOrder = { asc: 'asc', desc: 'desc' @@ -2586,6 +2858,132 @@ export const RoleOrderByRelevanceFieldEnum = { export type RoleOrderByRelevanceFieldEnum = (typeof RoleOrderByRelevanceFieldEnum)[keyof typeof RoleOrderByRelevanceFieldEnum] +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 = { + name: 'name', + code: 'code', + address: 'address' +} 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 InventoryOrderByRelevanceFieldEnum = { + name: 'name', + location: 'location' +} as const + +export type InventoryOrderByRelevanceFieldEnum = (typeof InventoryOrderByRelevanceFieldEnum)[keyof typeof InventoryOrderByRelevanceFieldEnum] + + +export const InventoryTransferOrderByRelevanceFieldEnum = { + code: 'code', + description: 'description' +} as const + +export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum] + + +export const PosAccountOrderByRelevanceFieldEnum = { + name: 'name', + code: 'code', + description: 'description' +} as const + +export type PosAccountOrderByRelevanceFieldEnum = (typeof PosAccountOrderByRelevanceFieldEnum)[keyof typeof PosAccountOrderByRelevanceFieldEnum] + + +export const BankOrderByRelevanceFieldEnum = { + name: 'name', + shortName: 'shortName' +} as const + +export type BankOrderByRelevanceFieldEnum = (typeof BankOrderByRelevanceFieldEnum)[keyof typeof BankOrderByRelevanceFieldEnum] + + +export const SupplierOrderByRelevanceFieldEnum = { + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + mobileNumber: 'mobileNumber', + address: 'address', + city: 'city', + state: 'state', + country: 'country' +} 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 const CustomerOrderByRelevanceFieldEnum = { + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + mobileNumber: 'mobileNumber', + address: 'address', + city: 'city', + state: 'state', + country: 'country' +} as const + +export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum] + + +export const OrderOrderByRelevanceFieldEnum = { + orderNumber: 'orderNumber', + description: 'description' +} as const + +export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum] + + +export const SalesInvoiceOrderByRelevanceFieldEnum = { + code: 'code', + description: 'description' +} as const + +export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum] + + +export const TriggerLogOrderByRelevanceFieldEnum = { + message: 'message', + name: 'name' +} as const + +export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum] + + export const ProductVariantOrderByRelevanceFieldEnum = { name: 'name', description: 'description', @@ -2625,64 +3023,6 @@ export const ProductCategoryOrderByRelevanceFieldEnum = { export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum] -export const SupplierOrderByRelevanceFieldEnum = { - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country' -} as const - -export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum] - - -export const CustomerOrderByRelevanceFieldEnum = { - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country' -} as const - -export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum] - - -export const InventoryOrderByRelevanceFieldEnum = { - name: 'name', - location: 'location' -} as const - -export type InventoryOrderByRelevanceFieldEnum = (typeof InventoryOrderByRelevanceFieldEnum)[keyof typeof InventoryOrderByRelevanceFieldEnum] - - -export const StoreOrderByRelevanceFieldEnum = { - name: 'name', - location: 'location' -} as const - -export type StoreOrderByRelevanceFieldEnum = (typeof StoreOrderByRelevanceFieldEnum)[keyof typeof StoreOrderByRelevanceFieldEnum] - - -export const ProductChargeOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type ProductChargeOrderByRelevanceFieldEnum = (typeof ProductChargeOrderByRelevanceFieldEnum)[keyof typeof ProductChargeOrderByRelevanceFieldEnum] - - -export const OrderOrderByRelevanceFieldEnum = { - orderNumber: 'orderNumber' -} as const - -export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum] - - export const PurchaseReceiptOrderByRelevanceFieldEnum = { code: 'code', description: 'description' @@ -2698,12 +3038,11 @@ export const PurchaseReceiptItemOrderByRelevanceFieldEnum = { export type PurchaseReceiptItemOrderByRelevanceFieldEnum = (typeof PurchaseReceiptItemOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptItemOrderByRelevanceFieldEnum] -export const SalesInvoiceOrderByRelevanceFieldEnum = { - code: 'code', +export const PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = { description: 'description' } as const -export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum] +export type PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = (typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum] export const StockMovementOrderByRelevanceFieldEnum = { @@ -2713,37 +3052,6 @@ export const StockMovementOrderByRelevanceFieldEnum = { export type StockMovementOrderByRelevanceFieldEnum = (typeof StockMovementOrderByRelevanceFieldEnum)[keyof typeof StockMovementOrderByRelevanceFieldEnum] -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 InventoryTransferOrderByRelevanceFieldEnum = { - code: 'code', - description: 'description' -} as const - -export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum] - - -export const TriggerLogOrderByRelevanceFieldEnum = { - name: 'name', - message: 'message' -} as const - -export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum] - - /** * Field references @@ -2785,6 +3093,13 @@ export type EnumQueryModeFieldRefInput<$PrismaModel> = FieldRefInputType<$Prisma +/** + * Reference to a field of type 'Boolean' + */ +export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> + + + /** * Reference to a field of type 'Decimal' */ @@ -2793,9 +3108,9 @@ export type DecimalFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, /** - * Reference to a field of type 'Boolean' + * Reference to a field of type 'ledgerSourceType' */ -export type BooleanFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'Boolean'> +export type EnumledgerSourceTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'ledgerSourceType'> @@ -2807,9 +3122,9 @@ export type EnumOrderStatusFieldRefInput<$PrismaModel> = FieldRefInputType<$Pris /** - * Reference to a field of type 'paymentMethod' + * Reference to a field of type 'payment_method_type' */ -export type EnumpaymentMethodFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'paymentMethod'> +export type Enumpayment_method_typeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'payment_method_type'> @@ -2827,13 +3142,6 @@ export type EnumMovementReferenceTypeFieldRefInput<$PrismaModel> = FieldRefInput -/** - * Reference to a field of type 'stock_cardex_type' - */ -export type Enumstock_cardex_typeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'stock_cardex_type'> - - - /** * Reference to a field of type 'Float' */ @@ -2937,31 +3245,33 @@ export type PrismaClientOptions = ({ export type GlobalOmitConfig = { user?: Prisma.UserOmit role?: Prisma.RoleOmit + otpCode?: Prisma.OtpCodeOmit + refreshToken?: Prisma.RefreshTokenOmit + bankBranch?: Prisma.BankBranchOmit + bankAccount?: Prisma.BankAccountOmit + inventory?: Prisma.InventoryOmit + inventoryTransfer?: Prisma.InventoryTransferOmit + inventoryTransferItem?: Prisma.InventoryTransferItemOmit + inventoryBankAccount?: Prisma.InventoryBankAccountOmit + posAccount?: Prisma.PosAccountOmit + bank?: Prisma.BankOmit + supplier?: Prisma.SupplierOmit + supplierLedger?: Prisma.SupplierLedgerOmit + customer?: Prisma.CustomerOmit + order?: Prisma.OrderOmit + salesInvoice?: Prisma.SalesInvoiceOmit + salesInvoiceItem?: Prisma.SalesInvoiceItemOmit + triggerLog?: Prisma.TriggerLogOmit productVariant?: Prisma.ProductVariantOmit product?: Prisma.ProductOmit productBrand?: Prisma.ProductBrandOmit productCategory?: Prisma.ProductCategoryOmit - supplier?: Prisma.SupplierOmit - customer?: Prisma.CustomerOmit - inventory?: Prisma.InventoryOmit - store?: Prisma.StoreOmit - productCharge?: Prisma.ProductChargeOmit - order?: Prisma.OrderOmit purchaseReceipt?: Prisma.PurchaseReceiptOmit purchaseReceiptItem?: Prisma.PurchaseReceiptItemOmit - salesInvoice?: Prisma.SalesInvoiceOmit - salesInvoiceItem?: Prisma.SalesInvoiceItemOmit + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOmit stockMovement?: Prisma.StockMovementOmit stockBalance?: Prisma.StockBalanceOmit - otpCode?: Prisma.OtpCodeOmit - refreshToken?: Prisma.RefreshTokenOmit - inventoryTransfer?: Prisma.InventoryTransferOmit - inventoryTransferItem?: Prisma.InventoryTransferItemOmit stockAdjustment?: Prisma.StockAdjustmentOmit - triggerLog?: Prisma.TriggerLogOmit - inventory_overview?: Prisma.inventory_overviewOmit - stock_cardex?: Prisma.stock_cardexOmit - stock_view?: Prisma.stock_viewOmit } /* Types for Logging */ diff --git a/src/generated/prisma/internal/prismaNamespaceBrowser.ts b/src/generated/prisma/internal/prismaNamespaceBrowser.ts index dad0b10..934923d 100644 --- a/src/generated/prisma/internal/prismaNamespaceBrowser.ts +++ b/src/generated/prisma/internal/prismaNamespaceBrowser.ts @@ -53,31 +53,33 @@ export const AnyNull = runtime.AnyNull export const ModelName = { User: 'User', Role: 'Role', + OtpCode: 'OtpCode', + RefreshToken: 'RefreshToken', + BankBranch: 'BankBranch', + BankAccount: 'BankAccount', + Inventory: 'Inventory', + InventoryTransfer: 'InventoryTransfer', + InventoryTransferItem: 'InventoryTransferItem', + InventoryBankAccount: 'InventoryBankAccount', + PosAccount: 'PosAccount', + Bank: 'Bank', + Supplier: 'Supplier', + SupplierLedger: 'SupplierLedger', + Customer: 'Customer', + Order: 'Order', + SalesInvoice: 'SalesInvoice', + SalesInvoiceItem: 'SalesInvoiceItem', + TriggerLog: 'TriggerLog', ProductVariant: 'ProductVariant', Product: 'Product', ProductBrand: 'ProductBrand', ProductCategory: 'ProductCategory', - Supplier: 'Supplier', - Customer: 'Customer', - Inventory: 'Inventory', - Store: 'Store', - ProductCharge: 'ProductCharge', - Order: 'Order', PurchaseReceipt: 'PurchaseReceipt', PurchaseReceiptItem: 'PurchaseReceiptItem', - SalesInvoice: 'SalesInvoice', - SalesInvoiceItem: 'SalesInvoiceItem', + PurchaseReceiptPayments: 'PurchaseReceiptPayments', StockMovement: 'StockMovement', StockBalance: 'StockBalance', - OtpCode: 'OtpCode', - RefreshToken: 'RefreshToken', - InventoryTransfer: 'InventoryTransfer', - InventoryTransferItem: 'InventoryTransferItem', - StockAdjustment: 'StockAdjustment', - TriggerLog: 'TriggerLog', - inventory_overview: 'inventory_overview', - stock_cardex: 'stock_cardex', - stock_view: 'stock_view' + StockAdjustment: 'StockAdjustment' } as const export type ModelName = (typeof ModelName)[keyof typeof ModelName] @@ -124,6 +126,237 @@ export const RoleScalarFieldEnum = { 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 InventoryScalarFieldEnum = { + id: 'id', + name: 'name', + location: 'location', + isActive: 'isActive', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + deletedAt: 'deletedAt', + isPointOfSale: 'isPointOfSale', + bankAccountId: 'bankAccountId' +} as const + +export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum] + + +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 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 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 SupplierScalarFieldEnum = { + id: 'id', + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + mobileNumber: 'mobileNumber', + address: 'address', + city: 'city', + state: 'state', + country: 'country', + isActive: 'isActive', + 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 CustomerScalarFieldEnum = { + id: 'id', + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + mobileNumber: 'mobileNumber', + address: 'address', + city: 'city', + state: 'state', + country: 'country', + isActive: 'isActive', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + deletedAt: 'deletedAt' +} as const + +export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum] + + +export const OrderScalarFieldEnum = { + id: 'id', + orderNumber: 'orderNumber', + status: 'status', + paymentMethod: 'paymentMethod', + totalAmount: 'totalAmount', + description: 'description', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + deletedAt: 'deletedAt', + customerId: 'customerId' +} as const + +export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] + + +export const SalesInvoiceScalarFieldEnum = { + id: 'id', + code: 'code', + totalAmount: 'totalAmount', + description: 'description', + createdAt: 'createdAt', + updatedAt: 'updatedAt', + customerId: 'customerId', + inventoryId: 'inventoryId' +} as const + +export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum] + + +export const SalesInvoiceItemScalarFieldEnum = { + id: 'id', + count: 'count', + fee: 'fee', + total: 'total', + createdAt: 'createdAt', + invoiceId: 'invoiceId', + productId: 'productId' +} as const + +export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum] + + +export const TriggerLogScalarFieldEnum = { + id: 'id', + message: 'message', + createdAt: 'createdAt', + name: 'name' +} as const + +export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum] + + export const ProductVariantScalarFieldEnum = { id: 'id', name: 'name', @@ -155,9 +388,9 @@ export const ProductScalarFieldEnum = { createdAt: 'createdAt', updatedAt: 'updatedAt', deletedAt: 'deletedAt', - salePrice: 'salePrice', brandId: 'brandId', - categoryId: 'categoryId' + categoryId: 'categoryId', + salePrice: 'salePrice' } as const export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum] @@ -189,109 +422,12 @@ export const ProductCategoryScalarFieldEnum = { export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum] -export const SupplierScalarFieldEnum = { - id: 'id', - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum] - - -export const CustomerScalarFieldEnum = { - id: 'id', - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum] - - -export const InventoryScalarFieldEnum = { - id: 'id', - name: 'name', - location: 'location', - isActive: 'isActive', - isPointOfSale: 'isPointOfSale', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum] - - -export const StoreScalarFieldEnum = { - id: 'id', - name: 'name', - location: 'location', - isActive: 'isActive', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt' -} as const - -export type StoreScalarFieldEnum = (typeof StoreScalarFieldEnum)[keyof typeof StoreScalarFieldEnum] - - -export const ProductChargeScalarFieldEnum = { - id: 'id', - count: 'count', - fee: 'fee', - totalAmount: 'totalAmount', - isSettled: 'isSettled', - buyAt: 'buyAt', - description: 'description', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - productId: 'productId', - inventoryId: 'inventoryId', - supplierId: 'supplierId' -} as const - -export type ProductChargeScalarFieldEnum = (typeof ProductChargeScalarFieldEnum)[keyof typeof ProductChargeScalarFieldEnum] - - -export const OrderScalarFieldEnum = { - id: 'id', - orderNumber: 'orderNumber', - status: 'status', - paymentMethod: 'paymentMethod', - totalAmount: 'totalAmount', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - deletedAt: 'deletedAt', - customerId: 'customerId' -} as const - -export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum] - - export const PurchaseReceiptScalarFieldEnum = { id: 'id', code: 'code', totalAmount: 'totalAmount', + paidAmount: 'paidAmount', + isSettled: 'isSettled', description: 'description', createdAt: 'createdAt', updatedAt: 'updatedAt', @@ -316,31 +452,18 @@ export const PurchaseReceiptItemScalarFieldEnum = { export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum] -export const SalesInvoiceScalarFieldEnum = { +export const PurchaseReceiptPaymentsScalarFieldEnum = { id: 'id', - code: 'code', - totalAmount: 'totalAmount', + amount: 'amount', + paymentMethod: 'paymentMethod', + bankAccountId: 'bankAccountId', description: 'description', - createdAt: 'createdAt', - updatedAt: 'updatedAt', - customerId: 'customerId', - inventoryId: 'inventoryId' + payedAt: 'payedAt', + receiptId: 'receiptId', + createdAt: 'createdAt' } as const -export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum] - - -export const SalesInvoiceItemScalarFieldEnum = { - id: 'id', - count: 'count', - fee: 'fee', - total: 'total', - createdAt: 'createdAt', - invoiceId: 'invoiceId', - productId: 'productId' -} as const - -export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum] +export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum] export const StockMovementScalarFieldEnum = { @@ -355,75 +478,29 @@ export const StockMovementScalarFieldEnum = { productId: 'productId', inventoryId: 'inventoryId', avgCost: 'avgCost', - remainedInStock: 'remainedInStock', supplierId: 'supplierId', - customerId: 'customerId', - counterInventoryId: 'counterInventoryId' + remainedInStock: 'remainedInStock', + counterInventoryId: 'counterInventoryId', + customerId: 'customerId' } as const export type StockMovementScalarFieldEnum = (typeof StockMovementScalarFieldEnum)[keyof typeof StockMovementScalarFieldEnum] export const StockBalanceScalarFieldEnum = { - id: 'id', - productId: 'productId', - inventoryId: 'inventoryId', quantity: 'quantity', - avgCost: 'avgCost', totalCost: 'totalCost', + updatedAt: 'updatedAt', + avgCost: 'avgCost', + inventoryId: 'inventoryId', + productId: 'productId', createdAt: 'createdAt', - updatedAt: 'updatedAt' + id: 'id' } as const export type StockBalanceScalarFieldEnum = (typeof StockBalanceScalarFieldEnum)[keyof typeof StockBalanceScalarFieldEnum] -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 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 StockAdjustmentScalarFieldEnum = { id: 'id', adjustedQuantity: 'adjustedQuantity', @@ -435,51 +512,6 @@ export const StockAdjustmentScalarFieldEnum = { export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum] -export const TriggerLogScalarFieldEnum = { - id: 'id', - name: 'name', - message: 'message', - createdAt: 'createdAt' -} as const - -export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum] - - -export const Inventory_overviewScalarFieldEnum = { - ProductId: 'ProductId', - stock_quantity: 'stock_quantity', - avgCost: 'avgCost', - totalCost: 'totalCost', - updatedAt: 'updatedAt' -} as const - -export type Inventory_overviewScalarFieldEnum = (typeof Inventory_overviewScalarFieldEnum)[keyof typeof Inventory_overviewScalarFieldEnum] - - -export const Stock_cardexScalarFieldEnum = { - productId: 'productId', - movement_id: 'movement_id', - type: 'type', - quantity: 'quantity', - fee: 'fee', - totalCost: 'totalCost', - balance_quantity: 'balance_quantity', - balance_avg_cost: 'balance_avg_cost', - createdAt: 'createdAt' -} as const - -export type Stock_cardexScalarFieldEnum = (typeof Stock_cardexScalarFieldEnum)[keyof typeof Stock_cardexScalarFieldEnum] - - -export const Stock_viewScalarFieldEnum = { - productId: 'productId', - inventoryId: 'inventoryId', - stock: 'stock' -} as const - -export type Stock_viewScalarFieldEnum = (typeof Stock_viewScalarFieldEnum)[keyof typeof Stock_viewScalarFieldEnum] - - export const SortOrder = { asc: 'asc', desc: 'desc' @@ -539,6 +571,132 @@ export const RoleOrderByRelevanceFieldEnum = { export type RoleOrderByRelevanceFieldEnum = (typeof RoleOrderByRelevanceFieldEnum)[keyof typeof RoleOrderByRelevanceFieldEnum] +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 = { + name: 'name', + code: 'code', + address: 'address' +} 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 InventoryOrderByRelevanceFieldEnum = { + name: 'name', + location: 'location' +} as const + +export type InventoryOrderByRelevanceFieldEnum = (typeof InventoryOrderByRelevanceFieldEnum)[keyof typeof InventoryOrderByRelevanceFieldEnum] + + +export const InventoryTransferOrderByRelevanceFieldEnum = { + code: 'code', + description: 'description' +} as const + +export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum] + + +export const PosAccountOrderByRelevanceFieldEnum = { + name: 'name', + code: 'code', + description: 'description' +} as const + +export type PosAccountOrderByRelevanceFieldEnum = (typeof PosAccountOrderByRelevanceFieldEnum)[keyof typeof PosAccountOrderByRelevanceFieldEnum] + + +export const BankOrderByRelevanceFieldEnum = { + name: 'name', + shortName: 'shortName' +} as const + +export type BankOrderByRelevanceFieldEnum = (typeof BankOrderByRelevanceFieldEnum)[keyof typeof BankOrderByRelevanceFieldEnum] + + +export const SupplierOrderByRelevanceFieldEnum = { + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + mobileNumber: 'mobileNumber', + address: 'address', + city: 'city', + state: 'state', + country: 'country' +} 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 const CustomerOrderByRelevanceFieldEnum = { + firstName: 'firstName', + lastName: 'lastName', + email: 'email', + mobileNumber: 'mobileNumber', + address: 'address', + city: 'city', + state: 'state', + country: 'country' +} as const + +export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum] + + +export const OrderOrderByRelevanceFieldEnum = { + orderNumber: 'orderNumber', + description: 'description' +} as const + +export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum] + + +export const SalesInvoiceOrderByRelevanceFieldEnum = { + code: 'code', + description: 'description' +} as const + +export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum] + + +export const TriggerLogOrderByRelevanceFieldEnum = { + message: 'message', + name: 'name' +} as const + +export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum] + + export const ProductVariantOrderByRelevanceFieldEnum = { name: 'name', description: 'description', @@ -578,64 +736,6 @@ export const ProductCategoryOrderByRelevanceFieldEnum = { export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum] -export const SupplierOrderByRelevanceFieldEnum = { - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country' -} as const - -export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum] - - -export const CustomerOrderByRelevanceFieldEnum = { - firstName: 'firstName', - lastName: 'lastName', - email: 'email', - mobileNumber: 'mobileNumber', - address: 'address', - city: 'city', - state: 'state', - country: 'country' -} as const - -export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum] - - -export const InventoryOrderByRelevanceFieldEnum = { - name: 'name', - location: 'location' -} as const - -export type InventoryOrderByRelevanceFieldEnum = (typeof InventoryOrderByRelevanceFieldEnum)[keyof typeof InventoryOrderByRelevanceFieldEnum] - - -export const StoreOrderByRelevanceFieldEnum = { - name: 'name', - location: 'location' -} as const - -export type StoreOrderByRelevanceFieldEnum = (typeof StoreOrderByRelevanceFieldEnum)[keyof typeof StoreOrderByRelevanceFieldEnum] - - -export const ProductChargeOrderByRelevanceFieldEnum = { - description: 'description' -} as const - -export type ProductChargeOrderByRelevanceFieldEnum = (typeof ProductChargeOrderByRelevanceFieldEnum)[keyof typeof ProductChargeOrderByRelevanceFieldEnum] - - -export const OrderOrderByRelevanceFieldEnum = { - orderNumber: 'orderNumber' -} as const - -export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum] - - export const PurchaseReceiptOrderByRelevanceFieldEnum = { code: 'code', description: 'description' @@ -651,12 +751,11 @@ export const PurchaseReceiptItemOrderByRelevanceFieldEnum = { export type PurchaseReceiptItemOrderByRelevanceFieldEnum = (typeof PurchaseReceiptItemOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptItemOrderByRelevanceFieldEnum] -export const SalesInvoiceOrderByRelevanceFieldEnum = { - code: 'code', +export const PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = { description: 'description' } as const -export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum] +export type PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = (typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum] export const StockMovementOrderByRelevanceFieldEnum = { @@ -665,34 +764,3 @@ export const StockMovementOrderByRelevanceFieldEnum = { export type StockMovementOrderByRelevanceFieldEnum = (typeof StockMovementOrderByRelevanceFieldEnum)[keyof typeof StockMovementOrderByRelevanceFieldEnum] - -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 InventoryTransferOrderByRelevanceFieldEnum = { - code: 'code', - description: 'description' -} as const - -export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum] - - -export const TriggerLogOrderByRelevanceFieldEnum = { - name: 'name', - message: 'message' -} as const - -export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum] - diff --git a/src/generated/prisma/models.ts b/src/generated/prisma/models.ts index fe26eb1..7d525f0 100644 --- a/src/generated/prisma/models.ts +++ b/src/generated/prisma/models.ts @@ -10,29 +10,31 @@ */ 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/Inventory.js' +export type * from './models/InventoryTransfer.js' +export type * from './models/InventoryTransferItem.js' +export type * from './models/InventoryBankAccount.js' +export type * from './models/PosAccount.js' +export type * from './models/Bank.js' +export type * from './models/Supplier.js' +export type * from './models/SupplierLedger.js' +export type * from './models/Customer.js' +export type * from './models/Order.js' +export type * from './models/SalesInvoice.js' +export type * from './models/SalesInvoiceItem.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/Supplier.js' -export type * from './models/Customer.js' -export type * from './models/Inventory.js' -export type * from './models/Store.js' -export type * from './models/ProductCharge.js' -export type * from './models/Order.js' export type * from './models/PurchaseReceipt.js' export type * from './models/PurchaseReceiptItem.js' -export type * from './models/SalesInvoice.js' -export type * from './models/SalesInvoiceItem.js' +export type * from './models/PurchaseReceiptPayments.js' export type * from './models/StockMovement.js' export type * from './models/StockBalance.js' -export type * from './models/OtpCode.js' -export type * from './models/RefreshToken.js' -export type * from './models/InventoryTransfer.js' -export type * from './models/InventoryTransferItem.js' export type * from './models/StockAdjustment.js' -export type * from './models/TriggerLog.js' -export type * from './models/inventory_overview.js' -export type * from './models/stock_cardex.js' -export type * from './models/stock_view.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 new file mode 100644 index 0000000..0a03c9f --- /dev/null +++ b/src/generated/prisma/models/Bank.ts @@ -0,0 +1,1283 @@ + +/* !!! 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 new file mode 100644 index 0000000..9a0dc68 --- /dev/null +++ b/src/generated/prisma/models/BankAccount.ts @@ -0,0 +1,2016 @@ + +/* !!! 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 + inventories?: Prisma.InventoryListRelationFilter + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter + posAccounts?: Prisma.PosAccountListRelationFilter + inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter +} + +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 + inventories?: Prisma.InventoryOrderByRelationAggregateInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput + posAccounts?: Prisma.PosAccountOrderByRelationAggregateInput + inventoryBankAccounts?: Prisma.InventoryBankAccountOrderByRelationAggregateInput + _relevance?: Prisma.BankAccountOrderByRelevanceInput +} + +export type BankAccountWhereUniqueInput = Prisma.AtLeast<{ + id?: number + accountNumber?: string + cardNumber?: string + AND?: Prisma.BankAccountWhereInput | Prisma.BankAccountWhereInput[] + OR?: Prisma.BankAccountWhereInput[] + NOT?: Prisma.BankAccountWhereInput | Prisma.BankAccountWhereInput[] + 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 + inventories?: Prisma.InventoryListRelationFilter + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter + posAccounts?: Prisma.PosAccountListRelationFilter + inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter +}, "id" | "accountNumber" | "cardNumber"> + +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 + inventories?: Prisma.InventoryCreateNestedManyWithoutBankAccountsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput +} + +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 + inventories?: Prisma.InventoryUncheckedCreateNestedManyWithoutBankAccountsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput +} + +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 + inventories?: Prisma.InventoryUpdateManyWithoutBankAccountsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput +} + +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 + inventories?: Prisma.InventoryUncheckedUpdateManyWithoutBankAccountsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput +} + +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 BankAccountNullableScalarRelationFilter = { + is?: Prisma.BankAccountWhereInput | null + isNot?: Prisma.BankAccountWhereInput | null +} + +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 BankAccountCreateNestedManyWithoutInventoriesInput = { + create?: Prisma.XOR | Prisma.BankAccountCreateWithoutInventoriesInput[] | Prisma.BankAccountUncheckedCreateWithoutInventoriesInput[] + connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutInventoriesInput | Prisma.BankAccountCreateOrConnectWithoutInventoriesInput[] + connect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] +} + +export type BankAccountUncheckedCreateNestedManyWithoutInventoriesInput = { + create?: Prisma.XOR | Prisma.BankAccountCreateWithoutInventoriesInput[] | Prisma.BankAccountUncheckedCreateWithoutInventoriesInput[] + connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutInventoriesInput | Prisma.BankAccountCreateOrConnectWithoutInventoriesInput[] + connect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] +} + +export type BankAccountUpdateManyWithoutInventoriesNestedInput = { + create?: Prisma.XOR | Prisma.BankAccountCreateWithoutInventoriesInput[] | Prisma.BankAccountUncheckedCreateWithoutInventoriesInput[] + connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutInventoriesInput | Prisma.BankAccountCreateOrConnectWithoutInventoriesInput[] + upsert?: Prisma.BankAccountUpsertWithWhereUniqueWithoutInventoriesInput | Prisma.BankAccountUpsertWithWhereUniqueWithoutInventoriesInput[] + set?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] + disconnect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] + delete?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] + connect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] + update?: Prisma.BankAccountUpdateWithWhereUniqueWithoutInventoriesInput | Prisma.BankAccountUpdateWithWhereUniqueWithoutInventoriesInput[] + updateMany?: Prisma.BankAccountUpdateManyWithWhereWithoutInventoriesInput | Prisma.BankAccountUpdateManyWithWhereWithoutInventoriesInput[] + deleteMany?: Prisma.BankAccountScalarWhereInput | Prisma.BankAccountScalarWhereInput[] +} + +export type BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput = { + create?: Prisma.XOR | Prisma.BankAccountCreateWithoutInventoriesInput[] | Prisma.BankAccountUncheckedCreateWithoutInventoriesInput[] + connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutInventoriesInput | Prisma.BankAccountCreateOrConnectWithoutInventoriesInput[] + upsert?: Prisma.BankAccountUpsertWithWhereUniqueWithoutInventoriesInput | Prisma.BankAccountUpsertWithWhereUniqueWithoutInventoriesInput[] + set?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] + disconnect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] + delete?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] + connect?: Prisma.BankAccountWhereUniqueInput | Prisma.BankAccountWhereUniqueInput[] + update?: Prisma.BankAccountUpdateWithWhereUniqueWithoutInventoriesInput | Prisma.BankAccountUpdateWithWhereUniqueWithoutInventoriesInput[] + updateMany?: Prisma.BankAccountUpdateManyWithWhereWithoutInventoriesInput | Prisma.BankAccountUpdateManyWithWhereWithoutInventoriesInput[] + deleteMany?: Prisma.BankAccountScalarWhereInput | Prisma.BankAccountScalarWhereInput[] +} + +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 BankAccountCreateNestedOneWithoutPosAccountsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutPosAccountsInput + connect?: Prisma.BankAccountWhereUniqueInput +} + +export type BankAccountUpdateOneWithoutPosAccountsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutPosAccountsInput + upsert?: Prisma.BankAccountUpsertWithoutPosAccountsInput + disconnect?: Prisma.BankAccountWhereInput | boolean + delete?: Prisma.BankAccountWhereInput | boolean + connect?: Prisma.BankAccountWhereUniqueInput + update?: Prisma.XOR, Prisma.BankAccountUncheckedUpdateWithoutPosAccountsInput> +} + +export type BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput + connect?: Prisma.BankAccountWhereUniqueInput +} + +export type BankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput + upsert?: Prisma.BankAccountUpsertWithoutPurchaseReceiptPaymentsInput + disconnect?: Prisma.BankAccountWhereInput | boolean + delete?: Prisma.BankAccountWhereInput | boolean + 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 + inventories?: Prisma.InventoryCreateNestedManyWithoutBankAccountsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput +} + +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 + inventories?: Prisma.InventoryUncheckedCreateNestedManyWithoutBankAccountsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput +} + +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 BankAccountCreateWithoutInventoriesInput = { + 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 + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput +} + +export type BankAccountUncheckedCreateWithoutInventoriesInput = { + 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 + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput +} + +export type BankAccountCreateOrConnectWithoutInventoriesInput = { + where: Prisma.BankAccountWhereUniqueInput + create: Prisma.XOR +} + +export type BankAccountUpsertWithWhereUniqueWithoutInventoriesInput = { + where: Prisma.BankAccountWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type BankAccountUpdateWithWhereUniqueWithoutInventoriesInput = { + where: Prisma.BankAccountWhereUniqueInput + data: Prisma.XOR +} + +export type BankAccountUpdateManyWithWhereWithoutInventoriesInput = { + where: Prisma.BankAccountScalarWhereInput + data: Prisma.XOR +} + +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 + inventories?: Prisma.InventoryCreateNestedManyWithoutBankAccountsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutBankAccountInput +} + +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 + inventories?: Prisma.InventoryUncheckedCreateNestedManyWithoutBankAccountsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutBankAccountInput +} + +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 + inventories?: Prisma.InventoryUpdateManyWithoutBankAccountsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutBankAccountNestedInput +} + +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 + inventories?: Prisma.InventoryUncheckedUpdateManyWithoutBankAccountsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutBankAccountNestedInput +} + +export type BankAccountCreateWithoutPosAccountsInput = { + accountNumber?: string | null + cardNumber?: string | null + name: string + iban?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput + inventories?: Prisma.InventoryCreateNestedManyWithoutBankAccountsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput +} + +export type BankAccountUncheckedCreateWithoutPosAccountsInput = { + 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 + inventories?: Prisma.InventoryUncheckedCreateNestedManyWithoutBankAccountsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput +} + +export type BankAccountCreateOrConnectWithoutPosAccountsInput = { + where: Prisma.BankAccountWhereUniqueInput + create: Prisma.XOR +} + +export type BankAccountUpsertWithoutPosAccountsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.BankAccountWhereInput +} + +export type BankAccountUpdateToOneWithWhereWithoutPosAccountsInput = { + where?: Prisma.BankAccountWhereInput + data: Prisma.XOR +} + +export type BankAccountUpdateWithoutPosAccountsInput = { + 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 + inventories?: Prisma.InventoryUpdateManyWithoutBankAccountsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput +} + +export type BankAccountUncheckedUpdateWithoutPosAccountsInput = { + 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 + inventories?: Prisma.InventoryUncheckedUpdateManyWithoutBankAccountsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput +} + +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 + inventories?: Prisma.InventoryCreateNestedManyWithoutBankAccountsInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput +} + +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 + inventories?: Prisma.InventoryUncheckedCreateNestedManyWithoutBankAccountsInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutBankAccountInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput +} + +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 + inventories?: Prisma.InventoryUpdateManyWithoutBankAccountsNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput +} + +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 + inventories?: Prisma.InventoryUncheckedUpdateManyWithoutBankAccountsNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput +} + +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 + inventories?: Prisma.InventoryUpdateManyWithoutBankAccountsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput +} + +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 + inventories?: Prisma.InventoryUncheckedUpdateManyWithoutBankAccountsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput +} + +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 +} + +export type BankAccountUpdateWithoutInventoriesInput = { + 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 + posAccounts?: Prisma.PosAccountUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput +} + +export type BankAccountUncheckedUpdateWithoutInventoriesInput = { + 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 + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutBankAccountNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput +} + +export type BankAccountUncheckedUpdateManyWithoutInventoriesInput = { + 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 +} + + +/** + * Count Type BankAccountCountOutputType + */ + +export type BankAccountCountOutputType = { + inventories: number + purchaseReceiptPayments: number + posAccounts: number + inventoryBankAccounts: number +} + +export type BankAccountCountOutputTypeSelect = { + inventories?: boolean | BankAccountCountOutputTypeCountInventoriesArgs + purchaseReceiptPayments?: boolean | BankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs + posAccounts?: boolean | BankAccountCountOutputTypeCountPosAccountsArgs + inventoryBankAccounts?: boolean | BankAccountCountOutputTypeCountInventoryBankAccountsArgs +} + +/** + * BankAccountCountOutputType without action + */ +export type BankAccountCountOutputTypeDefaultArgs = { + /** + * Select specific fields to fetch from the BankAccountCountOutputType + */ + select?: Prisma.BankAccountCountOutputTypeSelect | null +} + +/** + * BankAccountCountOutputType without action + */ +export type BankAccountCountOutputTypeCountInventoriesArgs = { + where?: Prisma.InventoryWhereInput +} + +/** + * BankAccountCountOutputType without action + */ +export type BankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs = { + where?: Prisma.PurchaseReceiptPaymentsWhereInput +} + +/** + * BankAccountCountOutputType without action + */ +export type BankAccountCountOutputTypeCountPosAccountsArgs = { + where?: Prisma.PosAccountWhereInput +} + +/** + * BankAccountCountOutputType without action + */ +export type BankAccountCountOutputTypeCountInventoryBankAccountsArgs = { + where?: Prisma.InventoryBankAccountWhereInput +} + + +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 + inventories?: boolean | Prisma.BankAccount$inventoriesArgs + purchaseReceiptPayments?: boolean | Prisma.BankAccount$purchaseReceiptPaymentsArgs + posAccounts?: boolean | Prisma.BankAccount$posAccountsArgs + inventoryBankAccounts?: boolean | Prisma.BankAccount$inventoryBankAccountsArgs + _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 + inventories?: boolean | Prisma.BankAccount$inventoriesArgs + purchaseReceiptPayments?: boolean | Prisma.BankAccount$purchaseReceiptPaymentsArgs + posAccounts?: boolean | Prisma.BankAccount$posAccountsArgs + inventoryBankAccounts?: boolean | Prisma.BankAccount$inventoryBankAccountsArgs + _count?: boolean | Prisma.BankAccountCountOutputTypeDefaultArgs +} + +export type $BankAccountPayload = { + name: "BankAccount" + objects: { + branch: Prisma.$BankBranchPayload + inventories: Prisma.$InventoryPayload[] + purchaseReceiptPayments: Prisma.$PurchaseReceiptPaymentsPayload[] + posAccounts: Prisma.$PosAccountPayload[] + inventoryBankAccounts: Prisma.$InventoryBankAccountPayload[] + } + 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> + inventories = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + purchaseReceiptPayments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + posAccounts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + inventoryBankAccounts = {}>(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.inventories + */ +export type BankAccount$inventoriesArgs = { + /** + * 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 + orderBy?: Prisma.InventoryOrderByWithRelationInput | Prisma.InventoryOrderByWithRelationInput[] + cursor?: Prisma.InventoryWhereUniqueInput + take?: number + skip?: number + distinct?: Prisma.InventoryScalarFieldEnum | Prisma.InventoryScalarFieldEnum[] +} + +/** + * 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.posAccounts + */ +export type BankAccount$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[] +} + +/** + * 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 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/BankBranch.ts b/src/generated/prisma/models/BankBranch.ts new file mode 100644 index 0000000..0cc1a06 --- /dev/null +++ b/src/generated/prisma/models/BankBranch.ts @@ -0,0 +1,1509 @@ + +/* !!! 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/Inventory.ts b/src/generated/prisma/models/Inventory.ts index 241fccb..a539d59 100644 --- a/src/generated/prisma/models/Inventory.ts +++ b/src/generated/prisma/models/Inventory.ts @@ -28,10 +28,12 @@ export type AggregateInventory = { export type InventoryAvgAggregateOutputType = { id: number | null + bankAccountId: number | null } export type InventorySumAggregateOutputType = { id: number | null + bankAccountId: number | null } export type InventoryMinAggregateOutputType = { @@ -39,10 +41,11 @@ export type InventoryMinAggregateOutputType = { name: string | null location: string | null isActive: boolean | null - isPointOfSale: boolean | null createdAt: Date | null updatedAt: Date | null deletedAt: Date | null + isPointOfSale: boolean | null + bankAccountId: number | null } export type InventoryMaxAggregateOutputType = { @@ -50,10 +53,11 @@ export type InventoryMaxAggregateOutputType = { name: string | null location: string | null isActive: boolean | null - isPointOfSale: boolean | null createdAt: Date | null updatedAt: Date | null deletedAt: Date | null + isPointOfSale: boolean | null + bankAccountId: number | null } export type InventoryCountAggregateOutputType = { @@ -61,20 +65,23 @@ export type InventoryCountAggregateOutputType = { name: number location: number isActive: number - isPointOfSale: number createdAt: number updatedAt: number deletedAt: number + isPointOfSale: number + bankAccountId: number _all: number } export type InventoryAvgAggregateInputType = { id?: true + bankAccountId?: true } export type InventorySumAggregateInputType = { id?: true + bankAccountId?: true } export type InventoryMinAggregateInputType = { @@ -82,10 +89,11 @@ export type InventoryMinAggregateInputType = { name?: true location?: true isActive?: true - isPointOfSale?: true createdAt?: true updatedAt?: true deletedAt?: true + isPointOfSale?: true + bankAccountId?: true } export type InventoryMaxAggregateInputType = { @@ -93,10 +101,11 @@ export type InventoryMaxAggregateInputType = { name?: true location?: true isActive?: true - isPointOfSale?: true createdAt?: true updatedAt?: true deletedAt?: true + isPointOfSale?: true + bankAccountId?: true } export type InventoryCountAggregateInputType = { @@ -104,10 +113,11 @@ export type InventoryCountAggregateInputType = { name?: true location?: true isActive?: true - isPointOfSale?: true createdAt?: true updatedAt?: true deletedAt?: true + isPointOfSale?: true + bankAccountId?: true _all?: true } @@ -202,10 +212,11 @@ export type InventoryGroupByOutputType = { name: string location: string | null isActive: boolean - isPointOfSale: boolean createdAt: Date updatedAt: Date deletedAt: Date | null + isPointOfSale: boolean + bankAccountId: number | null _count: InventoryCountAggregateOutputType | null _avg: InventoryAvgAggregateOutputType | null _sum: InventorySumAggregateOutputType | null @@ -236,19 +247,22 @@ export type InventoryWhereInput = { name?: Prisma.StringFilter<"Inventory"> | string location?: Prisma.StringNullableFilter<"Inventory"> | string | null isActive?: Prisma.BoolFilter<"Inventory"> | boolean - isPointOfSale?: 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 + bankAccountId?: Prisma.IntNullableFilter<"Inventory"> | number | null inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter - productCharges?: Prisma.ProductChargeListRelationFilter purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter - stockAdjustments?: Prisma.StockAdjustmentListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter - counterStockMovements?: Prisma.StockMovementListRelationFilter - stockBalances?: Prisma.StockBalanceListRelationFilter salesInvoices?: Prisma.SalesInvoiceListRelationFilter + stockAdjustments?: Prisma.StockAdjustmentListRelationFilter + stockBalances?: Prisma.StockBalanceListRelationFilter + counterStockMovements?: Prisma.StockMovementListRelationFilter + stockMovements?: Prisma.StockMovementListRelationFilter + bankAccounts?: Prisma.BankAccountListRelationFilter + posAccounts?: Prisma.PosAccountListRelationFilter + inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter } export type InventoryOrderByWithRelationInput = { @@ -256,19 +270,22 @@ export type InventoryOrderByWithRelationInput = { name?: Prisma.SortOrder location?: Prisma.SortOrderInput | Prisma.SortOrder isActive?: Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + isPointOfSale?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder inventoryTransfersFrom?: Prisma.InventoryTransferOrderByRelationAggregateInput inventoryTransfersTo?: Prisma.InventoryTransferOrderByRelationAggregateInput - productCharges?: Prisma.ProductChargeOrderByRelationAggregateInput purchaseReceipts?: Prisma.PurchaseReceiptOrderByRelationAggregateInput - stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput - stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput - counterStockMovements?: Prisma.StockMovementOrderByRelationAggregateInput - stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput + stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput + stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput + counterStockMovements?: Prisma.StockMovementOrderByRelationAggregateInput + stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput + bankAccounts?: Prisma.BankAccountOrderByRelationAggregateInput + posAccounts?: Prisma.PosAccountOrderByRelationAggregateInput + inventoryBankAccounts?: Prisma.InventoryBankAccountOrderByRelationAggregateInput _relevance?: Prisma.InventoryOrderByRelevanceInput } @@ -280,19 +297,22 @@ export type InventoryWhereUniqueInput = Prisma.AtLeast<{ name?: Prisma.StringFilter<"Inventory"> | string location?: Prisma.StringNullableFilter<"Inventory"> | string | null isActive?: Prisma.BoolFilter<"Inventory"> | boolean - isPointOfSale?: 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 + bankAccountId?: Prisma.IntNullableFilter<"Inventory"> | number | null inventoryTransfersFrom?: Prisma.InventoryTransferListRelationFilter inventoryTransfersTo?: Prisma.InventoryTransferListRelationFilter - productCharges?: Prisma.ProductChargeListRelationFilter purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter - stockAdjustments?: Prisma.StockAdjustmentListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter - counterStockMovements?: Prisma.StockMovementListRelationFilter - stockBalances?: Prisma.StockBalanceListRelationFilter salesInvoices?: Prisma.SalesInvoiceListRelationFilter + stockAdjustments?: Prisma.StockAdjustmentListRelationFilter + stockBalances?: Prisma.StockBalanceListRelationFilter + counterStockMovements?: Prisma.StockMovementListRelationFilter + stockMovements?: Prisma.StockMovementListRelationFilter + bankAccounts?: Prisma.BankAccountListRelationFilter + posAccounts?: Prisma.PosAccountListRelationFilter + inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter }, "id"> export type InventoryOrderByWithAggregationInput = { @@ -300,10 +320,11 @@ export type InventoryOrderByWithAggregationInput = { name?: Prisma.SortOrder location?: Prisma.SortOrderInput | Prisma.SortOrder isActive?: Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + isPointOfSale?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder _count?: Prisma.InventoryCountOrderByAggregateInput _avg?: Prisma.InventoryAvgOrderByAggregateInput _max?: Prisma.InventoryMaxOrderByAggregateInput @@ -319,29 +340,33 @@ export type InventoryScalarWhereWithAggregatesInput = { name?: Prisma.StringWithAggregatesFilter<"Inventory"> | string location?: Prisma.StringNullableWithAggregatesFilter<"Inventory"> | string | null isActive?: Prisma.BoolWithAggregatesFilter<"Inventory"> | boolean - isPointOfSale?: 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 + bankAccountId?: Prisma.IntNullableWithAggregatesFilter<"Inventory"> | number | null } export type InventoryCreateInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput } export type InventoryUncheckedCreateInput = { @@ -349,38 +374,44 @@ export type InventoryUncheckedCreateInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput } export type InventoryUpdateInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput } export type InventoryUncheckedUpdateInput = { @@ -388,19 +419,22 @@ export type InventoryUncheckedUpdateInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput } export type InventoryCreateManyInput = { @@ -408,20 +442,22 @@ export type InventoryCreateManyInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null } export type InventoryUpdateManyMutationInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null } export type InventoryUncheckedUpdateManyInput = { @@ -429,10 +465,21 @@ export type InventoryUncheckedUpdateManyInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null +} + +export type InventoryListRelationFilter = { + every?: Prisma.InventoryWhereInput + some?: Prisma.InventoryWhereInput + none?: Prisma.InventoryWhereInput +} + +export type InventoryOrderByRelationAggregateInput = { + _count?: Prisma.SortOrder } export type InventoryOrderByRelevanceInput = { @@ -446,14 +493,16 @@ export type InventoryCountOrderByAggregateInput = { name?: Prisma.SortOrder location?: Prisma.SortOrder isActive?: Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder + isPointOfSale?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder } export type InventoryAvgOrderByAggregateInput = { id?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder } export type InventoryMaxOrderByAggregateInput = { @@ -461,10 +510,11 @@ export type InventoryMaxOrderByAggregateInput = { name?: Prisma.SortOrder location?: Prisma.SortOrder isActive?: Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder + isPointOfSale?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder } export type InventoryMinOrderByAggregateInput = { @@ -472,14 +522,16 @@ export type InventoryMinOrderByAggregateInput = { name?: Prisma.SortOrder location?: Prisma.SortOrder isActive?: Prisma.SortOrder - isPointOfSale?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder + isPointOfSale?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder } export type InventorySumOrderByAggregateInput = { id?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder } export type InventoryScalarRelationFilter = { @@ -492,90 +544,50 @@ export type InventoryNullableScalarRelationFilter = { isNot?: Prisma.InventoryWhereInput | null } -export type InventoryCreateNestedOneWithoutProductChargesInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutProductChargesInput - connect?: Prisma.InventoryWhereUniqueInput +export type InventoryCreateNestedManyWithoutBankAccountsInput = { + create?: Prisma.XOR | Prisma.InventoryCreateWithoutBankAccountsInput[] | Prisma.InventoryUncheckedCreateWithoutBankAccountsInput[] + connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutBankAccountsInput | Prisma.InventoryCreateOrConnectWithoutBankAccountsInput[] + connect?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] } -export type InventoryUpdateOneRequiredWithoutProductChargesNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutProductChargesInput - upsert?: Prisma.InventoryUpsertWithoutProductChargesInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutProductChargesInput> +export type InventoryUncheckedCreateNestedManyWithoutBankAccountsInput = { + create?: Prisma.XOR | Prisma.InventoryCreateWithoutBankAccountsInput[] | Prisma.InventoryUncheckedCreateWithoutBankAccountsInput[] + connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutBankAccountsInput | Prisma.InventoryCreateOrConnectWithoutBankAccountsInput[] + connect?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] } -export type InventoryCreateNestedOneWithoutPurchaseReceiptsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutPurchaseReceiptsInput - connect?: Prisma.InventoryWhereUniqueInput +export type InventoryUpdateManyWithoutBankAccountsNestedInput = { + create?: Prisma.XOR | Prisma.InventoryCreateWithoutBankAccountsInput[] | Prisma.InventoryUncheckedCreateWithoutBankAccountsInput[] + connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutBankAccountsInput | Prisma.InventoryCreateOrConnectWithoutBankAccountsInput[] + upsert?: Prisma.InventoryUpsertWithWhereUniqueWithoutBankAccountsInput | Prisma.InventoryUpsertWithWhereUniqueWithoutBankAccountsInput[] + set?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] + disconnect?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] + delete?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] + connect?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] + update?: Prisma.InventoryUpdateWithWhereUniqueWithoutBankAccountsInput | Prisma.InventoryUpdateWithWhereUniqueWithoutBankAccountsInput[] + updateMany?: Prisma.InventoryUpdateManyWithWhereWithoutBankAccountsInput | Prisma.InventoryUpdateManyWithWhereWithoutBankAccountsInput[] + deleteMany?: Prisma.InventoryScalarWhereInput | Prisma.InventoryScalarWhereInput[] } -export type InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutPurchaseReceiptsInput - upsert?: Prisma.InventoryUpsertWithoutPurchaseReceiptsInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutPurchaseReceiptsInput> +export type InventoryUncheckedUpdateManyWithoutBankAccountsNestedInput = { + create?: Prisma.XOR | Prisma.InventoryCreateWithoutBankAccountsInput[] | Prisma.InventoryUncheckedCreateWithoutBankAccountsInput[] + connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutBankAccountsInput | Prisma.InventoryCreateOrConnectWithoutBankAccountsInput[] + upsert?: Prisma.InventoryUpsertWithWhereUniqueWithoutBankAccountsInput | Prisma.InventoryUpsertWithWhereUniqueWithoutBankAccountsInput[] + set?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] + disconnect?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] + delete?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] + connect?: Prisma.InventoryWhereUniqueInput | Prisma.InventoryWhereUniqueInput[] + update?: Prisma.InventoryUpdateWithWhereUniqueWithoutBankAccountsInput | Prisma.InventoryUpdateWithWhereUniqueWithoutBankAccountsInput[] + updateMany?: Prisma.InventoryUpdateManyWithWhereWithoutBankAccountsInput | Prisma.InventoryUpdateManyWithWhereWithoutBankAccountsInput[] + deleteMany?: Prisma.InventoryScalarWhereInput | Prisma.InventoryScalarWhereInput[] } -export type InventoryCreateNestedOneWithoutSalesInvoicesInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutSalesInvoicesInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutSalesInvoicesInput - upsert?: Prisma.InventoryUpsertWithoutSalesInvoicesInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutSalesInvoicesInput> -} - -export type InventoryCreateNestedOneWithoutStockMovementsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockMovementsInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryCreateNestedOneWithoutCounterStockMovementsInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutCounterStockMovementsInput - connect?: Prisma.InventoryWhereUniqueInput -} - -export type InventoryUpdateOneRequiredWithoutStockMovementsNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockMovementsInput - upsert?: Prisma.InventoryUpsertWithoutStockMovementsInput - connect?: Prisma.InventoryWhereUniqueInput - update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutStockMovementsInput> -} - -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 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 NullableIntFieldUpdateOperationsInput = { + set?: number | null + increment?: number + decrement?: number + multiply?: number + divide?: number } export type InventoryCreateNestedOneWithoutInventoryTransfersFromInput = { @@ -606,6 +618,106 @@ export type InventoryUpdateOneRequiredWithoutInventoryTransfersToNestedInput = { update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutInventoryTransfersToInput> } +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 InventoryCreateNestedOneWithoutPosAccountsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutPosAccountsInput + connect?: Prisma.InventoryWhereUniqueInput +} + +export type InventoryUpdateOneRequiredWithoutPosAccountsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutPosAccountsInput + upsert?: Prisma.InventoryUpsertWithoutPosAccountsInput + connect?: Prisma.InventoryWhereUniqueInput + update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutPosAccountsInput> +} + +export type InventoryCreateNestedOneWithoutSalesInvoicesInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutSalesInvoicesInput + connect?: Prisma.InventoryWhereUniqueInput +} + +export type InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutSalesInvoicesInput + upsert?: Prisma.InventoryUpsertWithoutSalesInvoicesInput + connect?: Prisma.InventoryWhereUniqueInput + update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutSalesInvoicesInput> +} + +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 @@ -620,562 +732,104 @@ export type InventoryUpdateOneRequiredWithoutStockAdjustmentsNestedInput = { update?: Prisma.XOR, Prisma.InventoryUncheckedUpdateWithoutStockAdjustmentsInput> } -export type InventoryCreateWithoutProductChargesInput = { +export type InventoryCreateWithoutBankAccountsInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput } -export type InventoryUncheckedCreateWithoutProductChargesInput = { +export type InventoryUncheckedCreateWithoutBankAccountsInput = { id?: number name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutProductChargesInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryUpsertWithoutProductChargesInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutProductChargesInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutProductChargesInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutProductChargesInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutPurchaseReceiptsInput = { - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutPurchaseReceiptsInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutInventoryInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput -} - -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 - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutPurchaseReceiptsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutSalesInvoicesInput = { - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutSalesInvoicesInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutSalesInvoicesInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryUpsertWithoutSalesInvoicesInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput -} - -export type InventoryUpdateToOneWithWhereWithoutSalesInvoicesInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR -} - -export type InventoryUpdateWithoutSalesInvoicesInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutSalesInvoicesInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutStockMovementsInput = { - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutStockMovementsInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutStockMovementsInput = { - where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR -} - -export type InventoryCreateWithoutCounterStockMovementsInput = { - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput - salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutCounterStockMovementsInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput - salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput } -export type InventoryCreateOrConnectWithoutCounterStockMovementsInput = { +export type InventoryCreateOrConnectWithoutBankAccountsInput = { where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR } -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 - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutStockMovementsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput -} - -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 - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutCounterStockMovementsInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput -} - -export type InventoryCreateWithoutStockBalancesInput = { - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput -} - -export type InventoryUncheckedCreateWithoutStockBalancesInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - isPointOfSale?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutInventoryInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput -} - -export type InventoryCreateOrConnectWithoutStockBalancesInput = { +export type InventoryUpsertWithWhereUniqueWithoutBankAccountsInput = { where: Prisma.InventoryWhereUniqueInput - create: Prisma.XOR + update: Prisma.XOR + create: Prisma.XOR } -export type InventoryUpsertWithoutStockBalancesInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.InventoryWhereInput +export type InventoryUpdateWithWhereUniqueWithoutBankAccountsInput = { + where: Prisma.InventoryWhereUniqueInput + data: Prisma.XOR } -export type InventoryUpdateToOneWithWhereWithoutStockBalancesInput = { - where?: Prisma.InventoryWhereInput - data: Prisma.XOR +export type InventoryUpdateManyWithWhereWithoutBankAccountsInput = { + where: Prisma.InventoryScalarWhereInput + data: Prisma.XOR } -export type InventoryUpdateWithoutStockBalancesInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput -} - -export type InventoryUncheckedUpdateWithoutStockBalancesInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string - location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput - purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput +export type InventoryScalarWhereInput = { + AND?: Prisma.InventoryScalarWhereInput | Prisma.InventoryScalarWhereInput[] + OR?: Prisma.InventoryScalarWhereInput[] + NOT?: Prisma.InventoryScalarWhereInput | Prisma.InventoryScalarWhereInput[] + 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 + bankAccountId?: Prisma.IntNullableFilter<"Inventory"> | number | null } export type InventoryCreateWithoutInventoryTransfersFromInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput } export type InventoryUncheckedCreateWithoutInventoryTransfersFromInput = { @@ -1183,18 +837,21 @@ export type InventoryUncheckedCreateWithoutInventoryTransfersFromInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput } export type InventoryCreateOrConnectWithoutInventoryTransfersFromInput = { @@ -1206,18 +863,21 @@ export type InventoryCreateWithoutInventoryTransfersToInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput } export type InventoryUncheckedCreateWithoutInventoryTransfersToInput = { @@ -1225,18 +885,21 @@ export type InventoryUncheckedCreateWithoutInventoryTransfersToInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput } export type InventoryCreateOrConnectWithoutInventoryTransfersToInput = { @@ -1259,18 +922,21 @@ export type InventoryUpdateWithoutInventoryTransfersFromInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput } export type InventoryUncheckedUpdateWithoutInventoryTransfersFromInput = { @@ -1278,18 +944,21 @@ export type InventoryUncheckedUpdateWithoutInventoryTransfersFromInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput } export type InventoryUpsertWithoutInventoryTransfersToInput = { @@ -1307,18 +976,21 @@ export type InventoryUpdateWithoutInventoryTransfersToInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput } export type InventoryUncheckedUpdateWithoutInventoryTransfersToInput = { @@ -1326,36 +998,756 @@ export type InventoryUncheckedUpdateWithoutInventoryTransfersToInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput +} + +export type InventoryCreateWithoutInventoryBankAccountsInput = { + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput +} + +export type InventoryUncheckedCreateWithoutInventoryBankAccountsInput = { + id?: number + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput +} + +export type InventoryCreateWithoutPosAccountsInput = { + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput +} + +export type InventoryUncheckedCreateWithoutPosAccountsInput = { + id?: number + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput +} + +export type InventoryCreateOrConnectWithoutPosAccountsInput = { + where: Prisma.InventoryWhereUniqueInput + create: Prisma.XOR +} + +export type InventoryUpsertWithoutPosAccountsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.InventoryWhereInput +} + +export type InventoryUpdateToOneWithWhereWithoutPosAccountsInput = { + where?: Prisma.InventoryWhereInput + data: Prisma.XOR +} + +export type InventoryUpdateWithoutPosAccountsInput = { + 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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput +} + +export type InventoryUncheckedUpdateWithoutPosAccountsInput = { + 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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput +} + +export type InventoryCreateWithoutSalesInvoicesInput = { + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput +} + +export type InventoryUncheckedCreateWithoutSalesInvoicesInput = { + id?: number + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput +} + +export type InventoryCreateOrConnectWithoutSalesInvoicesInput = { + where: Prisma.InventoryWhereUniqueInput + create: Prisma.XOR +} + +export type InventoryUpsertWithoutSalesInvoicesInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.InventoryWhereInput +} + +export type InventoryUpdateToOneWithWhereWithoutSalesInvoicesInput = { + where?: Prisma.InventoryWhereInput + data: Prisma.XOR +} + +export type InventoryUpdateWithoutSalesInvoicesInput = { + 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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput +} + +export type InventoryUncheckedUpdateWithoutSalesInvoicesInput = { + 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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput +} + +export type InventoryCreateWithoutPurchaseReceiptsInput = { + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput + salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput +} + +export type InventoryUncheckedCreateWithoutPurchaseReceiptsInput = { + id?: number + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput + salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput +} + +export type InventoryCreateWithoutCounterStockMovementsInput = { + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput +} + +export type InventoryUncheckedCreateWithoutCounterStockMovementsInput = { + id?: number + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput +} + +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 + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput +} + +export type InventoryUncheckedCreateWithoutStockMovementsInput = { + id?: number + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput +} + +export type InventoryCreateWithoutStockBalancesInput = { + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput +} + +export type InventoryUncheckedCreateWithoutStockBalancesInput = { + id?: number + name: string + location?: string | null + isActive?: boolean + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput + salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput +} + +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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput } export type InventoryCreateWithoutStockAdjustmentsInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput } export type InventoryUncheckedCreateWithoutStockAdjustmentsInput = { @@ -1363,18 +1755,21 @@ export type InventoryUncheckedCreateWithoutStockAdjustmentsInput = { name: string location?: string | null isActive?: boolean - isPointOfSale?: boolean createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null + isPointOfSale?: boolean + bankAccountId?: number | null inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutInventoryInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput - counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutInventoryInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput + counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput + bankAccounts?: Prisma.BankAccountUncheckedCreateNestedManyWithoutInventoriesInput + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput } export type InventoryCreateOrConnectWithoutStockAdjustmentsInput = { @@ -1397,18 +1792,21 @@ export type InventoryUpdateWithoutStockAdjustmentsInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput } export type InventoryUncheckedUpdateWithoutStockAdjustmentsInput = { @@ -1416,18 +1814,76 @@ export type InventoryUncheckedUpdateWithoutStockAdjustmentsInput = { name?: Prisma.StringFieldUpdateOperationsInput | string location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean - isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null + isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput - counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + bankAccounts?: Prisma.BankAccountUncheckedUpdateManyWithoutInventoriesNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput +} + +export type InventoryUpdateWithoutBankAccountsInput = { + 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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput +} + +export type InventoryUncheckedUpdateWithoutBankAccountsInput = { + 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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput + inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput + purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput + salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput + counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryNestedInput + inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput +} + +export type InventoryUncheckedUpdateManyWithoutBankAccountsInput = { + 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 + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null } @@ -1438,25 +1894,29 @@ export type InventoryUncheckedUpdateWithoutStockAdjustmentsInput = { export type InventoryCountOutputType = { inventoryTransfersFrom: number inventoryTransfersTo: number - productCharges: number purchaseReceipts: number - stockAdjustments: number - stockMovements: number - counterStockMovements: number - stockBalances: number salesInvoices: number + stockAdjustments: number + stockBalances: number + counterStockMovements: number + stockMovements: number + bankAccounts: number + posAccounts: number + inventoryBankAccounts: number } export type InventoryCountOutputTypeSelect = { inventoryTransfersFrom?: boolean | InventoryCountOutputTypeCountInventoryTransfersFromArgs inventoryTransfersTo?: boolean | InventoryCountOutputTypeCountInventoryTransfersToArgs - productCharges?: boolean | InventoryCountOutputTypeCountProductChargesArgs purchaseReceipts?: boolean | InventoryCountOutputTypeCountPurchaseReceiptsArgs - stockAdjustments?: boolean | InventoryCountOutputTypeCountStockAdjustmentsArgs - stockMovements?: boolean | InventoryCountOutputTypeCountStockMovementsArgs - counterStockMovements?: boolean | InventoryCountOutputTypeCountCounterStockMovementsArgs - stockBalances?: boolean | InventoryCountOutputTypeCountStockBalancesArgs salesInvoices?: boolean | InventoryCountOutputTypeCountSalesInvoicesArgs + stockAdjustments?: boolean | InventoryCountOutputTypeCountStockAdjustmentsArgs + stockBalances?: boolean | InventoryCountOutputTypeCountStockBalancesArgs + counterStockMovements?: boolean | InventoryCountOutputTypeCountCounterStockMovementsArgs + stockMovements?: boolean | InventoryCountOutputTypeCountStockMovementsArgs + bankAccounts?: boolean | InventoryCountOutputTypeCountBankAccountsArgs + posAccounts?: boolean | InventoryCountOutputTypeCountPosAccountsArgs + inventoryBankAccounts?: boolean | InventoryCountOutputTypeCountInventoryBankAccountsArgs } /** @@ -1486,15 +1946,15 @@ export type InventoryCountOutputTypeCountInventoryTransfersToArgs = { - where?: Prisma.ProductChargeWhereInput +export type InventoryCountOutputTypeCountPurchaseReceiptsArgs = { + where?: Prisma.PurchaseReceiptWhereInput } /** * InventoryCountOutputType without action */ -export type InventoryCountOutputTypeCountPurchaseReceiptsArgs = { - where?: Prisma.PurchaseReceiptWhereInput +export type InventoryCountOutputTypeCountSalesInvoicesArgs = { + where?: Prisma.SalesInvoiceWhereInput } /** @@ -1507,8 +1967,8 @@ export type InventoryCountOutputTypeCountStockAdjustmentsArgs = { - where?: Prisma.StockMovementWhereInput +export type InventoryCountOutputTypeCountStockBalancesArgs = { + where?: Prisma.StockBalanceWhereInput } /** @@ -1521,15 +1981,29 @@ export type InventoryCountOutputTypeCountCounterStockMovementsArgs = { - where?: Prisma.StockBalanceWhereInput +export type InventoryCountOutputTypeCountStockMovementsArgs = { + where?: Prisma.StockMovementWhereInput } /** * InventoryCountOutputType without action */ -export type InventoryCountOutputTypeCountSalesInvoicesArgs = { - where?: Prisma.SalesInvoiceWhereInput +export type InventoryCountOutputTypeCountBankAccountsArgs = { + where?: Prisma.BankAccountWhereInput +} + +/** + * InventoryCountOutputType without action + */ +export type InventoryCountOutputTypeCountPosAccountsArgs = { + where?: Prisma.PosAccountWhereInput +} + +/** + * InventoryCountOutputType without action + */ +export type InventoryCountOutputTypeCountInventoryBankAccountsArgs = { + where?: Prisma.InventoryBankAccountWhereInput } @@ -1538,19 +2012,22 @@ export type InventorySelect inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs - productCharges?: boolean | Prisma.Inventory$productChargesArgs purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs - stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs - stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs - counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs - stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs salesInvoices?: boolean | Prisma.Inventory$salesInvoicesArgs + stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs + stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs + counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs + stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs + bankAccounts?: boolean | Prisma.Inventory$bankAccountsArgs + posAccounts?: boolean | Prisma.Inventory$posAccountsArgs + inventoryBankAccounts?: boolean | Prisma.Inventory$inventoryBankAccountsArgs _count?: boolean | Prisma.InventoryCountOutputTypeDefaultArgs }, ExtArgs["result"]["inventory"]> @@ -1561,23 +2038,26 @@ export type InventorySelectScalar = { name?: boolean location?: boolean isActive?: boolean - isPointOfSale?: boolean createdAt?: boolean updatedAt?: boolean deletedAt?: boolean + isPointOfSale?: boolean + bankAccountId?: boolean } -export type InventoryOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "location" | "isActive" | "isPointOfSale" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["inventory"]> +export type InventoryOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "location" | "isActive" | "createdAt" | "updatedAt" | "deletedAt" | "isPointOfSale" | "bankAccountId", ExtArgs["result"]["inventory"]> export type InventoryInclude = { inventoryTransfersFrom?: boolean | Prisma.Inventory$inventoryTransfersFromArgs inventoryTransfersTo?: boolean | Prisma.Inventory$inventoryTransfersToArgs - productCharges?: boolean | Prisma.Inventory$productChargesArgs purchaseReceipts?: boolean | Prisma.Inventory$purchaseReceiptsArgs - stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs - stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs - counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs - stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs salesInvoices?: boolean | Prisma.Inventory$salesInvoicesArgs + stockAdjustments?: boolean | Prisma.Inventory$stockAdjustmentsArgs + stockBalances?: boolean | Prisma.Inventory$stockBalancesArgs + counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs + stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs + bankAccounts?: boolean | Prisma.Inventory$bankAccountsArgs + posAccounts?: boolean | Prisma.Inventory$posAccountsArgs + inventoryBankAccounts?: boolean | Prisma.Inventory$inventoryBankAccountsArgs _count?: boolean | Prisma.InventoryCountOutputTypeDefaultArgs } @@ -1586,23 +2066,26 @@ export type $InventoryPayload[] inventoryTransfersTo: Prisma.$InventoryTransferPayload[] - productCharges: Prisma.$ProductChargePayload[] purchaseReceipts: Prisma.$PurchaseReceiptPayload[] - stockAdjustments: Prisma.$StockAdjustmentPayload[] - stockMovements: Prisma.$StockMovementPayload[] - counterStockMovements: Prisma.$StockMovementPayload[] - stockBalances: Prisma.$StockBalancePayload[] salesInvoices: Prisma.$SalesInvoicePayload[] + stockAdjustments: Prisma.$StockAdjustmentPayload[] + stockBalances: Prisma.$StockBalancePayload[] + counterStockMovements: Prisma.$StockMovementPayload[] + stockMovements: Prisma.$StockMovementPayload[] + bankAccounts: Prisma.$BankAccountPayload[] + posAccounts: Prisma.$PosAccountPayload[] + inventoryBankAccounts: Prisma.$InventoryBankAccountPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number name: string location: string | null isActive: boolean - isPointOfSale: boolean createdAt: Date updatedAt: Date deletedAt: Date | null + isPointOfSale: boolean + bankAccountId: number | null }, ExtArgs["result"]["inventory"]> composites: {} } @@ -1945,13 +2428,15 @@ export interface Prisma__InventoryClient = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> inventoryTransfersTo = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - productCharges = {}>(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> - stockMovements = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - counterStockMovements = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockBalances = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> salesInvoices = {}>(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> + bankAccounts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + posAccounts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + inventoryBankAccounts = {}>(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. @@ -1985,10 +2470,11 @@ export interface InventoryFieldRefs { readonly name: Prisma.FieldRef<"Inventory", 'String'> readonly location: Prisma.FieldRef<"Inventory", 'String'> readonly isActive: Prisma.FieldRef<"Inventory", 'Boolean'> - readonly isPointOfSale: 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'> + readonly bankAccountId: Prisma.FieldRef<"Inventory", 'Int'> } @@ -2379,30 +2865,6 @@ export type Inventory$inventoryTransfersToArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - where?: Prisma.ProductChargeWhereInput - orderBy?: Prisma.ProductChargeOrderByWithRelationInput | Prisma.ProductChargeOrderByWithRelationInput[] - cursor?: Prisma.ProductChargeWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.ProductChargeScalarFieldEnum | Prisma.ProductChargeScalarFieldEnum[] -} - /** * Inventory.purchaseReceipts */ @@ -2427,102 +2889,6 @@ export type Inventory$purchaseReceiptsArgs = { - /** - * 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.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.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.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.salesInvoices */ @@ -2547,6 +2913,174 @@ export type Inventory$salesInvoicesArgs = { + /** + * 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.bankAccounts + */ +export type Inventory$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[] +} + +/** + * Inventory.posAccounts + */ +export type Inventory$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[] +} + +/** + * 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 without action */ diff --git a/src/generated/prisma/models/InventoryBankAccount.ts b/src/generated/prisma/models/InventoryBankAccount.ts new file mode 100644 index 0000000..4953646 --- /dev/null +++ b/src/generated/prisma/models/InventoryBankAccount.ts @@ -0,0 +1,1398 @@ + +/* !!! 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 +} + +export type InventoryBankAccountOrderByWithRelationInput = { + inventoryId?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder + inventory?: Prisma.InventoryOrderByWithRelationInput + bankAccount?: Prisma.BankAccountOrderByWithRelationInput + posAccounts?: Prisma.PosAccountOrderByRelationAggregateInput +} + +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 +}, "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 +} + +export type InventoryBankAccountUncheckedCreateInput = { + inventoryId: number + bankAccountId: number + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput +} + +export type InventoryBankAccountUpdateInput = { + inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput + bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput +} + +export type InventoryBankAccountUncheckedUpdateInput = { + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number + bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput +} + +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 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 InventoryBankAccountUpdateOneWithoutPosAccountsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.InventoryBankAccountCreateOrConnectWithoutPosAccountsInput + upsert?: Prisma.InventoryBankAccountUpsertWithoutPosAccountsInput + disconnect?: Prisma.InventoryBankAccountWhereInput | boolean + delete?: Prisma.InventoryBankAccountWhereInput | boolean + connect?: Prisma.InventoryBankAccountWhereUniqueInput + update?: Prisma.XOR, Prisma.InventoryBankAccountUncheckedUpdateWithoutPosAccountsInput> +} + +export type InventoryBankAccountCreateWithoutBankAccountInput = { + inventory: Prisma.InventoryCreateNestedOneWithoutInventoryBankAccountsInput + posAccounts?: Prisma.PosAccountCreateNestedManyWithoutInventoryBankAccountInput +} + +export type InventoryBankAccountUncheckedCreateWithoutBankAccountInput = { + inventoryId: number + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput +} + +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 +} + +export type InventoryBankAccountUncheckedCreateWithoutInventoryInput = { + bankAccountId: number + posAccounts?: Prisma.PosAccountUncheckedCreateNestedManyWithoutInventoryBankAccountInput +} + +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 +} + +export type InventoryBankAccountUncheckedCreateWithoutPosAccountsInput = { + inventoryId: number + bankAccountId: number +} + +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 +} + +export type InventoryBankAccountUncheckedUpdateWithoutPosAccountsInput = { + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number + bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type InventoryBankAccountCreateManyBankAccountInput = { + inventoryId: number +} + +export type InventoryBankAccountUpdateWithoutBankAccountInput = { + inventory?: Prisma.InventoryUpdateOneRequiredWithoutInventoryBankAccountsNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput +} + +export type InventoryBankAccountUncheckedUpdateWithoutBankAccountInput = { + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput +} + +export type InventoryBankAccountUncheckedUpdateManyWithoutBankAccountInput = { + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type InventoryBankAccountCreateManyInventoryInput = { + bankAccountId: number +} + +export type InventoryBankAccountUpdateWithoutInventoryInput = { + bankAccount?: Prisma.BankAccountUpdateOneRequiredWithoutInventoryBankAccountsNestedInput + posAccounts?: Prisma.PosAccountUpdateManyWithoutInventoryBankAccountNestedInput +} + +export type InventoryBankAccountUncheckedUpdateWithoutInventoryInput = { + bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number + posAccounts?: Prisma.PosAccountUncheckedUpdateManyWithoutInventoryBankAccountNestedInput +} + +export type InventoryBankAccountUncheckedUpdateManyWithoutInventoryInput = { + bankAccountId?: Prisma.IntFieldUpdateOperationsInput | number +} + + +/** + * Count Type InventoryBankAccountCountOutputType + */ + +export type InventoryBankAccountCountOutputType = { + posAccounts: number +} + +export type InventoryBankAccountCountOutputTypeSelect = { + posAccounts?: boolean | InventoryBankAccountCountOutputTypeCountPosAccountsArgs +} + +/** + * 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 +} + + +export type InventoryBankAccountSelect = runtime.Types.Extensions.GetSelect<{ + inventoryId?: boolean + bankAccountId?: boolean + inventory?: boolean | Prisma.InventoryDefaultArgs + bankAccount?: boolean | Prisma.BankAccountDefaultArgs + posAccounts?: boolean | Prisma.InventoryBankAccount$posAccountsArgs + _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 + _count?: boolean | Prisma.InventoryBankAccountCountOutputTypeDefaultArgs +} + +export type $InventoryBankAccountPayload = { + name: "InventoryBankAccount" + objects: { + inventory: Prisma.$InventoryPayload + bankAccount: Prisma.$BankAccountPayload + posAccounts: Prisma.$PosAccountPayload[] + } + 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> + /** + * 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 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/InventoryTransferItem.ts b/src/generated/prisma/models/InventoryTransferItem.ts index 4f58360..3809292 100644 --- a/src/generated/prisma/models/InventoryTransferItem.ts +++ b/src/generated/prisma/models/InventoryTransferItem.ts @@ -356,48 +356,6 @@ export type InventoryTransferItemSumOrderByAggregateInput = { transferId?: Prisma.SortOrder } -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 InventoryTransferItemCreateNestedManyWithoutTransferInput = { create?: Prisma.XOR | Prisma.InventoryTransferItemCreateWithoutTransferInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutTransferInput[] connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput | Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput[] @@ -440,51 +398,54 @@ export type InventoryTransferItemUncheckedUpdateManyWithoutTransferNestedInput = deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[] } -export type InventoryTransferItemCreateWithoutProductInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - transfer: Prisma.InventoryTransferCreateNestedOneWithoutItemsInput +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 InventoryTransferItemUncheckedCreateWithoutProductInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - transferId: number +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 InventoryTransferItemCreateOrConnectWithoutProductInput = { - where: Prisma.InventoryTransferItemWhereUniqueInput - create: Prisma.XOR +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 InventoryTransferItemCreateManyProductInputEnvelope = { - data: Prisma.InventoryTransferItemCreateManyProductInput | Prisma.InventoryTransferItemCreateManyProductInput[] - skipDuplicates?: boolean +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 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 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 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 = { @@ -524,27 +485,51 @@ export type InventoryTransferItemUpdateManyWithWhereWithoutTransferInput = { data: Prisma.XOR } -export type InventoryTransferItemCreateManyProductInput = { +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 InventoryTransferItemUpdateWithoutProductInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - transfer?: Prisma.InventoryTransferUpdateOneRequiredWithoutItemsNestedInput +export type InventoryTransferItemCreateOrConnectWithoutProductInput = { + where: Prisma.InventoryTransferItemWhereUniqueInput + create: Prisma.XOR } -export type InventoryTransferItemUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - transferId?: Prisma.IntFieldUpdateOperationsInput | number +export type InventoryTransferItemCreateManyProductInputEnvelope = { + data: Prisma.InventoryTransferItemCreateManyProductInput | Prisma.InventoryTransferItemCreateManyProductInput[] + skipDuplicates?: boolean } -export type InventoryTransferItemUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - transferId?: Prisma.IntFieldUpdateOperationsInput | number +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 = { @@ -570,6 +555,29 @@ export type InventoryTransferItemUncheckedUpdateManyWithoutTransferInput = { 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<{ diff --git a/src/generated/prisma/models/Order.ts b/src/generated/prisma/models/Order.ts index 45996b2..55bef43 100644 --- a/src/generated/prisma/models/Order.ts +++ b/src/generated/prisma/models/Order.ts @@ -42,8 +42,9 @@ export type OrderMinAggregateOutputType = { id: number | null orderNumber: string | null status: $Enums.OrderStatus | null - paymentMethod: $Enums.paymentMethod | null + paymentMethod: $Enums.payment_method_type | null totalAmount: runtime.Decimal | null + description: string | null createdAt: Date | null updatedAt: Date | null deletedAt: Date | null @@ -54,8 +55,9 @@ export type OrderMaxAggregateOutputType = { id: number | null orderNumber: string | null status: $Enums.OrderStatus | null - paymentMethod: $Enums.paymentMethod | null + paymentMethod: $Enums.payment_method_type | null totalAmount: runtime.Decimal | null + description: string | null createdAt: Date | null updatedAt: Date | null deletedAt: Date | null @@ -68,6 +70,7 @@ export type OrderCountAggregateOutputType = { status: number paymentMethod: number totalAmount: number + description: number createdAt: number updatedAt: number deletedAt: number @@ -94,6 +97,7 @@ export type OrderMinAggregateInputType = { status?: true paymentMethod?: true totalAmount?: true + description?: true createdAt?: true updatedAt?: true deletedAt?: true @@ -106,6 +110,7 @@ export type OrderMaxAggregateInputType = { status?: true paymentMethod?: true totalAmount?: true + description?: true createdAt?: true updatedAt?: true deletedAt?: true @@ -118,6 +123,7 @@ export type OrderCountAggregateInputType = { status?: true paymentMethod?: true totalAmount?: true + description?: true createdAt?: true updatedAt?: true deletedAt?: true @@ -215,8 +221,9 @@ export type OrderGroupByOutputType = { id: number orderNumber: string status: $Enums.OrderStatus - paymentMethod: $Enums.paymentMethod + paymentMethod: $Enums.payment_method_type totalAmount: runtime.Decimal + description: string | null createdAt: Date updatedAt: Date deletedAt: Date | null @@ -250,8 +257,9 @@ export type OrderWhereInput = { id?: Prisma.IntFilter<"Order"> | number orderNumber?: Prisma.StringFilter<"Order"> | string status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFilter<"Order"> | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFilter<"Order"> | $Enums.payment_method_type 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 @@ -265,6 +273,7 @@ export type OrderOrderByWithRelationInput = { status?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder @@ -280,8 +289,9 @@ export type OrderWhereUniqueInput = Prisma.AtLeast<{ OR?: Prisma.OrderWhereInput[] NOT?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[] status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFilter<"Order"> | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFilter<"Order"> | $Enums.payment_method_type 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 @@ -295,6 +305,7 @@ export type OrderOrderByWithAggregationInput = { status?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder @@ -313,8 +324,9 @@ export type OrderScalarWhereWithAggregatesInput = { id?: Prisma.IntWithAggregatesFilter<"Order"> | number orderNumber?: Prisma.StringWithAggregatesFilter<"Order"> | string status?: Prisma.EnumOrderStatusWithAggregatesFilter<"Order"> | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodWithAggregatesFilter<"Order"> | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeWithAggregatesFilter<"Order"> | $Enums.payment_method_type 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 @@ -324,8 +336,9 @@ export type OrderScalarWhereWithAggregatesInput = { export type OrderCreateInput = { orderNumber: string status?: $Enums.OrderStatus - paymentMethod?: $Enums.paymentMethod + paymentMethod?: $Enums.payment_method_type totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + description?: string | null createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null @@ -336,8 +349,9 @@ export type OrderUncheckedCreateInput = { id?: number orderNumber: string status?: $Enums.OrderStatus - paymentMethod?: $Enums.paymentMethod + paymentMethod?: $Enums.payment_method_type totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + description?: string | null createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null @@ -347,8 +361,9 @@ export type OrderUncheckedCreateInput = { export type OrderUpdateInput = { orderNumber?: Prisma.StringFieldUpdateOperationsInput | string status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type 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 @@ -359,8 +374,9 @@ export type OrderUncheckedUpdateInput = { id?: Prisma.IntFieldUpdateOperationsInput | number orderNumber?: Prisma.StringFieldUpdateOperationsInput | string status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type 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 @@ -371,8 +387,9 @@ export type OrderCreateManyInput = { id?: number orderNumber: string status?: $Enums.OrderStatus - paymentMethod?: $Enums.paymentMethod + paymentMethod?: $Enums.payment_method_type totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + description?: string | null createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null @@ -382,8 +399,9 @@ export type OrderCreateManyInput = { export type OrderUpdateManyMutationInput = { orderNumber?: Prisma.StringFieldUpdateOperationsInput | string status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type 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 @@ -393,8 +411,9 @@ export type OrderUncheckedUpdateManyInput = { id?: Prisma.IntFieldUpdateOperationsInput | number orderNumber?: Prisma.StringFieldUpdateOperationsInput | string status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type 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 @@ -423,6 +442,7 @@ export type OrderCountOrderByAggregateInput = { status?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + description?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder @@ -441,6 +461,7 @@ export type OrderMaxOrderByAggregateInput = { status?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + description?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder @@ -453,6 +474,7 @@ export type OrderMinOrderByAggregateInput = { status?: Prisma.SortOrder paymentMethod?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + description?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder @@ -511,15 +533,16 @@ export type EnumOrderStatusFieldUpdateOperationsInput = { set?: $Enums.OrderStatus } -export type EnumpaymentMethodFieldUpdateOperationsInput = { - set?: $Enums.paymentMethod +export type Enumpayment_method_typeFieldUpdateOperationsInput = { + set?: $Enums.payment_method_type } export type OrderCreateWithoutCustomerInput = { orderNumber: string status?: $Enums.OrderStatus - paymentMethod?: $Enums.paymentMethod + paymentMethod?: $Enums.payment_method_type totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + description?: string | null createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null @@ -529,8 +552,9 @@ export type OrderUncheckedCreateWithoutCustomerInput = { id?: number orderNumber: string status?: $Enums.OrderStatus - paymentMethod?: $Enums.paymentMethod + paymentMethod?: $Enums.payment_method_type totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + description?: string | null createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null @@ -569,8 +593,9 @@ export type OrderScalarWhereInput = { id?: Prisma.IntFilter<"Order"> | number orderNumber?: Prisma.StringFilter<"Order"> | string status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFilter<"Order"> | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFilter<"Order"> | $Enums.payment_method_type 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 @@ -581,8 +606,9 @@ export type OrderCreateManyCustomerInput = { id?: number orderNumber: string status?: $Enums.OrderStatus - paymentMethod?: $Enums.paymentMethod + paymentMethod?: $Enums.payment_method_type totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + description?: string | null createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null @@ -591,8 +617,9 @@ export type OrderCreateManyCustomerInput = { export type OrderUpdateWithoutCustomerInput = { orderNumber?: Prisma.StringFieldUpdateOperationsInput | string status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type 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 @@ -602,8 +629,9 @@ export type OrderUncheckedUpdateWithoutCustomerInput = { id?: Prisma.IntFieldUpdateOperationsInput | number orderNumber?: Prisma.StringFieldUpdateOperationsInput | string status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type 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 @@ -613,8 +641,9 @@ export type OrderUncheckedUpdateManyWithoutCustomerInput = { id?: Prisma.IntFieldUpdateOperationsInput | number orderNumber?: Prisma.StringFieldUpdateOperationsInput | string status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus - paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type 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 @@ -628,6 +657,7 @@ export type OrderSelect = runtime.Types.Extensions.GetOmit<"id" | "orderNumber" | "status" | "paymentMethod" | "totalAmount" | "createdAt" | "updatedAt" | "deletedAt" | "customerId", ExtArgs["result"]["order"]> +export type OrderOmit = runtime.Types.Extensions.GetOmit<"id" | "orderNumber" | "status" | "paymentMethod" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "deletedAt" | "customerId", ExtArgs["result"]["order"]> export type OrderInclude = { customer?: boolean | Prisma.CustomerDefaultArgs } @@ -663,8 +694,9 @@ export type $OrderPayload readonly orderNumber: Prisma.FieldRef<"Order", 'String'> readonly status: Prisma.FieldRef<"Order", 'OrderStatus'> - readonly paymentMethod: Prisma.FieldRef<"Order", 'paymentMethod'> + readonly paymentMethod: Prisma.FieldRef<"Order", 'payment_method_type'> 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'> diff --git a/src/generated/prisma/models/OtpCode.ts b/src/generated/prisma/models/OtpCode.ts index 1d22129..bd53074 100644 --- a/src/generated/prisma/models/OtpCode.ts +++ b/src/generated/prisma/models/OtpCode.ts @@ -375,6 +375,10 @@ export type OtpCodeSumOrderByAggregateInput = { id?: Prisma.SortOrder } +export type BoolFieldUpdateOperationsInput = { + set?: boolean +} + export type OtpCodeSelect = runtime.Types.Extensions.GetSelect<{ diff --git a/src/generated/prisma/models/PosAccount.ts b/src/generated/prisma/models/PosAccount.ts new file mode 100644 index 0000000..f4ed7fa --- /dev/null +++ b/src/generated/prisma/models/PosAccount.ts @@ -0,0 +1,1720 @@ + +/* !!! 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 | null + 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.IntNullableFilter<"PosAccount"> | number | null + inventoryId?: Prisma.IntFilter<"PosAccount"> | number + createdAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null + inventory?: Prisma.XOR + inventoryBankAccount?: Prisma.XOR | null + bankAccount?: Prisma.XOR | null +} + +export type PosAccountOrderByWithRelationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + code?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + bankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder + inventoryId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + updatedAt?: Prisma.SortOrder + deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder + inventory?: Prisma.InventoryOrderByWithRelationInput + inventoryBankAccount?: Prisma.InventoryBankAccountOrderByWithRelationInput + bankAccount?: Prisma.BankAccountOrderByWithRelationInput + _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.IntNullableFilter<"PosAccount"> | number | null + inventoryId?: Prisma.IntFilter<"PosAccount"> | number + createdAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"PosAccount"> | Date | string + deletedAt?: Prisma.DateTimeNullableFilter<"PosAccount"> | Date | string | null + inventory?: Prisma.XOR + inventoryBankAccount?: Prisma.XOR | null + bankAccount?: Prisma.XOR | null +}, "id" | "code"> + +export type PosAccountOrderByWithAggregationInput = { + id?: Prisma.SortOrder + name?: Prisma.SortOrder + code?: Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + bankAccountId?: Prisma.SortOrderInput | 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.IntNullableWithAggregatesFilter<"PosAccount"> | number | null + 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 + inventory: Prisma.InventoryCreateNestedOneWithoutPosAccountsInput + inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput + bankAccount?: Prisma.BankAccountCreateNestedOneWithoutPosAccountsInput +} + +export type PosAccountUncheckedCreateInput = { + id?: number + name: string + code: string + description?: string | null + bankAccountId?: number | null + inventoryId: number + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +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 + inventory?: Prisma.InventoryUpdateOneRequiredWithoutPosAccountsNestedInput + inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPosAccountsNestedInput + bankAccount?: Prisma.BankAccountUpdateOneWithoutPosAccountsNestedInput +} + +export type PosAccountUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + code?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type PosAccountCreateManyInput = { + id?: number + name: string + code: string + description?: string | null + bankAccountId?: number | null + 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.NullableIntFieldUpdateOperationsInput | number | null + 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 PosAccountCreateNestedManyWithoutBankAccountInput = { + create?: Prisma.XOR | Prisma.PosAccountCreateWithoutBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutBankAccountInput[] + connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutBankAccountInput[] + createMany?: Prisma.PosAccountCreateManyBankAccountInputEnvelope + connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] +} + +export type PosAccountUncheckedCreateNestedManyWithoutBankAccountInput = { + create?: Prisma.XOR | Prisma.PosAccountCreateWithoutBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutBankAccountInput[] + connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutBankAccountInput[] + createMany?: Prisma.PosAccountCreateManyBankAccountInputEnvelope + connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] +} + +export type PosAccountUpdateManyWithoutBankAccountNestedInput = { + create?: Prisma.XOR | Prisma.PosAccountCreateWithoutBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutBankAccountInput[] + connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutBankAccountInput[] + upsert?: Prisma.PosAccountUpsertWithWhereUniqueWithoutBankAccountInput | Prisma.PosAccountUpsertWithWhereUniqueWithoutBankAccountInput[] + createMany?: Prisma.PosAccountCreateManyBankAccountInputEnvelope + set?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + disconnect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + delete?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + update?: Prisma.PosAccountUpdateWithWhereUniqueWithoutBankAccountInput | Prisma.PosAccountUpdateWithWhereUniqueWithoutBankAccountInput[] + updateMany?: Prisma.PosAccountUpdateManyWithWhereWithoutBankAccountInput | Prisma.PosAccountUpdateManyWithWhereWithoutBankAccountInput[] + deleteMany?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[] +} + +export type PosAccountUncheckedUpdateManyWithoutBankAccountNestedInput = { + create?: Prisma.XOR | Prisma.PosAccountCreateWithoutBankAccountInput[] | Prisma.PosAccountUncheckedCreateWithoutBankAccountInput[] + connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutBankAccountInput | Prisma.PosAccountCreateOrConnectWithoutBankAccountInput[] + upsert?: Prisma.PosAccountUpsertWithWhereUniqueWithoutBankAccountInput | Prisma.PosAccountUpsertWithWhereUniqueWithoutBankAccountInput[] + createMany?: Prisma.PosAccountCreateManyBankAccountInputEnvelope + set?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + disconnect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + delete?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + update?: Prisma.PosAccountUpdateWithWhereUniqueWithoutBankAccountInput | Prisma.PosAccountUpdateWithWhereUniqueWithoutBankAccountInput[] + updateMany?: Prisma.PosAccountUpdateManyWithWhereWithoutBankAccountInput | Prisma.PosAccountUpdateManyWithWhereWithoutBankAccountInput[] + deleteMany?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[] +} + +export type PosAccountCreateNestedManyWithoutInventoryInput = { + create?: Prisma.XOR | Prisma.PosAccountCreateWithoutInventoryInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryInput[] + connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryInput | Prisma.PosAccountCreateOrConnectWithoutInventoryInput[] + createMany?: Prisma.PosAccountCreateManyInventoryInputEnvelope + connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] +} + +export type PosAccountUncheckedCreateNestedManyWithoutInventoryInput = { + create?: Prisma.XOR | Prisma.PosAccountCreateWithoutInventoryInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryInput[] + connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryInput | Prisma.PosAccountCreateOrConnectWithoutInventoryInput[] + createMany?: Prisma.PosAccountCreateManyInventoryInputEnvelope + connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] +} + +export type PosAccountUpdateManyWithoutInventoryNestedInput = { + create?: Prisma.XOR | Prisma.PosAccountCreateWithoutInventoryInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryInput[] + connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryInput | Prisma.PosAccountCreateOrConnectWithoutInventoryInput[] + upsert?: Prisma.PosAccountUpsertWithWhereUniqueWithoutInventoryInput | Prisma.PosAccountUpsertWithWhereUniqueWithoutInventoryInput[] + createMany?: Prisma.PosAccountCreateManyInventoryInputEnvelope + set?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + disconnect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + delete?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + update?: Prisma.PosAccountUpdateWithWhereUniqueWithoutInventoryInput | Prisma.PosAccountUpdateWithWhereUniqueWithoutInventoryInput[] + updateMany?: Prisma.PosAccountUpdateManyWithWhereWithoutInventoryInput | Prisma.PosAccountUpdateManyWithWhereWithoutInventoryInput[] + deleteMany?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[] +} + +export type PosAccountUncheckedUpdateManyWithoutInventoryNestedInput = { + create?: Prisma.XOR | Prisma.PosAccountCreateWithoutInventoryInput[] | Prisma.PosAccountUncheckedCreateWithoutInventoryInput[] + connectOrCreate?: Prisma.PosAccountCreateOrConnectWithoutInventoryInput | Prisma.PosAccountCreateOrConnectWithoutInventoryInput[] + upsert?: Prisma.PosAccountUpsertWithWhereUniqueWithoutInventoryInput | Prisma.PosAccountUpsertWithWhereUniqueWithoutInventoryInput[] + createMany?: Prisma.PosAccountCreateManyInventoryInputEnvelope + set?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + disconnect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + delete?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + connect?: Prisma.PosAccountWhereUniqueInput | Prisma.PosAccountWhereUniqueInput[] + update?: Prisma.PosAccountUpdateWithWhereUniqueWithoutInventoryInput | Prisma.PosAccountUpdateWithWhereUniqueWithoutInventoryInput[] + updateMany?: Prisma.PosAccountUpdateManyWithWhereWithoutInventoryInput | Prisma.PosAccountUpdateManyWithWhereWithoutInventoryInput[] + deleteMany?: Prisma.PosAccountScalarWhereInput | Prisma.PosAccountScalarWhereInput[] +} + +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 PosAccountCreateWithoutBankAccountInput = { + name: string + code: string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + inventory: Prisma.InventoryCreateNestedOneWithoutPosAccountsInput + inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput +} + +export type PosAccountUncheckedCreateWithoutBankAccountInput = { + id?: number + name: string + code: string + description?: string | null + inventoryId: number + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type PosAccountCreateOrConnectWithoutBankAccountInput = { + where: Prisma.PosAccountWhereUniqueInput + create: Prisma.XOR +} + +export type PosAccountCreateManyBankAccountInputEnvelope = { + data: Prisma.PosAccountCreateManyBankAccountInput | Prisma.PosAccountCreateManyBankAccountInput[] + skipDuplicates?: boolean +} + +export type PosAccountUpsertWithWhereUniqueWithoutBankAccountInput = { + where: Prisma.PosAccountWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type PosAccountUpdateWithWhereUniqueWithoutBankAccountInput = { + where: Prisma.PosAccountWhereUniqueInput + data: Prisma.XOR +} + +export type PosAccountUpdateManyWithWhereWithoutBankAccountInput = { + 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.IntNullableFilter<"PosAccount"> | number | null + 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 PosAccountCreateWithoutInventoryInput = { + name: string + code: string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + inventoryBankAccount?: Prisma.InventoryBankAccountCreateNestedOneWithoutPosAccountsInput + bankAccount?: Prisma.BankAccountCreateNestedOneWithoutPosAccountsInput +} + +export type PosAccountUncheckedCreateWithoutInventoryInput = { + id?: number + name: string + code: string + description?: string | null + bankAccountId?: number | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type PosAccountCreateOrConnectWithoutInventoryInput = { + where: Prisma.PosAccountWhereUniqueInput + create: Prisma.XOR +} + +export type PosAccountCreateManyInventoryInputEnvelope = { + data: Prisma.PosAccountCreateManyInventoryInput | Prisma.PosAccountCreateManyInventoryInput[] + skipDuplicates?: boolean +} + +export type PosAccountUpsertWithWhereUniqueWithoutInventoryInput = { + where: Prisma.PosAccountWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type PosAccountUpdateWithWhereUniqueWithoutInventoryInput = { + where: Prisma.PosAccountWhereUniqueInput + data: Prisma.XOR +} + +export type PosAccountUpdateManyWithWhereWithoutInventoryInput = { + where: Prisma.PosAccountScalarWhereInput + data: Prisma.XOR +} + +export type PosAccountCreateWithoutInventoryBankAccountInput = { + name: string + code: string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null + inventory: Prisma.InventoryCreateNestedOneWithoutPosAccountsInput + bankAccount?: Prisma.BankAccountCreateNestedOneWithoutPosAccountsInput +} + +export type PosAccountUncheckedCreateWithoutInventoryBankAccountInput = { + id?: number + name: string + code: string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +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 PosAccountCreateManyBankAccountInput = { + id?: number + name: string + code: string + description?: string | null + inventoryId: number + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type PosAccountUpdateWithoutBankAccountInput = { + 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 + inventory?: Prisma.InventoryUpdateOneRequiredWithoutPosAccountsNestedInput + inventoryBankAccount?: Prisma.InventoryBankAccountUpdateOneWithoutPosAccountsNestedInput +} + +export type PosAccountUncheckedUpdateWithoutBankAccountInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + code?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type PosAccountUncheckedUpdateManyWithoutBankAccountInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + code?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type PosAccountCreateManyInventoryInput = { + id?: number + name: string + code: string + description?: string | null + bankAccountId?: number | null + createdAt?: Date | string + updatedAt?: Date | string + deletedAt?: Date | string | null +} + +export type PosAccountUpdateWithoutInventoryInput = { + 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.InventoryBankAccountUpdateOneWithoutPosAccountsNestedInput + bankAccount?: Prisma.BankAccountUpdateOneWithoutPosAccountsNestedInput +} + +export type PosAccountUncheckedUpdateWithoutInventoryInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + code?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +export type PosAccountUncheckedUpdateManyWithoutInventoryInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + name?: Prisma.StringFieldUpdateOperationsInput | string + code?: Prisma.StringFieldUpdateOperationsInput | string + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null +} + +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 + inventory?: Prisma.InventoryUpdateOneRequiredWithoutPosAccountsNestedInput + bankAccount?: Prisma.BankAccountUpdateOneWithoutPosAccountsNestedInput +} + +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 +} + +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 +} + + + +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 + inventory?: boolean | Prisma.InventoryDefaultArgs + inventoryBankAccount?: boolean | Prisma.PosAccount$inventoryBankAccountArgs + bankAccount?: boolean | Prisma.PosAccount$bankAccountArgs +}, 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 = { + inventory?: boolean | Prisma.InventoryDefaultArgs + inventoryBankAccount?: boolean | Prisma.PosAccount$inventoryBankAccountArgs + bankAccount?: boolean | Prisma.PosAccount$bankAccountArgs +} + +export type $PosAccountPayload = { + name: "PosAccount" + objects: { + inventory: Prisma.$InventoryPayload + inventoryBankAccount: Prisma.$InventoryBankAccountPayload | null + bankAccount: Prisma.$BankAccountPayload | null + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + name: string + code: string + description: string | null + bankAccountId: number | null + 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" + inventory = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> + inventoryBankAccount = {}>(args?: Prisma.Subset>): Prisma.Prisma__InventoryBankAccountClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> + 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 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.inventoryBankAccount + */ +export type PosAccount$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 +} + +/** + * PosAccount.bankAccount + */ +export type PosAccount$bankAccountArgs = { + /** + * 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 +} + +/** + * 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 index c5efb4b..4a02547 100644 --- a/src/generated/prisma/models/Product.ts +++ b/src/generated/prisma/models/Product.ts @@ -28,16 +28,16 @@ export type AggregateProduct = { export type ProductAvgAggregateOutputType = { id: number | null - salePrice: runtime.Decimal | null brandId: number | null categoryId: number | null + salePrice: runtime.Decimal | null } export type ProductSumAggregateOutputType = { id: number | null - salePrice: runtime.Decimal | null brandId: number | null categoryId: number | null + salePrice: runtime.Decimal | null } export type ProductMinAggregateOutputType = { @@ -49,9 +49,9 @@ export type ProductMinAggregateOutputType = { createdAt: Date | null updatedAt: Date | null deletedAt: Date | null - salePrice: runtime.Decimal | null brandId: number | null categoryId: number | null + salePrice: runtime.Decimal | null } export type ProductMaxAggregateOutputType = { @@ -63,9 +63,9 @@ export type ProductMaxAggregateOutputType = { createdAt: Date | null updatedAt: Date | null deletedAt: Date | null - salePrice: runtime.Decimal | null brandId: number | null categoryId: number | null + salePrice: runtime.Decimal | null } export type ProductCountAggregateOutputType = { @@ -77,25 +77,25 @@ export type ProductCountAggregateOutputType = { createdAt: number updatedAt: number deletedAt: number - salePrice: number brandId: number categoryId: number + salePrice: number _all: number } export type ProductAvgAggregateInputType = { id?: true - salePrice?: true brandId?: true categoryId?: true + salePrice?: true } export type ProductSumAggregateInputType = { id?: true - salePrice?: true brandId?: true categoryId?: true + salePrice?: true } export type ProductMinAggregateInputType = { @@ -107,9 +107,9 @@ export type ProductMinAggregateInputType = { createdAt?: true updatedAt?: true deletedAt?: true - salePrice?: true brandId?: true categoryId?: true + salePrice?: true } export type ProductMaxAggregateInputType = { @@ -121,9 +121,9 @@ export type ProductMaxAggregateInputType = { createdAt?: true updatedAt?: true deletedAt?: true - salePrice?: true brandId?: true categoryId?: true + salePrice?: true } export type ProductCountAggregateInputType = { @@ -135,9 +135,9 @@ export type ProductCountAggregateInputType = { createdAt?: true updatedAt?: true deletedAt?: true - salePrice?: true brandId?: true categoryId?: true + salePrice?: true _all?: true } @@ -236,9 +236,9 @@ export type ProductGroupByOutputType = { createdAt: Date updatedAt: Date deletedAt: Date | null - salePrice: runtime.Decimal brandId: number | null categoryId: number | null + salePrice: runtime.Decimal _count: ProductCountAggregateOutputType | null _avg: ProductAvgAggregateOutputType | null _sum: ProductSumAggregateOutputType | null @@ -273,19 +273,18 @@ export type ProductWhereInput = { createdAt?: Prisma.DateTimeFilter<"Product"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Product"> | Date | string deletedAt?: Prisma.DateTimeNullableFilter<"Product"> | Date | string | null - salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: Prisma.IntNullableFilter<"Product"> | number | null categoryId?: Prisma.IntNullableFilter<"Product"> | number | null + salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter - productCharges?: Prisma.ProductChargeListRelationFilter variants?: Prisma.ProductVariantListRelationFilter brand?: Prisma.XOR | null category?: Prisma.XOR | null purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter stockAdjustments?: Prisma.StockAdjustmentListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter stockBalances?: Prisma.StockBalanceListRelationFilter + stockMovements?: Prisma.StockMovementListRelationFilter } export type ProductOrderByWithRelationInput = { @@ -297,19 +296,18 @@ export type ProductOrderByWithRelationInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - salePrice?: Prisma.SortOrder brandId?: Prisma.SortOrderInput | Prisma.SortOrder categoryId?: Prisma.SortOrderInput | Prisma.SortOrder + salePrice?: Prisma.SortOrder inventoryTransferItems?: Prisma.InventoryTransferItemOrderByRelationAggregateInput - productCharges?: Prisma.ProductChargeOrderByRelationAggregateInput variants?: Prisma.ProductVariantOrderByRelationAggregateInput brand?: Prisma.ProductBrandOrderByWithRelationInput category?: Prisma.ProductCategoryOrderByWithRelationInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemOrderByRelationAggregateInput salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput stockAdjustments?: Prisma.StockAdjustmentOrderByRelationAggregateInput - stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput + stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput _relevance?: Prisma.ProductOrderByRelevanceInput } @@ -325,19 +323,18 @@ export type ProductWhereUniqueInput = Prisma.AtLeast<{ createdAt?: Prisma.DateTimeFilter<"Product"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Product"> | Date | string deletedAt?: Prisma.DateTimeNullableFilter<"Product"> | Date | string | null - salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: Prisma.IntNullableFilter<"Product"> | number | null categoryId?: Prisma.IntNullableFilter<"Product"> | number | null + salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemListRelationFilter - productCharges?: Prisma.ProductChargeListRelationFilter variants?: Prisma.ProductVariantListRelationFilter brand?: Prisma.XOR | null category?: Prisma.XOR | null purchaseReceiptItems?: Prisma.PurchaseReceiptItemListRelationFilter salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter stockAdjustments?: Prisma.StockAdjustmentListRelationFilter - stockMovements?: Prisma.StockMovementListRelationFilter stockBalances?: Prisma.StockBalanceListRelationFilter + stockMovements?: Prisma.StockMovementListRelationFilter }, "id" | "sku" | "barcode"> export type ProductOrderByWithAggregationInput = { @@ -349,9 +346,9 @@ export type ProductOrderByWithAggregationInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - salePrice?: Prisma.SortOrder brandId?: Prisma.SortOrderInput | Prisma.SortOrder categoryId?: Prisma.SortOrderInput | Prisma.SortOrder + salePrice?: Prisma.SortOrder _count?: Prisma.ProductCountOrderByAggregateInput _avg?: Prisma.ProductAvgOrderByAggregateInput _max?: Prisma.ProductMaxOrderByAggregateInput @@ -371,9 +368,9 @@ export type ProductScalarWhereWithAggregatesInput = { createdAt?: Prisma.DateTimeWithAggregatesFilter<"Product"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Product"> | Date | string deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Product"> | Date | string | null - salePrice?: Prisma.DecimalWithAggregatesFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null categoryId?: Prisma.IntNullableWithAggregatesFilter<"Product"> | number | null + salePrice?: Prisma.DecimalWithAggregatesFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string } export type ProductCreateInput = { @@ -386,15 +383,14 @@ export type ProductCreateInput = { deletedAt?: Date | string | null salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateInput = { @@ -406,17 +402,16 @@ export type ProductUncheckedCreateInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: number | null categoryId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput } export type ProductUpdateInput = { @@ -429,15 +424,14 @@ export type ProductUpdateInput = { deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateInput = { @@ -449,17 +443,16 @@ export type ProductUncheckedUpdateInput = { 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 brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput } export type ProductCreateManyInput = { @@ -471,9 +464,9 @@ export type ProductCreateManyInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: number | null categoryId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string } export type ProductUpdateManyMutationInput = { @@ -496,9 +489,9 @@ export type ProductUncheckedUpdateManyInput = { 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 brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string } export type ProductScalarRelationFilter = { @@ -521,16 +514,16 @@ export type ProductCountOrderByAggregateInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder - salePrice?: Prisma.SortOrder brandId?: Prisma.SortOrder categoryId?: Prisma.SortOrder + salePrice?: Prisma.SortOrder } export type ProductAvgOrderByAggregateInput = { id?: Prisma.SortOrder - salePrice?: Prisma.SortOrder brandId?: Prisma.SortOrder categoryId?: Prisma.SortOrder + salePrice?: Prisma.SortOrder } export type ProductMaxOrderByAggregateInput = { @@ -542,9 +535,9 @@ export type ProductMaxOrderByAggregateInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder - salePrice?: Prisma.SortOrder brandId?: Prisma.SortOrder categoryId?: Prisma.SortOrder + salePrice?: Prisma.SortOrder } export type ProductMinOrderByAggregateInput = { @@ -556,16 +549,16 @@ export type ProductMinOrderByAggregateInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrder - salePrice?: Prisma.SortOrder brandId?: Prisma.SortOrder categoryId?: Prisma.SortOrder + salePrice?: Prisma.SortOrder } export type ProductSumOrderByAggregateInput = { id?: Prisma.SortOrder - salePrice?: Prisma.SortOrder brandId?: Prisma.SortOrder categoryId?: Prisma.SortOrder + salePrice?: Prisma.SortOrder } export type ProductListRelationFilter = { @@ -578,6 +571,34 @@ 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 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 ProductCreateNestedOneWithoutVariantsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.ProductCreateOrConnectWithoutVariantsInput @@ -592,14 +613,6 @@ export type ProductUpdateOneRequiredWithoutVariantsNestedInput = { update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutVariantsInput> } -export type NullableIntFieldUpdateOperationsInput = { - set?: number | null - increment?: number - decrement?: number - multiply?: number - divide?: number -} - export type ProductCreateNestedManyWithoutBrandInput = { create?: Prisma.XOR | Prisma.ProductCreateWithoutBrandInput[] | Prisma.ProductUncheckedCreateWithoutBrandInput[] connectOrCreate?: Prisma.ProductCreateOrConnectWithoutBrandInput | Prisma.ProductCreateOrConnectWithoutBrandInput[] @@ -684,20 +697,6 @@ export type ProductUncheckedUpdateManyWithoutCategoryNestedInput = { deleteMany?: Prisma.ProductScalarWhereInput | Prisma.ProductScalarWhereInput[] } -export type ProductCreateNestedOneWithoutProductChargesInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutProductChargesInput - connect?: Prisma.ProductWhereUniqueInput -} - -export type ProductUpdateOneRequiredWithoutProductChargesNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.ProductCreateOrConnectWithoutProductChargesInput - upsert?: Prisma.ProductUpsertWithoutProductChargesInput - connect?: Prisma.ProductWhereUniqueInput - update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutProductChargesInput> -} - export type ProductCreateNestedOneWithoutPurchaseReceiptItemsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.ProductCreateOrConnectWithoutPurchaseReceiptItemsInput @@ -712,20 +711,6 @@ export type ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput = { 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 @@ -754,20 +739,6 @@ export type ProductUpdateOneRequiredWithoutStockBalancesNestedInput = { update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutStockBalancesInput> } -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 ProductCreateNestedOneWithoutStockAdjustmentsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockAdjustmentsInput @@ -782,6 +753,194 @@ export type ProductUpdateOneRequiredWithoutStockAdjustmentsNestedInput = { update?: Prisma.XOR, Prisma.ProductUncheckedUpdateWithoutStockAdjustmentsInput> } +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 + variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput + brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput + category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput + purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput + salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput +} + +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 + variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput + purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput +} + +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 + variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput + brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput + category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput + purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput + salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput +} + +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 + variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput + purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput + salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput +} + +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 + inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput + variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput + brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput + category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput + purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput + stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput + stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput +} + +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 + inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput + variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput + purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput + stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput +} + +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 + inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput + variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput + brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput + category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput + purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput + stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput + stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput +} + +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 + inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput + variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput + purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput + stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput + stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput +} + export type ProductCreateWithoutVariantsInput = { name: string description?: string | null @@ -792,14 +951,13 @@ export type ProductCreateWithoutVariantsInput = { deletedAt?: Date | string | null salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutVariantsInput = { @@ -811,16 +969,15 @@ export type ProductUncheckedCreateWithoutVariantsInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: number | null categoryId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutVariantsInput = { @@ -849,14 +1006,13 @@ export type ProductUpdateWithoutVariantsInput = { deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutVariantsInput = { @@ -868,16 +1024,15 @@ export type ProductUncheckedUpdateWithoutVariantsInput = { 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 brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput } export type ProductCreateWithoutBrandInput = { @@ -890,14 +1045,13 @@ export type ProductCreateWithoutBrandInput = { deletedAt?: Date | string | null salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutBrandInput = { @@ -909,16 +1063,15 @@ export type ProductUncheckedCreateWithoutBrandInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string categoryId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutBrandInput = { @@ -959,9 +1112,9 @@ export type ProductScalarWhereInput = { createdAt?: Prisma.DateTimeFilter<"Product"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Product"> | Date | string deletedAt?: Prisma.DateTimeNullableFilter<"Product"> | Date | string | null - salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: Prisma.IntNullableFilter<"Product"> | number | null categoryId?: Prisma.IntNullableFilter<"Product"> | number | null + salePrice?: Prisma.DecimalFilter<"Product"> | runtime.Decimal | runtime.DecimalJsLike | number | string } export type ProductCreateWithoutCategoryInput = { @@ -974,14 +1127,13 @@ export type ProductCreateWithoutCategoryInput = { deletedAt?: Date | string | null salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutCategoryInput = { @@ -993,16 +1145,15 @@ export type ProductUncheckedCreateWithoutCategoryInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutCategoryInput = { @@ -1031,104 +1182,6 @@ export type ProductUpdateManyWithWhereWithoutCategoryInput = { data: Prisma.XOR } -export type ProductCreateWithoutProductChargesInput = { - 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 - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput -} - -export type ProductUncheckedCreateWithoutProductChargesInput = { - id?: number - 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 - brandId?: number | null - categoryId?: number | null - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput -} - -export type ProductCreateOrConnectWithoutProductChargesInput = { - where: Prisma.ProductWhereUniqueInput - create: Prisma.XOR -} - -export type ProductUpsertWithoutProductChargesInput = { - update: Prisma.XOR - create: Prisma.XOR - where?: Prisma.ProductWhereInput -} - -export type ProductUpdateToOneWithWhereWithoutProductChargesInput = { - where?: Prisma.ProductWhereInput - data: Prisma.XOR -} - -export type ProductUpdateWithoutProductChargesInput = { - 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 - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput -} - -export type ProductUncheckedUpdateWithoutProductChargesInput = { - 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 - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput -} - export type ProductCreateWithoutPurchaseReceiptItemsInput = { name: string description?: string | null @@ -1139,14 +1192,13 @@ export type ProductCreateWithoutPurchaseReceiptItemsInput = { deletedAt?: Date | string | null salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = { @@ -1158,16 +1210,15 @@ export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: number | null categoryId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutPurchaseReceiptItemsInput = { @@ -1196,14 +1247,13 @@ export type ProductUpdateWithoutPurchaseReceiptItemsInput = { deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = { @@ -1215,114 +1265,15 @@ export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = { 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 brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput -} - -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 - inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput -} - -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 - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - brandId?: number | null - categoryId?: number | null - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput -} - -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 - inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput -} - -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 - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput } export type ProductCreateWithoutStockMovementsInput = { @@ -1335,7 +1286,6 @@ export type ProductCreateWithoutStockMovementsInput = { deletedAt?: Date | string | null salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput @@ -1354,11 +1304,10 @@ export type ProductUncheckedCreateWithoutStockMovementsInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: number | null categoryId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput @@ -1392,7 +1341,6 @@ export type ProductUpdateWithoutStockMovementsInput = { deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput @@ -1411,11 +1359,10 @@ export type ProductUncheckedUpdateWithoutStockMovementsInput = { 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 brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput @@ -1433,7 +1380,6 @@ export type ProductCreateWithoutStockBalancesInput = { deletedAt?: Date | string | null salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput @@ -1452,11 +1398,10 @@ export type ProductUncheckedCreateWithoutStockBalancesInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: number | null categoryId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput @@ -1490,7 +1435,6 @@ export type ProductUpdateWithoutStockBalancesInput = { deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput @@ -1509,11 +1453,10 @@ export type ProductUncheckedUpdateWithoutStockBalancesInput = { 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 brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput @@ -1521,104 +1464,6 @@ export type ProductUncheckedUpdateWithoutStockBalancesInput = { stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput } -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 - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput - brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput - category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput -} - -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 - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string - brandId?: number | null - categoryId?: number | null - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput - variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput - stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput -} - -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 - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput - brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput - category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput -} - -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 - salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput - variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput - purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput - salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput - stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput -} - export type ProductCreateWithoutStockAdjustmentsInput = { name: string description?: string | null @@ -1629,14 +1474,13 @@ export type ProductCreateWithoutStockAdjustmentsInput = { deletedAt?: Date | string | null salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput } export type ProductUncheckedCreateWithoutStockAdjustmentsInput = { @@ -1648,16 +1492,15 @@ export type ProductUncheckedCreateWithoutStockAdjustmentsInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: number | null categoryId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutProductInput variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput - stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput + stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput } export type ProductCreateOrConnectWithoutStockAdjustmentsInput = { @@ -1686,14 +1529,13 @@ export type ProductUpdateWithoutStockAdjustmentsInput = { deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = { @@ -1705,16 +1547,15 @@ export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = { 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 brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput } export type ProductCreateManyBrandInput = { @@ -1726,8 +1567,8 @@ export type ProductCreateManyBrandInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string categoryId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string } export type ProductUpdateWithoutBrandInput = { @@ -1740,14 +1581,13 @@ export type ProductUpdateWithoutBrandInput = { deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutBrandInput = { @@ -1759,16 +1599,15 @@ export type ProductUncheckedUpdateWithoutBrandInput = { 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 categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateManyWithoutBrandInput = { @@ -1780,8 +1619,8 @@ export type ProductUncheckedUpdateManyWithoutBrandInput = { 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 categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string } export type ProductCreateManyCategoryInput = { @@ -1793,8 +1632,8 @@ export type ProductCreateManyCategoryInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string brandId?: number | null + salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string } export type ProductUpdateWithoutCategoryInput = { @@ -1807,14 +1646,13 @@ export type ProductUpdateWithoutCategoryInput = { deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateWithoutCategoryInput = { @@ -1826,16 +1664,15 @@ export type ProductUncheckedUpdateWithoutCategoryInput = { 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 brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutProductNestedInput variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput - stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput + stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput } export type ProductUncheckedUpdateManyWithoutCategoryInput = { @@ -1847,8 +1684,8 @@ export type ProductUncheckedUpdateManyWithoutCategoryInput = { 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 brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string } @@ -1858,24 +1695,22 @@ export type ProductUncheckedUpdateManyWithoutCategoryInput = { export type ProductCountOutputType = { inventoryTransferItems: number - productCharges: number variants: number purchaseReceiptItems: number salesInvoiceItems: number stockAdjustments: number - stockMovements: number stockBalances: number + stockMovements: number } export type ProductCountOutputTypeSelect = { inventoryTransferItems?: boolean | ProductCountOutputTypeCountInventoryTransferItemsArgs - productCharges?: boolean | ProductCountOutputTypeCountProductChargesArgs variants?: boolean | ProductCountOutputTypeCountVariantsArgs purchaseReceiptItems?: boolean | ProductCountOutputTypeCountPurchaseReceiptItemsArgs salesInvoiceItems?: boolean | ProductCountOutputTypeCountSalesInvoiceItemsArgs stockAdjustments?: boolean | ProductCountOutputTypeCountStockAdjustmentsArgs - stockMovements?: boolean | ProductCountOutputTypeCountStockMovementsArgs stockBalances?: boolean | ProductCountOutputTypeCountStockBalancesArgs + stockMovements?: boolean | ProductCountOutputTypeCountStockMovementsArgs } /** @@ -1895,13 +1730,6 @@ export type ProductCountOutputTypeCountInventoryTransferItemsArgs = { - where?: Prisma.ProductChargeWhereInput -} - /** * ProductCountOutputType without action */ @@ -1933,15 +1761,15 @@ export type ProductCountOutputTypeCountStockAdjustmentsArgs = { - where?: Prisma.StockMovementWhereInput +export type ProductCountOutputTypeCountStockBalancesArgs = { + where?: Prisma.StockBalanceWhereInput } /** * ProductCountOutputType without action */ -export type ProductCountOutputTypeCountStockBalancesArgs = { - where?: Prisma.StockBalanceWhereInput +export type ProductCountOutputTypeCountStockMovementsArgs = { + where?: Prisma.StockMovementWhereInput } @@ -1954,19 +1782,18 @@ export type ProductSelect - productCharges?: boolean | Prisma.Product$productChargesArgs variants?: boolean | Prisma.Product$variantsArgs brand?: boolean | Prisma.Product$brandArgs category?: boolean | Prisma.Product$categoryArgs purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs - stockMovements?: boolean | Prisma.Product$stockMovementsArgs stockBalances?: boolean | Prisma.Product$stockBalancesArgs + stockMovements?: boolean | Prisma.Product$stockMovementsArgs _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs }, ExtArgs["result"]["product"]> @@ -1981,23 +1808,22 @@ export type ProductSelectScalar = { createdAt?: boolean updatedAt?: boolean deletedAt?: boolean - salePrice?: boolean brandId?: boolean categoryId?: boolean + salePrice?: boolean } -export type ProductOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "sku" | "barcode" | "createdAt" | "updatedAt" | "deletedAt" | "salePrice" | "brandId" | "categoryId", ExtArgs["result"]["product"]> +export type ProductOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "sku" | "barcode" | "createdAt" | "updatedAt" | "deletedAt" | "brandId" | "categoryId" | "salePrice", ExtArgs["result"]["product"]> export type ProductInclude = { inventoryTransferItems?: boolean | Prisma.Product$inventoryTransferItemsArgs - productCharges?: boolean | Prisma.Product$productChargesArgs variants?: boolean | Prisma.Product$variantsArgs brand?: boolean | Prisma.Product$brandArgs category?: boolean | Prisma.Product$categoryArgs purchaseReceiptItems?: boolean | Prisma.Product$purchaseReceiptItemsArgs salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs stockAdjustments?: boolean | Prisma.Product$stockAdjustmentsArgs - stockMovements?: boolean | Prisma.Product$stockMovementsArgs stockBalances?: boolean | Prisma.Product$stockBalancesArgs + stockMovements?: boolean | Prisma.Product$stockMovementsArgs _count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs } @@ -2005,15 +1831,14 @@ export type $ProductPayload[] - productCharges: Prisma.$ProductChargePayload[] variants: Prisma.$ProductVariantPayload[] brand: Prisma.$ProductBrandPayload | null category: Prisma.$ProductCategoryPayload | null purchaseReceiptItems: Prisma.$PurchaseReceiptItemPayload[] salesInvoiceItems: Prisma.$SalesInvoiceItemPayload[] stockAdjustments: Prisma.$StockAdjustmentPayload[] - stockMovements: Prisma.$StockMovementPayload[] stockBalances: Prisma.$StockBalancePayload[] + stockMovements: Prisma.$StockMovementPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number @@ -2024,9 +1849,9 @@ export type $ProductPayload composites: {} } @@ -2368,15 +2193,14 @@ readonly fields: ProductFieldRefs; export interface Prisma__ProductClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" inventoryTransferItems = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - productCharges = {}>(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> salesInvoiceItems = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> stockAdjustments = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> - stockMovements = {}>(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> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -2414,9 +2238,9 @@ export interface ProductFieldRefs { readonly createdAt: Prisma.FieldRef<"Product", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"Product", 'DateTime'> readonly deletedAt: Prisma.FieldRef<"Product", 'DateTime'> - readonly salePrice: Prisma.FieldRef<"Product", 'Decimal'> readonly brandId: Prisma.FieldRef<"Product", 'Int'> readonly categoryId: Prisma.FieldRef<"Product", 'Int'> + readonly salePrice: Prisma.FieldRef<"Product", 'Decimal'> } @@ -2783,30 +2607,6 @@ export type Product$inventoryTransferItemsArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - where?: Prisma.ProductChargeWhereInput - orderBy?: Prisma.ProductChargeOrderByWithRelationInput | Prisma.ProductChargeOrderByWithRelationInput[] - cursor?: Prisma.ProductChargeWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.ProductChargeScalarFieldEnum | Prisma.ProductChargeScalarFieldEnum[] -} - /** * Product.variants */ @@ -2941,30 +2741,6 @@ export type Product$stockAdjustmentsArgs = { - /** - * 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.stockBalances */ @@ -2989,6 +2765,30 @@ export type Product$stockBalancesArgs = { + /** + * 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 without action */ diff --git a/src/generated/prisma/models/ProductCharge.ts b/src/generated/prisma/models/ProductCharge.ts deleted file mode 100644 index b8b2d53..0000000 --- a/src/generated/prisma/models/ProductCharge.ts +++ /dev/null @@ -1,1881 +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 `ProductCharge` 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 ProductCharge - * - */ -export type ProductChargeModel = runtime.Types.Result.DefaultSelection - -export type AggregateProductCharge = { - _count: ProductChargeCountAggregateOutputType | null - _avg: ProductChargeAvgAggregateOutputType | null - _sum: ProductChargeSumAggregateOutputType | null - _min: ProductChargeMinAggregateOutputType | null - _max: ProductChargeMaxAggregateOutputType | null -} - -export type ProductChargeAvgAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - fee: runtime.Decimal | null - totalAmount: runtime.Decimal | null - productId: number | null - inventoryId: number | null - supplierId: number | null -} - -export type ProductChargeSumAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - fee: runtime.Decimal | null - totalAmount: runtime.Decimal | null - productId: number | null - inventoryId: number | null - supplierId: number | null -} - -export type ProductChargeMinAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - fee: runtime.Decimal | null - totalAmount: runtime.Decimal | null - isSettled: boolean | null - buyAt: Date | null - description: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - productId: number | null - inventoryId: number | null - supplierId: number | null -} - -export type ProductChargeMaxAggregateOutputType = { - id: number | null - count: runtime.Decimal | null - fee: runtime.Decimal | null - totalAmount: runtime.Decimal | null - isSettled: boolean | null - buyAt: Date | null - description: string | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null - productId: number | null - inventoryId: number | null - supplierId: number | null -} - -export type ProductChargeCountAggregateOutputType = { - id: number - count: number - fee: number - totalAmount: number - isSettled: number - buyAt: number - description: number - createdAt: number - updatedAt: number - deletedAt: number - productId: number - inventoryId: number - supplierId: number - _all: number -} - - -export type ProductChargeAvgAggregateInputType = { - id?: true - count?: true - fee?: true - totalAmount?: true - productId?: true - inventoryId?: true - supplierId?: true -} - -export type ProductChargeSumAggregateInputType = { - id?: true - count?: true - fee?: true - totalAmount?: true - productId?: true - inventoryId?: true - supplierId?: true -} - -export type ProductChargeMinAggregateInputType = { - id?: true - count?: true - fee?: true - totalAmount?: true - isSettled?: true - buyAt?: true - description?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - productId?: true - inventoryId?: true - supplierId?: true -} - -export type ProductChargeMaxAggregateInputType = { - id?: true - count?: true - fee?: true - totalAmount?: true - isSettled?: true - buyAt?: true - description?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - productId?: true - inventoryId?: true - supplierId?: true -} - -export type ProductChargeCountAggregateInputType = { - id?: true - count?: true - fee?: true - totalAmount?: true - isSettled?: true - buyAt?: true - description?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - productId?: true - inventoryId?: true - supplierId?: true - _all?: true -} - -export type ProductChargeAggregateArgs = { - /** - * Filter which ProductCharge to aggregate. - */ - where?: Prisma.ProductChargeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductCharges to fetch. - */ - orderBy?: Prisma.ProductChargeOrderByWithRelationInput | Prisma.ProductChargeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.ProductChargeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductCharges 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` ProductCharges. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned ProductCharges - **/ - _count?: true | ProductChargeCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: ProductChargeAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: ProductChargeSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: ProductChargeMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: ProductChargeMaxAggregateInputType -} - -export type GetProductChargeAggregateType = { - [P in keyof T & keyof AggregateProductCharge]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type ProductChargeGroupByArgs = { - where?: Prisma.ProductChargeWhereInput - orderBy?: Prisma.ProductChargeOrderByWithAggregationInput | Prisma.ProductChargeOrderByWithAggregationInput[] - by: Prisma.ProductChargeScalarFieldEnum[] | Prisma.ProductChargeScalarFieldEnum - having?: Prisma.ProductChargeScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: ProductChargeCountAggregateInputType | true - _avg?: ProductChargeAvgAggregateInputType - _sum?: ProductChargeSumAggregateInputType - _min?: ProductChargeMinAggregateInputType - _max?: ProductChargeMaxAggregateInputType -} - -export type ProductChargeGroupByOutputType = { - id: number - count: runtime.Decimal - fee: runtime.Decimal - totalAmount: runtime.Decimal - isSettled: boolean - buyAt: Date | null - description: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - productId: number - inventoryId: number - supplierId: number - _count: ProductChargeCountAggregateOutputType | null - _avg: ProductChargeAvgAggregateOutputType | null - _sum: ProductChargeSumAggregateOutputType | null - _min: ProductChargeMinAggregateOutputType | null - _max: ProductChargeMaxAggregateOutputType | null -} - -type GetProductChargeGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof ProductChargeGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type ProductChargeWhereInput = { - AND?: Prisma.ProductChargeWhereInput | Prisma.ProductChargeWhereInput[] - OR?: Prisma.ProductChargeWhereInput[] - NOT?: Prisma.ProductChargeWhereInput | Prisma.ProductChargeWhereInput[] - id?: Prisma.IntFilter<"ProductCharge"> | number - count?: Prisma.DecimalFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFilter<"ProductCharge"> | boolean - buyAt?: Prisma.DateTimeNullableFilter<"ProductCharge"> | Date | string | null - description?: Prisma.StringNullableFilter<"ProductCharge"> | string | null - createdAt?: Prisma.DateTimeFilter<"ProductCharge"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductCharge"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductCharge"> | Date | string | null - productId?: Prisma.IntFilter<"ProductCharge"> | number - inventoryId?: Prisma.IntFilter<"ProductCharge"> | number - supplierId?: Prisma.IntFilter<"ProductCharge"> | number - inventory?: Prisma.XOR - product?: Prisma.XOR - supplier?: Prisma.XOR -} - -export type ProductChargeOrderByWithRelationInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - isSettled?: Prisma.SortOrder - buyAt?: Prisma.SortOrderInput | Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - inventory?: Prisma.InventoryOrderByWithRelationInput - product?: Prisma.ProductOrderByWithRelationInput - supplier?: Prisma.SupplierOrderByWithRelationInput - _relevance?: Prisma.ProductChargeOrderByRelevanceInput -} - -export type ProductChargeWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.ProductChargeWhereInput | Prisma.ProductChargeWhereInput[] - OR?: Prisma.ProductChargeWhereInput[] - NOT?: Prisma.ProductChargeWhereInput | Prisma.ProductChargeWhereInput[] - count?: Prisma.DecimalFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFilter<"ProductCharge"> | boolean - buyAt?: Prisma.DateTimeNullableFilter<"ProductCharge"> | Date | string | null - description?: Prisma.StringNullableFilter<"ProductCharge"> | string | null - createdAt?: Prisma.DateTimeFilter<"ProductCharge"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductCharge"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductCharge"> | Date | string | null - productId?: Prisma.IntFilter<"ProductCharge"> | number - inventoryId?: Prisma.IntFilter<"ProductCharge"> | number - supplierId?: Prisma.IntFilter<"ProductCharge"> | number - inventory?: Prisma.XOR - product?: Prisma.XOR - supplier?: Prisma.XOR -}, "id"> - -export type ProductChargeOrderByWithAggregationInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - isSettled?: Prisma.SortOrder - buyAt?: Prisma.SortOrderInput | Prisma.SortOrder - description?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - supplierId?: Prisma.SortOrder - _count?: Prisma.ProductChargeCountOrderByAggregateInput - _avg?: Prisma.ProductChargeAvgOrderByAggregateInput - _max?: Prisma.ProductChargeMaxOrderByAggregateInput - _min?: Prisma.ProductChargeMinOrderByAggregateInput - _sum?: Prisma.ProductChargeSumOrderByAggregateInput -} - -export type ProductChargeScalarWhereWithAggregatesInput = { - AND?: Prisma.ProductChargeScalarWhereWithAggregatesInput | Prisma.ProductChargeScalarWhereWithAggregatesInput[] - OR?: Prisma.ProductChargeScalarWhereWithAggregatesInput[] - NOT?: Prisma.ProductChargeScalarWhereWithAggregatesInput | Prisma.ProductChargeScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"ProductCharge"> | number - count?: Prisma.DecimalWithAggregatesFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalWithAggregatesFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalWithAggregatesFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolWithAggregatesFilter<"ProductCharge"> | boolean - buyAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ProductCharge"> | Date | string | null - description?: Prisma.StringNullableWithAggregatesFilter<"ProductCharge"> | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"ProductCharge"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"ProductCharge"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"ProductCharge"> | Date | string | null - productId?: Prisma.IntWithAggregatesFilter<"ProductCharge"> | number - inventoryId?: Prisma.IntWithAggregatesFilter<"ProductCharge"> | number - supplierId?: Prisma.IntWithAggregatesFilter<"ProductCharge"> | number -} - -export type ProductChargeCreateInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventory: Prisma.InventoryCreateNestedOneWithoutProductChargesInput - product: Prisma.ProductCreateNestedOneWithoutProductChargesInput - supplier: Prisma.SupplierCreateNestedOneWithoutProductChargesInput -} - -export type ProductChargeUncheckedCreateInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - productId: number - inventoryId: number - supplierId: number -} - -export type ProductChargeUpdateInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventory?: Prisma.InventoryUpdateOneRequiredWithoutProductChargesNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutProductChargesNestedInput - supplier?: Prisma.SupplierUpdateOneRequiredWithoutProductChargesNestedInput -} - -export type ProductChargeUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - supplierId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type ProductChargeCreateManyInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - productId: number - inventoryId: number - supplierId: number -} - -export type ProductChargeUpdateManyMutationInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null -} - -export type ProductChargeUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - supplierId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type ProductChargeListRelationFilter = { - every?: Prisma.ProductChargeWhereInput - some?: Prisma.ProductChargeWhereInput - none?: Prisma.ProductChargeWhereInput -} - -export type ProductChargeOrderByRelationAggregateInput = { - _count?: Prisma.SortOrder -} - -export type ProductChargeOrderByRelevanceInput = { - fields: Prisma.ProductChargeOrderByRelevanceFieldEnum | Prisma.ProductChargeOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type ProductChargeCountOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - isSettled?: Prisma.SortOrder - buyAt?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type ProductChargeAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type ProductChargeMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - isSettled?: Prisma.SortOrder - buyAt?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type ProductChargeMinOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - isSettled?: Prisma.SortOrder - buyAt?: Prisma.SortOrder - description?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type ProductChargeSumOrderByAggregateInput = { - id?: Prisma.SortOrder - count?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalAmount?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - supplierId?: Prisma.SortOrder -} - -export type ProductChargeCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutProductInput[] | Prisma.ProductChargeUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutProductInput | Prisma.ProductChargeCreateOrConnectWithoutProductInput[] - createMany?: Prisma.ProductChargeCreateManyProductInputEnvelope - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] -} - -export type ProductChargeUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutProductInput[] | Prisma.ProductChargeUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutProductInput | Prisma.ProductChargeCreateOrConnectWithoutProductInput[] - createMany?: Prisma.ProductChargeCreateManyProductInputEnvelope - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] -} - -export type ProductChargeUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutProductInput[] | Prisma.ProductChargeUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutProductInput | Prisma.ProductChargeCreateOrConnectWithoutProductInput[] - upsert?: Prisma.ProductChargeUpsertWithWhereUniqueWithoutProductInput | Prisma.ProductChargeUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.ProductChargeCreateManyProductInputEnvelope - set?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - disconnect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - delete?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - update?: Prisma.ProductChargeUpdateWithWhereUniqueWithoutProductInput | Prisma.ProductChargeUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.ProductChargeUpdateManyWithWhereWithoutProductInput | Prisma.ProductChargeUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.ProductChargeScalarWhereInput | Prisma.ProductChargeScalarWhereInput[] -} - -export type ProductChargeUncheckedUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutProductInput[] | Prisma.ProductChargeUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutProductInput | Prisma.ProductChargeCreateOrConnectWithoutProductInput[] - upsert?: Prisma.ProductChargeUpsertWithWhereUniqueWithoutProductInput | Prisma.ProductChargeUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.ProductChargeCreateManyProductInputEnvelope - set?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - disconnect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - delete?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - update?: Prisma.ProductChargeUpdateWithWhereUniqueWithoutProductInput | Prisma.ProductChargeUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.ProductChargeUpdateManyWithWhereWithoutProductInput | Prisma.ProductChargeUpdateManyWithWhereWithoutProductInput[] - deleteMany?: Prisma.ProductChargeScalarWhereInput | Prisma.ProductChargeScalarWhereInput[] -} - -export type ProductChargeCreateNestedManyWithoutSupplierInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutSupplierInput[] | Prisma.ProductChargeUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutSupplierInput | Prisma.ProductChargeCreateOrConnectWithoutSupplierInput[] - createMany?: Prisma.ProductChargeCreateManySupplierInputEnvelope - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] -} - -export type ProductChargeUncheckedCreateNestedManyWithoutSupplierInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutSupplierInput[] | Prisma.ProductChargeUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutSupplierInput | Prisma.ProductChargeCreateOrConnectWithoutSupplierInput[] - createMany?: Prisma.ProductChargeCreateManySupplierInputEnvelope - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] -} - -export type ProductChargeUpdateManyWithoutSupplierNestedInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutSupplierInput[] | Prisma.ProductChargeUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutSupplierInput | Prisma.ProductChargeCreateOrConnectWithoutSupplierInput[] - upsert?: Prisma.ProductChargeUpsertWithWhereUniqueWithoutSupplierInput | Prisma.ProductChargeUpsertWithWhereUniqueWithoutSupplierInput[] - createMany?: Prisma.ProductChargeCreateManySupplierInputEnvelope - set?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - disconnect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - delete?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - update?: Prisma.ProductChargeUpdateWithWhereUniqueWithoutSupplierInput | Prisma.ProductChargeUpdateWithWhereUniqueWithoutSupplierInput[] - updateMany?: Prisma.ProductChargeUpdateManyWithWhereWithoutSupplierInput | Prisma.ProductChargeUpdateManyWithWhereWithoutSupplierInput[] - deleteMany?: Prisma.ProductChargeScalarWhereInput | Prisma.ProductChargeScalarWhereInput[] -} - -export type ProductChargeUncheckedUpdateManyWithoutSupplierNestedInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutSupplierInput[] | Prisma.ProductChargeUncheckedCreateWithoutSupplierInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutSupplierInput | Prisma.ProductChargeCreateOrConnectWithoutSupplierInput[] - upsert?: Prisma.ProductChargeUpsertWithWhereUniqueWithoutSupplierInput | Prisma.ProductChargeUpsertWithWhereUniqueWithoutSupplierInput[] - createMany?: Prisma.ProductChargeCreateManySupplierInputEnvelope - set?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - disconnect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - delete?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - update?: Prisma.ProductChargeUpdateWithWhereUniqueWithoutSupplierInput | Prisma.ProductChargeUpdateWithWhereUniqueWithoutSupplierInput[] - updateMany?: Prisma.ProductChargeUpdateManyWithWhereWithoutSupplierInput | Prisma.ProductChargeUpdateManyWithWhereWithoutSupplierInput[] - deleteMany?: Prisma.ProductChargeScalarWhereInput | Prisma.ProductChargeScalarWhereInput[] -} - -export type ProductChargeCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutInventoryInput[] | Prisma.ProductChargeUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutInventoryInput | Prisma.ProductChargeCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.ProductChargeCreateManyInventoryInputEnvelope - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] -} - -export type ProductChargeUncheckedCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutInventoryInput[] | Prisma.ProductChargeUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutInventoryInput | Prisma.ProductChargeCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.ProductChargeCreateManyInventoryInputEnvelope - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] -} - -export type ProductChargeUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutInventoryInput[] | Prisma.ProductChargeUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutInventoryInput | Prisma.ProductChargeCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.ProductChargeUpsertWithWhereUniqueWithoutInventoryInput | Prisma.ProductChargeUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.ProductChargeCreateManyInventoryInputEnvelope - set?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - disconnect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - delete?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - update?: Prisma.ProductChargeUpdateWithWhereUniqueWithoutInventoryInput | Prisma.ProductChargeUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.ProductChargeUpdateManyWithWhereWithoutInventoryInput | Prisma.ProductChargeUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.ProductChargeScalarWhereInput | Prisma.ProductChargeScalarWhereInput[] -} - -export type ProductChargeUncheckedUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.ProductChargeCreateWithoutInventoryInput[] | Prisma.ProductChargeUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.ProductChargeCreateOrConnectWithoutInventoryInput | Prisma.ProductChargeCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.ProductChargeUpsertWithWhereUniqueWithoutInventoryInput | Prisma.ProductChargeUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.ProductChargeCreateManyInventoryInputEnvelope - set?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - disconnect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - delete?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - connect?: Prisma.ProductChargeWhereUniqueInput | Prisma.ProductChargeWhereUniqueInput[] - update?: Prisma.ProductChargeUpdateWithWhereUniqueWithoutInventoryInput | Prisma.ProductChargeUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.ProductChargeUpdateManyWithWhereWithoutInventoryInput | Prisma.ProductChargeUpdateManyWithWhereWithoutInventoryInput[] - deleteMany?: Prisma.ProductChargeScalarWhereInput | Prisma.ProductChargeScalarWhereInput[] -} - -export type ProductChargeCreateWithoutProductInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventory: Prisma.InventoryCreateNestedOneWithoutProductChargesInput - supplier: Prisma.SupplierCreateNestedOneWithoutProductChargesInput -} - -export type ProductChargeUncheckedCreateWithoutProductInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryId: number - supplierId: number -} - -export type ProductChargeCreateOrConnectWithoutProductInput = { - where: Prisma.ProductChargeWhereUniqueInput - create: Prisma.XOR -} - -export type ProductChargeCreateManyProductInputEnvelope = { - data: Prisma.ProductChargeCreateManyProductInput | Prisma.ProductChargeCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type ProductChargeUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.ProductChargeWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type ProductChargeUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.ProductChargeWhereUniqueInput - data: Prisma.XOR -} - -export type ProductChargeUpdateManyWithWhereWithoutProductInput = { - where: Prisma.ProductChargeScalarWhereInput - data: Prisma.XOR -} - -export type ProductChargeScalarWhereInput = { - AND?: Prisma.ProductChargeScalarWhereInput | Prisma.ProductChargeScalarWhereInput[] - OR?: Prisma.ProductChargeScalarWhereInput[] - NOT?: Prisma.ProductChargeScalarWhereInput | Prisma.ProductChargeScalarWhereInput[] - id?: Prisma.IntFilter<"ProductCharge"> | number - count?: Prisma.DecimalFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFilter<"ProductCharge"> | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFilter<"ProductCharge"> | boolean - buyAt?: Prisma.DateTimeNullableFilter<"ProductCharge"> | Date | string | null - description?: Prisma.StringNullableFilter<"ProductCharge"> | string | null - createdAt?: Prisma.DateTimeFilter<"ProductCharge"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"ProductCharge"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"ProductCharge"> | Date | string | null - productId?: Prisma.IntFilter<"ProductCharge"> | number - inventoryId?: Prisma.IntFilter<"ProductCharge"> | number - supplierId?: Prisma.IntFilter<"ProductCharge"> | number -} - -export type ProductChargeCreateWithoutSupplierInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventory: Prisma.InventoryCreateNestedOneWithoutProductChargesInput - product: Prisma.ProductCreateNestedOneWithoutProductChargesInput -} - -export type ProductChargeUncheckedCreateWithoutSupplierInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - productId: number - inventoryId: number -} - -export type ProductChargeCreateOrConnectWithoutSupplierInput = { - where: Prisma.ProductChargeWhereUniqueInput - create: Prisma.XOR -} - -export type ProductChargeCreateManySupplierInputEnvelope = { - data: Prisma.ProductChargeCreateManySupplierInput | Prisma.ProductChargeCreateManySupplierInput[] - skipDuplicates?: boolean -} - -export type ProductChargeUpsertWithWhereUniqueWithoutSupplierInput = { - where: Prisma.ProductChargeWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type ProductChargeUpdateWithWhereUniqueWithoutSupplierInput = { - where: Prisma.ProductChargeWhereUniqueInput - data: Prisma.XOR -} - -export type ProductChargeUpdateManyWithWhereWithoutSupplierInput = { - where: Prisma.ProductChargeScalarWhereInput - data: Prisma.XOR -} - -export type ProductChargeCreateWithoutInventoryInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - product: Prisma.ProductCreateNestedOneWithoutProductChargesInput - supplier: Prisma.SupplierCreateNestedOneWithoutProductChargesInput -} - -export type ProductChargeUncheckedCreateWithoutInventoryInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - productId: number - supplierId: number -} - -export type ProductChargeCreateOrConnectWithoutInventoryInput = { - where: Prisma.ProductChargeWhereUniqueInput - create: Prisma.XOR -} - -export type ProductChargeCreateManyInventoryInputEnvelope = { - data: Prisma.ProductChargeCreateManyInventoryInput | Prisma.ProductChargeCreateManyInventoryInput[] - skipDuplicates?: boolean -} - -export type ProductChargeUpsertWithWhereUniqueWithoutInventoryInput = { - where: Prisma.ProductChargeWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type ProductChargeUpdateWithWhereUniqueWithoutInventoryInput = { - where: Prisma.ProductChargeWhereUniqueInput - data: Prisma.XOR -} - -export type ProductChargeUpdateManyWithWhereWithoutInventoryInput = { - where: Prisma.ProductChargeScalarWhereInput - data: Prisma.XOR -} - -export type ProductChargeCreateManyProductInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - inventoryId: number - supplierId: number -} - -export type ProductChargeUpdateWithoutProductInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventory?: Prisma.InventoryUpdateOneRequiredWithoutProductChargesNestedInput - supplier?: Prisma.SupplierUpdateOneRequiredWithoutProductChargesNestedInput -} - -export type ProductChargeUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - supplierId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type ProductChargeUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - supplierId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type ProductChargeCreateManySupplierInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - productId: number - inventoryId: number -} - -export type ProductChargeUpdateWithoutSupplierInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - inventory?: Prisma.InventoryUpdateOneRequiredWithoutProductChargesNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutProductChargesNestedInput -} - -export type ProductChargeUncheckedUpdateWithoutSupplierInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type ProductChargeUncheckedUpdateManyWithoutSupplierInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type ProductChargeCreateManyInventoryInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: boolean - buyAt?: Date | string | null - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null - productId: number - supplierId: number -} - -export type ProductChargeUpdateWithoutInventoryInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - product?: Prisma.ProductUpdateOneRequiredWithoutProductChargesNestedInput - supplier?: Prisma.SupplierUpdateOneRequiredWithoutProductChargesNestedInput -} - -export type ProductChargeUncheckedUpdateWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productId?: Prisma.IntFieldUpdateOperationsInput | number - supplierId?: Prisma.IntFieldUpdateOperationsInput | number -} - -export type ProductChargeUncheckedUpdateManyWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean - buyAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productId?: Prisma.IntFieldUpdateOperationsInput | number - supplierId?: Prisma.IntFieldUpdateOperationsInput | number -} - - - -export type ProductChargeSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - count?: boolean - fee?: boolean - totalAmount?: boolean - isSettled?: boolean - buyAt?: boolean - description?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - productId?: boolean - inventoryId?: boolean - supplierId?: boolean - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs - supplier?: boolean | Prisma.SupplierDefaultArgs -}, ExtArgs["result"]["productCharge"]> - - - -export type ProductChargeSelectScalar = { - id?: boolean - count?: boolean - fee?: boolean - totalAmount?: boolean - isSettled?: boolean - buyAt?: boolean - description?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean - productId?: boolean - inventoryId?: boolean - supplierId?: boolean -} - -export type ProductChargeOmit = runtime.Types.Extensions.GetOmit<"id" | "count" | "fee" | "totalAmount" | "isSettled" | "buyAt" | "description" | "createdAt" | "updatedAt" | "deletedAt" | "productId" | "inventoryId" | "supplierId", ExtArgs["result"]["productCharge"]> -export type ProductChargeInclude = { - inventory?: boolean | Prisma.InventoryDefaultArgs - product?: boolean | Prisma.ProductDefaultArgs - supplier?: boolean | Prisma.SupplierDefaultArgs -} - -export type $ProductChargePayload = { - name: "ProductCharge" - objects: { - inventory: Prisma.$InventoryPayload - product: Prisma.$ProductPayload - supplier: Prisma.$SupplierPayload - } - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - count: runtime.Decimal - fee: runtime.Decimal - totalAmount: runtime.Decimal - isSettled: boolean - buyAt: Date | null - description: string | null - createdAt: Date - updatedAt: Date - deletedAt: Date | null - productId: number - inventoryId: number - supplierId: number - }, ExtArgs["result"]["productCharge"]> - composites: {} -} - -export type ProductChargeGetPayload = runtime.Types.Result.GetResult - -export type ProductChargeCountArgs = - Omit & { - select?: ProductChargeCountAggregateInputType | true - } - -export interface ProductChargeDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['ProductCharge'], meta: { name: 'ProductCharge' } } - /** - * Find zero or one ProductCharge that matches the filter. - * @param {ProductChargeFindUniqueArgs} args - Arguments to find a ProductCharge - * @example - * // Get one ProductCharge - * const productCharge = await prisma.productCharge.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__ProductChargeClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one ProductCharge that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {ProductChargeFindUniqueOrThrowArgs} args - Arguments to find a ProductCharge - * @example - * // Get one ProductCharge - * const productCharge = await prisma.productCharge.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__ProductChargeClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ProductCharge 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 {ProductChargeFindFirstArgs} args - Arguments to find a ProductCharge - * @example - * // Get one ProductCharge - * const productCharge = await prisma.productCharge.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductChargeClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first ProductCharge 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 {ProductChargeFindFirstOrThrowArgs} args - Arguments to find a ProductCharge - * @example - * // Get one ProductCharge - * const productCharge = await prisma.productCharge.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__ProductChargeClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more ProductCharges 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 {ProductChargeFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all ProductCharges - * const productCharges = await prisma.productCharge.findMany() - * - * // Get first 10 ProductCharges - * const productCharges = await prisma.productCharge.findMany({ take: 10 }) - * - * // Only select the `id` - * const productChargeWithIdOnly = await prisma.productCharge.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a ProductCharge. - * @param {ProductChargeCreateArgs} args - Arguments to create a ProductCharge. - * @example - * // Create one ProductCharge - * const ProductCharge = await prisma.productCharge.create({ - * data: { - * // ... data to create a ProductCharge - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__ProductChargeClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many ProductCharges. - * @param {ProductChargeCreateManyArgs} args - Arguments to create many ProductCharges. - * @example - * // Create many ProductCharges - * const productCharge = await prisma.productCharge.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a ProductCharge. - * @param {ProductChargeDeleteArgs} args - Arguments to delete one ProductCharge. - * @example - * // Delete one ProductCharge - * const ProductCharge = await prisma.productCharge.delete({ - * where: { - * // ... filter to delete one ProductCharge - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__ProductChargeClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one ProductCharge. - * @param {ProductChargeUpdateArgs} args - Arguments to update one ProductCharge. - * @example - * // Update one ProductCharge - * const productCharge = await prisma.productCharge.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__ProductChargeClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more ProductCharges. - * @param {ProductChargeDeleteManyArgs} args - Arguments to filter ProductCharges to delete. - * @example - * // Delete a few ProductCharges - * const { count } = await prisma.productCharge.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more ProductCharges. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductChargeUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many ProductCharges - * const productCharge = await prisma.productCharge.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one ProductCharge. - * @param {ProductChargeUpsertArgs} args - Arguments to update or create a ProductCharge. - * @example - * // Update or create a ProductCharge - * const productCharge = await prisma.productCharge.upsert({ - * create: { - * // ... data to create a ProductCharge - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the ProductCharge we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__ProductChargeClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of ProductCharges. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductChargeCountArgs} args - Arguments to filter ProductCharges to count. - * @example - * // Count the number of ProductCharges - * const count = await prisma.productCharge.count({ - * where: { - * // ... the filter for the ProductCharges 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 ProductCharge. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductChargeAggregateArgs} 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 ProductCharge. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {ProductChargeGroupByArgs} 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 ProductChargeGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: ProductChargeGroupByArgs['orderBy'] } - : { orderBy?: ProductChargeGroupByArgs['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 ? GetProductChargeGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the ProductCharge model - */ -readonly fields: ProductChargeFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for ProductCharge. - * 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__ProductChargeClient 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> - 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 ProductCharge model - */ -export interface ProductChargeFieldRefs { - readonly id: Prisma.FieldRef<"ProductCharge", 'Int'> - readonly count: Prisma.FieldRef<"ProductCharge", 'Decimal'> - readonly fee: Prisma.FieldRef<"ProductCharge", 'Decimal'> - readonly totalAmount: Prisma.FieldRef<"ProductCharge", 'Decimal'> - readonly isSettled: Prisma.FieldRef<"ProductCharge", 'Boolean'> - readonly buyAt: Prisma.FieldRef<"ProductCharge", 'DateTime'> - readonly description: Prisma.FieldRef<"ProductCharge", 'String'> - readonly createdAt: Prisma.FieldRef<"ProductCharge", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"ProductCharge", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"ProductCharge", 'DateTime'> - readonly productId: Prisma.FieldRef<"ProductCharge", 'Int'> - readonly inventoryId: Prisma.FieldRef<"ProductCharge", 'Int'> - readonly supplierId: Prisma.FieldRef<"ProductCharge", 'Int'> -} - - -// Custom InputTypes -/** - * ProductCharge findUnique - */ -export type ProductChargeFindUniqueArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - /** - * Filter, which ProductCharge to fetch. - */ - where: Prisma.ProductChargeWhereUniqueInput -} - -/** - * ProductCharge findUniqueOrThrow - */ -export type ProductChargeFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - /** - * Filter, which ProductCharge to fetch. - */ - where: Prisma.ProductChargeWhereUniqueInput -} - -/** - * ProductCharge findFirst - */ -export type ProductChargeFindFirstArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - /** - * Filter, which ProductCharge to fetch. - */ - where?: Prisma.ProductChargeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductCharges to fetch. - */ - orderBy?: Prisma.ProductChargeOrderByWithRelationInput | Prisma.ProductChargeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProductCharges. - */ - cursor?: Prisma.ProductChargeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductCharges 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` ProductCharges. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProductCharges. - */ - distinct?: Prisma.ProductChargeScalarFieldEnum | Prisma.ProductChargeScalarFieldEnum[] -} - -/** - * ProductCharge findFirstOrThrow - */ -export type ProductChargeFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - /** - * Filter, which ProductCharge to fetch. - */ - where?: Prisma.ProductChargeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductCharges to fetch. - */ - orderBy?: Prisma.ProductChargeOrderByWithRelationInput | Prisma.ProductChargeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for ProductCharges. - */ - cursor?: Prisma.ProductChargeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductCharges 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` ProductCharges. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of ProductCharges. - */ - distinct?: Prisma.ProductChargeScalarFieldEnum | Prisma.ProductChargeScalarFieldEnum[] -} - -/** - * ProductCharge findMany - */ -export type ProductChargeFindManyArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - /** - * Filter, which ProductCharges to fetch. - */ - where?: Prisma.ProductChargeWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of ProductCharges to fetch. - */ - orderBy?: Prisma.ProductChargeOrderByWithRelationInput | Prisma.ProductChargeOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing ProductCharges. - */ - cursor?: Prisma.ProductChargeWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` ProductCharges 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` ProductCharges. - */ - skip?: number - distinct?: Prisma.ProductChargeScalarFieldEnum | Prisma.ProductChargeScalarFieldEnum[] -} - -/** - * ProductCharge create - */ -export type ProductChargeCreateArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - /** - * The data needed to create a ProductCharge. - */ - data: Prisma.XOR -} - -/** - * ProductCharge createMany - */ -export type ProductChargeCreateManyArgs = { - /** - * The data used to create many ProductCharges. - */ - data: Prisma.ProductChargeCreateManyInput | Prisma.ProductChargeCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * ProductCharge update - */ -export type ProductChargeUpdateArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - /** - * The data needed to update a ProductCharge. - */ - data: Prisma.XOR - /** - * Choose, which ProductCharge to update. - */ - where: Prisma.ProductChargeWhereUniqueInput -} - -/** - * ProductCharge updateMany - */ -export type ProductChargeUpdateManyArgs = { - /** - * The data used to update ProductCharges. - */ - data: Prisma.XOR - /** - * Filter which ProductCharges to update - */ - where?: Prisma.ProductChargeWhereInput - /** - * Limit how many ProductCharges to update. - */ - limit?: number -} - -/** - * ProductCharge upsert - */ -export type ProductChargeUpsertArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - /** - * The filter to search for the ProductCharge to update in case it exists. - */ - where: Prisma.ProductChargeWhereUniqueInput - /** - * In case the ProductCharge found by the `where` argument doesn't exist, create a new ProductCharge with this data. - */ - create: Prisma.XOR - /** - * In case the ProductCharge was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * ProductCharge delete - */ -export type ProductChargeDeleteArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - /** - * Filter which ProductCharge to delete. - */ - where: Prisma.ProductChargeWhereUniqueInput -} - -/** - * ProductCharge deleteMany - */ -export type ProductChargeDeleteManyArgs = { - /** - * Filter which ProductCharges to delete - */ - where?: Prisma.ProductChargeWhereInput - /** - * Limit how many ProductCharges to delete. - */ - limit?: number -} - -/** - * ProductCharge without action - */ -export type ProductChargeDefaultArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null -} diff --git a/src/generated/prisma/models/ProductVariant.ts b/src/generated/prisma/models/ProductVariant.ts index c01a7f7..f15dcee 100644 --- a/src/generated/prisma/models/ProductVariant.ts +++ b/src/generated/prisma/models/ProductVariant.ts @@ -637,14 +637,6 @@ export type ProductVariantOrderByRelationAggregateInput = { _count?: Prisma.SortOrder } -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 NullableDecimalFieldUpdateOperationsInput = { set?: runtime.Decimal | runtime.DecimalJsLike | number | string | null increment?: runtime.Decimal | runtime.DecimalJsLike | number | string @@ -653,10 +645,6 @@ export type NullableDecimalFieldUpdateOperationsInput = { divide?: runtime.Decimal | runtime.DecimalJsLike | number | string } -export type BoolFieldUpdateOperationsInput = { - set?: boolean -} - export type ProductVariantCreateNestedManyWithoutProductInput = { create?: Prisma.XOR | Prisma.ProductVariantCreateWithoutProductInput[] | Prisma.ProductVariantUncheckedCreateWithoutProductInput[] connectOrCreate?: Prisma.ProductVariantCreateOrConnectWithoutProductInput | Prisma.ProductVariantCreateOrConnectWithoutProductInput[] diff --git a/src/generated/prisma/models/PurchaseReceipt.ts b/src/generated/prisma/models/PurchaseReceipt.ts index 530b842..8303749 100644 --- a/src/generated/prisma/models/PurchaseReceipt.ts +++ b/src/generated/prisma/models/PurchaseReceipt.ts @@ -29,6 +29,7 @@ export type AggregatePurchaseReceipt = { export type PurchaseReceiptAvgAggregateOutputType = { id: number | null totalAmount: runtime.Decimal | null + paidAmount: runtime.Decimal | null supplierId: number | null inventoryId: number | null } @@ -36,6 +37,7 @@ export type PurchaseReceiptAvgAggregateOutputType = { export type PurchaseReceiptSumAggregateOutputType = { id: number | null totalAmount: runtime.Decimal | null + paidAmount: runtime.Decimal | null supplierId: number | null inventoryId: number | null } @@ -44,6 +46,8 @@ export type PurchaseReceiptMinAggregateOutputType = { id: number | null code: string | null totalAmount: runtime.Decimal | null + paidAmount: runtime.Decimal | null + isSettled: boolean | null description: string | null createdAt: Date | null updatedAt: Date | null @@ -55,6 +59,8 @@ export type PurchaseReceiptMaxAggregateOutputType = { id: number | null code: string | null totalAmount: runtime.Decimal | null + paidAmount: runtime.Decimal | null + isSettled: boolean | null description: string | null createdAt: Date | null updatedAt: Date | null @@ -66,6 +72,8 @@ export type PurchaseReceiptCountAggregateOutputType = { id: number code: number totalAmount: number + paidAmount: number + isSettled: number description: number createdAt: number updatedAt: number @@ -78,6 +86,7 @@ export type PurchaseReceiptCountAggregateOutputType = { export type PurchaseReceiptAvgAggregateInputType = { id?: true totalAmount?: true + paidAmount?: true supplierId?: true inventoryId?: true } @@ -85,6 +94,7 @@ export type PurchaseReceiptAvgAggregateInputType = { export type PurchaseReceiptSumAggregateInputType = { id?: true totalAmount?: true + paidAmount?: true supplierId?: true inventoryId?: true } @@ -93,6 +103,8 @@ export type PurchaseReceiptMinAggregateInputType = { id?: true code?: true totalAmount?: true + paidAmount?: true + isSettled?: true description?: true createdAt?: true updatedAt?: true @@ -104,6 +116,8 @@ export type PurchaseReceiptMaxAggregateInputType = { id?: true code?: true totalAmount?: true + paidAmount?: true + isSettled?: true description?: true createdAt?: true updatedAt?: true @@ -115,6 +129,8 @@ export type PurchaseReceiptCountAggregateInputType = { id?: true code?: true totalAmount?: true + paidAmount?: true + isSettled?: true description?: true createdAt?: true updatedAt?: true @@ -213,6 +229,8 @@ export type PurchaseReceiptGroupByOutputType = { id: number code: string totalAmount: runtime.Decimal + paidAmount: runtime.Decimal + isSettled: boolean description: string | null createdAt: Date updatedAt: Date @@ -247,6 +265,8 @@ export type 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 + isSettled?: Prisma.BoolFilter<"PurchaseReceipt"> | boolean description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string @@ -255,12 +275,15 @@ export type PurchaseReceiptWhereInput = { items?: Prisma.PurchaseReceiptItemListRelationFilter inventory?: Prisma.XOR supplier?: Prisma.XOR + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter } export type PurchaseReceiptOrderByWithRelationInput = { id?: Prisma.SortOrder code?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + paidAmount?: Prisma.SortOrder + isSettled?: Prisma.SortOrder description?: Prisma.SortOrderInput | Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder @@ -269,6 +292,7 @@ export type PurchaseReceiptOrderByWithRelationInput = { items?: Prisma.PurchaseReceiptItemOrderByRelationAggregateInput inventory?: Prisma.InventoryOrderByWithRelationInput supplier?: Prisma.SupplierOrderByWithRelationInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput _relevance?: Prisma.PurchaseReceiptOrderByRelevanceInput } @@ -279,6 +303,8 @@ export type PurchaseReceiptWhereUniqueInput = Prisma.AtLeast<{ 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 + isSettled?: Prisma.BoolFilter<"PurchaseReceipt"> | boolean description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string @@ -287,12 +313,15 @@ export type PurchaseReceiptWhereUniqueInput = Prisma.AtLeast<{ items?: Prisma.PurchaseReceiptItemListRelationFilter inventory?: Prisma.XOR supplier?: Prisma.XOR + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter }, "id" | "code"> export type PurchaseReceiptOrderByWithAggregationInput = { id?: Prisma.SortOrder code?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + paidAmount?: Prisma.SortOrder + isSettled?: Prisma.SortOrder description?: Prisma.SortOrderInput | Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder @@ -312,6 +341,8 @@ export type 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 + isSettled?: Prisma.BoolWithAggregatesFilter<"PurchaseReceipt"> | boolean description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceipt"> | string | null createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceipt"> | Date | string updatedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceipt"> | Date | string @@ -322,53 +353,67 @@ export type PurchaseReceiptScalarWhereWithAggregatesInput = { export type PurchaseReceiptCreateInput = { code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean description?: string | null createdAt?: Date | string updatedAt?: Date | string items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput } export type PurchaseReceiptUncheckedCreateInput = { id?: number code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean description?: string | null createdAt?: Date | string updatedAt?: Date | string supplierId: number inventoryId: number items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput } 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput } 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string supplierId?: Prisma.IntFieldUpdateOperationsInput | number inventoryId?: Prisma.IntFieldUpdateOperationsInput | number items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput } export type PurchaseReceiptCreateManyInput = { id?: number code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean description?: string | null createdAt?: Date | string updatedAt?: Date | string @@ -379,6 +424,8 @@ export type PurchaseReceiptCreateManyInput = { 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string @@ -388,6 +435,8 @@ 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string @@ -415,6 +464,8 @@ export type PurchaseReceiptCountOrderByAggregateInput = { id?: Prisma.SortOrder code?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + paidAmount?: Prisma.SortOrder + isSettled?: Prisma.SortOrder description?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder @@ -425,6 +476,7 @@ export type PurchaseReceiptCountOrderByAggregateInput = { export type PurchaseReceiptAvgOrderByAggregateInput = { id?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + paidAmount?: Prisma.SortOrder supplierId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder } @@ -433,6 +485,8 @@ export type PurchaseReceiptMaxOrderByAggregateInput = { id?: Prisma.SortOrder code?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + paidAmount?: Prisma.SortOrder + isSettled?: Prisma.SortOrder description?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder @@ -444,6 +498,8 @@ export type PurchaseReceiptMinOrderByAggregateInput = { id?: Prisma.SortOrder code?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + paidAmount?: Prisma.SortOrder + isSettled?: Prisma.SortOrder description?: Prisma.SortOrder createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder @@ -454,6 +510,7 @@ export type PurchaseReceiptMinOrderByAggregateInput = { export type PurchaseReceiptSumOrderByAggregateInput = { id?: Prisma.SortOrder totalAmount?: Prisma.SortOrder + paidAmount?: Prisma.SortOrder supplierId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder } @@ -463,48 +520,6 @@ export type PurchaseReceiptScalarRelationFilter = { isNot?: Prisma.PurchaseReceiptWhereInput } -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 PurchaseReceiptCreateNestedManyWithoutInventoryInput = { create?: Prisma.XOR | Prisma.PurchaseReceiptCreateWithoutInventoryInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutInventoryInput[] connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput | Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput[] @@ -547,6 +562,48 @@ export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput = { deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[] } +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 PurchaseReceiptCreateNestedOneWithoutItemsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutItemsInput @@ -561,86 +618,45 @@ export type PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput = { update?: Prisma.XOR, Prisma.PurchaseReceiptUncheckedUpdateWithoutItemsInput> } -export type PurchaseReceiptCreateWithoutSupplierInput = { - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput - inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput +export type PurchaseReceiptCreateNestedOneWithoutPurchaseReceiptPaymentsInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutPurchaseReceiptPaymentsInput + connect?: Prisma.PurchaseReceiptWhereUniqueInput } -export type PurchaseReceiptUncheckedCreateWithoutSupplierInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - inventoryId: number - items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput -} - -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 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 - description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null - createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string - supplierId?: Prisma.IntFilter<"PurchaseReceipt"> | number - inventoryId?: Prisma.IntFilter<"PurchaseReceipt"> | number +export type PurchaseReceiptUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutPurchaseReceiptPaymentsInput + upsert?: Prisma.PurchaseReceiptUpsertWithoutPurchaseReceiptPaymentsInput + connect?: Prisma.PurchaseReceiptWhereUniqueInput + update?: Prisma.XOR, Prisma.PurchaseReceiptUncheckedUpdateWithoutPurchaseReceiptPaymentsInput> } export type PurchaseReceiptCreateWithoutInventoryInput = { code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean description?: string | null createdAt?: Date | string updatedAt?: Date | string items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput } export type PurchaseReceiptUncheckedCreateWithoutInventoryInput = { id?: number code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean description?: string | null createdAt?: Date | string updatedAt?: Date | string supplierId: number items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput } export type PurchaseReceiptCreateOrConnectWithoutInventoryInput = { @@ -669,25 +685,100 @@ export type PurchaseReceiptUpdateManyWithWhereWithoutInventoryInput = { 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 + isSettled?: Prisma.BoolFilter<"PurchaseReceipt"> | boolean + description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null + createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string + updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string + supplierId?: Prisma.IntFilter<"PurchaseReceipt"> | number + inventoryId?: Prisma.IntFilter<"PurchaseReceipt"> | number +} + +export type PurchaseReceiptCreateWithoutSupplierInput = { + code: string + totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput + inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput +} + +export type PurchaseReceiptUncheckedCreateWithoutSupplierInput = { + id?: number + code: string + totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + inventoryId: number + items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput +} + +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 PurchaseReceiptCreateWithoutItemsInput = { code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean description?: string | null createdAt?: Date | string updatedAt?: Date | string inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput } export type PurchaseReceiptUncheckedCreateWithoutItemsInput = { id?: number code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean description?: string | null createdAt?: Date | string updatedAt?: Date | string supplierId: number inventoryId: number + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput } export type PurchaseReceiptCreateOrConnectWithoutItemsInput = { @@ -709,69 +800,106 @@ export type PurchaseReceiptUpdateToOneWithWhereWithoutItemsInput = { 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput } 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string supplierId?: Prisma.IntFieldUpdateOperationsInput | number inventoryId?: Prisma.IntFieldUpdateOperationsInput | number + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput } -export type PurchaseReceiptCreateManySupplierInput = { - id?: number +export type PurchaseReceiptCreateWithoutPurchaseReceiptPaymentsInput = { code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean description?: string | null createdAt?: Date | string updatedAt?: Date | string - inventoryId: number + items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput + inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput + supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput } -export type PurchaseReceiptUpdateWithoutSupplierInput = { +export type PurchaseReceiptUncheckedCreateWithoutPurchaseReceiptPaymentsInput = { + id?: number + code: string + totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + supplierId: number + inventoryId: number + items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput +} + +export type PurchaseReceiptCreateOrConnectWithoutPurchaseReceiptPaymentsInput = { + where: Prisma.PurchaseReceiptWhereUniqueInput + create: Prisma.XOR +} + +export type PurchaseReceiptUpsertWithoutPurchaseReceiptPaymentsInput = { + update: Prisma.XOR + create: Prisma.XOR + where?: Prisma.PurchaseReceiptWhereInput +} + +export type PurchaseReceiptUpdateToOneWithWhereWithoutPurchaseReceiptPaymentsInput = { + where?: Prisma.PurchaseReceiptWhereInput + data: Prisma.XOR +} + +export type PurchaseReceiptUpdateWithoutPurchaseReceiptPaymentsInput = { code?: Prisma.StringFieldUpdateOperationsInput | string totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput + supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput } -export type PurchaseReceiptUncheckedUpdateWithoutSupplierInput = { +export type PurchaseReceiptUncheckedUpdateWithoutPurchaseReceiptPaymentsInput = { 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + supplierId?: Prisma.IntFieldUpdateOperationsInput | number inventoryId?: Prisma.IntFieldUpdateOperationsInput | number items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput } -export type PurchaseReceiptUncheckedUpdateManyWithoutSupplierInput = { - 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 - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - export type PurchaseReceiptCreateManyInventoryInput = { id?: number code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string + isSettled?: boolean description?: string | null createdAt?: Date | string updatedAt?: Date | string @@ -781,34 +909,93 @@ export type PurchaseReceiptCreateManyInventoryInput = { 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput } 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string supplierId?: Prisma.IntFieldUpdateOperationsInput | number items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput } 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string 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 + isSettled?: boolean + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + 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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput + inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput +} + +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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number + items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput + purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput +} + +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 + isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number +} + /** * Count Type PurchaseReceiptCountOutputType @@ -816,10 +1003,12 @@ export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryInput = { export type PurchaseReceiptCountOutputType = { items: number + purchaseReceiptPayments: number } export type PurchaseReceiptCountOutputTypeSelect = { items?: boolean | PurchaseReceiptCountOutputTypeCountItemsArgs + purchaseReceiptPayments?: boolean | PurchaseReceiptCountOutputTypeCountPurchaseReceiptPaymentsArgs } /** @@ -839,11 +1028,20 @@ export type PurchaseReceiptCountOutputTypeCountItemsArgs = { + where?: Prisma.PurchaseReceiptPaymentsWhereInput +} + export type PurchaseReceiptSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean code?: boolean totalAmount?: boolean + paidAmount?: boolean + isSettled?: boolean description?: boolean createdAt?: boolean updatedAt?: boolean @@ -852,6 +1050,7 @@ export type PurchaseReceiptSelect inventory?: boolean | Prisma.InventoryDefaultArgs supplier?: boolean | Prisma.SupplierDefaultArgs + purchaseReceiptPayments?: boolean | Prisma.PurchaseReceipt$purchaseReceiptPaymentsArgs _count?: boolean | Prisma.PurchaseReceiptCountOutputTypeDefaultArgs }, ExtArgs["result"]["purchaseReceipt"]> @@ -861,6 +1060,8 @@ export type PurchaseReceiptSelectScalar = { id?: boolean code?: boolean totalAmount?: boolean + paidAmount?: boolean + isSettled?: boolean description?: boolean createdAt?: boolean updatedAt?: boolean @@ -868,11 +1069,12 @@ export type PurchaseReceiptSelectScalar = { inventoryId?: boolean } -export type PurchaseReceiptOmit = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "supplierId" | "inventoryId", ExtArgs["result"]["purchaseReceipt"]> +export type PurchaseReceiptOmit = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "paidAmount" | "isSettled" | "description" | "createdAt" | "updatedAt" | "supplierId" | "inventoryId", ExtArgs["result"]["purchaseReceipt"]> export type PurchaseReceiptInclude = { items?: boolean | Prisma.PurchaseReceipt$itemsArgs inventory?: boolean | Prisma.InventoryDefaultArgs supplier?: boolean | Prisma.SupplierDefaultArgs + purchaseReceiptPayments?: boolean | Prisma.PurchaseReceipt$purchaseReceiptPaymentsArgs _count?: boolean | Prisma.PurchaseReceiptCountOutputTypeDefaultArgs } @@ -882,11 +1084,14 @@ export type $PurchaseReceiptPayload[] inventory: Prisma.$InventoryPayload supplier: Prisma.$SupplierPayload + purchaseReceiptPayments: Prisma.$PurchaseReceiptPaymentsPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number code: string totalAmount: runtime.Decimal + paidAmount: runtime.Decimal + isSettled: boolean description: string | null createdAt: Date updatedAt: Date @@ -1235,6 +1440,7 @@ export interface Prisma__PurchaseReceiptClient = {}>(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> + 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. @@ -1267,6 +1473,8 @@ 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 isSettled: Prisma.FieldRef<"PurchaseReceipt", 'Boolean'> readonly description: Prisma.FieldRef<"PurchaseReceipt", 'String'> readonly createdAt: Prisma.FieldRef<"PurchaseReceipt", 'DateTime'> readonly updatedAt: Prisma.FieldRef<"PurchaseReceipt", 'DateTime'> @@ -1638,6 +1846,30 @@ export type PurchaseReceipt$itemsArgs = { + /** + * 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 */ diff --git a/src/generated/prisma/models/PurchaseReceiptItem.ts b/src/generated/prisma/models/PurchaseReceiptItem.ts index 63865ca..c9b34e2 100644 --- a/src/generated/prisma/models/PurchaseReceiptItem.ts +++ b/src/generated/prisma/models/PurchaseReceiptItem.ts @@ -260,8 +260,8 @@ export type PurchaseReceiptItemWhereInput = { createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - receipt?: Prisma.XOR product?: Prisma.XOR + receipt?: Prisma.XOR } export type PurchaseReceiptItemOrderByWithRelationInput = { @@ -273,8 +273,8 @@ export type PurchaseReceiptItemOrderByWithRelationInput = { createdAt?: Prisma.SortOrder receiptId?: Prisma.SortOrder productId?: Prisma.SortOrder - receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput product?: Prisma.ProductOrderByWithRelationInput + receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput _relevance?: Prisma.PurchaseReceiptItemOrderByRelevanceInput } @@ -290,8 +290,8 @@ export type PurchaseReceiptItemWhereUniqueInput = Prisma.AtLeast<{ createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number - receipt?: Prisma.XOR product?: Prisma.XOR + receipt?: Prisma.XOR }, "id"> export type PurchaseReceiptItemOrderByWithAggregationInput = { @@ -330,8 +330,8 @@ export type PurchaseReceiptItemCreateInput = { total: runtime.Decimal | runtime.DecimalJsLike | number | string description?: string | null createdAt?: Date | string - receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutItemsInput product: Prisma.ProductCreateNestedOneWithoutPurchaseReceiptItemsInput + receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutItemsInput } export type PurchaseReceiptItemUncheckedCreateInput = { @@ -351,8 +351,8 @@ export type PurchaseReceiptItemUpdateInput = { total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput product?: Prisma.ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput + receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput } export type PurchaseReceiptItemUncheckedUpdateInput = { @@ -740,8 +740,8 @@ export type PurchaseReceiptItemSelect product?: boolean | Prisma.ProductDefaultArgs + receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs }, ExtArgs["result"]["purchaseReceiptItem"]> @@ -759,15 +759,15 @@ export type PurchaseReceiptItemSelectScalar = { export type PurchaseReceiptItemOmit = runtime.Types.Extensions.GetOmit<"id" | "count" | "fee" | "total" | "description" | "createdAt" | "receiptId" | "productId", ExtArgs["result"]["purchaseReceiptItem"]> export type PurchaseReceiptItemInclude = { - receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs product?: boolean | Prisma.ProductDefaultArgs + receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs } export type $PurchaseReceiptItemPayload = { name: "PurchaseReceiptItem" objects: { - receipt: Prisma.$PurchaseReceiptPayload product: Prisma.$ProductPayload + receipt: Prisma.$PurchaseReceiptPayload } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number @@ -1118,8 +1118,8 @@ readonly fields: PurchaseReceiptItemFieldRefs; */ export interface Prisma__PurchaseReceiptItemClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" - receipt = {}>(args?: Prisma.Subset>): Prisma.Prisma__PurchaseReceiptClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> 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. diff --git a/src/generated/prisma/models/PurchaseReceiptPayments.ts b/src/generated/prisma/models/PurchaseReceiptPayments.ts new file mode 100644 index 0000000..fdf6481 --- /dev/null +++ b/src/generated/prisma/models/PurchaseReceiptPayments.ts @@ -0,0 +1,1525 @@ + +/* !!! 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 +} + +export type PurchaseReceiptPaymentsSumAggregateOutputType = { + id: number | null + amount: runtime.Decimal | null + bankAccountId: number | null + receiptId: number | null +} + +export type PurchaseReceiptPaymentsMinAggregateOutputType = { + id: number | null + amount: runtime.Decimal | null + paymentMethod: $Enums.payment_method_type | null + bankAccountId: number | null + description: string | null + payedAt: Date | null + receiptId: number | null + createdAt: Date | null +} + +export type PurchaseReceiptPaymentsMaxAggregateOutputType = { + id: number | null + amount: runtime.Decimal | null + paymentMethod: $Enums.payment_method_type | null + bankAccountId: number | null + description: string | null + payedAt: Date | null + receiptId: number | null + createdAt: Date | null +} + +export type PurchaseReceiptPaymentsCountAggregateOutputType = { + id: number + amount: number + paymentMethod: number + bankAccountId: number + description: number + payedAt: number + receiptId: number + createdAt: number + _all: number +} + + +export type PurchaseReceiptPaymentsAvgAggregateInputType = { + id?: true + amount?: true + bankAccountId?: true + receiptId?: true +} + +export type PurchaseReceiptPaymentsSumAggregateInputType = { + id?: true + amount?: true + bankAccountId?: true + receiptId?: true +} + +export type PurchaseReceiptPaymentsMinAggregateInputType = { + id?: true + amount?: true + paymentMethod?: true + bankAccountId?: true + description?: true + payedAt?: true + receiptId?: true + createdAt?: true +} + +export type PurchaseReceiptPaymentsMaxAggregateInputType = { + id?: true + amount?: true + paymentMethod?: true + bankAccountId?: true + description?: true + payedAt?: true + receiptId?: true + createdAt?: true +} + +export type PurchaseReceiptPaymentsCountAggregateInputType = { + id?: true + amount?: true + paymentMethod?: true + bankAccountId?: true + description?: true + payedAt?: true + receiptId?: true + createdAt?: 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.payment_method_type + bankAccountId: number | null + description: string | null + payedAt: Date + receiptId: number + createdAt: Date + _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.Enumpayment_method_typeFilter<"PurchaseReceiptPayments"> | $Enums.payment_method_type + bankAccountId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null + description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null + payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string + receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number + createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string + purchaseReceipt?: Prisma.XOR + bankAccount?: Prisma.XOR | null +} + +export type PurchaseReceiptPaymentsOrderByWithRelationInput = { + id?: Prisma.SortOrder + amount?: Prisma.SortOrder + paymentMethod?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + payedAt?: Prisma.SortOrder + receiptId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + purchaseReceipt?: Prisma.PurchaseReceiptOrderByWithRelationInput + bankAccount?: Prisma.BankAccountOrderByWithRelationInput + _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.Enumpayment_method_typeFilter<"PurchaseReceiptPayments"> | $Enums.payment_method_type + bankAccountId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null + description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null + payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string + receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number + createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string + purchaseReceipt?: Prisma.XOR + bankAccount?: Prisma.XOR | null +}, "id"> + +export type PurchaseReceiptPaymentsOrderByWithAggregationInput = { + id?: Prisma.SortOrder + amount?: Prisma.SortOrder + paymentMethod?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrderInput | Prisma.SortOrder + description?: Prisma.SortOrderInput | Prisma.SortOrder + payedAt?: Prisma.SortOrder + receiptId?: Prisma.SortOrder + createdAt?: 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.Enumpayment_method_typeWithAggregatesFilter<"PurchaseReceiptPayments"> | $Enums.payment_method_type + bankAccountId?: Prisma.IntNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | number | null + description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptPayments"> | string | null + payedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string + receiptId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptPayments"> | number + createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceiptPayments"> | Date | string +} + +export type PurchaseReceiptPaymentsCreateInput = { + amount: runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod: $Enums.payment_method_type + description?: string | null + payedAt: Date | string + createdAt?: Date | string + purchaseReceipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPurchaseReceiptPaymentsInput + bankAccount?: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput +} + +export type PurchaseReceiptPaymentsUncheckedCreateInput = { + id?: number + amount: runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod: $Enums.payment_method_type + bankAccountId?: number | null + description?: string | null + payedAt: Date | string + receiptId: number + createdAt?: Date | string +} + +export type PurchaseReceiptPaymentsUpdateInput = { + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + purchaseReceipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput + bankAccount?: Prisma.BankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput +} + +export type PurchaseReceiptPaymentsUncheckedUpdateInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + receiptId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type PurchaseReceiptPaymentsCreateManyInput = { + id?: number + amount: runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod: $Enums.payment_method_type + bankAccountId?: number | null + description?: string | null + payedAt: Date | string + receiptId: number + createdAt?: Date | string +} + +export type PurchaseReceiptPaymentsUpdateManyMutationInput = { + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type PurchaseReceiptPaymentsUncheckedUpdateManyInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + receiptId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +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 + bankAccountId?: Prisma.SortOrder + description?: Prisma.SortOrder + payedAt?: Prisma.SortOrder + receiptId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type PurchaseReceiptPaymentsAvgOrderByAggregateInput = { + id?: Prisma.SortOrder + amount?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder + receiptId?: Prisma.SortOrder +} + +export type PurchaseReceiptPaymentsMaxOrderByAggregateInput = { + id?: Prisma.SortOrder + amount?: Prisma.SortOrder + paymentMethod?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder + description?: Prisma.SortOrder + payedAt?: Prisma.SortOrder + receiptId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type PurchaseReceiptPaymentsMinOrderByAggregateInput = { + id?: Prisma.SortOrder + amount?: Prisma.SortOrder + paymentMethod?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder + description?: Prisma.SortOrder + payedAt?: Prisma.SortOrder + receiptId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder +} + +export type PurchaseReceiptPaymentsSumOrderByAggregateInput = { + id?: Prisma.SortOrder + amount?: Prisma.SortOrder + bankAccountId?: Prisma.SortOrder + receiptId?: 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 PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput = { + create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput[] + connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput[] + createMany?: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope + connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] +} + +export type PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput = { + create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput[] + connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput[] + createMany?: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope + connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] +} + +export type PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput = { + create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput[] + connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput[] + upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput[] + createMany?: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope + set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] + disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] + delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] + connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] + update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput[] + updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput[] + deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] +} + +export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput = { + create?: Prisma.XOR | Prisma.PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput[] | Prisma.PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput[] + connectOrCreate?: Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput[] + upsert?: Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput[] + createMany?: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope + set?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] + disconnect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] + delete?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] + connect?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput | Prisma.PurchaseReceiptPaymentsWhereUniqueInput[] + update?: Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput[] + updateMany?: Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput[] + deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[] +} + +export type PurchaseReceiptPaymentsCreateWithoutBankAccountInput = { + amount: runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod: $Enums.payment_method_type + description?: string | null + payedAt: Date | string + createdAt?: Date | string + purchaseReceipt: Prisma.PurchaseReceiptCreateNestedOneWithoutPurchaseReceiptPaymentsInput +} + +export type PurchaseReceiptPaymentsUncheckedCreateWithoutBankAccountInput = { + id?: number + amount: runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod: $Enums.payment_method_type + description?: string | null + payedAt: Date | string + receiptId: number + createdAt?: Date | string +} + +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.Enumpayment_method_typeFilter<"PurchaseReceiptPayments"> | $Enums.payment_method_type + bankAccountId?: Prisma.IntNullableFilter<"PurchaseReceiptPayments"> | number | null + description?: Prisma.StringNullableFilter<"PurchaseReceiptPayments"> | string | null + payedAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string + receiptId?: Prisma.IntFilter<"PurchaseReceiptPayments"> | number + createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptPayments"> | Date | string +} + +export type PurchaseReceiptPaymentsCreateWithoutPurchaseReceiptInput = { + amount: runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod: $Enums.payment_method_type + description?: string | null + payedAt: Date | string + createdAt?: Date | string + bankAccount?: Prisma.BankAccountCreateNestedOneWithoutPurchaseReceiptPaymentsInput +} + +export type PurchaseReceiptPaymentsUncheckedCreateWithoutPurchaseReceiptInput = { + id?: number + amount: runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod: $Enums.payment_method_type + bankAccountId?: number | null + description?: string | null + payedAt: Date | string + createdAt?: Date | string +} + +export type PurchaseReceiptPaymentsCreateOrConnectWithoutPurchaseReceiptInput = { + where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput + create: Prisma.XOR +} + +export type PurchaseReceiptPaymentsCreateManyPurchaseReceiptInputEnvelope = { + data: Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInput | Prisma.PurchaseReceiptPaymentsCreateManyPurchaseReceiptInput[] + skipDuplicates?: boolean +} + +export type PurchaseReceiptPaymentsUpsertWithWhereUniqueWithoutPurchaseReceiptInput = { + where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type PurchaseReceiptPaymentsUpdateWithWhereUniqueWithoutPurchaseReceiptInput = { + where: Prisma.PurchaseReceiptPaymentsWhereUniqueInput + data: Prisma.XOR +} + +export type PurchaseReceiptPaymentsUpdateManyWithWhereWithoutPurchaseReceiptInput = { + where: Prisma.PurchaseReceiptPaymentsScalarWhereInput + data: Prisma.XOR +} + +export type PurchaseReceiptPaymentsCreateManyBankAccountInput = { + id?: number + amount: runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod: $Enums.payment_method_type + description?: string | null + payedAt: Date | string + receiptId: number + createdAt?: Date | string +} + +export type PurchaseReceiptPaymentsUpdateWithoutBankAccountInput = { + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + purchaseReceipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput +} + +export type PurchaseReceiptPaymentsUncheckedUpdateWithoutBankAccountInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + receiptId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + receiptId?: Prisma.IntFieldUpdateOperationsInput | number + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type PurchaseReceiptPaymentsCreateManyPurchaseReceiptInput = { + id?: number + amount: runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod: $Enums.payment_method_type + bankAccountId?: number | null + description?: string | null + payedAt: Date | string + createdAt?: Date | string +} + +export type PurchaseReceiptPaymentsUpdateWithoutPurchaseReceiptInput = { + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + bankAccount?: Prisma.BankAccountUpdateOneWithoutPurchaseReceiptPaymentsNestedInput +} + +export type PurchaseReceiptPaymentsUncheckedUpdateWithoutPurchaseReceiptInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + +export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + amount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type + bankAccountId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null + payedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +} + + + +export type PurchaseReceiptPaymentsSelect = runtime.Types.Extensions.GetSelect<{ + id?: boolean + amount?: boolean + paymentMethod?: boolean + bankAccountId?: boolean + description?: boolean + payedAt?: boolean + receiptId?: boolean + createdAt?: boolean + purchaseReceipt?: boolean | Prisma.PurchaseReceiptDefaultArgs + bankAccount?: boolean | Prisma.PurchaseReceiptPayments$bankAccountArgs +}, ExtArgs["result"]["purchaseReceiptPayments"]> + + + +export type PurchaseReceiptPaymentsSelectScalar = { + id?: boolean + amount?: boolean + paymentMethod?: boolean + bankAccountId?: boolean + description?: boolean + payedAt?: boolean + receiptId?: boolean + createdAt?: boolean +} + +export type PurchaseReceiptPaymentsOmit = runtime.Types.Extensions.GetOmit<"id" | "amount" | "paymentMethod" | "bankAccountId" | "description" | "payedAt" | "receiptId" | "createdAt", ExtArgs["result"]["purchaseReceiptPayments"]> +export type PurchaseReceiptPaymentsInclude = { + purchaseReceipt?: boolean | Prisma.PurchaseReceiptDefaultArgs + bankAccount?: boolean | Prisma.PurchaseReceiptPayments$bankAccountArgs +} + +export type $PurchaseReceiptPaymentsPayload = { + name: "PurchaseReceiptPayments" + objects: { + purchaseReceipt: Prisma.$PurchaseReceiptPayload + bankAccount: Prisma.$BankAccountPayload | null + } + scalars: runtime.Types.Extensions.GetPayloadResult<{ + id: number + amount: runtime.Decimal + paymentMethod: $Enums.payment_method_type + bankAccountId: number | null + description: string | null + payedAt: Date + receiptId: number + createdAt: Date + }, 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" + purchaseReceipt = {}>(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> + /** + * 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", 'payment_method_type'> + readonly bankAccountId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'> + readonly description: Prisma.FieldRef<"PurchaseReceiptPayments", 'String'> + readonly payedAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'> + readonly receiptId: Prisma.FieldRef<"PurchaseReceiptPayments", 'Int'> + readonly createdAt: Prisma.FieldRef<"PurchaseReceiptPayments", 'DateTime'> +} + + +// 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.bankAccount + */ +export type PurchaseReceiptPayments$bankAccountArgs = { + /** + * 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 +} + +/** + * 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/SalesInvoice.ts b/src/generated/prisma/models/SalesInvoice.ts index af2ddfb..352381f 100644 --- a/src/generated/prisma/models/SalesInvoice.ts +++ b/src/generated/prisma/models/SalesInvoice.ts @@ -463,48 +463,6 @@ export type SalesInvoiceScalarRelationFilter = { isNot?: Prisma.SalesInvoiceWhereInput } -export type SalesInvoiceCreateNestedManyWithoutCustomerInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[] - createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope - connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] -} - -export type SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[] - createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope - connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] -} - -export type SalesInvoiceUpdateManyWithoutCustomerNestedInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[] - upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput[] - createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope - set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput[] - updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput[] - deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] -} - -export type SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[] - connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[] - upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput[] - createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope - set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] - update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput[] - updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput[] - deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] -} - export type SalesInvoiceCreateNestedManyWithoutInventoryInput = { create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[] connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[] @@ -547,6 +505,48 @@ export type SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput = { deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] } +export type SalesInvoiceCreateNestedManyWithoutCustomerInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[] + createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope + connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] +} + +export type SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[] + createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope + connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] +} + +export type SalesInvoiceUpdateManyWithoutCustomerNestedInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[] + upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope + set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] + disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] + delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] + connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] + update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] +} + +export type SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[] + connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[] + upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput[] + createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope + set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] + disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] + delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] + connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[] + update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput[] + updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput[] + deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[] +} + export type SalesInvoiceCreateNestedOneWithoutItemsInput = { create?: Prisma.XOR connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutItemsInput @@ -561,67 +561,6 @@ export type SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput = { update?: Prisma.XOR, Prisma.SalesInvoiceUncheckedUpdateWithoutItemsInput> } -export type SalesInvoiceCreateWithoutCustomerInput = { - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput - inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput -} - -export type SalesInvoiceUncheckedCreateWithoutCustomerInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - inventoryId: number - items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput -} - -export type SalesInvoiceCreateOrConnectWithoutCustomerInput = { - where: Prisma.SalesInvoiceWhereUniqueInput - create: Prisma.XOR -} - -export type SalesInvoiceCreateManyCustomerInputEnvelope = { - data: Prisma.SalesInvoiceCreateManyCustomerInput | Prisma.SalesInvoiceCreateManyCustomerInput[] - skipDuplicates?: boolean -} - -export type SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput = { - where: Prisma.SalesInvoiceWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput = { - where: Prisma.SalesInvoiceWhereUniqueInput - data: Prisma.XOR -} - -export type SalesInvoiceUpdateManyWithWhereWithoutCustomerInput = { - 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 - inventoryId?: Prisma.IntFilter<"SalesInvoice"> | number -} - export type SalesInvoiceCreateWithoutInventoryInput = { code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string @@ -669,6 +608,67 @@ export type SalesInvoiceUpdateManyWithWhereWithoutInventoryInput = { 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 + inventoryId?: 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 + items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput + inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput +} + +export type SalesInvoiceUncheckedCreateWithoutCustomerInput = { + id?: number + code: string + totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + inventoryId: number + items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput +} + +export type SalesInvoiceCreateOrConnectWithoutCustomerInput = { + where: Prisma.SalesInvoiceWhereUniqueInput + create: Prisma.XOR +} + +export type SalesInvoiceCreateManyCustomerInputEnvelope = { + data: Prisma.SalesInvoiceCreateManyCustomerInput | Prisma.SalesInvoiceCreateManyCustomerInput[] + skipDuplicates?: boolean +} + +export type SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput = { + where: Prisma.SalesInvoiceWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput = { + where: Prisma.SalesInvoiceWhereUniqueInput + data: Prisma.XOR +} + +export type SalesInvoiceUpdateManyWithWhereWithoutCustomerInput = { + where: Prisma.SalesInvoiceScalarWhereInput + data: Prisma.XOR +} + export type SalesInvoiceCreateWithoutItemsInput = { code: string totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string @@ -727,47 +727,6 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = { inventoryId?: Prisma.IntFieldUpdateOperationsInput | number } -export type SalesInvoiceCreateManyCustomerInput = { - id?: number - code: string - totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string - description?: string | null - createdAt?: Date | string - updatedAt?: Date | string - inventoryId: number -} - -export type SalesInvoiceUpdateWithoutCustomerInput = { - 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 - items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput - inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput -} - -export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = { - 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 - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput -} - -export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = { - 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 - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number -} - export type SalesInvoiceCreateManyInventoryInput = { id?: number code: string @@ -809,6 +768,47 @@ export type SalesInvoiceUncheckedUpdateManyWithoutInventoryInput = { customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null } +export type SalesInvoiceCreateManyCustomerInput = { + id?: number + code: string + totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string + description?: string | null + createdAt?: Date | string + updatedAt?: Date | string + inventoryId: number +} + +export type SalesInvoiceUpdateWithoutCustomerInput = { + 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 + items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput + inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput +} + +export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = { + 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 + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number + items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput +} + +export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = { + 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 + inventoryId?: Prisma.IntFieldUpdateOperationsInput | number +} + /** * Count Type SalesInvoiceCountOutputType diff --git a/src/generated/prisma/models/SalesInvoiceItem.ts b/src/generated/prisma/models/SalesInvoiceItem.ts index 0e7a6ca..1cbe42a 100644 --- a/src/generated/prisma/models/SalesInvoiceItem.ts +++ b/src/generated/prisma/models/SalesInvoiceItem.ts @@ -434,48 +434,6 @@ export type SalesInvoiceItemSumOrderByAggregateInput = { productId?: Prisma.SortOrder } -export type SalesInvoiceItemCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope - connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] -} - -export type SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] - createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope - 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 - 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[] - 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 - 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[] - deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] -} - export type SalesInvoiceItemCreateNestedManyWithoutInvoiceInput = { create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[] connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[] @@ -518,60 +476,46 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput = { deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] } -export type SalesInvoiceItemCreateWithoutProductInput = { - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - total: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput +export type SalesInvoiceItemCreateNestedManyWithoutProductInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope + connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] } -export type SalesInvoiceItemUncheckedCreateWithoutProductInput = { - id?: number - count: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: runtime.Decimal | runtime.DecimalJsLike | number | string - total: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - invoiceId: number +export type SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope + connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[] } -export type SalesInvoiceItemCreateOrConnectWithoutProductInput = { - where: Prisma.SalesInvoiceItemWhereUniqueInput - create: Prisma.XOR +export type SalesInvoiceItemUpdateManyWithoutProductNestedInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] + upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope + 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[] + deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] } -export type SalesInvoiceItemCreateManyProductInputEnvelope = { - data: Prisma.SalesInvoiceItemCreateManyProductInput | Prisma.SalesInvoiceItemCreateManyProductInput[] - skipDuplicates?: boolean -} - -export type SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.SalesInvoiceItemWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR -} - -export type SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.SalesInvoiceItemWhereUniqueInput - data: Prisma.XOR -} - -export type SalesInvoiceItemUpdateManyWithWhereWithoutProductInput = { - where: Prisma.SalesInvoiceItemScalarWhereInput - data: Prisma.XOR -} - -export type SalesInvoiceItemScalarWhereInput = { - AND?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] - OR?: Prisma.SalesInvoiceItemScalarWhereInput[] - NOT?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] - id?: Prisma.IntFilter<"SalesInvoiceItem"> | number - count?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string - total?: 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 +export type SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput = { + create?: Prisma.XOR | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[] + connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[] + upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[] + createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope + 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[] + deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] } export type SalesInvoiceItemCreateWithoutInvoiceInput = { @@ -617,7 +561,28 @@ export type SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput = { data: Prisma.XOR } -export type SalesInvoiceItemCreateManyProductInput = { +export type SalesInvoiceItemScalarWhereInput = { + AND?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] + OR?: Prisma.SalesInvoiceItemScalarWhereInput[] + NOT?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[] + id?: Prisma.IntFilter<"SalesInvoiceItem"> | number + count?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string + fee?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string + total?: 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 +} + +export type SalesInvoiceItemCreateWithoutProductInput = { + count: runtime.Decimal | runtime.DecimalJsLike | number | string + fee: runtime.Decimal | runtime.DecimalJsLike | number | string + total: runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Date | string + invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput +} + +export type SalesInvoiceItemUncheckedCreateWithoutProductInput = { id?: number count: runtime.Decimal | runtime.DecimalJsLike | number | string fee: runtime.Decimal | runtime.DecimalJsLike | number | string @@ -626,30 +591,30 @@ export type SalesInvoiceItemCreateManyProductInput = { invoiceId: number } -export type SalesInvoiceItemUpdateWithoutProductInput = { - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput +export type SalesInvoiceItemCreateOrConnectWithoutProductInput = { + where: Prisma.SalesInvoiceItemWhereUniqueInput + create: Prisma.XOR } -export type SalesInvoiceItemUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - invoiceId?: Prisma.IntFieldUpdateOperationsInput | number +export type SalesInvoiceItemCreateManyProductInputEnvelope = { + data: Prisma.SalesInvoiceItemCreateManyProductInput | Prisma.SalesInvoiceItemCreateManyProductInput[] + skipDuplicates?: boolean } -export type SalesInvoiceItemUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - invoiceId?: Prisma.IntFieldUpdateOperationsInput | number +export type SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput = { + where: Prisma.SalesInvoiceItemWhereUniqueInput + update: Prisma.XOR + create: Prisma.XOR +} + +export type SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput = { + where: Prisma.SalesInvoiceItemWhereUniqueInput + data: Prisma.XOR +} + +export type SalesInvoiceItemUpdateManyWithWhereWithoutProductInput = { + where: Prisma.SalesInvoiceItemScalarWhereInput + data: Prisma.XOR } export type SalesInvoiceItemCreateManyInvoiceInput = { @@ -687,6 +652,41 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = { productId?: Prisma.IntFieldUpdateOperationsInput | number } +export type SalesInvoiceItemCreateManyProductInput = { + id?: number + count: runtime.Decimal | runtime.DecimalJsLike | number | string + fee: runtime.Decimal | runtime.DecimalJsLike | number | string + total: runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Date | string + invoiceId: number +} + +export type SalesInvoiceItemUpdateWithoutProductInput = { + count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput +} + +export type SalesInvoiceItemUncheckedUpdateWithoutProductInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + invoiceId?: Prisma.IntFieldUpdateOperationsInput | number +} + +export type SalesInvoiceItemUncheckedUpdateManyWithoutProductInput = { + id?: Prisma.IntFieldUpdateOperationsInput | number + count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + invoiceId?: Prisma.IntFieldUpdateOperationsInput | number +} + export type SalesInvoiceItemSelect = runtime.Types.Extensions.GetSelect<{ diff --git a/src/generated/prisma/models/StockAdjustment.ts b/src/generated/prisma/models/StockAdjustment.ts index 1c88c58..4b4d7bc 100644 --- a/src/generated/prisma/models/StockAdjustment.ts +++ b/src/generated/prisma/models/StockAdjustment.ts @@ -378,48 +378,6 @@ export type StockAdjustmentSumOrderByAggregateInput = { inventoryId?: Prisma.SortOrder } -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 StockAdjustmentCreateNestedManyWithoutInventoryInput = { create?: Prisma.XOR | Prisma.StockAdjustmentCreateWithoutInventoryInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutInventoryInput[] connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput | Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput[] @@ -462,54 +420,46 @@ export type StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput = { deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[] } -export type StockAdjustmentCreateWithoutProductInput = { - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockAdjustmentsInput +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 StockAdjustmentUncheckedCreateWithoutProductInput = { - id?: number - adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - inventoryId: number +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 StockAdjustmentCreateOrConnectWithoutProductInput = { - where: Prisma.StockAdjustmentWhereUniqueInput - create: Prisma.XOR +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 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 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 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 = { @@ -551,31 +501,54 @@ export type StockAdjustmentUpdateManyWithWhereWithoutInventoryInput = { data: Prisma.XOR } -export type StockAdjustmentCreateManyProductInput = { +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 StockAdjustmentUpdateWithoutProductInput = { - adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockAdjustmentsNestedInput +export type StockAdjustmentCreateOrConnectWithoutProductInput = { + where: Prisma.StockAdjustmentWhereUniqueInput + create: Prisma.XOR } -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 StockAdjustmentCreateManyProductInputEnvelope = { + data: Prisma.StockAdjustmentCreateManyProductInput | Prisma.StockAdjustmentCreateManyProductInput[] + skipDuplicates?: boolean } -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 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 = { @@ -605,6 +578,33 @@ export type StockAdjustmentUncheckedUpdateManyWithoutInventoryInput = { 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<{ diff --git a/src/generated/prisma/models/StockBalance.ts b/src/generated/prisma/models/StockBalance.ts index 88d7da8..4d45f4e 100644 --- a/src/generated/prisma/models/StockBalance.ts +++ b/src/generated/prisma/models/StockBalance.ts @@ -27,107 +27,107 @@ export type AggregateStockBalance = { } export type StockBalanceAvgAggregateOutputType = { - id: number | null - productId: number | null - inventoryId: number | null quantity: runtime.Decimal | null - avgCost: runtime.Decimal | null totalCost: runtime.Decimal | null + avgCost: runtime.Decimal | null + inventoryId: number | null + productId: number | null + id: number | null } export type StockBalanceSumAggregateOutputType = { - id: number | null - productId: number | null - inventoryId: number | null quantity: runtime.Decimal | null - avgCost: runtime.Decimal | null totalCost: runtime.Decimal | null + avgCost: runtime.Decimal | null + inventoryId: number | null + productId: number | null + id: number | null } export type StockBalanceMinAggregateOutputType = { - id: number | null - productId: number | null - inventoryId: number | null quantity: runtime.Decimal | null - avgCost: runtime.Decimal | null totalCost: runtime.Decimal | null - createdAt: Date | null updatedAt: Date | null + avgCost: runtime.Decimal | null + inventoryId: number | null + productId: number | null + createdAt: Date | null + id: number | null } export type StockBalanceMaxAggregateOutputType = { - id: number | null - productId: number | null - inventoryId: number | null quantity: runtime.Decimal | null - avgCost: runtime.Decimal | null totalCost: runtime.Decimal | null - createdAt: Date | null updatedAt: Date | null + avgCost: runtime.Decimal | null + inventoryId: number | null + productId: number | null + createdAt: Date | null + id: number | null } export type StockBalanceCountAggregateOutputType = { - id: number - productId: number - inventoryId: number quantity: number - avgCost: number totalCost: number - createdAt: number updatedAt: number + avgCost: number + inventoryId: number + productId: number + createdAt: number + id: number _all: number } export type StockBalanceAvgAggregateInputType = { - id?: true - productId?: true - inventoryId?: true quantity?: true - avgCost?: true totalCost?: true + avgCost?: true + inventoryId?: true + productId?: true + id?: true } export type StockBalanceSumAggregateInputType = { - id?: true - productId?: true - inventoryId?: true quantity?: true - avgCost?: true totalCost?: true + avgCost?: true + inventoryId?: true + productId?: true + id?: true } export type StockBalanceMinAggregateInputType = { - id?: true - productId?: true - inventoryId?: true quantity?: true - avgCost?: true totalCost?: true - createdAt?: true updatedAt?: true + avgCost?: true + inventoryId?: true + productId?: true + createdAt?: true + id?: true } export type StockBalanceMaxAggregateInputType = { - id?: true - productId?: true - inventoryId?: true quantity?: true - avgCost?: true totalCost?: true - createdAt?: true updatedAt?: true + avgCost?: true + inventoryId?: true + productId?: true + createdAt?: true + id?: true } export type StockBalanceCountAggregateInputType = { - id?: true - productId?: true - inventoryId?: true quantity?: true - avgCost?: true totalCost?: true - createdAt?: true updatedAt?: true + avgCost?: true + inventoryId?: true + productId?: true + createdAt?: true + id?: true _all?: true } @@ -218,14 +218,14 @@ export type StockBalanceGroupByArgs | number - productId?: Prisma.IntFilter<"StockBalance"> | number - inventoryId?: Prisma.IntFilter<"StockBalance"> | number quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string - product?: Prisma.XOR + 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 = { - id?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder totalCost?: Prisma.SortOrder - createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder - product?: Prisma.ProductOrderByWithRelationInput + 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<{ @@ -283,26 +283,26 @@ export type StockBalanceWhereUniqueInput = Prisma.AtLeast<{ AND?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[] OR?: Prisma.StockBalanceWhereInput[] NOT?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[] - productId?: Prisma.IntFilter<"StockBalance"> | number - inventoryId?: Prisma.IntFilter<"StockBalance"> | number quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string - product?: Prisma.XOR + 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 = { - id?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder totalCost?: Prisma.SortOrder - createdAt?: 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 @@ -314,86 +314,86 @@ export type StockBalanceScalarWhereWithAggregatesInput = { AND?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[] OR?: Prisma.StockBalanceScalarWhereWithAggregatesInput[] NOT?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number - productId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number - inventoryId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number quantity?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeWithAggregatesFilter<"StockBalance"> | Date | 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 - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string updatedAt?: Date | string - product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput + avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Date | string inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput + product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput } export type StockBalanceUncheckedCreateInput = { - id?: number - productId: number - inventoryId: number quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | 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 - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput + avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput + product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput } export type StockBalanceUncheckedUpdateInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | 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 = { - id?: number - productId: number - inventoryId: number quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | 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 - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string } export type StockBalanceUncheckedUpdateManyInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | 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 = { @@ -412,96 +412,54 @@ export type StockBalanceProductIdInventoryIdCompoundUniqueInput = { } export type StockBalanceCountOrderByAggregateInput = { - id?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder totalCost?: Prisma.SortOrder - createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder + avgCost?: Prisma.SortOrder + inventoryId?: Prisma.SortOrder + productId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + id?: Prisma.SortOrder } export type StockBalanceAvgOrderByAggregateInput = { - id?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder totalCost?: Prisma.SortOrder + avgCost?: Prisma.SortOrder + inventoryId?: Prisma.SortOrder + productId?: Prisma.SortOrder + id?: Prisma.SortOrder } export type StockBalanceMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder totalCost?: Prisma.SortOrder - createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder + avgCost?: Prisma.SortOrder + inventoryId?: Prisma.SortOrder + productId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + id?: Prisma.SortOrder } export type StockBalanceMinOrderByAggregateInput = { - id?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder totalCost?: Prisma.SortOrder - createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder + avgCost?: Prisma.SortOrder + inventoryId?: Prisma.SortOrder + productId?: Prisma.SortOrder + createdAt?: Prisma.SortOrder + id?: Prisma.SortOrder } export type StockBalanceSumOrderByAggregateInput = { - id?: Prisma.SortOrder - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder totalCost?: Prisma.SortOrder -} - -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[] + avgCost?: Prisma.SortOrder + inventoryId?: Prisma.SortOrder + productId?: Prisma.SortOrder + id?: Prisma.SortOrder } export type StockBalanceCreateNestedManyWithoutInventoryInput = { @@ -546,82 +504,65 @@ export type StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput = { deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[] } -export type StockBalanceCreateWithoutProductInput = { - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - updatedAt?: Date | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput +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 StockBalanceUncheckedCreateWithoutProductInput = { - id?: number - inventoryId: number - quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string - updatedAt?: Date | string +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 StockBalanceCreateOrConnectWithoutProductInput = { - where: Prisma.StockBalanceWhereUniqueInput - create: Prisma.XOR +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 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 StockBalanceScalarWhereInput = { - AND?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[] - OR?: Prisma.StockBalanceScalarWhereInput[] - NOT?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[] - id?: Prisma.IntFilter<"StockBalance"> | number - productId?: Prisma.IntFilter<"StockBalance"> | number - inventoryId?: Prisma.IntFilter<"StockBalance"> | number - quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string +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 - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string updatedAt?: Date | string + avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Date | string product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput } export type StockBalanceUncheckedCreateWithoutInventoryInput = { - id?: number - productId: number quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string updatedAt?: Date | string + avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string + productId: number + createdAt?: Date | string + id?: number } export type StockBalanceCreateOrConnectWithoutInventoryInput = { @@ -650,133 +591,192 @@ export type StockBalanceUpdateManyWithWhereWithoutInventoryInput = { data: Prisma.XOR } -export type StockBalanceCreateManyProductInput = { - id?: number - inventoryId: number +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 - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | string updatedAt?: Date | string + avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string + createdAt?: Date | string + inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput } -export type StockBalanceUpdateWithoutProductInput = { - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput +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 StockBalanceUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +export type StockBalanceCreateOrConnectWithoutProductInput = { + where: Prisma.StockBalanceWhereUniqueInput + create: Prisma.XOR } -export type StockBalanceUncheckedUpdateManyWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - inventoryId?: Prisma.IntFieldUpdateOperationsInput | number - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string +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 = { - id?: number - productId: number quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Date | 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 - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | 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 = { - id?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | 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 = { - id?: Prisma.IntFieldUpdateOperationsInput | number - productId?: Prisma.IntFieldUpdateOperationsInput | number quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | 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<{ - id?: boolean - productId?: boolean - inventoryId?: boolean quantity?: boolean - avgCost?: boolean totalCost?: boolean - createdAt?: boolean updatedAt?: boolean - product?: boolean | Prisma.ProductDefaultArgs + avgCost?: boolean + inventoryId?: boolean + productId?: boolean + createdAt?: boolean + id?: boolean inventory?: boolean | Prisma.InventoryDefaultArgs + product?: boolean | Prisma.ProductDefaultArgs }, ExtArgs["result"]["stockBalance"]> export type StockBalanceSelectScalar = { - id?: boolean - productId?: boolean - inventoryId?: boolean quantity?: boolean - avgCost?: boolean totalCost?: boolean - createdAt?: boolean updatedAt?: boolean + avgCost?: boolean + inventoryId?: boolean + productId?: boolean + createdAt?: boolean + id?: boolean } -export type StockBalanceOmit = runtime.Types.Extensions.GetOmit<"id" | "productId" | "inventoryId" | "quantity" | "avgCost" | "totalCost" | "createdAt" | "updatedAt", ExtArgs["result"]["stockBalance"]> +export type StockBalanceOmit = runtime.Types.Extensions.GetOmit<"quantity" | "totalCost" | "updatedAt" | "avgCost" | "inventoryId" | "productId" | "createdAt" | "id", ExtArgs["result"]["stockBalance"]> export type StockBalanceInclude = { - product?: boolean | Prisma.ProductDefaultArgs inventory?: boolean | Prisma.InventoryDefaultArgs + product?: boolean | Prisma.ProductDefaultArgs } export type $StockBalancePayload = { name: "StockBalance" objects: { - product: Prisma.$ProductPayload inventory: Prisma.$InventoryPayload + product: Prisma.$ProductPayload } scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - productId: number - inventoryId: number quantity: runtime.Decimal - avgCost: runtime.Decimal totalCost: runtime.Decimal - createdAt: Date updatedAt: Date + avgCost: runtime.Decimal + inventoryId: number + productId: number + createdAt: Date + id: number }, ExtArgs["result"]["stockBalance"]> composites: {} } @@ -860,8 +860,8 @@ export interface StockBalanceDelegate(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> @@ -1117,8 +1117,8 @@ readonly fields: StockBalanceFieldRefs; */ export interface Prisma__StockBalanceClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" - product = {}>(args?: Prisma.Subset>): Prisma.Prisma__ProductClient, 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> /** * Attaches callbacks for the resolution and/or rejection of the Promise. * @param onfulfilled The callback to execute when the Promise is resolved. @@ -1148,14 +1148,14 @@ export interface Prisma__StockBalanceClient - readonly productId: Prisma.FieldRef<"StockBalance", 'Int'> - readonly inventoryId: Prisma.FieldRef<"StockBalance", 'Int'> readonly quantity: Prisma.FieldRef<"StockBalance", 'Decimal'> - readonly avgCost: Prisma.FieldRef<"StockBalance", 'Decimal'> readonly totalCost: Prisma.FieldRef<"StockBalance", 'Decimal'> - readonly createdAt: Prisma.FieldRef<"StockBalance", 'DateTime'> 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'> } diff --git a/src/generated/prisma/models/StockMovement.ts b/src/generated/prisma/models/StockMovement.ts index 6aff622..2e7eb80 100644 --- a/src/generated/prisma/models/StockMovement.ts +++ b/src/generated/prisma/models/StockMovement.ts @@ -34,10 +34,10 @@ export type StockMovementAvgAggregateOutputType = { productId: number | null inventoryId: number | null avgCost: runtime.Decimal | null - remainedInStock: runtime.Decimal | null supplierId: number | null - customerId: number | null + remainedInStock: runtime.Decimal | null counterInventoryId: number | null + customerId: number | null } export type StockMovementSumAggregateOutputType = { @@ -48,10 +48,10 @@ export type StockMovementSumAggregateOutputType = { productId: number | null inventoryId: number | null avgCost: runtime.Decimal | null - remainedInStock: runtime.Decimal | null supplierId: number | null - customerId: number | null + remainedInStock: runtime.Decimal | null counterInventoryId: number | null + customerId: number | null } export type StockMovementMinAggregateOutputType = { @@ -66,10 +66,10 @@ export type StockMovementMinAggregateOutputType = { productId: number | null inventoryId: number | null avgCost: runtime.Decimal | null - remainedInStock: runtime.Decimal | null supplierId: number | null - customerId: number | null + remainedInStock: runtime.Decimal | null counterInventoryId: number | null + customerId: number | null } export type StockMovementMaxAggregateOutputType = { @@ -84,10 +84,10 @@ export type StockMovementMaxAggregateOutputType = { productId: number | null inventoryId: number | null avgCost: runtime.Decimal | null - remainedInStock: runtime.Decimal | null supplierId: number | null - customerId: number | null + remainedInStock: runtime.Decimal | null counterInventoryId: number | null + customerId: number | null } export type StockMovementCountAggregateOutputType = { @@ -102,10 +102,10 @@ export type StockMovementCountAggregateOutputType = { productId: number inventoryId: number avgCost: number - remainedInStock: number supplierId: number - customerId: number + remainedInStock: number counterInventoryId: number + customerId: number _all: number } @@ -118,10 +118,10 @@ export type StockMovementAvgAggregateInputType = { productId?: true inventoryId?: true avgCost?: true - remainedInStock?: true supplierId?: true - customerId?: true + remainedInStock?: true counterInventoryId?: true + customerId?: true } export type StockMovementSumAggregateInputType = { @@ -132,10 +132,10 @@ export type StockMovementSumAggregateInputType = { productId?: true inventoryId?: true avgCost?: true - remainedInStock?: true supplierId?: true - customerId?: true + remainedInStock?: true counterInventoryId?: true + customerId?: true } export type StockMovementMinAggregateInputType = { @@ -150,10 +150,10 @@ export type StockMovementMinAggregateInputType = { productId?: true inventoryId?: true avgCost?: true - remainedInStock?: true supplierId?: true - customerId?: true + remainedInStock?: true counterInventoryId?: true + customerId?: true } export type StockMovementMaxAggregateInputType = { @@ -168,10 +168,10 @@ export type StockMovementMaxAggregateInputType = { productId?: true inventoryId?: true avgCost?: true - remainedInStock?: true supplierId?: true - customerId?: true + remainedInStock?: true counterInventoryId?: true + customerId?: true } export type StockMovementCountAggregateInputType = { @@ -186,10 +186,10 @@ export type StockMovementCountAggregateInputType = { productId?: true inventoryId?: true avgCost?: true - remainedInStock?: true supplierId?: true - customerId?: true + remainedInStock?: true counterInventoryId?: true + customerId?: true _all?: true } @@ -291,10 +291,10 @@ export type StockMovementGroupByOutputType = { productId: number inventoryId: number avgCost: runtime.Decimal - remainedInStock: runtime.Decimal supplierId: number | null - customerId: number | null + remainedInStock: runtime.Decimal counterInventoryId: number | null + customerId: number | null _count: StockMovementCountAggregateOutputType | null _avg: StockMovementAvgAggregateOutputType | null _sum: StockMovementSumAggregateOutputType | null @@ -332,15 +332,15 @@ export type StockMovementWhereInput = { productId?: Prisma.IntFilter<"StockMovement"> | number inventoryId?: Prisma.IntFilter<"StockMovement"> | number avgCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string supplierId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - customerId?: 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 - customer?: Prisma.XOR | null - counterInventory?: Prisma.XOR | null } export type StockMovementOrderByWithRelationInput = { @@ -355,15 +355,15 @@ export type StockMovementOrderByWithRelationInput = { productId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder avgCost?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder supplierId?: Prisma.SortOrderInput | Prisma.SortOrder - customerId?: 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 - customer?: Prisma.CustomerOrderByWithRelationInput - counterInventory?: Prisma.InventoryOrderByWithRelationInput _relevance?: Prisma.StockMovementOrderByRelevanceInput } @@ -382,15 +382,15 @@ export type StockMovementWhereUniqueInput = Prisma.AtLeast<{ productId?: Prisma.IntFilter<"StockMovement"> | number inventoryId?: Prisma.IntFilter<"StockMovement"> | number avgCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string supplierId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - customerId?: 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 - customer?: Prisma.XOR | null - counterInventory?: Prisma.XOR | null }, "id"> export type StockMovementOrderByWithAggregationInput = { @@ -405,10 +405,10 @@ export type StockMovementOrderByWithAggregationInput = { productId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder avgCost?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder supplierId?: Prisma.SortOrderInput | Prisma.SortOrder - customerId?: 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 @@ -431,10 +431,10 @@ export type StockMovementScalarWhereWithAggregatesInput = { productId?: Prisma.IntWithAggregatesFilter<"StockMovement"> | number inventoryId?: Prisma.IntWithAggregatesFilter<"StockMovement"> | number avgCost?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string supplierId?: Prisma.IntNullableWithAggregatesFilter<"StockMovement"> | number | null - customerId?: 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 = { @@ -447,11 +447,11 @@ export type StockMovementCreateInput = { 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 - customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput - counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput } export type StockMovementUncheckedCreateInput = { @@ -466,10 +466,10 @@ export type StockMovementUncheckedCreateInput = { productId: number inventoryId: number avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string supplierId?: number | null - customerId?: number | null + remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string counterInventoryId?: number | null + customerId?: number | null } export type StockMovementUpdateInput = { @@ -482,11 +482,11 @@ export type StockMovementUpdateInput = { 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 - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput } export type StockMovementUncheckedUpdateInput = { @@ -501,10 +501,10 @@ export type StockMovementUncheckedUpdateInput = { 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 supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: 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 = { @@ -519,10 +519,10 @@ export type StockMovementCreateManyInput = { productId: number inventoryId: number avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string supplierId?: number | null - customerId?: number | null + remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string counterInventoryId?: number | null + customerId?: number | null } export type StockMovementUpdateManyMutationInput = { @@ -549,10 +549,10 @@ export type StockMovementUncheckedUpdateManyInput = { 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 supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: 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 = { @@ -583,10 +583,10 @@ export type StockMovementCountOrderByAggregateInput = { productId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder avgCost?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder supplierId?: Prisma.SortOrder - customerId?: Prisma.SortOrder + remainedInStock?: Prisma.SortOrder counterInventoryId?: Prisma.SortOrder + customerId?: Prisma.SortOrder } export type StockMovementAvgOrderByAggregateInput = { @@ -597,10 +597,10 @@ export type StockMovementAvgOrderByAggregateInput = { productId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder avgCost?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder supplierId?: Prisma.SortOrder - customerId?: Prisma.SortOrder + remainedInStock?: Prisma.SortOrder counterInventoryId?: Prisma.SortOrder + customerId?: Prisma.SortOrder } export type StockMovementMaxOrderByAggregateInput = { @@ -615,10 +615,10 @@ export type StockMovementMaxOrderByAggregateInput = { productId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder avgCost?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder supplierId?: Prisma.SortOrder - customerId?: Prisma.SortOrder + remainedInStock?: Prisma.SortOrder counterInventoryId?: Prisma.SortOrder + customerId?: Prisma.SortOrder } export type StockMovementMinOrderByAggregateInput = { @@ -633,10 +633,10 @@ export type StockMovementMinOrderByAggregateInput = { productId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder avgCost?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder supplierId?: Prisma.SortOrder - customerId?: Prisma.SortOrder + remainedInStock?: Prisma.SortOrder counterInventoryId?: Prisma.SortOrder + customerId?: Prisma.SortOrder } export type StockMovementSumOrderByAggregateInput = { @@ -647,51 +647,93 @@ export type StockMovementSumOrderByAggregateInput = { productId?: Prisma.SortOrder inventoryId?: Prisma.SortOrder avgCost?: Prisma.SortOrder - remainedInStock?: Prisma.SortOrder supplierId?: Prisma.SortOrder - customerId?: Prisma.SortOrder + remainedInStock?: Prisma.SortOrder counterInventoryId?: Prisma.SortOrder + customerId?: Prisma.SortOrder } -export type StockMovementCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutProductInput[] | Prisma.StockMovementUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutProductInput | Prisma.StockMovementCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockMovementCreateManyProductInputEnvelope +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 StockMovementUncheckedCreateNestedManyWithoutProductInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutProductInput[] | Prisma.StockMovementUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutProductInput | Prisma.StockMovementCreateOrConnectWithoutProductInput[] - createMany?: Prisma.StockMovementCreateManyProductInputEnvelope +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 StockMovementUpdateManyWithoutProductNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutProductInput[] | Prisma.StockMovementUncheckedCreateWithoutProductInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutProductInput | Prisma.StockMovementCreateOrConnectWithoutProductInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutProductInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutProductInput[] - createMany?: Prisma.StockMovementCreateManyProductInputEnvelope +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.StockMovementUpdateWithWhereUniqueWithoutProductInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutProductInput | Prisma.StockMovementUpdateManyWithWhereWithoutProductInput[] + update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutCounterInventoryInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutCounterInventoryInput[] + updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutCounterInventoryInput | Prisma.StockMovementUpdateManyWithWhereWithoutCounterInventoryInput[] 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 +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.StockMovementUpdateWithWhereUniqueWithoutProductInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutProductInput | Prisma.StockMovementUpdateManyWithWhereWithoutProductInput[] + 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[] } @@ -779,87 +821,45 @@ export type StockMovementUncheckedUpdateManyWithoutCustomerNestedInput = { deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] } -export type StockMovementCreateNestedManyWithoutInventoryInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutInventoryInput | Prisma.StockMovementCreateOrConnectWithoutInventoryInput[] - createMany?: Prisma.StockMovementCreateManyInventoryInputEnvelope +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 StockMovementCreateNestedManyWithoutCounterInventoryInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCounterInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutCounterInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput | Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput[] - createMany?: Prisma.StockMovementCreateManyCounterInventoryInputEnvelope +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 StockMovementUncheckedCreateNestedManyWithoutInventoryInput = { - 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 StockMovementUpdateManyWithoutInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutInventoryInput | Prisma.StockMovementCreateOrConnectWithoutInventoryInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutInventoryInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutInventoryInput[] - createMany?: Prisma.StockMovementCreateManyInventoryInputEnvelope +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.StockMovementUpdateWithWhereUniqueWithoutInventoryInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutInventoryInput[] - updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutInventoryInput | Prisma.StockMovementUpdateManyWithWhereWithoutInventoryInput[] + update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutProductInput | Prisma.StockMovementUpdateManyWithWhereWithoutProductInput[] deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] } -export type StockMovementUpdateManyWithoutCounterInventoryNestedInput = { - create?: Prisma.XOR | Prisma.StockMovementCreateWithoutCounterInventoryInput[] | Prisma.StockMovementUncheckedCreateWithoutCounterInventoryInput[] - connectOrCreate?: Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput | Prisma.StockMovementCreateOrConnectWithoutCounterInventoryInput[] - upsert?: Prisma.StockMovementUpsertWithWhereUniqueWithoutCounterInventoryInput | Prisma.StockMovementUpsertWithWhereUniqueWithoutCounterInventoryInput[] - createMany?: Prisma.StockMovementCreateManyCounterInventoryInputEnvelope +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.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 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[] + update?: Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput | Prisma.StockMovementUpdateWithWhereUniqueWithoutProductInput[] + updateMany?: Prisma.StockMovementUpdateManyWithWhereWithoutProductInput | Prisma.StockMovementUpdateManyWithWhereWithoutProductInput[] deleteMany?: Prisma.StockMovementScalarWhereInput | Prisma.StockMovementScalarWhereInput[] } @@ -871,7 +871,7 @@ export type EnumMovementReferenceTypeFieldUpdateOperationsInput = { set?: $Enums.MovementReferenceType } -export type StockMovementCreateWithoutProductInput = { +export type StockMovementCreateWithoutCounterInventoryInput = { type: $Enums.MovementType quantity: runtime.Decimal | runtime.DecimalJsLike | number | string fee: runtime.Decimal | runtime.DecimalJsLike | number | string @@ -881,13 +881,13 @@ export type StockMovementCreateWithoutProductInput = { createdAt?: Date | string avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - inventory: Prisma.InventoryCreateNestedOneWithoutStockMovementsInput - supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput - counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput + inventory: Prisma.InventoryCreateNestedOneWithoutStockMovementsInput + product: Prisma.ProductCreateNestedOneWithoutStockMovementsInput + supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput } -export type StockMovementUncheckedCreateWithoutProductInput = { +export type StockMovementUncheckedCreateWithoutCounterInventoryInput = { id?: number type: $Enums.MovementType quantity: runtime.Decimal | runtime.DecimalJsLike | number | string @@ -896,38 +896,81 @@ export type StockMovementUncheckedCreateWithoutProductInput = { 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 supplierId?: number | null + remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string customerId?: number | null - counterInventoryId?: number | null } -export type StockMovementCreateOrConnectWithoutProductInput = { +export type StockMovementCreateOrConnectWithoutCounterInventoryInput = { where: Prisma.StockMovementWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR } -export type StockMovementCreateManyProductInputEnvelope = { - data: Prisma.StockMovementCreateManyProductInput | Prisma.StockMovementCreateManyProductInput[] +export type StockMovementCreateManyCounterInventoryInputEnvelope = { + data: Prisma.StockMovementCreateManyCounterInventoryInput | Prisma.StockMovementCreateManyCounterInventoryInput[] skipDuplicates?: boolean } -export type StockMovementUpsertWithWhereUniqueWithoutProductInput = { - where: Prisma.StockMovementWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR +export type StockMovementCreateWithoutInventoryInput = { + type: $Enums.MovementType + quantity: runtime.Decimal | runtime.DecimalJsLike | number | string + fee: 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 StockMovementUpdateWithWhereUniqueWithoutProductInput = { - where: Prisma.StockMovementWhereUniqueInput - data: Prisma.XOR +export type StockMovementUncheckedCreateWithoutInventoryInput = { + id?: number + type: $Enums.MovementType + quantity: runtime.Decimal | runtime.DecimalJsLike | number | string + fee: 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 StockMovementUpdateManyWithWhereWithoutProductInput = { +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 + data: Prisma.XOR } export type StockMovementScalarWhereInput = { @@ -945,10 +988,26 @@ export type StockMovementScalarWhereInput = { productId?: Prisma.IntFilter<"StockMovement"> | number inventoryId?: Prisma.IntFilter<"StockMovement"> | number avgCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string supplierId?: Prisma.IntNullableFilter<"StockMovement"> | number | null - customerId?: 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 StockMovementCreateWithoutSupplierInput = { @@ -961,10 +1020,10 @@ export type StockMovementCreateWithoutSupplierInput = { 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 - customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput - counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput } export type StockMovementUncheckedCreateWithoutSupplierInput = { @@ -980,8 +1039,8 @@ export type StockMovementUncheckedCreateWithoutSupplierInput = { inventoryId: number avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - customerId?: number | null counterInventoryId?: number | null + customerId?: number | null } export type StockMovementCreateOrConnectWithoutSupplierInput = { @@ -1020,10 +1079,10 @@ export type StockMovementCreateWithoutCustomerInput = { 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 - counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput } export type StockMovementUncheckedCreateWithoutCustomerInput = { @@ -1038,8 +1097,8 @@ export type StockMovementUncheckedCreateWithoutCustomerInput = { productId: number inventoryId: number avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string supplierId?: number | null + remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string counterInventoryId?: number | null } @@ -1069,7 +1128,7 @@ export type StockMovementUpdateManyWithWhereWithoutCustomerInput = { data: Prisma.XOR } -export type StockMovementCreateWithoutInventoryInput = { +export type StockMovementCreateWithoutProductInput = { type: $Enums.MovementType quantity: runtime.Decimal | runtime.DecimalJsLike | number | string fee: runtime.Decimal | runtime.DecimalJsLike | number | string @@ -1079,56 +1138,13 @@ export type StockMovementCreateWithoutInventoryInput = { createdAt?: Date | string avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - product: Prisma.ProductCreateNestedOneWithoutStockMovementsInput - supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput - customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput counterInventory?: Prisma.InventoryCreateNestedOneWithoutCounterStockMovementsInput -} - -export type StockMovementUncheckedCreateWithoutInventoryInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: 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 - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - customerId?: number | null - counterInventoryId?: number | null -} - -export type StockMovementCreateOrConnectWithoutInventoryInput = { - where: Prisma.StockMovementWhereUniqueInput - create: Prisma.XOR -} - -export type StockMovementCreateManyInventoryInputEnvelope = { - data: Prisma.StockMovementCreateManyInventoryInput | Prisma.StockMovementCreateManyInventoryInput[] - skipDuplicates?: boolean -} - -export type StockMovementCreateWithoutCounterInventoryInput = { - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: 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 - inventory: Prisma.InventoryCreateNestedOneWithoutStockMovementsInput - product: Prisma.ProductCreateNestedOneWithoutStockMovementsInput - supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput customer?: Prisma.CustomerCreateNestedOneWithoutStockMovementsInput + inventory: Prisma.InventoryCreateNestedOneWithoutStockMovementsInput + supplier?: Prisma.SupplierCreateNestedOneWithoutStockMovementsInput } -export type StockMovementUncheckedCreateWithoutCounterInventoryInput = { +export type StockMovementUncheckedCreateWithoutProductInput = { id?: number type: $Enums.MovementType quantity: runtime.Decimal | runtime.DecimalJsLike | number | string @@ -1137,272 +1153,38 @@ export type StockMovementUncheckedCreateWithoutCounterInventoryInput = { 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 supplierId?: number | null + remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string + counterInventoryId?: number | null customerId?: number | null } -export type StockMovementCreateOrConnectWithoutCounterInventoryInput = { +export type StockMovementCreateOrConnectWithoutProductInput = { where: Prisma.StockMovementWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR } -export type StockMovementCreateManyCounterInventoryInputEnvelope = { - data: Prisma.StockMovementCreateManyCounterInventoryInput | Prisma.StockMovementCreateManyCounterInventoryInput[] +export type StockMovementCreateManyProductInputEnvelope = { + data: Prisma.StockMovementCreateManyProductInput | Prisma.StockMovementCreateManyProductInput[] skipDuplicates?: boolean } -export type StockMovementUpsertWithWhereUniqueWithoutInventoryInput = { +export type StockMovementUpsertWithWhereUniqueWithoutProductInput = { where: Prisma.StockMovementWhereUniqueInput - update: Prisma.XOR - create: Prisma.XOR + update: Prisma.XOR + create: Prisma.XOR } -export type StockMovementUpdateWithWhereUniqueWithoutInventoryInput = { +export type StockMovementUpdateWithWhereUniqueWithoutProductInput = { where: Prisma.StockMovementWhereUniqueInput - data: Prisma.XOR + data: Prisma.XOR } -export type StockMovementUpdateManyWithWhereWithoutInventoryInput = { +export type StockMovementUpdateManyWithWhereWithoutProductInput = { where: Prisma.StockMovementScalarWhereInput - data: Prisma.XOR -} - -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 StockMovementCreateManyProductInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: 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 - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - customerId?: number | null - counterInventoryId?: number | null -} - -export type StockMovementUpdateWithoutProductInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: 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 - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockMovementsNestedInput - supplier?: Prisma.SupplierUpdateOneWithoutStockMovementsNestedInput - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateWithoutProductInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: 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 - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - counterInventoryId?: 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 - fee?: 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 - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementCreateManySupplierInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: 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 - customerId?: number | null - counterInventoryId?: number | null -} - -export type StockMovementUpdateWithoutSupplierInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: 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 - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockMovementsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockMovementsNestedInput - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateWithoutSupplierInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: 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 - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - counterInventoryId?: 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 - fee?: 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 - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementCreateManyCustomerInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: 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 - supplierId?: number | null - counterInventoryId?: number | null -} - -export type StockMovementUpdateWithoutCustomerInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: 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 - inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockMovementsNestedInput - product?: Prisma.ProductUpdateOneRequiredWithoutStockMovementsNestedInput - supplier?: Prisma.SupplierUpdateOneWithoutStockMovementsNestedInput - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateWithoutCustomerInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: 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 - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - 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 - fee?: 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 - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null -} - -export type StockMovementCreateManyInventoryInput = { - id?: number - type: $Enums.MovementType - quantity: runtime.Decimal | runtime.DecimalJsLike | number | string - fee: 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 - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: number | null - customerId?: number | null - counterInventoryId?: number | null + data: Prisma.XOR } export type StockMovementCreateManyCounterInventoryInput = { @@ -1417,59 +1199,26 @@ export type StockMovementCreateManyCounterInventoryInput = { productId: number inventoryId: number avgCost: runtime.Decimal | runtime.DecimalJsLike | number | string - remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string supplierId?: number | null + remainedInStock?: runtime.Decimal | runtime.DecimalJsLike | number | string customerId?: number | null } -export type StockMovementUpdateWithoutInventoryInput = { - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: 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 - product?: Prisma.ProductUpdateOneRequiredWithoutStockMovementsNestedInput - supplier?: Prisma.SupplierUpdateOneWithoutStockMovementsNestedInput - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput - counterInventory?: Prisma.InventoryUpdateOneWithoutCounterStockMovementsNestedInput -} - -export type StockMovementUncheckedUpdateWithoutInventoryInput = { - id?: Prisma.IntFieldUpdateOperationsInput | number - type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType - quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: 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 - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - counterInventoryId?: 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 - fee?: 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 - remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string - supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null - counterInventoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null +export type StockMovementCreateManyInventoryInput = { + id?: number + type: $Enums.MovementType + quantity: runtime.Decimal | runtime.DecimalJsLike | number | string + fee: 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 = { @@ -1482,10 +1231,10 @@ export type StockMovementUpdateWithoutCounterInventoryInput = { 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 - customer?: Prisma.CustomerUpdateOneWithoutStockMovementsNestedInput } export type StockMovementUncheckedUpdateWithoutCounterInventoryInput = { @@ -1500,8 +1249,8 @@ export type StockMovementUncheckedUpdateWithoutCounterInventoryInput = { 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 supplierId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null + remainedInStock?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null } @@ -1517,8 +1266,259 @@ export type StockMovementUncheckedUpdateManyWithoutCounterInventoryInput = { 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 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 + fee?: 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 + fee?: 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 + fee?: 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 StockMovementCreateManySupplierInput = { + id?: number + type: $Enums.MovementType + quantity: runtime.Decimal | runtime.DecimalJsLike | number | string + fee: 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 + fee?: 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 + fee?: 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 + fee?: 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 StockMovementCreateManyCustomerInput = { + id?: number + type: $Enums.MovementType + quantity: runtime.Decimal | runtime.DecimalJsLike | number | string + fee: 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 + fee?: 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 + fee?: 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 + fee?: 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 + fee: 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 + fee?: 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 + fee?: 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 + fee?: 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 } @@ -1536,15 +1536,15 @@ export type StockMovementSelect + customer?: boolean | Prisma.StockMovement$customerArgs inventory?: boolean | Prisma.InventoryDefaultArgs product?: boolean | Prisma.ProductDefaultArgs supplier?: boolean | Prisma.StockMovement$supplierArgs - customer?: boolean | Prisma.StockMovement$customerArgs - counterInventory?: boolean | Prisma.StockMovement$counterInventoryArgs }, ExtArgs["result"]["stockMovement"]> @@ -1561,29 +1561,29 @@ export type StockMovementSelectScalar = { productId?: boolean inventoryId?: boolean avgCost?: boolean - remainedInStock?: boolean supplierId?: boolean - customerId?: boolean + remainedInStock?: boolean counterInventoryId?: boolean + customerId?: boolean } -export type StockMovementOmit = runtime.Types.Extensions.GetOmit<"id" | "type" | "quantity" | "fee" | "totalCost" | "referenceType" | "referenceId" | "createdAt" | "productId" | "inventoryId" | "avgCost" | "remainedInStock" | "supplierId" | "customerId" | "counterInventoryId", ExtArgs["result"]["stockMovement"]> +export type StockMovementOmit = runtime.Types.Extensions.GetOmit<"id" | "type" | "quantity" | "fee" | "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 - customer?: boolean | Prisma.StockMovement$customerArgs - counterInventory?: boolean | Prisma.StockMovement$counterInventoryArgs } export type $StockMovementPayload = { name: "StockMovement" objects: { + counterInventory: Prisma.$InventoryPayload | null + customer: Prisma.$CustomerPayload | null inventory: Prisma.$InventoryPayload product: Prisma.$ProductPayload supplier: Prisma.$SupplierPayload | null - customer: Prisma.$CustomerPayload | null - counterInventory: Prisma.$InventoryPayload | null } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number @@ -1597,10 +1597,10 @@ export type $StockMovementPayload composites: {} } @@ -1941,11 +1941,11 @@ readonly fields: StockMovementFieldRefs; */ 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> - customer = {}>(args?: Prisma.Subset>): Prisma.Prisma__CustomerClient, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - counterInventory = {}>(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. @@ -1986,10 +1986,10 @@ export interface StockMovementFieldRefs { readonly productId: Prisma.FieldRef<"StockMovement", 'Int'> readonly inventoryId: Prisma.FieldRef<"StockMovement", 'Int'> readonly avgCost: Prisma.FieldRef<"StockMovement", 'Decimal'> - readonly remainedInStock: Prisma.FieldRef<"StockMovement", 'Decimal'> readonly supplierId: Prisma.FieldRef<"StockMovement", 'Int'> - readonly customerId: Prisma.FieldRef<"StockMovement", 'Int'> + readonly remainedInStock: Prisma.FieldRef<"StockMovement", 'Decimal'> readonly counterInventoryId: Prisma.FieldRef<"StockMovement", 'Int'> + readonly customerId: Prisma.FieldRef<"StockMovement", 'Int'> } @@ -2333,22 +2333,22 @@ export type StockMovementDeleteManyArgs = { +export type StockMovement$counterInventoryArgs = { /** - * Select specific fields to fetch from the Supplier + * Select specific fields to fetch from the Inventory */ - select?: Prisma.SupplierSelect | null + select?: Prisma.InventorySelect | null /** - * Omit specific fields from the Supplier + * Omit specific fields from the Inventory */ - omit?: Prisma.SupplierOmit | null + omit?: Prisma.InventoryOmit | null /** * Choose, which related nodes to fetch as well */ - include?: Prisma.SupplierInclude | null - where?: Prisma.SupplierWhereInput + include?: Prisma.InventoryInclude | null + where?: Prisma.InventoryWhereInput } /** @@ -2371,22 +2371,22 @@ export type StockMovement$customerArgs = { +export type StockMovement$supplierArgs = { /** - * Select specific fields to fetch from the Inventory + * Select specific fields to fetch from the Supplier */ - select?: Prisma.InventorySelect | null + select?: Prisma.SupplierSelect | null /** - * Omit specific fields from the Inventory + * Omit specific fields from the Supplier */ - omit?: Prisma.InventoryOmit | null + omit?: Prisma.SupplierOmit | null /** * Choose, which related nodes to fetch as well */ - include?: Prisma.InventoryInclude | null - where?: Prisma.InventoryWhereInput + include?: Prisma.SupplierInclude | null + where?: Prisma.SupplierWhereInput } /** diff --git a/src/generated/prisma/models/Store.ts b/src/generated/prisma/models/Store.ts deleted file mode 100644 index 2df4e0d..0000000 --- a/src/generated/prisma/models/Store.ts +++ /dev/null @@ -1,1131 +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 `Store` 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 Store - * - */ -export type StoreModel = runtime.Types.Result.DefaultSelection - -export type AggregateStore = { - _count: StoreCountAggregateOutputType | null - _avg: StoreAvgAggregateOutputType | null - _sum: StoreSumAggregateOutputType | null - _min: StoreMinAggregateOutputType | null - _max: StoreMaxAggregateOutputType | null -} - -export type StoreAvgAggregateOutputType = { - id: number | null -} - -export type StoreSumAggregateOutputType = { - id: number | null -} - -export type StoreMinAggregateOutputType = { - id: number | null - name: string | null - location: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type StoreMaxAggregateOutputType = { - id: number | null - name: string | null - location: string | null - isActive: boolean | null - createdAt: Date | null - updatedAt: Date | null - deletedAt: Date | null -} - -export type StoreCountAggregateOutputType = { - id: number - name: number - location: number - isActive: number - createdAt: number - updatedAt: number - deletedAt: number - _all: number -} - - -export type StoreAvgAggregateInputType = { - id?: true -} - -export type StoreSumAggregateInputType = { - id?: true -} - -export type StoreMinAggregateInputType = { - id?: true - name?: true - location?: true - isActive?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type StoreMaxAggregateInputType = { - id?: true - name?: true - location?: true - isActive?: true - createdAt?: true - updatedAt?: true - deletedAt?: true -} - -export type StoreCountAggregateInputType = { - id?: true - name?: true - location?: true - isActive?: true - createdAt?: true - updatedAt?: true - deletedAt?: true - _all?: true -} - -export type StoreAggregateArgs = { - /** - * Filter which Store to aggregate. - */ - where?: Prisma.StoreWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Stores to fetch. - */ - orderBy?: Prisma.StoreOrderByWithRelationInput | Prisma.StoreOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the start position - */ - cursor?: Prisma.StoreWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Stores 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` Stores. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned Stores - **/ - _count?: true | StoreCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: StoreAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: StoreSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: StoreMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: StoreMaxAggregateInputType -} - -export type GetStoreAggregateType = { - [P in keyof T & keyof AggregateStore]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type StoreGroupByArgs = { - where?: Prisma.StoreWhereInput - orderBy?: Prisma.StoreOrderByWithAggregationInput | Prisma.StoreOrderByWithAggregationInput[] - by: Prisma.StoreScalarFieldEnum[] | Prisma.StoreScalarFieldEnum - having?: Prisma.StoreScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: StoreCountAggregateInputType | true - _avg?: StoreAvgAggregateInputType - _sum?: StoreSumAggregateInputType - _min?: StoreMinAggregateInputType - _max?: StoreMaxAggregateInputType -} - -export type StoreGroupByOutputType = { - id: number - name: string - location: string | null - isActive: boolean - createdAt: Date - updatedAt: Date - deletedAt: Date | null - _count: StoreCountAggregateOutputType | null - _avg: StoreAvgAggregateOutputType | null - _sum: StoreSumAggregateOutputType | null - _min: StoreMinAggregateOutputType | null - _max: StoreMaxAggregateOutputType | null -} - -type GetStoreGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof StoreGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type StoreWhereInput = { - AND?: Prisma.StoreWhereInput | Prisma.StoreWhereInput[] - OR?: Prisma.StoreWhereInput[] - NOT?: Prisma.StoreWhereInput | Prisma.StoreWhereInput[] - id?: Prisma.IntFilter<"Store"> | number - name?: Prisma.StringFilter<"Store"> | string - location?: Prisma.StringNullableFilter<"Store"> | string | null - isActive?: Prisma.BoolFilter<"Store"> | boolean - createdAt?: Prisma.DateTimeFilter<"Store"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Store"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Store"> | Date | string | null -} - -export type StoreOrderByWithRelationInput = { - 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 - _relevance?: Prisma.StoreOrderByRelevanceInput -} - -export type StoreWhereUniqueInput = Prisma.AtLeast<{ - id?: number - AND?: Prisma.StoreWhereInput | Prisma.StoreWhereInput[] - OR?: Prisma.StoreWhereInput[] - NOT?: Prisma.StoreWhereInput | Prisma.StoreWhereInput[] - name?: Prisma.StringFilter<"Store"> | string - location?: Prisma.StringNullableFilter<"Store"> | string | null - isActive?: Prisma.BoolFilter<"Store"> | boolean - createdAt?: Prisma.DateTimeFilter<"Store"> | Date | string - updatedAt?: Prisma.DateTimeFilter<"Store"> | Date | string - deletedAt?: Prisma.DateTimeNullableFilter<"Store"> | Date | string | null -}, "id"> - -export type StoreOrderByWithAggregationInput = { - 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 - _count?: Prisma.StoreCountOrderByAggregateInput - _avg?: Prisma.StoreAvgOrderByAggregateInput - _max?: Prisma.StoreMaxOrderByAggregateInput - _min?: Prisma.StoreMinOrderByAggregateInput - _sum?: Prisma.StoreSumOrderByAggregateInput -} - -export type StoreScalarWhereWithAggregatesInput = { - AND?: Prisma.StoreScalarWhereWithAggregatesInput | Prisma.StoreScalarWhereWithAggregatesInput[] - OR?: Prisma.StoreScalarWhereWithAggregatesInput[] - NOT?: Prisma.StoreScalarWhereWithAggregatesInput | Prisma.StoreScalarWhereWithAggregatesInput[] - id?: Prisma.IntWithAggregatesFilter<"Store"> | number - name?: Prisma.StringWithAggregatesFilter<"Store"> | string - location?: Prisma.StringNullableWithAggregatesFilter<"Store"> | string | null - isActive?: Prisma.BoolWithAggregatesFilter<"Store"> | boolean - createdAt?: Prisma.DateTimeWithAggregatesFilter<"Store"> | Date | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Store"> | Date | string - deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Store"> | Date | string | null -} - -export type StoreCreateInput = { - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type StoreUncheckedCreateInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type StoreUpdateInput = { - 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 -} - -export type StoreUncheckedUpdateInput = { - 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 -} - -export type StoreCreateManyInput = { - id?: number - name: string - location?: string | null - isActive?: boolean - createdAt?: Date | string - updatedAt?: Date | string - deletedAt?: Date | string | null -} - -export type StoreUpdateManyMutationInput = { - 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 -} - -export type StoreUncheckedUpdateManyInput = { - 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 -} - -export type StoreOrderByRelevanceInput = { - fields: Prisma.StoreOrderByRelevanceFieldEnum | Prisma.StoreOrderByRelevanceFieldEnum[] - sort: Prisma.SortOrder - search: string -} - -export type StoreCountOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - location?: Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type StoreAvgOrderByAggregateInput = { - id?: Prisma.SortOrder -} - -export type StoreMaxOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - location?: Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type StoreMinOrderByAggregateInput = { - id?: Prisma.SortOrder - name?: Prisma.SortOrder - location?: Prisma.SortOrder - isActive?: Prisma.SortOrder - createdAt?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - deletedAt?: Prisma.SortOrder -} - -export type StoreSumOrderByAggregateInput = { - id?: Prisma.SortOrder -} - - - -export type StoreSelect = runtime.Types.Extensions.GetSelect<{ - id?: boolean - name?: boolean - location?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean -}, ExtArgs["result"]["store"]> - - - -export type StoreSelectScalar = { - id?: boolean - name?: boolean - location?: boolean - isActive?: boolean - createdAt?: boolean - updatedAt?: boolean - deletedAt?: boolean -} - -export type StoreOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "location" | "isActive" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["store"]> - -export type $StorePayload = { - name: "Store" - objects: {} - scalars: runtime.Types.Extensions.GetPayloadResult<{ - id: number - name: string - location: string | null - isActive: boolean - createdAt: Date - updatedAt: Date - deletedAt: Date | null - }, ExtArgs["result"]["store"]> - composites: {} -} - -export type StoreGetPayload = runtime.Types.Result.GetResult - -export type StoreCountArgs = - Omit & { - select?: StoreCountAggregateInputType | true - } - -export interface StoreDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['Store'], meta: { name: 'Store' } } - /** - * Find zero or one Store that matches the filter. - * @param {StoreFindUniqueArgs} args - Arguments to find a Store - * @example - * // Get one Store - * const store = await prisma.store.findUnique({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUnique(args: Prisma.SelectSubset>): Prisma.Prisma__StoreClient, T, "findUnique", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find one Store that matches the filter or throw an error with `error.code='P2025'` - * if no matches were found. - * @param {StoreFindUniqueOrThrowArgs} args - Arguments to find a Store - * @example - * // Get one Store - * const store = await prisma.store.findUniqueOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findUniqueOrThrow(args: Prisma.SelectSubset>): Prisma.Prisma__StoreClient, T, "findUniqueOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Store 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 {StoreFindFirstArgs} args - Arguments to find a Store - * @example - * // Get one Store - * const store = await prisma.store.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst(args?: Prisma.SelectSubset>): Prisma.Prisma__StoreClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Store 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 {StoreFindFirstOrThrowArgs} args - Arguments to find a Store - * @example - * // Get one Store - * const store = await prisma.store.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow(args?: Prisma.SelectSubset>): Prisma.Prisma__StoreClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Stores 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 {StoreFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Stores - * const stores = await prisma.store.findMany() - * - * // Get first 10 Stores - * const stores = await prisma.store.findMany({ take: 10 }) - * - * // Only select the `id` - * const storeWithIdOnly = await prisma.store.findMany({ select: { id: true } }) - * - */ - findMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions>> - - /** - * Create a Store. - * @param {StoreCreateArgs} args - Arguments to create a Store. - * @example - * // Create one Store - * const Store = await prisma.store.create({ - * data: { - * // ... data to create a Store - * } - * }) - * - */ - create(args: Prisma.SelectSubset>): Prisma.Prisma__StoreClient, T, "create", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Create many Stores. - * @param {StoreCreateManyArgs} args - Arguments to create many Stores. - * @example - * // Create many Stores - * const store = await prisma.store.createMany({ - * data: [ - * // ... provide data here - * ] - * }) - * - */ - createMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Delete a Store. - * @param {StoreDeleteArgs} args - Arguments to delete one Store. - * @example - * // Delete one Store - * const Store = await prisma.store.delete({ - * where: { - * // ... filter to delete one Store - * } - * }) - * - */ - delete(args: Prisma.SelectSubset>): Prisma.Prisma__StoreClient, T, "delete", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Update one Store. - * @param {StoreUpdateArgs} args - Arguments to update one Store. - * @example - * // Update one Store - * const store = await prisma.store.update({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - update(args: Prisma.SelectSubset>): Prisma.Prisma__StoreClient, T, "update", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Delete zero or more Stores. - * @param {StoreDeleteManyArgs} args - Arguments to filter Stores to delete. - * @example - * // Delete a few Stores - * const { count } = await prisma.store.deleteMany({ - * where: { - * // ... provide filter here - * } - * }) - * - */ - deleteMany(args?: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Update zero or more Stores. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StoreUpdateManyArgs} args - Arguments to update one or more rows. - * @example - * // Update many Stores - * const store = await prisma.store.updateMany({ - * where: { - * // ... provide filter here - * }, - * data: { - * // ... provide data here - * } - * }) - * - */ - updateMany(args: Prisma.SelectSubset>): Prisma.PrismaPromise - - /** - * Create or update one Store. - * @param {StoreUpsertArgs} args - Arguments to update or create a Store. - * @example - * // Update or create a Store - * const store = await prisma.store.upsert({ - * create: { - * // ... data to create a Store - * }, - * update: { - * // ... in case it already exists, update - * }, - * where: { - * // ... the filter for the Store we want to update - * } - * }) - */ - upsert(args: Prisma.SelectSubset>): Prisma.Prisma__StoreClient, T, "upsert", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - - /** - * Count the number of Stores. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StoreCountArgs} args - Arguments to filter Stores to count. - * @example - * // Count the number of Stores - * const count = await prisma.store.count({ - * where: { - * // ... the filter for the Stores 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 Store. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StoreAggregateArgs} 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 Store. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {StoreGroupByArgs} 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 StoreGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: StoreGroupByArgs['orderBy'] } - : { orderBy?: StoreGroupByArgs['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 ? GetStoreGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the Store model - */ -readonly fields: StoreFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for Store. - * 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__StoreClient 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 Store model - */ -export interface StoreFieldRefs { - readonly id: Prisma.FieldRef<"Store", 'Int'> - readonly name: Prisma.FieldRef<"Store", 'String'> - readonly location: Prisma.FieldRef<"Store", 'String'> - readonly isActive: Prisma.FieldRef<"Store", 'Boolean'> - readonly createdAt: Prisma.FieldRef<"Store", 'DateTime'> - readonly updatedAt: Prisma.FieldRef<"Store", 'DateTime'> - readonly deletedAt: Prisma.FieldRef<"Store", 'DateTime'> -} - - -// Custom InputTypes -/** - * Store findUnique - */ -export type StoreFindUniqueArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null - /** - * Filter, which Store to fetch. - */ - where: Prisma.StoreWhereUniqueInput -} - -/** - * Store findUniqueOrThrow - */ -export type StoreFindUniqueOrThrowArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null - /** - * Filter, which Store to fetch. - */ - where: Prisma.StoreWhereUniqueInput -} - -/** - * Store findFirst - */ -export type StoreFindFirstArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null - /** - * Filter, which Store to fetch. - */ - where?: Prisma.StoreWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Stores to fetch. - */ - orderBy?: Prisma.StoreOrderByWithRelationInput | Prisma.StoreOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Stores. - */ - cursor?: Prisma.StoreWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Stores 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` Stores. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Stores. - */ - distinct?: Prisma.StoreScalarFieldEnum | Prisma.StoreScalarFieldEnum[] -} - -/** - * Store findFirstOrThrow - */ -export type StoreFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null - /** - * Filter, which Store to fetch. - */ - where?: Prisma.StoreWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Stores to fetch. - */ - orderBy?: Prisma.StoreOrderByWithRelationInput | Prisma.StoreOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for searching for Stores. - */ - cursor?: Prisma.StoreWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Stores 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` Stores. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of Stores. - */ - distinct?: Prisma.StoreScalarFieldEnum | Prisma.StoreScalarFieldEnum[] -} - -/** - * Store findMany - */ -export type StoreFindManyArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null - /** - * Filter, which Stores to fetch. - */ - where?: Prisma.StoreWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of Stores to fetch. - */ - orderBy?: Prisma.StoreOrderByWithRelationInput | Prisma.StoreOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination#cursor-based-pagination Cursor Docs} - * - * Sets the position for listing Stores. - */ - cursor?: Prisma.StoreWhereUniqueInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` Stores 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` Stores. - */ - skip?: number - distinct?: Prisma.StoreScalarFieldEnum | Prisma.StoreScalarFieldEnum[] -} - -/** - * Store create - */ -export type StoreCreateArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null - /** - * The data needed to create a Store. - */ - data: Prisma.XOR -} - -/** - * Store createMany - */ -export type StoreCreateManyArgs = { - /** - * The data used to create many Stores. - */ - data: Prisma.StoreCreateManyInput | Prisma.StoreCreateManyInput[] - skipDuplicates?: boolean -} - -/** - * Store update - */ -export type StoreUpdateArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null - /** - * The data needed to update a Store. - */ - data: Prisma.XOR - /** - * Choose, which Store to update. - */ - where: Prisma.StoreWhereUniqueInput -} - -/** - * Store updateMany - */ -export type StoreUpdateManyArgs = { - /** - * The data used to update Stores. - */ - data: Prisma.XOR - /** - * Filter which Stores to update - */ - where?: Prisma.StoreWhereInput - /** - * Limit how many Stores to update. - */ - limit?: number -} - -/** - * Store upsert - */ -export type StoreUpsertArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null - /** - * The filter to search for the Store to update in case it exists. - */ - where: Prisma.StoreWhereUniqueInput - /** - * In case the Store found by the `where` argument doesn't exist, create a new Store with this data. - */ - create: Prisma.XOR - /** - * In case the Store was found with the provided `where` argument, update it with this data. - */ - update: Prisma.XOR -} - -/** - * Store delete - */ -export type StoreDeleteArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null - /** - * Filter which Store to delete. - */ - where: Prisma.StoreWhereUniqueInput -} - -/** - * Store deleteMany - */ -export type StoreDeleteManyArgs = { - /** - * Filter which Stores to delete - */ - where?: Prisma.StoreWhereInput - /** - * Limit how many Stores to delete. - */ - limit?: number -} - -/** - * Store without action - */ -export type StoreDefaultArgs = { - /** - * Select specific fields to fetch from the Store - */ - select?: Prisma.StoreSelect | null - /** - * Omit specific fields from the Store - */ - omit?: Prisma.StoreOmit | null -} diff --git a/src/generated/prisma/models/Supplier.ts b/src/generated/prisma/models/Supplier.ts index e91de76..de1bc5e 100644 --- a/src/generated/prisma/models/Supplier.ts +++ b/src/generated/prisma/models/Supplier.ts @@ -280,9 +280,9 @@ export type SupplierWhereInput = { createdAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null - productCharges?: Prisma.ProductChargeListRelationFilter purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter stockMovements?: Prisma.StockMovementListRelationFilter + supplierLedgers?: Prisma.SupplierLedgerListRelationFilter } export type SupplierOrderByWithRelationInput = { @@ -299,9 +299,9 @@ export type SupplierOrderByWithRelationInput = { createdAt?: Prisma.SortOrder updatedAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder - productCharges?: Prisma.ProductChargeOrderByRelationAggregateInput purchaseReceipts?: Prisma.PurchaseReceiptOrderByRelationAggregateInput stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput + supplierLedgers?: Prisma.SupplierLedgerOrderByRelationAggregateInput _relevance?: Prisma.SupplierOrderByRelevanceInput } @@ -322,9 +322,9 @@ export type SupplierWhereUniqueInput = Prisma.AtLeast<{ createdAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string updatedAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null - productCharges?: Prisma.ProductChargeListRelationFilter purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter stockMovements?: Prisma.StockMovementListRelationFilter + supplierLedgers?: Prisma.SupplierLedgerListRelationFilter }, "id" | "mobileNumber"> export type SupplierOrderByWithAggregationInput = { @@ -380,9 +380,9 @@ export type SupplierCreateInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutSupplierInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutSupplierInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput + supplierLedgers?: Prisma.SupplierLedgerCreateNestedManyWithoutSupplierInput } export type SupplierUncheckedCreateInput = { @@ -399,9 +399,9 @@ export type SupplierUncheckedCreateInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutSupplierInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput + supplierLedgers?: Prisma.SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput } export type SupplierUpdateInput = { @@ -417,9 +417,9 @@ export type SupplierUpdateInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productCharges?: Prisma.ProductChargeUpdateManyWithoutSupplierNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutSupplierNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput + supplierLedgers?: Prisma.SupplierLedgerUpdateManyWithoutSupplierNestedInput } export type SupplierUncheckedUpdateInput = { @@ -436,9 +436,9 @@ export type SupplierUncheckedUpdateInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutSupplierNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutSupplierNestedInput + supplierLedgers?: Prisma.SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput } export type SupplierCreateManyInput = { @@ -560,18 +560,18 @@ export type SupplierNullableScalarRelationFilter = { isNot?: Prisma.SupplierWhereInput | null } -export type SupplierCreateNestedOneWithoutProductChargesInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutProductChargesInput +export type SupplierCreateNestedOneWithoutSupplierLedgersInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutSupplierLedgersInput connect?: Prisma.SupplierWhereUniqueInput } -export type SupplierUpdateOneRequiredWithoutProductChargesNestedInput = { - create?: Prisma.XOR - connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutProductChargesInput - upsert?: Prisma.SupplierUpsertWithoutProductChargesInput +export type SupplierUpdateOneRequiredWithoutSupplierLedgersNestedInput = { + create?: Prisma.XOR + connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutSupplierLedgersInput + upsert?: Prisma.SupplierUpsertWithoutSupplierLedgersInput connect?: Prisma.SupplierWhereUniqueInput - update?: Prisma.XOR, Prisma.SupplierUncheckedUpdateWithoutProductChargesInput> + update?: Prisma.XOR, Prisma.SupplierUncheckedUpdateWithoutSupplierLedgersInput> } export type SupplierCreateNestedOneWithoutPurchaseReceiptsInput = { @@ -604,7 +604,7 @@ export type SupplierUpdateOneWithoutStockMovementsNestedInput = { update?: Prisma.XOR, Prisma.SupplierUncheckedUpdateWithoutStockMovementsInput> } -export type SupplierCreateWithoutProductChargesInput = { +export type SupplierCreateWithoutSupplierLedgersInput = { firstName: string lastName: string email?: string | null @@ -621,7 +621,7 @@ export type SupplierCreateWithoutProductChargesInput = { stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput } -export type SupplierUncheckedCreateWithoutProductChargesInput = { +export type SupplierUncheckedCreateWithoutSupplierLedgersInput = { id?: number firstName: string lastName: string @@ -639,23 +639,23 @@ export type SupplierUncheckedCreateWithoutProductChargesInput = { stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput } -export type SupplierCreateOrConnectWithoutProductChargesInput = { +export type SupplierCreateOrConnectWithoutSupplierLedgersInput = { where: Prisma.SupplierWhereUniqueInput - create: Prisma.XOR + create: Prisma.XOR } -export type SupplierUpsertWithoutProductChargesInput = { - update: Prisma.XOR - create: Prisma.XOR +export type SupplierUpsertWithoutSupplierLedgersInput = { + update: Prisma.XOR + create: Prisma.XOR where?: Prisma.SupplierWhereInput } -export type SupplierUpdateToOneWithWhereWithoutProductChargesInput = { +export type SupplierUpdateToOneWithWhereWithoutSupplierLedgersInput = { where?: Prisma.SupplierWhereInput - data: Prisma.XOR + data: Prisma.XOR } -export type SupplierUpdateWithoutProductChargesInput = { +export type SupplierUpdateWithoutSupplierLedgersInput = { firstName?: Prisma.StringFieldUpdateOperationsInput | string lastName?: Prisma.StringFieldUpdateOperationsInput | string email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null @@ -672,7 +672,7 @@ export type SupplierUpdateWithoutProductChargesInput = { stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput } -export type SupplierUncheckedUpdateWithoutProductChargesInput = { +export type SupplierUncheckedUpdateWithoutSupplierLedgersInput = { id?: Prisma.IntFieldUpdateOperationsInput | number firstName?: Prisma.StringFieldUpdateOperationsInput | string lastName?: Prisma.StringFieldUpdateOperationsInput | string @@ -703,8 +703,8 @@ export type SupplierCreateWithoutPurchaseReceiptsInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutSupplierInput stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput + supplierLedgers?: Prisma.SupplierLedgerCreateNestedManyWithoutSupplierInput } export type SupplierUncheckedCreateWithoutPurchaseReceiptsInput = { @@ -721,8 +721,8 @@ export type SupplierUncheckedCreateWithoutPurchaseReceiptsInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutSupplierInput stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput + supplierLedgers?: Prisma.SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput } export type SupplierCreateOrConnectWithoutPurchaseReceiptsInput = { @@ -754,8 +754,8 @@ export type SupplierUpdateWithoutPurchaseReceiptsInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productCharges?: Prisma.ProductChargeUpdateManyWithoutSupplierNestedInput stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput + supplierLedgers?: Prisma.SupplierLedgerUpdateManyWithoutSupplierNestedInput } export type SupplierUncheckedUpdateWithoutPurchaseReceiptsInput = { @@ -772,8 +772,8 @@ export type SupplierUncheckedUpdateWithoutPurchaseReceiptsInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutSupplierNestedInput stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutSupplierNestedInput + supplierLedgers?: Prisma.SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput } export type SupplierCreateWithoutStockMovementsInput = { @@ -789,8 +789,8 @@ export type SupplierCreateWithoutStockMovementsInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - productCharges?: Prisma.ProductChargeCreateNestedManyWithoutSupplierInput purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutSupplierInput + supplierLedgers?: Prisma.SupplierLedgerCreateNestedManyWithoutSupplierInput } export type SupplierUncheckedCreateWithoutStockMovementsInput = { @@ -807,8 +807,8 @@ export type SupplierUncheckedCreateWithoutStockMovementsInput = { createdAt?: Date | string updatedAt?: Date | string deletedAt?: Date | string | null - productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutSupplierInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput + supplierLedgers?: Prisma.SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput } export type SupplierCreateOrConnectWithoutStockMovementsInput = { @@ -840,8 +840,8 @@ export type SupplierUpdateWithoutStockMovementsInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productCharges?: Prisma.ProductChargeUpdateManyWithoutSupplierNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutSupplierNestedInput + supplierLedgers?: Prisma.SupplierLedgerUpdateManyWithoutSupplierNestedInput } export type SupplierUncheckedUpdateWithoutStockMovementsInput = { @@ -858,8 +858,8 @@ export type SupplierUncheckedUpdateWithoutStockMovementsInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null - productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutSupplierNestedInput purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput + supplierLedgers?: Prisma.SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput } @@ -868,15 +868,15 @@ export type SupplierUncheckedUpdateWithoutStockMovementsInput = { */ export type SupplierCountOutputType = { - productCharges: number purchaseReceipts: number stockMovements: number + supplierLedgers: number } export type SupplierCountOutputTypeSelect = { - productCharges?: boolean | SupplierCountOutputTypeCountProductChargesArgs purchaseReceipts?: boolean | SupplierCountOutputTypeCountPurchaseReceiptsArgs stockMovements?: boolean | SupplierCountOutputTypeCountStockMovementsArgs + supplierLedgers?: boolean | SupplierCountOutputTypeCountSupplierLedgersArgs } /** @@ -889,13 +889,6 @@ export type SupplierCountOutputTypeDefaultArgs | null } -/** - * SupplierCountOutputType without action - */ -export type SupplierCountOutputTypeCountProductChargesArgs = { - where?: Prisma.ProductChargeWhereInput -} - /** * SupplierCountOutputType without action */ @@ -910,6 +903,13 @@ export type SupplierCountOutputTypeCountStockMovementsArgs = { + where?: Prisma.SupplierLedgerWhereInput +} + export type SupplierSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean @@ -925,9 +925,9 @@ export type SupplierSelect purchaseReceipts?: boolean | Prisma.Supplier$purchaseReceiptsArgs stockMovements?: boolean | Prisma.Supplier$stockMovementsArgs + supplierLedgers?: boolean | Prisma.Supplier$supplierLedgersArgs _count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs }, ExtArgs["result"]["supplier"]> @@ -951,18 +951,18 @@ export type SupplierSelectScalar = { 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 = { - productCharges?: boolean | Prisma.Supplier$productChargesArgs purchaseReceipts?: boolean | Prisma.Supplier$purchaseReceiptsArgs stockMovements?: boolean | Prisma.Supplier$stockMovementsArgs + supplierLedgers?: boolean | Prisma.Supplier$supplierLedgersArgs _count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs } export type $SupplierPayload = { name: "Supplier" objects: { - productCharges: Prisma.$ProductChargePayload[] purchaseReceipts: Prisma.$PurchaseReceiptPayload[] stockMovements: Prisma.$StockMovementPayload[] + supplierLedgers: Prisma.$SupplierLedgerPayload[] } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number @@ -1318,9 +1318,9 @@ readonly fields: SupplierFieldRefs; */ export interface Prisma__SupplierClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" - productCharges = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> purchaseReceipts = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> stockMovements = {}>(args?: Prisma.Subset>): Prisma.PrismaPromise, T, "findMany", GlobalOmitOptions> | Null> + supplierLedgers = {}>(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. @@ -1705,30 +1705,6 @@ export type SupplierDeleteManyArgs = { - /** - * Select specific fields to fetch from the ProductCharge - */ - select?: Prisma.ProductChargeSelect | null - /** - * Omit specific fields from the ProductCharge - */ - omit?: Prisma.ProductChargeOmit | null - /** - * Choose, which related nodes to fetch as well - */ - include?: Prisma.ProductChargeInclude | null - where?: Prisma.ProductChargeWhereInput - orderBy?: Prisma.ProductChargeOrderByWithRelationInput | Prisma.ProductChargeOrderByWithRelationInput[] - cursor?: Prisma.ProductChargeWhereUniqueInput - take?: number - skip?: number - distinct?: Prisma.ProductChargeScalarFieldEnum | Prisma.ProductChargeScalarFieldEnum[] -} - /** * Supplier.purchaseReceipts */ @@ -1777,6 +1753,30 @@ export type Supplier$stockMovementsArgs = { + /** + * 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 */ diff --git a/src/generated/prisma/models/SupplierLedger.ts b/src/generated/prisma/models/SupplierLedger.ts new file mode 100644 index 0000000..f37f796 --- /dev/null +++ b/src/generated/prisma/models/SupplierLedger.ts @@ -0,0 +1,1423 @@ + +/* !!! 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.SupplierCreateNestedOneWithoutSupplierLedgersInput +} + +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.SupplierUpdateOneRequiredWithoutSupplierLedgersNestedInput +} + +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/TriggerLog.ts b/src/generated/prisma/models/TriggerLog.ts index bc57e4a..b8cbf17 100644 --- a/src/generated/prisma/models/TriggerLog.ts +++ b/src/generated/prisma/models/TriggerLog.ts @@ -36,23 +36,23 @@ export type TriggerLogSumAggregateOutputType = { export type TriggerLogMinAggregateOutputType = { id: number | null - name: string | null message: string | null createdAt: Date | null + name: string | null } export type TriggerLogMaxAggregateOutputType = { id: number | null - name: string | null message: string | null createdAt: Date | null + name: string | null } export type TriggerLogCountAggregateOutputType = { id: number - name: number message: number createdAt: number + name: number _all: number } @@ -67,23 +67,23 @@ export type TriggerLogSumAggregateInputType = { export type TriggerLogMinAggregateInputType = { id?: true - name?: true message?: true createdAt?: true + name?: true } export type TriggerLogMaxAggregateInputType = { id?: true - name?: true message?: true createdAt?: true + name?: true } export type TriggerLogCountAggregateInputType = { id?: true - name?: true message?: true createdAt?: true + name?: true _all?: true } @@ -175,9 +175,9 @@ export type TriggerLogGroupByArgs | number - name?: Prisma.StringFilter<"TriggerLog"> | string message?: Prisma.StringFilter<"TriggerLog"> | string createdAt?: Prisma.DateTimeFilter<"TriggerLog"> | Date | string + name?: Prisma.StringFilter<"TriggerLog"> | string } export type TriggerLogOrderByWithRelationInput = { id?: Prisma.SortOrder - name?: Prisma.SortOrder message?: Prisma.SortOrder createdAt?: Prisma.SortOrder + name?: Prisma.SortOrder _relevance?: Prisma.TriggerLogOrderByRelevanceInput } @@ -223,16 +223,16 @@ export type TriggerLogWhereUniqueInput = Prisma.AtLeast<{ AND?: Prisma.TriggerLogWhereInput | Prisma.TriggerLogWhereInput[] OR?: Prisma.TriggerLogWhereInput[] NOT?: Prisma.TriggerLogWhereInput | Prisma.TriggerLogWhereInput[] - name?: Prisma.StringFilter<"TriggerLog"> | string message?: Prisma.StringFilter<"TriggerLog"> | string createdAt?: Prisma.DateTimeFilter<"TriggerLog"> | Date | string + name?: Prisma.StringFilter<"TriggerLog"> | string }, "id"> export type TriggerLogOrderByWithAggregationInput = { id?: Prisma.SortOrder - name?: Prisma.SortOrder message?: Prisma.SortOrder createdAt?: Prisma.SortOrder + name?: Prisma.SortOrder _count?: Prisma.TriggerLogCountOrderByAggregateInput _avg?: Prisma.TriggerLogAvgOrderByAggregateInput _max?: Prisma.TriggerLogMaxOrderByAggregateInput @@ -245,55 +245,55 @@ export type TriggerLogScalarWhereWithAggregatesInput = { OR?: Prisma.TriggerLogScalarWhereWithAggregatesInput[] NOT?: Prisma.TriggerLogScalarWhereWithAggregatesInput | Prisma.TriggerLogScalarWhereWithAggregatesInput[] id?: Prisma.IntWithAggregatesFilter<"TriggerLog"> | number - name?: Prisma.StringWithAggregatesFilter<"TriggerLog"> | string message?: Prisma.StringWithAggregatesFilter<"TriggerLog"> | string createdAt?: Prisma.DateTimeWithAggregatesFilter<"TriggerLog"> | Date | string + name?: Prisma.StringWithAggregatesFilter<"TriggerLog"> | string } export type TriggerLogCreateInput = { - name: string message: string createdAt?: Date | string + name: string } export type TriggerLogUncheckedCreateInput = { id?: number - name: string message: string createdAt?: Date | string + name: string } export type TriggerLogUpdateInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string message?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.StringFieldUpdateOperationsInput | string } export type TriggerLogUncheckedUpdateInput = { id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string message?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.StringFieldUpdateOperationsInput | string } export type TriggerLogCreateManyInput = { id?: number - name: string message: string createdAt?: Date | string + name: string } export type TriggerLogUpdateManyMutationInput = { - name?: Prisma.StringFieldUpdateOperationsInput | string message?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.StringFieldUpdateOperationsInput | string } export type TriggerLogUncheckedUpdateManyInput = { id?: Prisma.IntFieldUpdateOperationsInput | number - name?: Prisma.StringFieldUpdateOperationsInput | string message?: Prisma.StringFieldUpdateOperationsInput | string createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string + name?: Prisma.StringFieldUpdateOperationsInput | string } export type TriggerLogOrderByRelevanceInput = { @@ -304,9 +304,9 @@ export type TriggerLogOrderByRelevanceInput = { export type TriggerLogCountOrderByAggregateInput = { id?: Prisma.SortOrder - name?: Prisma.SortOrder message?: Prisma.SortOrder createdAt?: Prisma.SortOrder + name?: Prisma.SortOrder } export type TriggerLogAvgOrderByAggregateInput = { @@ -315,16 +315,16 @@ export type TriggerLogAvgOrderByAggregateInput = { export type TriggerLogMaxOrderByAggregateInput = { id?: Prisma.SortOrder - name?: Prisma.SortOrder message?: Prisma.SortOrder createdAt?: Prisma.SortOrder + name?: Prisma.SortOrder } export type TriggerLogMinOrderByAggregateInput = { id?: Prisma.SortOrder - name?: Prisma.SortOrder message?: Prisma.SortOrder createdAt?: Prisma.SortOrder + name?: Prisma.SortOrder } export type TriggerLogSumOrderByAggregateInput = { @@ -335,30 +335,30 @@ export type TriggerLogSumOrderByAggregateInput = { export type TriggerLogSelect = runtime.Types.Extensions.GetSelect<{ id?: boolean - name?: boolean message?: boolean createdAt?: boolean + name?: boolean }, ExtArgs["result"]["triggerLog"]> export type TriggerLogSelectScalar = { id?: boolean - name?: boolean message?: boolean createdAt?: boolean + name?: boolean } -export type TriggerLogOmit = runtime.Types.Extensions.GetOmit<"id" | "name" | "message" | "createdAt", ExtArgs["result"]["triggerLog"]> +export type TriggerLogOmit = runtime.Types.Extensions.GetOmit<"id" | "message" | "createdAt" | "name", ExtArgs["result"]["triggerLog"]> export type $TriggerLogPayload = { name: "TriggerLog" objects: {} scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number - name: string message: string createdAt: Date + name: string }, ExtArgs["result"]["triggerLog"]> composites: {} } @@ -729,9 +729,9 @@ export interface Prisma__TriggerLogClient - readonly name: Prisma.FieldRef<"TriggerLog", 'String'> readonly message: Prisma.FieldRef<"TriggerLog", 'String'> readonly createdAt: Prisma.FieldRef<"TriggerLog", 'DateTime'> + readonly name: Prisma.FieldRef<"TriggerLog", 'String'> } diff --git a/src/generated/prisma/models/User.ts b/src/generated/prisma/models/User.ts index 7aa9309..fc21d83 100644 --- a/src/generated/prisma/models/User.ts +++ b/src/generated/prisma/models/User.ts @@ -252,8 +252,8 @@ export type UserWhereInput = { createdAt?: Prisma.DateTimeFilter<"User"> | Date | string deletedAt?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string - role?: Prisma.XOR refreshTokens?: Prisma.RefreshTokenListRelationFilter + role?: Prisma.XOR } export type UserOrderByWithRelationInput = { @@ -266,8 +266,8 @@ export type UserOrderByWithRelationInput = { createdAt?: Prisma.SortOrder deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder updatedAt?: Prisma.SortOrder - role?: Prisma.RoleOrderByWithRelationInput refreshTokens?: Prisma.RefreshTokenOrderByRelationAggregateInput + role?: Prisma.RoleOrderByWithRelationInput _relevance?: Prisma.UserOrderByRelevanceInput } @@ -284,8 +284,8 @@ export type UserWhereUniqueInput = Prisma.AtLeast<{ createdAt?: Prisma.DateTimeFilter<"User"> | Date | string deletedAt?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string - role?: Prisma.XOR refreshTokens?: Prisma.RefreshTokenListRelationFilter + role?: Prisma.XOR }, "id" | "mobileNumber"> export type UserOrderByWithAggregationInput = { @@ -328,8 +328,8 @@ export type UserCreateInput = { createdAt?: Date | string deletedAt?: Date | string | null updatedAt?: Date | string - role: Prisma.RoleCreateNestedOneWithoutUsersInput refreshTokens?: Prisma.RefreshTokenCreateNestedManyWithoutUserInput + role: Prisma.RoleCreateNestedOneWithoutUsersInput } export type UserUncheckedCreateInput = { @@ -353,8 +353,8 @@ export type UserUpdateInput = { createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string - role?: Prisma.RoleUpdateOneRequiredWithoutUsersNestedInput refreshTokens?: Prisma.RefreshTokenUpdateManyWithoutUserNestedInput + role?: Prisma.RoleUpdateOneRequiredWithoutUsersNestedInput } export type UserUncheckedUpdateInput = { @@ -759,8 +759,8 @@ export type UserSelect refreshTokens?: boolean | Prisma.User$refreshTokensArgs + role?: boolean | Prisma.RoleDefaultArgs _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs }, ExtArgs["result"]["user"]> @@ -780,16 +780,16 @@ export type UserSelectScalar = { export type UserOmit = runtime.Types.Extensions.GetOmit<"id" | "mobileNumber" | "password" | "firstName" | "lastName" | "roleId" | "createdAt" | "deletedAt" | "updatedAt", ExtArgs["result"]["user"]> export type UserInclude = { - role?: boolean | Prisma.RoleDefaultArgs refreshTokens?: boolean | Prisma.User$refreshTokensArgs + role?: boolean | Prisma.RoleDefaultArgs _count?: boolean | Prisma.UserCountOutputTypeDefaultArgs } export type $UserPayload = { name: "User" objects: { - role: Prisma.$RolePayload refreshTokens: Prisma.$RefreshTokenPayload[] + role: Prisma.$RolePayload } scalars: runtime.Types.Extensions.GetPayloadResult<{ id: number @@ -1141,8 +1141,8 @@ readonly fields: UserFieldRefs; */ export interface Prisma__UserClient extends Prisma.PrismaPromise { readonly [Symbol.toStringTag]: "PrismaPromise" - role = {}>(args?: Prisma.Subset>): Prisma.Prisma__RoleClient, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions> 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. diff --git a/src/generated/prisma/models/inventory_overview.ts b/src/generated/prisma/models/inventory_overview.ts deleted file mode 100644 index d0e2b89..0000000 --- a/src/generated/prisma/models/inventory_overview.ts +++ /dev/null @@ -1,713 +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_overview` 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_overview - * - */ -export type inventory_overviewModel = runtime.Types.Result.DefaultSelection - -export type AggregateInventory_overview = { - _count: Inventory_overviewCountAggregateOutputType | null - _avg: Inventory_overviewAvgAggregateOutputType | null - _sum: Inventory_overviewSumAggregateOutputType | null - _min: Inventory_overviewMinAggregateOutputType | null - _max: Inventory_overviewMaxAggregateOutputType | null -} - -export type Inventory_overviewAvgAggregateOutputType = { - ProductId: number | null - stock_quantity: runtime.Decimal | null - avgCost: runtime.Decimal | null - totalCost: runtime.Decimal | null -} - -export type Inventory_overviewSumAggregateOutputType = { - ProductId: number | null - stock_quantity: runtime.Decimal | null - avgCost: runtime.Decimal | null - totalCost: runtime.Decimal | null -} - -export type Inventory_overviewMinAggregateOutputType = { - ProductId: number | null - stock_quantity: runtime.Decimal | null - avgCost: runtime.Decimal | null - totalCost: runtime.Decimal | null - updatedAt: Date | null -} - -export type Inventory_overviewMaxAggregateOutputType = { - ProductId: number | null - stock_quantity: runtime.Decimal | null - avgCost: runtime.Decimal | null - totalCost: runtime.Decimal | null - updatedAt: Date | null -} - -export type Inventory_overviewCountAggregateOutputType = { - ProductId: number - stock_quantity: number - avgCost: number - totalCost: number - updatedAt: number - _all: number -} - - -export type Inventory_overviewAvgAggregateInputType = { - ProductId?: true - stock_quantity?: true - avgCost?: true - totalCost?: true -} - -export type Inventory_overviewSumAggregateInputType = { - ProductId?: true - stock_quantity?: true - avgCost?: true - totalCost?: true -} - -export type Inventory_overviewMinAggregateInputType = { - ProductId?: true - stock_quantity?: true - avgCost?: true - totalCost?: true - updatedAt?: true -} - -export type Inventory_overviewMaxAggregateInputType = { - ProductId?: true - stock_quantity?: true - avgCost?: true - totalCost?: true - updatedAt?: true -} - -export type Inventory_overviewCountAggregateInputType = { - ProductId?: true - stock_quantity?: true - avgCost?: true - totalCost?: true - updatedAt?: true - _all?: true -} - -export type Inventory_overviewAggregateArgs = { - /** - * Filter which inventory_overview to aggregate. - */ - where?: Prisma.inventory_overviewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of inventory_overviews to fetch. - */ - orderBy?: Prisma.inventory_overviewOrderByWithRelationInput | Prisma.inventory_overviewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` inventory_overviews 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` inventory_overviews. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned inventory_overviews - **/ - _count?: true | Inventory_overviewCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: Inventory_overviewAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: Inventory_overviewSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Inventory_overviewMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Inventory_overviewMaxAggregateInputType -} - -export type GetInventory_overviewAggregateType = { - [P in keyof T & keyof AggregateInventory_overview]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type inventory_overviewGroupByArgs = { - where?: Prisma.inventory_overviewWhereInput - orderBy?: Prisma.inventory_overviewOrderByWithAggregationInput | Prisma.inventory_overviewOrderByWithAggregationInput[] - by: Prisma.Inventory_overviewScalarFieldEnum[] | Prisma.Inventory_overviewScalarFieldEnum - having?: Prisma.inventory_overviewScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Inventory_overviewCountAggregateInputType | true - _avg?: Inventory_overviewAvgAggregateInputType - _sum?: Inventory_overviewSumAggregateInputType - _min?: Inventory_overviewMinAggregateInputType - _max?: Inventory_overviewMaxAggregateInputType -} - -export type Inventory_overviewGroupByOutputType = { - ProductId: number - stock_quantity: runtime.Decimal - avgCost: runtime.Decimal - totalCost: runtime.Decimal - updatedAt: Date - _count: Inventory_overviewCountAggregateOutputType | null - _avg: Inventory_overviewAvgAggregateOutputType | null - _sum: Inventory_overviewSumAggregateOutputType | null - _min: Inventory_overviewMinAggregateOutputType | null - _max: Inventory_overviewMaxAggregateOutputType | null -} - -type GetInventory_overviewGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof Inventory_overviewGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type inventory_overviewWhereInput = { - AND?: Prisma.inventory_overviewWhereInput | Prisma.inventory_overviewWhereInput[] - OR?: Prisma.inventory_overviewWhereInput[] - NOT?: Prisma.inventory_overviewWhereInput | Prisma.inventory_overviewWhereInput[] - ProductId?: Prisma.IntFilter<"inventory_overview"> | number - stock_quantity?: Prisma.DecimalFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeFilter<"inventory_overview"> | Date | string -} - -export type inventory_overviewOrderByWithRelationInput = { - ProductId?: Prisma.SortOrder - stock_quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type inventory_overviewOrderByWithAggregationInput = { - ProductId?: Prisma.SortOrder - stock_quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder - _count?: Prisma.inventory_overviewCountOrderByAggregateInput - _avg?: Prisma.inventory_overviewAvgOrderByAggregateInput - _max?: Prisma.inventory_overviewMaxOrderByAggregateInput - _min?: Prisma.inventory_overviewMinOrderByAggregateInput - _sum?: Prisma.inventory_overviewSumOrderByAggregateInput -} - -export type inventory_overviewScalarWhereWithAggregatesInput = { - AND?: Prisma.inventory_overviewScalarWhereWithAggregatesInput | Prisma.inventory_overviewScalarWhereWithAggregatesInput[] - OR?: Prisma.inventory_overviewScalarWhereWithAggregatesInput[] - NOT?: Prisma.inventory_overviewScalarWhereWithAggregatesInput | Prisma.inventory_overviewScalarWhereWithAggregatesInput[] - ProductId?: Prisma.IntWithAggregatesFilter<"inventory_overview"> | number - stock_quantity?: Prisma.DecimalWithAggregatesFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string - avgCost?: Prisma.DecimalWithAggregatesFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalWithAggregatesFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string - updatedAt?: Prisma.DateTimeWithAggregatesFilter<"inventory_overview"> | Date | string -} - -export type inventory_overviewCountOrderByAggregateInput = { - ProductId?: Prisma.SortOrder - stock_quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type inventory_overviewAvgOrderByAggregateInput = { - ProductId?: Prisma.SortOrder - stock_quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - totalCost?: Prisma.SortOrder -} - -export type inventory_overviewMaxOrderByAggregateInput = { - ProductId?: Prisma.SortOrder - stock_quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type inventory_overviewMinOrderByAggregateInput = { - ProductId?: Prisma.SortOrder - stock_quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - updatedAt?: Prisma.SortOrder -} - -export type inventory_overviewSumOrderByAggregateInput = { - ProductId?: Prisma.SortOrder - stock_quantity?: Prisma.SortOrder - avgCost?: Prisma.SortOrder - totalCost?: Prisma.SortOrder -} - - - -export type inventory_overviewSelect = runtime.Types.Extensions.GetSelect<{ - ProductId?: boolean - stock_quantity?: boolean - avgCost?: boolean - totalCost?: boolean - updatedAt?: boolean -}, ExtArgs["result"]["inventory_overview"]> - - - -export type inventory_overviewSelectScalar = { - ProductId?: boolean - stock_quantity?: boolean - avgCost?: boolean - totalCost?: boolean - updatedAt?: boolean -} - -export type inventory_overviewOmit = runtime.Types.Extensions.GetOmit<"ProductId" | "stock_quantity" | "avgCost" | "totalCost" | "updatedAt", ExtArgs["result"]["inventory_overview"]> - -export type $inventory_overviewPayload = { - name: "inventory_overview" - objects: {} - scalars: runtime.Types.Extensions.GetPayloadResult<{ - ProductId: number - stock_quantity: runtime.Decimal - avgCost: runtime.Decimal - totalCost: runtime.Decimal - updatedAt: Date - }, ExtArgs["result"]["inventory_overview"]> - composites: {} -} - -export type inventory_overviewGetPayload = runtime.Types.Result.GetResult - -export type inventory_overviewCountArgs = - Omit & { - select?: Inventory_overviewCountAggregateInputType | true - } - -export interface inventory_overviewDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['inventory_overview'], meta: { name: 'inventory_overview' } } - /** - * Find the first Inventory_overview 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 {inventory_overviewFindFirstArgs} args - Arguments to find a Inventory_overview - * @example - * // Get one Inventory_overview - * const inventory_overview = await prisma.inventory_overview.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst ? { - orderBy: {} - } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { - orderBy: {} - } : {}>(args?: Prisma.SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__inventory_overviewClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Inventory_overview 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 {inventory_overviewFindFirstOrThrowArgs} args - Arguments to find a Inventory_overview - * @example - * // Get one Inventory_overview - * const inventory_overview = await prisma.inventory_overview.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow ? { - orderBy: {} - } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { - orderBy: {} - } : {}>(args?: Prisma.SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__inventory_overviewClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Inventory_overviews 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 {inventory_overviewFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Inventory_overviews - * const inventory_overviews = await prisma.inventory_overview.findMany() - * - * // Get first 10 Inventory_overviews - * const inventory_overviews = await prisma.inventory_overview.findMany({ take: 10 }) - * - * // Only select the `ProductId` - * const inventory_overviewWithProductIdOnly = await prisma.inventory_overview.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 Inventory_overviews. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {inventory_overviewCountArgs} args - Arguments to filter Inventory_overviews to count. - * @example - * // Count the number of Inventory_overviews - * const count = await prisma.inventory_overview.count({ - * where: { - * // ... the filter for the Inventory_overviews 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_overview. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Inventory_overviewAggregateArgs} 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_overview. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {inventory_overviewGroupByArgs} 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 inventory_overviewGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: inventory_overviewGroupByArgs['orderBy'] } - : { orderBy?: inventory_overviewGroupByArgs['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 ? GetInventory_overviewGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the inventory_overview model - */ -readonly fields: inventory_overviewFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for inventory_overview. - * 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__inventory_overviewClient 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 inventory_overview model - */ -export interface inventory_overviewFieldRefs { - readonly ProductId: Prisma.FieldRef<"inventory_overview", 'Int'> - readonly stock_quantity: Prisma.FieldRef<"inventory_overview", 'Decimal'> - readonly avgCost: Prisma.FieldRef<"inventory_overview", 'Decimal'> - readonly totalCost: Prisma.FieldRef<"inventory_overview", 'Decimal'> - readonly updatedAt: Prisma.FieldRef<"inventory_overview", 'DateTime'> -} - - -// Custom InputTypes -/** - * inventory_overview findFirst - */ -export type inventory_overviewFindFirstArgs = { - /** - * Select specific fields to fetch from the inventory_overview - */ - select?: Prisma.inventory_overviewSelect | null - /** - * Omit specific fields from the inventory_overview - */ - omit?: Prisma.inventory_overviewOmit | null - /** - * Filter, which inventory_overview to fetch. - */ - where?: Prisma.inventory_overviewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of inventory_overviews to fetch. - */ - orderBy?: Prisma.inventory_overviewOrderByWithRelationInput | Prisma.inventory_overviewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` inventory_overviews 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` inventory_overviews. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of inventory_overviews. - */ - distinct?: Prisma.Inventory_overviewScalarFieldEnum | Prisma.Inventory_overviewScalarFieldEnum[] -} - -/** - * inventory_overview findFirstOrThrow - */ -export type inventory_overviewFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the inventory_overview - */ - select?: Prisma.inventory_overviewSelect | null - /** - * Omit specific fields from the inventory_overview - */ - omit?: Prisma.inventory_overviewOmit | null - /** - * Filter, which inventory_overview to fetch. - */ - where?: Prisma.inventory_overviewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of inventory_overviews to fetch. - */ - orderBy?: Prisma.inventory_overviewOrderByWithRelationInput | Prisma.inventory_overviewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` inventory_overviews 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` inventory_overviews. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of inventory_overviews. - */ - distinct?: Prisma.Inventory_overviewScalarFieldEnum | Prisma.Inventory_overviewScalarFieldEnum[] -} - -/** - * inventory_overview findMany - */ -export type inventory_overviewFindManyArgs = { - /** - * Select specific fields to fetch from the inventory_overview - */ - select?: Prisma.inventory_overviewSelect | null - /** - * Omit specific fields from the inventory_overview - */ - omit?: Prisma.inventory_overviewOmit | null - /** - * Filter, which inventory_overviews to fetch. - */ - where?: Prisma.inventory_overviewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of inventory_overviews to fetch. - */ - orderBy?: Prisma.inventory_overviewOrderByWithRelationInput | Prisma.inventory_overviewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` inventory_overviews 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` inventory_overviews. - */ - skip?: number - distinct?: Prisma.Inventory_overviewScalarFieldEnum | Prisma.Inventory_overviewScalarFieldEnum[] -} - -/** - * inventory_overview without action - */ -export type inventory_overviewDefaultArgs = { - /** - * Select specific fields to fetch from the inventory_overview - */ - select?: Prisma.inventory_overviewSelect | null - /** - * Omit specific fields from the inventory_overview - */ - omit?: Prisma.inventory_overviewOmit | null -} diff --git a/src/generated/prisma/models/stock_cardex.ts b/src/generated/prisma/models/stock_cardex.ts deleted file mode 100644 index 4a3d911..0000000 --- a/src/generated/prisma/models/stock_cardex.ts +++ /dev/null @@ -1,803 +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 `stock_cardex` 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 stock_cardex - * - */ -export type stock_cardexModel = runtime.Types.Result.DefaultSelection - -export type AggregateStock_cardex = { - _count: Stock_cardexCountAggregateOutputType | null - _avg: Stock_cardexAvgAggregateOutputType | null - _sum: Stock_cardexSumAggregateOutputType | null - _min: Stock_cardexMinAggregateOutputType | null - _max: Stock_cardexMaxAggregateOutputType | null -} - -export type Stock_cardexAvgAggregateOutputType = { - productId: number | null - movement_id: number | null - quantity: runtime.Decimal | null - fee: runtime.Decimal | null - totalCost: runtime.Decimal | null - balance_quantity: runtime.Decimal | null - balance_avg_cost: runtime.Decimal | null -} - -export type Stock_cardexSumAggregateOutputType = { - productId: number | null - movement_id: number | null - quantity: runtime.Decimal | null - fee: runtime.Decimal | null - totalCost: runtime.Decimal | null - balance_quantity: runtime.Decimal | null - balance_avg_cost: runtime.Decimal | null -} - -export type Stock_cardexMinAggregateOutputType = { - productId: number | null - movement_id: number | null - type: $Enums.stock_cardex_type | null - quantity: runtime.Decimal | null - fee: runtime.Decimal | null - totalCost: runtime.Decimal | null - balance_quantity: runtime.Decimal | null - balance_avg_cost: runtime.Decimal | null - createdAt: Date | null -} - -export type Stock_cardexMaxAggregateOutputType = { - productId: number | null - movement_id: number | null - type: $Enums.stock_cardex_type | null - quantity: runtime.Decimal | null - fee: runtime.Decimal | null - totalCost: runtime.Decimal | null - balance_quantity: runtime.Decimal | null - balance_avg_cost: runtime.Decimal | null - createdAt: Date | null -} - -export type Stock_cardexCountAggregateOutputType = { - productId: number - movement_id: number - type: number - quantity: number - fee: number - totalCost: number - balance_quantity: number - balance_avg_cost: number - createdAt: number - _all: number -} - - -export type Stock_cardexAvgAggregateInputType = { - productId?: true - movement_id?: true - quantity?: true - fee?: true - totalCost?: true - balance_quantity?: true - balance_avg_cost?: true -} - -export type Stock_cardexSumAggregateInputType = { - productId?: true - movement_id?: true - quantity?: true - fee?: true - totalCost?: true - balance_quantity?: true - balance_avg_cost?: true -} - -export type Stock_cardexMinAggregateInputType = { - productId?: true - movement_id?: true - type?: true - quantity?: true - fee?: true - totalCost?: true - balance_quantity?: true - balance_avg_cost?: true - createdAt?: true -} - -export type Stock_cardexMaxAggregateInputType = { - productId?: true - movement_id?: true - type?: true - quantity?: true - fee?: true - totalCost?: true - balance_quantity?: true - balance_avg_cost?: true - createdAt?: true -} - -export type Stock_cardexCountAggregateInputType = { - productId?: true - movement_id?: true - type?: true - quantity?: true - fee?: true - totalCost?: true - balance_quantity?: true - balance_avg_cost?: true - createdAt?: true - _all?: true -} - -export type Stock_cardexAggregateArgs = { - /** - * Filter which stock_cardex to aggregate. - */ - where?: Prisma.stock_cardexWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of stock_cardexes to fetch. - */ - orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` stock_cardexes 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` stock_cardexes. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned stock_cardexes - **/ - _count?: true | Stock_cardexCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: Stock_cardexAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: Stock_cardexSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Stock_cardexMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Stock_cardexMaxAggregateInputType -} - -export type GetStock_cardexAggregateType = { - [P in keyof T & keyof AggregateStock_cardex]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type stock_cardexGroupByArgs = { - where?: Prisma.stock_cardexWhereInput - orderBy?: Prisma.stock_cardexOrderByWithAggregationInput | Prisma.stock_cardexOrderByWithAggregationInput[] - by: Prisma.Stock_cardexScalarFieldEnum[] | Prisma.Stock_cardexScalarFieldEnum - having?: Prisma.stock_cardexScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Stock_cardexCountAggregateInputType | true - _avg?: Stock_cardexAvgAggregateInputType - _sum?: Stock_cardexSumAggregateInputType - _min?: Stock_cardexMinAggregateInputType - _max?: Stock_cardexMaxAggregateInputType -} - -export type Stock_cardexGroupByOutputType = { - productId: number - movement_id: number - type: $Enums.stock_cardex_type - quantity: runtime.Decimal - fee: runtime.Decimal - totalCost: runtime.Decimal - balance_quantity: runtime.Decimal | null - balance_avg_cost: runtime.Decimal | null - createdAt: Date - _count: Stock_cardexCountAggregateOutputType | null - _avg: Stock_cardexAvgAggregateOutputType | null - _sum: Stock_cardexSumAggregateOutputType | null - _min: Stock_cardexMinAggregateOutputType | null - _max: Stock_cardexMaxAggregateOutputType | null -} - -type GetStock_cardexGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof Stock_cardexGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type stock_cardexWhereInput = { - AND?: Prisma.stock_cardexWhereInput | Prisma.stock_cardexWhereInput[] - OR?: Prisma.stock_cardexWhereInput[] - NOT?: Prisma.stock_cardexWhereInput | Prisma.stock_cardexWhereInput[] - productId?: Prisma.IntFilter<"stock_cardex"> | number - movement_id?: Prisma.IntFilter<"stock_cardex"> | number - type?: Prisma.Enumstock_cardex_typeFilter<"stock_cardex"> | $Enums.stock_cardex_type - quantity?: Prisma.DecimalFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balance_quantity?: Prisma.DecimalNullableFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - balance_avg_cost?: Prisma.DecimalNullableFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - createdAt?: Prisma.DateTimeFilter<"stock_cardex"> | Date | string -} - -export type stock_cardexOrderByWithRelationInput = { - productId?: Prisma.SortOrder - movement_id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - balance_quantity?: Prisma.SortOrderInput | Prisma.SortOrder - balance_avg_cost?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type stock_cardexOrderByWithAggregationInput = { - productId?: Prisma.SortOrder - movement_id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - balance_quantity?: Prisma.SortOrderInput | Prisma.SortOrder - balance_avg_cost?: Prisma.SortOrderInput | Prisma.SortOrder - createdAt?: Prisma.SortOrder - _count?: Prisma.stock_cardexCountOrderByAggregateInput - _avg?: Prisma.stock_cardexAvgOrderByAggregateInput - _max?: Prisma.stock_cardexMaxOrderByAggregateInput - _min?: Prisma.stock_cardexMinOrderByAggregateInput - _sum?: Prisma.stock_cardexSumOrderByAggregateInput -} - -export type stock_cardexScalarWhereWithAggregatesInput = { - AND?: Prisma.stock_cardexScalarWhereWithAggregatesInput | Prisma.stock_cardexScalarWhereWithAggregatesInput[] - OR?: Prisma.stock_cardexScalarWhereWithAggregatesInput[] - NOT?: Prisma.stock_cardexScalarWhereWithAggregatesInput | Prisma.stock_cardexScalarWhereWithAggregatesInput[] - productId?: Prisma.IntWithAggregatesFilter<"stock_cardex"> | number - movement_id?: Prisma.IntWithAggregatesFilter<"stock_cardex"> | number - type?: Prisma.Enumstock_cardex_typeWithAggregatesFilter<"stock_cardex"> | $Enums.stock_cardex_type - quantity?: Prisma.DecimalWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string - fee?: Prisma.DecimalWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string - totalCost?: Prisma.DecimalWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string - balance_quantity?: Prisma.DecimalNullableWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - balance_avg_cost?: Prisma.DecimalNullableWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null - createdAt?: Prisma.DateTimeWithAggregatesFilter<"stock_cardex"> | Date | string -} - -export type stock_cardexCountOrderByAggregateInput = { - productId?: Prisma.SortOrder - movement_id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - balance_quantity?: Prisma.SortOrder - balance_avg_cost?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type stock_cardexAvgOrderByAggregateInput = { - productId?: Prisma.SortOrder - movement_id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - balance_quantity?: Prisma.SortOrder - balance_avg_cost?: Prisma.SortOrder -} - -export type stock_cardexMaxOrderByAggregateInput = { - productId?: Prisma.SortOrder - movement_id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - balance_quantity?: Prisma.SortOrder - balance_avg_cost?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type stock_cardexMinOrderByAggregateInput = { - productId?: Prisma.SortOrder - movement_id?: Prisma.SortOrder - type?: Prisma.SortOrder - quantity?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - balance_quantity?: Prisma.SortOrder - balance_avg_cost?: Prisma.SortOrder - createdAt?: Prisma.SortOrder -} - -export type stock_cardexSumOrderByAggregateInput = { - productId?: Prisma.SortOrder - movement_id?: Prisma.SortOrder - quantity?: Prisma.SortOrder - fee?: Prisma.SortOrder - totalCost?: Prisma.SortOrder - balance_quantity?: Prisma.SortOrder - balance_avg_cost?: Prisma.SortOrder -} - - - -export type stock_cardexSelect = runtime.Types.Extensions.GetSelect<{ - productId?: boolean - movement_id?: boolean - type?: boolean - quantity?: boolean - fee?: boolean - totalCost?: boolean - balance_quantity?: boolean - balance_avg_cost?: boolean - createdAt?: boolean -}, ExtArgs["result"]["stock_cardex"]> - - - -export type stock_cardexSelectScalar = { - productId?: boolean - movement_id?: boolean - type?: boolean - quantity?: boolean - fee?: boolean - totalCost?: boolean - balance_quantity?: boolean - balance_avg_cost?: boolean - createdAt?: boolean -} - -export type stock_cardexOmit = runtime.Types.Extensions.GetOmit<"productId" | "movement_id" | "type" | "quantity" | "fee" | "totalCost" | "balance_quantity" | "balance_avg_cost" | "createdAt", ExtArgs["result"]["stock_cardex"]> - -export type $stock_cardexPayload = { - name: "stock_cardex" - objects: {} - scalars: runtime.Types.Extensions.GetPayloadResult<{ - productId: number - movement_id: number - type: $Enums.stock_cardex_type - quantity: runtime.Decimal - fee: runtime.Decimal - totalCost: runtime.Decimal - balance_quantity: runtime.Decimal | null - balance_avg_cost: runtime.Decimal | null - createdAt: Date - }, ExtArgs["result"]["stock_cardex"]> - composites: {} -} - -export type stock_cardexGetPayload = runtime.Types.Result.GetResult - -export type stock_cardexCountArgs = - Omit & { - select?: Stock_cardexCountAggregateInputType | true - } - -export interface stock_cardexDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['stock_cardex'], meta: { name: 'stock_cardex' } } - /** - * Find the first Stock_cardex 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 {stock_cardexFindFirstArgs} args - Arguments to find a Stock_cardex - * @example - * // Get one Stock_cardex - * const stock_cardex = await prisma.stock_cardex.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst ? { - orderBy: {} - } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { - orderBy: {} - } : {}>(args?: Prisma.SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_cardexClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Stock_cardex 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 {stock_cardexFindFirstOrThrowArgs} args - Arguments to find a Stock_cardex - * @example - * // Get one Stock_cardex - * const stock_cardex = await prisma.stock_cardex.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow ? { - orderBy: {} - } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { - orderBy: {} - } : {}>(args?: Prisma.SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_cardexClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Stock_cardexes 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 {stock_cardexFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Stock_cardexes - * const stock_cardexes = await prisma.stock_cardex.findMany() - * - * // Get first 10 Stock_cardexes - * const stock_cardexes = await prisma.stock_cardex.findMany({ take: 10 }) - * - * // Only select the `productId` - * const stock_cardexWithProductIdOnly = await prisma.stock_cardex.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 Stock_cardexes. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {stock_cardexCountArgs} args - Arguments to filter Stock_cardexes to count. - * @example - * // Count the number of Stock_cardexes - * const count = await prisma.stock_cardex.count({ - * where: { - * // ... the filter for the Stock_cardexes 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 Stock_cardex. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Stock_cardexAggregateArgs} 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 Stock_cardex. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {stock_cardexGroupByArgs} 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 stock_cardexGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: stock_cardexGroupByArgs['orderBy'] } - : { orderBy?: stock_cardexGroupByArgs['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 ? GetStock_cardexGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the stock_cardex model - */ -readonly fields: stock_cardexFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for stock_cardex. - * 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__stock_cardexClient 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 stock_cardex model - */ -export interface stock_cardexFieldRefs { - readonly productId: Prisma.FieldRef<"stock_cardex", 'Int'> - readonly movement_id: Prisma.FieldRef<"stock_cardex", 'Int'> - readonly type: Prisma.FieldRef<"stock_cardex", 'stock_cardex_type'> - readonly quantity: Prisma.FieldRef<"stock_cardex", 'Decimal'> - readonly fee: Prisma.FieldRef<"stock_cardex", 'Decimal'> - readonly totalCost: Prisma.FieldRef<"stock_cardex", 'Decimal'> - readonly balance_quantity: Prisma.FieldRef<"stock_cardex", 'Decimal'> - readonly balance_avg_cost: Prisma.FieldRef<"stock_cardex", 'Decimal'> - readonly createdAt: Prisma.FieldRef<"stock_cardex", 'DateTime'> -} - - -// Custom InputTypes -/** - * stock_cardex findFirst - */ -export type stock_cardexFindFirstArgs = { - /** - * Select specific fields to fetch from the stock_cardex - */ - select?: Prisma.stock_cardexSelect | null - /** - * Omit specific fields from the stock_cardex - */ - omit?: Prisma.stock_cardexOmit | null - /** - * Filter, which stock_cardex to fetch. - */ - where?: Prisma.stock_cardexWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of stock_cardexes to fetch. - */ - orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` stock_cardexes 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` stock_cardexes. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of stock_cardexes. - */ - distinct?: Prisma.Stock_cardexScalarFieldEnum | Prisma.Stock_cardexScalarFieldEnum[] -} - -/** - * stock_cardex findFirstOrThrow - */ -export type stock_cardexFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the stock_cardex - */ - select?: Prisma.stock_cardexSelect | null - /** - * Omit specific fields from the stock_cardex - */ - omit?: Prisma.stock_cardexOmit | null - /** - * Filter, which stock_cardex to fetch. - */ - where?: Prisma.stock_cardexWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of stock_cardexes to fetch. - */ - orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` stock_cardexes 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` stock_cardexes. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of stock_cardexes. - */ - distinct?: Prisma.Stock_cardexScalarFieldEnum | Prisma.Stock_cardexScalarFieldEnum[] -} - -/** - * stock_cardex findMany - */ -export type stock_cardexFindManyArgs = { - /** - * Select specific fields to fetch from the stock_cardex - */ - select?: Prisma.stock_cardexSelect | null - /** - * Omit specific fields from the stock_cardex - */ - omit?: Prisma.stock_cardexOmit | null - /** - * Filter, which stock_cardexes to fetch. - */ - where?: Prisma.stock_cardexWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of stock_cardexes to fetch. - */ - orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` stock_cardexes 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` stock_cardexes. - */ - skip?: number - distinct?: Prisma.Stock_cardexScalarFieldEnum | Prisma.Stock_cardexScalarFieldEnum[] -} - -/** - * stock_cardex without action - */ -export type stock_cardexDefaultArgs = { - /** - * Select specific fields to fetch from the stock_cardex - */ - select?: Prisma.stock_cardexSelect | null - /** - * Omit specific fields from the stock_cardex - */ - omit?: Prisma.stock_cardexOmit | null -} diff --git a/src/generated/prisma/models/stock_view.ts b/src/generated/prisma/models/stock_view.ts deleted file mode 100644 index 66146d2..0000000 --- a/src/generated/prisma/models/stock_view.ts +++ /dev/null @@ -1,671 +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 `stock_view` 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 stock_view - * - */ -export type stock_viewModel = runtime.Types.Result.DefaultSelection - -export type AggregateStock_view = { - _count: Stock_viewCountAggregateOutputType | null - _avg: Stock_viewAvgAggregateOutputType | null - _sum: Stock_viewSumAggregateOutputType | null - _min: Stock_viewMinAggregateOutputType | null - _max: Stock_viewMaxAggregateOutputType | null -} - -export type Stock_viewAvgAggregateOutputType = { - productId: number | null - inventoryId: number | null - stock: runtime.Decimal | null -} - -export type Stock_viewSumAggregateOutputType = { - productId: number | null - inventoryId: number | null - stock: runtime.Decimal | null -} - -export type Stock_viewMinAggregateOutputType = { - productId: number | null - inventoryId: number | null - stock: runtime.Decimal | null -} - -export type Stock_viewMaxAggregateOutputType = { - productId: number | null - inventoryId: number | null - stock: runtime.Decimal | null -} - -export type Stock_viewCountAggregateOutputType = { - productId: number - inventoryId: number - stock: number - _all: number -} - - -export type Stock_viewAvgAggregateInputType = { - productId?: true - inventoryId?: true - stock?: true -} - -export type Stock_viewSumAggregateInputType = { - productId?: true - inventoryId?: true - stock?: true -} - -export type Stock_viewMinAggregateInputType = { - productId?: true - inventoryId?: true - stock?: true -} - -export type Stock_viewMaxAggregateInputType = { - productId?: true - inventoryId?: true - stock?: true -} - -export type Stock_viewCountAggregateInputType = { - productId?: true - inventoryId?: true - stock?: true - _all?: true -} - -export type Stock_viewAggregateArgs = { - /** - * Filter which stock_view to aggregate. - */ - where?: Prisma.stock_viewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of stock_views to fetch. - */ - orderBy?: Prisma.stock_viewOrderByWithRelationInput | Prisma.stock_viewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` stock_views 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` stock_views. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Count returned stock_views - **/ - _count?: true | Stock_viewCountAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to average - **/ - _avg?: Stock_viewAvgAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to sum - **/ - _sum?: Stock_viewSumAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the minimum value - **/ - _min?: Stock_viewMinAggregateInputType - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs} - * - * Select which fields to find the maximum value - **/ - _max?: Stock_viewMaxAggregateInputType -} - -export type GetStock_viewAggregateType = { - [P in keyof T & keyof AggregateStock_view]: P extends '_count' | 'count' - ? T[P] extends true - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType -} - - - - -export type stock_viewGroupByArgs = { - where?: Prisma.stock_viewWhereInput - orderBy?: Prisma.stock_viewOrderByWithAggregationInput | Prisma.stock_viewOrderByWithAggregationInput[] - by: Prisma.Stock_viewScalarFieldEnum[] | Prisma.Stock_viewScalarFieldEnum - having?: Prisma.stock_viewScalarWhereWithAggregatesInput - take?: number - skip?: number - _count?: Stock_viewCountAggregateInputType | true - _avg?: Stock_viewAvgAggregateInputType - _sum?: Stock_viewSumAggregateInputType - _min?: Stock_viewMinAggregateInputType - _max?: Stock_viewMaxAggregateInputType -} - -export type Stock_viewGroupByOutputType = { - productId: number - inventoryId: number - stock: runtime.Decimal | null - _count: Stock_viewCountAggregateOutputType | null - _avg: Stock_viewAvgAggregateOutputType | null - _sum: Stock_viewSumAggregateOutputType | null - _min: Stock_viewMinAggregateOutputType | null - _max: Stock_viewMaxAggregateOutputType | null -} - -type GetStock_viewGroupByPayload = Prisma.PrismaPromise< - Array< - Prisma.PickEnumerable & - { - [P in ((keyof T) & (keyof Stock_viewGroupByOutputType))]: P extends '_count' - ? T[P] extends boolean - ? number - : Prisma.GetScalarType - : Prisma.GetScalarType - } - > - > - - - -export type stock_viewWhereInput = { - AND?: Prisma.stock_viewWhereInput | Prisma.stock_viewWhereInput[] - OR?: Prisma.stock_viewWhereInput[] - NOT?: Prisma.stock_viewWhereInput | Prisma.stock_viewWhereInput[] - productId?: Prisma.IntFilter<"stock_view"> | number - inventoryId?: Prisma.IntFilter<"stock_view"> | number - stock?: Prisma.DecimalNullableFilter<"stock_view"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type stock_viewOrderByWithRelationInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - stock?: Prisma.SortOrderInput | Prisma.SortOrder -} - -export type stock_viewOrderByWithAggregationInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - stock?: Prisma.SortOrderInput | Prisma.SortOrder - _count?: Prisma.stock_viewCountOrderByAggregateInput - _avg?: Prisma.stock_viewAvgOrderByAggregateInput - _max?: Prisma.stock_viewMaxOrderByAggregateInput - _min?: Prisma.stock_viewMinOrderByAggregateInput - _sum?: Prisma.stock_viewSumOrderByAggregateInput -} - -export type stock_viewScalarWhereWithAggregatesInput = { - AND?: Prisma.stock_viewScalarWhereWithAggregatesInput | Prisma.stock_viewScalarWhereWithAggregatesInput[] - OR?: Prisma.stock_viewScalarWhereWithAggregatesInput[] - NOT?: Prisma.stock_viewScalarWhereWithAggregatesInput | Prisma.stock_viewScalarWhereWithAggregatesInput[] - productId?: Prisma.IntWithAggregatesFilter<"stock_view"> | number - inventoryId?: Prisma.IntWithAggregatesFilter<"stock_view"> | number - stock?: Prisma.DecimalNullableWithAggregatesFilter<"stock_view"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null -} - -export type stock_viewCountOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - stock?: Prisma.SortOrder -} - -export type stock_viewAvgOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - stock?: Prisma.SortOrder -} - -export type stock_viewMaxOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - stock?: Prisma.SortOrder -} - -export type stock_viewMinOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - stock?: Prisma.SortOrder -} - -export type stock_viewSumOrderByAggregateInput = { - productId?: Prisma.SortOrder - inventoryId?: Prisma.SortOrder - stock?: Prisma.SortOrder -} - - - -export type stock_viewSelect = runtime.Types.Extensions.GetSelect<{ - productId?: boolean - inventoryId?: boolean - stock?: boolean -}, ExtArgs["result"]["stock_view"]> - - - -export type stock_viewSelectScalar = { - productId?: boolean - inventoryId?: boolean - stock?: boolean -} - -export type stock_viewOmit = runtime.Types.Extensions.GetOmit<"productId" | "inventoryId" | "stock", ExtArgs["result"]["stock_view"]> - -export type $stock_viewPayload = { - name: "stock_view" - objects: {} - scalars: runtime.Types.Extensions.GetPayloadResult<{ - productId: number - inventoryId: number - stock: runtime.Decimal | null - }, ExtArgs["result"]["stock_view"]> - composites: {} -} - -export type stock_viewGetPayload = runtime.Types.Result.GetResult - -export type stock_viewCountArgs = - Omit & { - select?: Stock_viewCountAggregateInputType | true - } - -export interface stock_viewDelegate { - [K: symbol]: { types: Prisma.TypeMap['model']['stock_view'], meta: { name: 'stock_view' } } - /** - * Find the first Stock_view 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 {stock_viewFindFirstArgs} args - Arguments to find a Stock_view - * @example - * // Get one Stock_view - * const stock_view = await prisma.stock_view.findFirst({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirst ? { - orderBy: {} - } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { - orderBy: {} - } : {}>(args?: Prisma.SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_viewClient, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions> - - /** - * Find the first Stock_view 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 {stock_viewFindFirstOrThrowArgs} args - Arguments to find a Stock_view - * @example - * // Get one Stock_view - * const stock_view = await prisma.stock_view.findFirstOrThrow({ - * where: { - * // ... provide filter here - * } - * }) - */ - findFirstOrThrow ? { - orderBy: {} - } : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys ? { - orderBy: {} - } : {}>(args?: Prisma.SelectSubset> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_viewClient, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions> - - /** - * Find zero or more Stock_views 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 {stock_viewFindManyArgs} args - Arguments to filter and select certain fields only. - * @example - * // Get all Stock_views - * const stock_views = await prisma.stock_view.findMany() - * - * // Get first 10 Stock_views - * const stock_views = await prisma.stock_view.findMany({ take: 10 }) - * - * // Only select the `productId` - * const stock_viewWithProductIdOnly = await prisma.stock_view.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 Stock_views. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {stock_viewCountArgs} args - Arguments to filter Stock_views to count. - * @example - * // Count the number of Stock_views - * const count = await prisma.stock_view.count({ - * where: { - * // ... the filter for the Stock_views 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 Stock_view. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {Stock_viewAggregateArgs} 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 Stock_view. - * Note, that providing `undefined` is treated as the value not being there. - * Read more here: https://pris.ly/d/null-undefined - * @param {stock_viewGroupByArgs} 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 stock_viewGroupByArgs, - HasSelectOrTake extends Prisma.Or< - Prisma.Extends<'skip', Prisma.Keys>, - Prisma.Extends<'take', Prisma.Keys> - >, - OrderByArg extends Prisma.True extends HasSelectOrTake - ? { orderBy: stock_viewGroupByArgs['orderBy'] } - : { orderBy?: stock_viewGroupByArgs['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 ? GetStock_viewGroupByPayload : Prisma.PrismaPromise -/** - * Fields of the stock_view model - */ -readonly fields: stock_viewFieldRefs; -} - -/** - * The delegate class that acts as a "Promise-like" for stock_view. - * 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__stock_viewClient 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 stock_view model - */ -export interface stock_viewFieldRefs { - readonly productId: Prisma.FieldRef<"stock_view", 'Int'> - readonly inventoryId: Prisma.FieldRef<"stock_view", 'Int'> - readonly stock: Prisma.FieldRef<"stock_view", 'Decimal'> -} - - -// Custom InputTypes -/** - * stock_view findFirst - */ -export type stock_viewFindFirstArgs = { - /** - * Select specific fields to fetch from the stock_view - */ - select?: Prisma.stock_viewSelect | null - /** - * Omit specific fields from the stock_view - */ - omit?: Prisma.stock_viewOmit | null - /** - * Filter, which stock_view to fetch. - */ - where?: Prisma.stock_viewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of stock_views to fetch. - */ - orderBy?: Prisma.stock_viewOrderByWithRelationInput | Prisma.stock_viewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` stock_views 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` stock_views. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of stock_views. - */ - distinct?: Prisma.Stock_viewScalarFieldEnum | Prisma.Stock_viewScalarFieldEnum[] -} - -/** - * stock_view findFirstOrThrow - */ -export type stock_viewFindFirstOrThrowArgs = { - /** - * Select specific fields to fetch from the stock_view - */ - select?: Prisma.stock_viewSelect | null - /** - * Omit specific fields from the stock_view - */ - omit?: Prisma.stock_viewOmit | null - /** - * Filter, which stock_view to fetch. - */ - where?: Prisma.stock_viewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of stock_views to fetch. - */ - orderBy?: Prisma.stock_viewOrderByWithRelationInput | Prisma.stock_viewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` stock_views 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` stock_views. - */ - skip?: number - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs} - * - * Filter by unique combinations of stock_views. - */ - distinct?: Prisma.Stock_viewScalarFieldEnum | Prisma.Stock_viewScalarFieldEnum[] -} - -/** - * stock_view findMany - */ -export type stock_viewFindManyArgs = { - /** - * Select specific fields to fetch from the stock_view - */ - select?: Prisma.stock_viewSelect | null - /** - * Omit specific fields from the stock_view - */ - omit?: Prisma.stock_viewOmit | null - /** - * Filter, which stock_views to fetch. - */ - where?: Prisma.stock_viewWhereInput - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs} - * - * Determine the order of stock_views to fetch. - */ - orderBy?: Prisma.stock_viewOrderByWithRelationInput | Prisma.stock_viewOrderByWithRelationInput[] - /** - * {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs} - * - * Take `±n` stock_views 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` stock_views. - */ - skip?: number - distinct?: Prisma.Stock_viewScalarFieldEnum | Prisma.Stock_viewScalarFieldEnum[] -} - -/** - * stock_view without action - */ -export type stock_viewDefaultArgs = { - /** - * Select specific fields to fetch from the stock_view - */ - select?: Prisma.stock_viewSelect | null - /** - * Omit specific fields from the stock_view - */ - omit?: Prisma.stock_viewOmit | null -} diff --git a/src/inventories/inventories.service.ts b/src/inventories/inventories.service.ts index 0d7227c..d1b65ea 100644 --- a/src/inventories/inventories.service.ts +++ b/src/inventories/inventories.service.ts @@ -179,4 +179,11 @@ export class InventoriesService { return ResponseMapper.list(mapped) } + + async getInventoryBankAccounts(inventoryId: number) { + const items = await this.prisma.bankAccount.findMany({ + where: { inventoryBankAccounts: { some: { inventoryId } } }, + }) + return ResponseMapper.list(items) + } } diff --git a/src/modules/bank-accounts/bank-accounts.controller.ts b/src/modules/bank-accounts/bank-accounts.controller.ts new file mode 100644 index 0000000..c599dd3 --- /dev/null +++ b/src/modules/bank-accounts/bank-accounts.controller.ts @@ -0,0 +1,34 @@ +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)) + } +} diff --git a/src/modules/bank-accounts/bank-accounts.module.ts b/src/modules/bank-accounts/bank-accounts.module.ts new file mode 100644 index 0000000..be6d59e --- /dev/null +++ b/src/modules/bank-accounts/bank-accounts.module.ts @@ -0,0 +1,11 @@ +import { Module } from '@nestjs/common' +import { PrismaModule } from '../../prisma/prisma.module' +import { BankAccountsController } from './bank-accounts.controller' +import { BankAccountsService } from './bank-accounts.service' + +@Module({ + imports: [PrismaModule], + controllers: [BankAccountsController], + providers: [BankAccountsService], +}) +export class BankAccountsModule {} diff --git a/src/modules/bank-accounts/bank-accounts.service.ts b/src/modules/bank-accounts/bank-accounts.service.ts new file mode 100644 index 0000000..46e0fe6 --- /dev/null +++ b/src/modules/bank-accounts/bank-accounts.service.ts @@ -0,0 +1,49 @@ +import { Injectable } from '@nestjs/common' +import { ResponseMapper } from '../../common/response/response-mapper' +import { PrismaService } from '../../prisma/prisma.service' + +@Injectable() +export class BankAccountsService { + constructor(private prisma: PrismaService) {} + 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({ + include: { + branch: { + select: { + id: true, + name: true, + code: true, + bank: { + select: { id: true, name: true, shortName: true }, + }, + }, + }, + }, + omit: { + branchId: true, + }, + }) + return ResponseMapper.list(items) + } + + async findOne(id: number) { + const item = await this.prisma.bankAccount.findUnique({ where: { id } }) + if (!item) return null + return ResponseMapper.single(item) + } + + 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) + } +} diff --git a/src/modules/bank-accounts/dto/create-bank-account.dto.ts b/src/modules/bank-accounts/dto/create-bank-account.dto.ts new file mode 100644 index 0000000..5f3c1ff --- /dev/null +++ b/src/modules/bank-accounts/dto/create-bank-account.dto.ts @@ -0,0 +1,27 @@ +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 new file mode 100644 index 0000000..8238c4c --- /dev/null +++ b/src/modules/bank-accounts/dto/update-bank-account.dto.ts @@ -0,0 +1,4 @@ +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 new file mode 100644 index 0000000..5724edd --- /dev/null +++ b/src/modules/bank-branches/bank-branches.controller.ts @@ -0,0 +1,34 @@ +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 new file mode 100644 index 0000000..45c59f2 --- /dev/null +++ b/src/modules/bank-branches/bank-branches.module.ts @@ -0,0 +1,11 @@ +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/bank-branches.service.ts b/src/modules/bank-branches/bank-branches.service.ts new file mode 100644 index 0000000..5d7e6bb --- /dev/null +++ b/src/modules/bank-branches/bank-branches.service.ts @@ -0,0 +1,39 @@ +import { Injectable } from '@nestjs/common' +import { ResponseMapper } from '../../common/response/response-mapper' +import { PrismaService } from '../../prisma/prisma.service' + +@Injectable() +export class BankBranchesService { + constructor(private prisma: PrismaService) {} + async create(data: any) { + const item = await this.prisma.bankBranch.create({ data }) + return ResponseMapper.create(item) + } + + async findAll() { + const items = await this.prisma.bankBranch.findMany({ + include: { + bank: { + select: { id: true, name: true, shortName: true }, + }, + }, + }) + return ResponseMapper.list(items) + } + + async findOne(id: number) { + const item = await this.prisma.bankBranch.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 }) + return ResponseMapper.update(item) + } + + async remove(id: number) { + const item = await this.prisma.bankBranch.delete({ where: { id } }) + return ResponseMapper.single(item) + } +} diff --git a/src/modules/bank-branches/dto/create-bank-branches.dto.ts b/src/modules/bank-branches/dto/create-bank-branches.dto.ts new file mode 100644 index 0000000..8bdd3de --- /dev/null +++ b/src/modules/bank-branches/dto/create-bank-branches.dto.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..ed95696 --- /dev/null +++ b/src/modules/bank-branches/dto/update-bank-branches.dto.ts @@ -0,0 +1,15 @@ +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 new file mode 100644 index 0000000..7ab9d20 --- /dev/null +++ b/src/modules/banks/banks.controller.ts @@ -0,0 +1,12 @@ +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 new file mode 100644 index 0000000..ab0a454 --- /dev/null +++ b/src/modules/banks/banks.module.ts @@ -0,0 +1,11 @@ +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 new file mode 100644 index 0000000..8b5eb91 --- /dev/null +++ b/src/modules/banks/banks.service.ts @@ -0,0 +1,15 @@ +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.service.ts b/src/modules/cardex/cardex.service.ts index 3b6db39..6a0c160 100644 --- a/src/modules/cardex/cardex.service.ts +++ b/src/modules/cardex/cardex.service.ts @@ -3,7 +3,7 @@ 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-pos.dto' +import { ReadCardexDto } from './dto/read-cardex.dto' @Injectable() export class CardexService { diff --git a/src/modules/cardex/dto/read-pos.dto.ts b/src/modules/cardex/dto/read-cardex.dto.ts similarity index 100% rename from src/modules/cardex/dto/read-pos.dto.ts rename to src/modules/cardex/dto/read-cardex.dto.ts diff --git a/src/modules/pos/pos.controller.ts b/src/modules/pos/pos.controller.ts index cdbf3ac..4a5cc97 100644 --- a/src/modules/pos/pos.controller.ts +++ b/src/modules/pos/pos.controller.ts @@ -29,47 +29,4 @@ export class PosController { return this.posService.createOrder(dto, inventoryId!) } - - // @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)) - // } } diff --git a/src/product-charges/dto/create-product-charge.dto.ts b/src/product-charges/dto/create-product-charge.dto.ts deleted file mode 100644 index 0ea439a..0000000 --- a/src/product-charges/dto/create-product-charge.dto.ts +++ /dev/null @@ -1,47 +0,0 @@ -import { Type } from 'class-transformer' -import { - IsBoolean, - IsDateString, - IsInt, - IsNumber, - IsOptional, - IsString, -} from 'class-validator' - -export class CreateProductChargeDto { - @Type(() => Number) - @IsNumber() - count: number - - @Type(() => Number) - @IsNumber() - fee: number - - @Type(() => Number) - @IsNumber() - totalAmount: number - - @IsOptional() - @IsBoolean() - @Type(() => Boolean) - isSettled?: boolean - - @IsDateString() - buyAt: string - - @IsOptional() - @IsString() - description?: string - - @Type(() => Number) - @IsInt() - productId: number - - @Type(() => Number) - @IsInt() - inventoryId: number - - @Type(() => Number) - @IsInt() - supplierId: number -} diff --git a/src/product-charges/dto/update-product-charge.dto.ts b/src/product-charges/dto/update-product-charge.dto.ts deleted file mode 100644 index fdd7867..0000000 --- a/src/product-charges/dto/update-product-charge.dto.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { Type } from 'class-transformer' -import { - IsBoolean, - IsDateString, - IsInt, - IsNumber, - IsOptional, - IsString, -} from 'class-validator' - -export class UpdateProductChargeDto { - @IsOptional() - @Type(() => Number) - @IsNumber() - count?: number - - @IsOptional() - @Type(() => Number) - @IsNumber() - fee?: number - - @IsOptional() - @Type(() => Number) - @IsNumber() - totalAmount?: number - - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isSettled?: boolean - - @IsOptional() - @IsDateString() - buyAt?: string - - @IsOptional() - @IsString() - description?: string - - @IsOptional() - @Type(() => Number) - @IsInt() - productId?: number - - @IsOptional() - @Type(() => Number) - @IsInt() - inventoryId?: number - - @IsOptional() - @Type(() => Number) - @IsInt() - supplierId?: number -} diff --git a/src/product-charges/product-charges.controller.ts b/src/product-charges/product-charges.controller.ts deleted file mode 100644 index e64b587..0000000 --- a/src/product-charges/product-charges.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateProductChargeDto } from './dto/create-product-charge.dto' -import { UpdateProductChargeDto } from './dto/update-product-charge.dto' -import { ProductChargesService } from './product-charges.service' - -@Controller('product-charges') -export class ProductChargesController { - constructor(private readonly service: ProductChargesService) {} - - @Post() - create(@Body() dto: CreateProductChargeDto) { - 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: UpdateProductChargeDto) { - return this.service.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.service.remove(Number(id)) - } -} diff --git a/src/product-charges/product-charges.module.ts b/src/product-charges/product-charges.module.ts deleted file mode 100644 index d2550d2..0000000 --- a/src/product-charges/product-charges.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { ProductChargesController } from './product-charges.controller' -import { ProductChargesService } from './product-charges.service' - -@Module({ - imports: [PrismaModule], - controllers: [ProductChargesController], - providers: [ProductChargesService], -}) -export class ProductChargesModule {} diff --git a/src/product-charges/product-charges.service.ts b/src/product-charges/product-charges.service.ts deleted file mode 100644 index ed3faf9..0000000 --- a/src/product-charges/product-charges.service.ts +++ /dev/null @@ -1,104 +0,0 @@ -import { Injectable } from '@nestjs/common' -import { ResponseMapper } from '../common/response/response-mapper' -import { PrismaService } from '../prisma/prisma.service' -import { CreateProductChargeDto } from './dto/create-product-charge.dto' - -@Injectable() -export class ProductChargesService { - constructor(private prisma: PrismaService) {} - - async create(data: CreateProductChargeDto) { - const payload: any = { ...data } - - // transform relation id scalars into nested connect objects - if (Object.prototype.hasOwnProperty.call(payload, 'productId')) { - if (payload.productId !== undefined && payload.productId !== null) { - payload.product = { connect: { id: Number(payload.productId) } } - } - delete payload.productId - } - - if (Object.prototype.hasOwnProperty.call(payload, 'inventoryId')) { - if (payload.inventoryId !== undefined && payload.inventoryId !== null) { - payload.inventory = { connect: { id: Number(payload.inventoryId) } } - } - delete payload.inventoryId - } - - if (Object.prototype.hasOwnProperty.call(payload, 'supplierId')) { - if (payload.supplierId !== undefined && payload.supplierId !== null) { - payload.supplier = { connect: { id: Number(payload.supplierId) } } - } - delete payload.supplierId - } - - // Convert buyAt to Date if it's a string - if (typeof payload.buyAt === 'string') { - payload.buyAt = new Date(payload.buyAt) - } - - // Remove explicit nulls for optional fields to avoid Prisma complaining - Object.keys(payload).forEach(k => { - if (payload[k] === null) delete payload[k] - }) - - const item = await this.prisma.productCharge.create({ data: payload }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.productCharge.findMany() - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.productCharge.findUnique({ where: { id } }) - 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')) { - if (payload.productId === null) { - payload.product = { disconnect: true } - } else { - payload.product = { connect: { id: Number(payload.productId) } } - } - delete payload.productId - } - - 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 - } - - 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 (typeof payload.buyAt === 'string') payload.buyAt = new Date(payload.buyAt) - - Object.keys(payload).forEach(k => { - if (payload[k] === null) delete payload[k] - }) - - const item = await this.prisma.productCharge.update({ where: { id }, data: payload }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.productCharge.delete({ where: { id } }) - return ResponseMapper.single(item) - } -} diff --git a/src/purchase-receipts/dto/create-purchase-receipt.dto.ts b/src/purchase-receipts/dto/create-purchase-receipt.dto.ts index e86b009..76bcb76 100644 --- a/src/purchase-receipts/dto/create-purchase-receipt.dto.ts +++ b/src/purchase-receipts/dto/create-purchase-receipt.dto.ts @@ -1,5 +1,12 @@ import { Type } from 'class-transformer' -import { ArrayMinSize, IsInt, IsNumber, IsOptional, IsString } from 'class-validator' +import { + ArrayMinSize, + IsBoolean, + IsInt, + IsNumber, + IsOptional, + IsString, +} from 'class-validator' import { CreatePurchaseReceiptItemDto } from '../../purchase-receipt-items/dto/create-purchase-receipt-item.dto' export class CreatePurchaseReceiptDto { @@ -10,6 +17,14 @@ export class CreatePurchaseReceiptDto { @IsNumber() totalAmount: number + @IsBoolean() + @IsOptional() + isSettled?: boolean + + @Type(() => Number) + @IsNumber() + paidAmount: number + @IsOptional() @IsString() description?: string diff --git a/src/purchase-receipts/purchase-receipts.service.ts b/src/purchase-receipts/purchase-receipts.service.ts index cfe5ce7..b4d8f78 100644 --- a/src/purchase-receipts/purchase-receipts.service.ts +++ b/src/purchase-receipts/purchase-receipts.service.ts @@ -15,6 +15,7 @@ export class PurchaseReceiptsService { description: dto.description ?? null, supplier: { connect: { id: dto.supplierId } }, inventory: { connect: { id: dto.inventoryId } }, + items: dto.items?.length ? { create: dto.items.map((item, idx) => { diff --git a/src/stores/dto/create-store.dto.ts b/src/stores/dto/create-store.dto.ts deleted file mode 100644 index 576b54f..0000000 --- a/src/stores/dto/create-store.dto.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { IsOptional, IsString } from 'class-validator' - -export class CreateStoreDto { - @IsString() - name: string - - @IsOptional() - @IsString() - location?: string -} diff --git a/src/stores/dto/update-store.dto.ts b/src/stores/dto/update-store.dto.ts deleted file mode 100644 index 6ebc4f3..0000000 --- a/src/stores/dto/update-store.dto.ts +++ /dev/null @@ -1,17 +0,0 @@ -import { Type } from 'class-transformer' -import { IsBoolean, IsOptional, IsString } from 'class-validator' - -export class UpdateStoreDto { - @IsOptional() - @IsString() - name?: string - - @IsOptional() - @IsString() - location?: string - - @IsOptional() - @Type(() => Boolean) - @IsBoolean() - isActive?: boolean -} diff --git a/src/stores/stores.controller.ts b/src/stores/stores.controller.ts deleted file mode 100644 index f3d76b6..0000000 --- a/src/stores/stores.controller.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common' -import { CreateStoreDto } from './dto/create-store.dto' -import { UpdateStoreDto } from './dto/update-store.dto' -import { StoresService } from './stores.service' - -@Controller('stores') -export class StoresController { - constructor(private readonly storesService: StoresService) {} - - @Post() - create(@Body() dto: CreateStoreDto) { - return this.storesService.create(dto) - } - - @Get() - findAll() { - return this.storesService.findAll() - } - - @Get(':id') - findOne(@Param('id') id: string) { - return this.storesService.findOne(Number(id)) - } - - @Patch(':id') - update(@Param('id') id: string, @Body() dto: UpdateStoreDto) { - return this.storesService.update(Number(id), dto) - } - - @Delete(':id') - remove(@Param('id') id: string) { - return this.storesService.remove(Number(id)) - } -} diff --git a/src/stores/stores.module.ts b/src/stores/stores.module.ts deleted file mode 100644 index 159fae7..0000000 --- a/src/stores/stores.module.ts +++ /dev/null @@ -1,11 +0,0 @@ -import { Module } from '@nestjs/common' -import { PrismaModule } from '../prisma/prisma.module' -import { StoresController } from './stores.controller' -import { StoresService } from './stores.service' - -@Module({ - imports: [PrismaModule], - controllers: [StoresController], - providers: [StoresService], -}) -export class StoresModule {} diff --git a/src/stores/stores.service.ts b/src/stores/stores.service.ts deleted file mode 100644 index 872c684..0000000 --- a/src/stores/stores.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 StoresService { - constructor(private prisma: PrismaService) {} - async create(data: any) { - const item = await this.prisma.store.create({ data }) - return ResponseMapper.create(item) - } - - async findAll() { - const items = await this.prisma.store.findMany() - return ResponseMapper.list(items) - } - - async findOne(id: number) { - const item = await this.prisma.store.findUnique({ where: { id } }) - if (!item) return null - return ResponseMapper.single(item) - } - - async update(id: number, data: any) { - const item = await this.prisma.store.update({ where: { id }, data }) - return ResponseMapper.update(item) - } - - async remove(id: number) { - const item = await this.prisma.store.delete({ where: { id } }) - return ResponseMapper.single(item) - } -}