init
This commit is contained in:
+3
-1
@@ -13,9 +13,11 @@
|
|||||||
"dotenv": "^17.2.3",
|
"dotenv": "^17.2.3",
|
||||||
"jalaliday": "^3.1.1",
|
"jalaliday": "^3.1.1",
|
||||||
"jsonwebtoken": "^9.0.3",
|
"jsonwebtoken": "^9.0.3",
|
||||||
|
"multer": "^2.0.2",
|
||||||
"mysql2": "^3.15.3",
|
"mysql2": "^3.15.3",
|
||||||
"reflect-metadata": "^0.2.2",
|
"reflect-metadata": "^0.2.2",
|
||||||
"rxjs": "^7.8.1"
|
"rxjs": "^7.8.1",
|
||||||
|
"uuid": "^13.0.0"
|
||||||
},
|
},
|
||||||
"description": "",
|
"description": "",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
|
|||||||
Generated
+12
@@ -44,6 +44,9 @@ importers:
|
|||||||
jsonwebtoken:
|
jsonwebtoken:
|
||||||
specifier: ^9.0.3
|
specifier: ^9.0.3
|
||||||
version: 9.0.3
|
version: 9.0.3
|
||||||
|
multer:
|
||||||
|
specifier: ^2.0.2
|
||||||
|
version: 2.0.2
|
||||||
mysql2:
|
mysql2:
|
||||||
specifier: ^3.15.3
|
specifier: ^3.15.3
|
||||||
version: 3.15.3
|
version: 3.15.3
|
||||||
@@ -53,6 +56,9 @@ importers:
|
|||||||
rxjs:
|
rxjs:
|
||||||
specifier: ^7.8.1
|
specifier: ^7.8.1
|
||||||
version: 7.8.2
|
version: 7.8.2
|
||||||
|
uuid:
|
||||||
|
specifier: ^13.0.0
|
||||||
|
version: 13.0.0
|
||||||
devDependencies:
|
devDependencies:
|
||||||
'@eslint/eslintrc':
|
'@eslint/eslintrc':
|
||||||
specifier: ^3.2.0
|
specifier: ^3.2.0
|
||||||
@@ -3504,6 +3510,10 @@ packages:
|
|||||||
util-deprecate@1.0.2:
|
util-deprecate@1.0.2:
|
||||||
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
resolution: {integrity: sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==}
|
||||||
|
|
||||||
|
uuid@13.0.0:
|
||||||
|
resolution: {integrity: sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
v8-compile-cache-lib@3.0.1:
|
v8-compile-cache-lib@3.0.1:
|
||||||
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}
|
resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==}
|
||||||
|
|
||||||
@@ -7353,6 +7363,8 @@ snapshots:
|
|||||||
|
|
||||||
util-deprecate@1.0.2: {}
|
util-deprecate@1.0.2: {}
|
||||||
|
|
||||||
|
uuid@13.0.0: {}
|
||||||
|
|
||||||
v8-compile-cache-lib@3.0.1: {}
|
v8-compile-cache-lib@3.0.1: {}
|
||||||
|
|
||||||
v8-to-istanbul@9.3.0:
|
v8-to-istanbul@9.3.0:
|
||||||
|
|||||||
@@ -1,662 +0,0 @@
|
|||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Users` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`mobileNumber` CHAR(11) NOT NULL,
|
|
||||||
`password` VARCHAR(191) NOT NULL,
|
|
||||||
`firstName` VARCHAR(191) NOT NULL,
|
|
||||||
`lastName` VARCHAR(191) NOT NULL,
|
|
||||||
`roleId` INTEGER NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Users_mobileNumber_key`(`mobileNumber`),
|
|
||||||
INDEX `Users_roleId_fkey`(`roleId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Roles` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(100) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`permissions` JSON NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Roles_name_key`(`name`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Otp_Codes` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`mobileNumber` VARCHAR(20) NOT NULL,
|
|
||||||
`code` VARCHAR(10) NOT NULL,
|
|
||||||
`used` BOOLEAN NOT NULL DEFAULT false,
|
|
||||||
`expiresAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
|
|
||||||
INDEX `Otp_Codes_mobileNumber_idx`(`mobileNumber`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Refresh_Tokens` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`tokenHash` VARCHAR(255) NOT NULL,
|
|
||||||
`userId` INTEGER NOT NULL,
|
|
||||||
`revoked` BOOLEAN NOT NULL DEFAULT false,
|
|
||||||
`expiresAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
|
|
||||||
INDEX `Refresh_Tokens_userId_idx`(`userId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Bank_Branches` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(255) NOT NULL,
|
|
||||||
`code` VARCHAR(10) NOT NULL,
|
|
||||||
`address` VARCHAR(500) NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
`bankId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Bank_Branches_code_key`(`code`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Bank_Accounts` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`accountNumber` VARCHAR(20) NULL,
|
|
||||||
`cardNumber` VARCHAR(16) NULL,
|
|
||||||
`name` VARCHAR(255) NOT NULL,
|
|
||||||
`iban` VARCHAR(34) NULL,
|
|
||||||
`branchId` INTEGER NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Bank_Accounts_accountNumber_key`(`accountNumber`),
|
|
||||||
UNIQUE INDEX `Bank_Accounts_cardNumber_key`(`cardNumber`),
|
|
||||||
UNIQUE INDEX `Bank_Accounts_iban_key`(`iban`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Bank_Account_Transactions` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`bankAccountId` INTEGER NOT NULL,
|
|
||||||
`type` ENUM('DEPOSIT', 'WITHDRAWAL') NOT NULL,
|
|
||||||
`amount` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`balanceAfter` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`referenceId` INTEGER NOT NULL,
|
|
||||||
`referenceType` ENUM('PURCHASE_PAYMENT', 'PURCHASE_REFUND', 'POS_SALE', 'POS_REFUND', 'BANK_TRANSFER', 'MANUAL_ADJUSTMENT') NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
|
|
||||||
INDEX `Bank_Account_Transactions_bankAccountId_idx`(`bankAccountId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Bank_Account_Balance` (
|
|
||||||
`bankAccountId` INTEGER NOT NULL,
|
|
||||||
`balance` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Bank_Account_Balance_bankAccountId_key`(`bankAccountId`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Inventories` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(255) NOT NULL,
|
|
||||||
`location` VARCHAR(255) NULL,
|
|
||||||
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
`isPointOfSale` BOOLEAN NOT NULL DEFAULT false,
|
|
||||||
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Inventory_Bank_Accounts` (
|
|
||||||
`inventoryId` INTEGER NOT NULL,
|
|
||||||
`bankAccountId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
INDEX `Inventory_Bank_Accounts_bankAccountId_idx`(`bankAccountId`),
|
|
||||||
PRIMARY KEY (`inventoryId`, `bankAccountId`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Pos_Accounts` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(255) NOT NULL,
|
|
||||||
`code` VARCHAR(10) NOT NULL,
|
|
||||||
`description` VARCHAR(500) NULL,
|
|
||||||
`bankAccountId` INTEGER NOT NULL,
|
|
||||||
`inventoryId` INTEGER NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Pos_Accounts_code_key`(`code`),
|
|
||||||
INDEX `Pos_Accounts_inventoryId_idx`(`inventoryId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Inventory_Transfers` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` VARCHAR(100) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`fromInventoryId` INTEGER NOT NULL,
|
|
||||||
`toInventoryId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Inventory_Transfers_code_key`(`code`),
|
|
||||||
INDEX `Inventory_Transfers_fromInventoryId_fkey`(`fromInventoryId`),
|
|
||||||
INDEX `Inventory_Transfers_toInventoryId_fkey`(`toInventoryId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Inventory_Transfer_Items` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`count` DECIMAL(10, 0) NOT NULL,
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
`transferId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
INDEX `Inventory_Transfer_Items_productId_fkey`(`productId`),
|
|
||||||
INDEX `Inventory_Transfer_Items_transferId_fkey`(`transferId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Banks` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(255) NOT NULL,
|
|
||||||
`shortName` VARCHAR(3) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Banks_shortName_key`(`shortName`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Orders` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`orderNumber` VARCHAR(100) NOT NULL,
|
|
||||||
`status` ENUM('PENDING', 'REJECT', 'DONE') NOT NULL DEFAULT 'PENDING',
|
|
||||||
`totalAmount` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
`customerId` INTEGER NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Orders_orderNumber_key`(`orderNumber`),
|
|
||||||
INDEX `Orders_customerId_idx`(`customerId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Order_Items` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`quantity` DECIMAL(10, 0) NOT NULL,
|
|
||||||
`unitPrice` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`totalPrice` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`orderId` INTEGER NOT NULL,
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
INDEX `Order_Items_orderId_idx`(`orderId`),
|
|
||||||
INDEX `Order_Items_productId_idx`(`productId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Customers` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`firstName` VARCHAR(255) NOT NULL,
|
|
||||||
`lastName` VARCHAR(255) NOT NULL,
|
|
||||||
`email` VARCHAR(255) NULL,
|
|
||||||
`mobileNumber` CHAR(11) NOT NULL,
|
|
||||||
`address` TEXT NULL,
|
|
||||||
`city` VARCHAR(100) NULL,
|
|
||||||
`state` VARCHAR(100) NULL,
|
|
||||||
`country` VARCHAR(100) NULL,
|
|
||||||
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Customers_mobileNumber_key`(`mobileNumber`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Trigger_Logs` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`message` TEXT NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`name` TEXT NOT NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Product_Variants` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(255) NOT NULL,
|
|
||||||
`basePrice` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`salePrice` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`barcode` VARCHAR(100) NULL,
|
|
||||||
`imageUrl` VARCHAR(255) NULL,
|
|
||||||
`unit` VARCHAR(10) NULL,
|
|
||||||
`quantity` DECIMAL(10, 0) NULL DEFAULT 0.00,
|
|
||||||
`alertQuantity` DECIMAL(10, 0) NULL DEFAULT 5.00,
|
|
||||||
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
|
||||||
`isFeatured` BOOLEAN NOT NULL DEFAULT false,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Product_Variants_barcode_key`(`barcode`),
|
|
||||||
INDEX `Product_Variants_productId_fkey`(`productId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Products` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(255) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`sku` VARCHAR(100) NULL,
|
|
||||||
`barcode` VARCHAR(100) NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
`brandId` INTEGER NULL,
|
|
||||||
`categoryId` INTEGER NULL,
|
|
||||||
`salePrice` DECIMAL(15, 0) NOT NULL DEFAULT 0.00,
|
|
||||||
`minimumStockAlertLevel` DECIMAL(10, 0) NOT NULL DEFAULT 1.00,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Products_sku_key`(`sku`),
|
|
||||||
UNIQUE INDEX `Products_barcode_key`(`barcode`),
|
|
||||||
INDEX `Products_brandId_fkey`(`brandId`),
|
|
||||||
INDEX `Products_categoryId_fkey`(`categoryId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Product_brands` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(100) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`imageUrl` VARCHAR(255) NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Product_categories` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(100) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`imageUrl` VARCHAR(255) NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Purchase_Receipts` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` VARCHAR(100) NOT NULL,
|
|
||||||
`totalAmount` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`paidAmount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`status` ENUM('UNPAID', 'PARTIALLY_PAID', 'PAID') NOT NULL DEFAULT 'UNPAID',
|
|
||||||
`supplierId` INTEGER NOT NULL,
|
|
||||||
`inventoryId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Purchase_Receipts_code_key`(`code`),
|
|
||||||
INDEX `Purchase_Receipts_inventoryId_fkey`(`inventoryId`),
|
|
||||||
INDEX `Purchase_Receipts_supplierId_fkey`(`supplierId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Purchase_Receipt_Items` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`count` DECIMAL(10, 0) NOT NULL,
|
|
||||||
`unitPrice` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`totalPrice` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`receiptId` INTEGER NOT NULL,
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
|
|
||||||
INDEX `Purchase_Receipt_Items_productId_fkey`(`productId`),
|
|
||||||
INDEX `Purchase_Receipt_Items_receiptId_fkey`(`receiptId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Purchase_Receipt_Payments` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`amount` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
|
||||||
`type` ENUM('PAYMENT', 'REFUND') NOT NULL,
|
|
||||||
`bankAccountId` INTEGER NOT NULL,
|
|
||||||
`receiptId` INTEGER NOT NULL,
|
|
||||||
`payedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`inventoryBankAccountInventoryId` INTEGER NULL,
|
|
||||||
`inventoryBankAccountBankAccountId` INTEGER NULL,
|
|
||||||
|
|
||||||
INDEX `Purchase_Receipt_Payments_receiptId_fkey`(`receiptId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Sales_Invoices` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` VARCHAR(100) NOT NULL,
|
|
||||||
`totalAmount` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`customerId` INTEGER NULL,
|
|
||||||
`posAccountId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Sales_Invoices_code_key`(`code`),
|
|
||||||
INDEX `Sales_Invoices_customerId_idx`(`customerId`),
|
|
||||||
INDEX `Sales_Invoices_posAccountId_idx`(`posAccountId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Sales_Invoice_Items` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`count` DECIMAL(10, 0) NOT NULL,
|
|
||||||
`unitPrice` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
|
||||||
`totalPrice` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`invoiceId` INTEGER NOT NULL,
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
INDEX `Sales_Invoice_Items_invoiceId_idx`(`invoiceId`),
|
|
||||||
INDEX `Sales_Invoice_Items_productId_idx`(`productId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `SalesInvoicePayment` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`invoiceId` INTEGER NOT NULL,
|
|
||||||
`amount` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
|
||||||
`paidAt` DATETIME(3) NOT NULL,
|
|
||||||
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
||||||
|
|
||||||
INDEX `SalesInvoicePayment_invoiceId_idx`(`invoiceId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Stock_Movements` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`type` ENUM('IN', 'OUT', 'ADJUST') NOT NULL,
|
|
||||||
`quantity` DECIMAL(10, 0) NOT NULL,
|
|
||||||
`unitPrice` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`totalCost` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`referenceType` ENUM('PURCHASE', 'SALES', 'ADJUSTMENT', 'INVENTORY_TRANSFER') NOT NULL,
|
|
||||||
`referenceId` VARCHAR(191) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
`inventoryId` INTEGER NOT NULL,
|
|
||||||
`avgCost` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`supplierId` INTEGER NULL,
|
|
||||||
`remainedInStock` DECIMAL(10, 0) NOT NULL DEFAULT 0.00,
|
|
||||||
`counterInventoryId` INTEGER NULL,
|
|
||||||
`customerId` INTEGER NULL,
|
|
||||||
|
|
||||||
INDEX `Stock_Movements_inventoryId_fkey`(`inventoryId`),
|
|
||||||
INDEX `Stock_Movements_productId_fkey`(`productId`),
|
|
||||||
INDEX `Stock_Movements_counterInventoryId_fkey`(`counterInventoryId`),
|
|
||||||
INDEX `Stock_Movements_customerId_fkey`(`customerId`),
|
|
||||||
INDEX `Stock_Movements_supplierId_fkey`(`supplierId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Stock_Balance` (
|
|
||||||
`quantity` DECIMAL(14, 3) NOT NULL DEFAULT 0.000,
|
|
||||||
`totalCost` DECIMAL(14, 2) NOT NULL DEFAULT 0.00,
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`avgCost` DECIMAL(14, 2) NOT NULL DEFAULT 0.00,
|
|
||||||
`inventoryId` INTEGER NOT NULL,
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
|
|
||||||
INDEX `Stock_Balance_productId_idx`(`productId`),
|
|
||||||
INDEX `Stock_Balance_inventoryId_idx`(`inventoryId`),
|
|
||||||
UNIQUE INDEX `Stock_Balance_productId_inventoryId_key`(`productId`, `inventoryId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Stock_Adjustments` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`adjustedQuantity` DECIMAL(10, 0) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
`inventoryId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
INDEX `Stock_Adjustments_inventoryId_fkey`(`inventoryId`),
|
|
||||||
INDEX `Stock_Adjustments_productId_fkey`(`productId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Stock_Reservations` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`quantity` DECIMAL(10, 0) NOT NULL,
|
|
||||||
`expiresAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
`inventoryId` INTEGER NOT NULL,
|
|
||||||
`orderId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
INDEX `Stock_Reservations_inventoryId_idx`(`inventoryId`),
|
|
||||||
INDEX `Stock_Reservations_productId_idx`(`productId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Suppliers` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`firstName` VARCHAR(255) NOT NULL,
|
|
||||||
`lastName` VARCHAR(255) NOT NULL,
|
|
||||||
`email` VARCHAR(255) NULL,
|
|
||||||
`mobileNumber` CHAR(11) NOT NULL,
|
|
||||||
`address` TEXT NULL,
|
|
||||||
`city` VARCHAR(100) NULL,
|
|
||||||
`state` VARCHAR(100) NULL,
|
|
||||||
`country` VARCHAR(100) NULL,
|
|
||||||
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Suppliers_mobileNumber_key`(`mobileNumber`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Supplier_Ledger` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`debit` DECIMAL(15, 2) NOT NULL DEFAULT 0,
|
|
||||||
`credit` DECIMAL(15, 2) NOT NULL DEFAULT 0,
|
|
||||||
`balance` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`sourceType` ENUM('PURCHASE', 'PAYMENT', 'ADJUSTMENT', 'REFUND') NOT NULL,
|
|
||||||
`sourceId` INTEGER NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`supplierId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
INDEX `Supplier_Ledger_supplierId_idx`(`supplierId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Users` ADD CONSTRAINT `Users_roleId_fkey` FOREIGN KEY (`roleId`) REFERENCES `Roles`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Refresh_Tokens` ADD CONSTRAINT `Refresh_Tokens_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `Users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Bank_Branches` ADD CONSTRAINT `Bank_Branches_bankId_fkey` FOREIGN KEY (`bankId`) REFERENCES `Banks`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Bank_Accounts` ADD CONSTRAINT `Bank_Accounts_branchId_fkey` FOREIGN KEY (`branchId`) REFERENCES `Bank_Branches`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Bank_Account_Transactions` ADD CONSTRAINT `Bank_Account_Transactions_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Bank_Account_Balance` ADD CONSTRAINT `Bank_Account_Balance_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Inventory_Bank_Accounts` ADD CONSTRAINT `Inventory_Bank_Accounts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Inventory_Bank_Accounts` ADD CONSTRAINT `Inventory_Bank_Accounts_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Pos_Accounts` ADD CONSTRAINT `Pos_Accounts_inventoryId_bankAccountId_fkey` FOREIGN KEY (`inventoryId`, `bankAccountId`) REFERENCES `Inventory_Bank_Accounts`(`inventoryId`, `bankAccountId`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Inventory_Transfers` ADD CONSTRAINT `Inventory_Transfers_fromInventoryId_fkey` FOREIGN KEY (`fromInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Inventory_Transfers` ADD CONSTRAINT `Inventory_Transfers_toInventoryId_fkey` FOREIGN KEY (`toInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Inventory_Transfer_Items` ADD CONSTRAINT `Inventory_Transfer_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Inventory_Transfer_Items` ADD CONSTRAINT `Inventory_Transfer_Items_transferId_fkey` FOREIGN KEY (`transferId`) REFERENCES `Inventory_Transfers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Orders` ADD CONSTRAINT `Orders_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Order_Items` ADD CONSTRAINT `Order_Items_orderId_fkey` FOREIGN KEY (`orderId`) REFERENCES `Orders`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Order_Items` ADD CONSTRAINT `Order_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Product_Variants` ADD CONSTRAINT `Product_Variants_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Products` ADD CONSTRAINT `Products_brandId_fkey` FOREIGN KEY (`brandId`) REFERENCES `Product_brands`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Products` ADD CONSTRAINT `Products_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Product_categories`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipts` ADD CONSTRAINT `Purchase_Receipts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipts` ADD CONSTRAINT `Purchase_Receipts_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Items` ADD CONSTRAINT `Purchase_Receipt_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Items` ADD CONSTRAINT `Purchase_Receipt_Items_receiptId_fkey` FOREIGN KEY (`receiptId`) REFERENCES `Purchase_Receipts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_receiptId_fkey` FOREIGN KEY (`receiptId`) REFERENCES `Purchase_Receipts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_inventoryBankAccountInventoryId_i_fkey` FOREIGN KEY (`inventoryBankAccountInventoryId`, `inventoryBankAccountBankAccountId`) REFERENCES `Inventory_Bank_Accounts`(`inventoryId`, `bankAccountId`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_posAccountId_fkey` FOREIGN KEY (`posAccountId`) REFERENCES `Pos_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `SalesInvoicePayment` ADD CONSTRAINT `SalesInvoicePayment_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_counterInventoryId_fkey` FOREIGN KEY (`counterInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Adjustments` ADD CONSTRAINT `Stock_Adjustments_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Adjustments` ADD CONSTRAINT `Stock_Adjustments_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Reservations` ADD CONSTRAINT `Stock_Reservations_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Reservations` ADD CONSTRAINT `Stock_Reservations_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Supplier_Ledger` ADD CONSTRAINT `Supplier_Ledger_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to drop the column `totalPrice` on the `Order_Items` table. All the data in the column will be lost.
|
|
||||||
- You are about to drop the column `totalPrice` on the `Purchase_Receipt_Items` table. All the data in the column will be lost.
|
|
||||||
- You are about to drop the column `totalPrice` on the `Sales_Invoice_Items` table. All the data in the column will be lost.
|
|
||||||
- Added the required column `totalAmount` to the `Order_Items` table without a default value. This is not possible if the table is not empty.
|
|
||||||
- Added the required column `totalAmount` to the `Purchase_Receipt_Items` table without a default value. This is not possible if the table is not empty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Order_Items` DROP COLUMN `totalPrice`,
|
|
||||||
ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Purchase_Receipt_Items` DROP COLUMN `totalPrice`,
|
|
||||||
ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Sales_Invoice_Items` DROP COLUMN `totalPrice`,
|
|
||||||
ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00;
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to drop the `SalesInvoicePayment` table. If the table is not empty, all the data it contains will be lost.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `SalesInvoicePayment` DROP FOREIGN KEY `SalesInvoicePayment_invoiceId_fkey`;
|
|
||||||
|
|
||||||
-- DropTable
|
|
||||||
DROP TABLE `SalesInvoicePayment`;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Sales_Invoice_Payments` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`invoiceId` INTEGER NOT NULL,
|
|
||||||
`amount` DECIMAL(15, 2) NOT NULL,
|
|
||||||
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
|
||||||
`paidAt` DATETIME(3) NOT NULL,
|
|
||||||
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
||||||
|
|
||||||
INDEX `Sales_Invoice_Payments_invoiceId_idx`(`invoiceId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoice_Payments` ADD CONSTRAINT `Sales_Invoice_Payments_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- The values [REJECT] on the enum `Orders_status` will be removed. If these variants are still used in the database, this will fail.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Orders` MODIFY `status` ENUM('PENDING', 'REJECTED', 'CANCELED', 'DONE') NOT NULL DEFAULT 'PENDING';
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to drop the `Bank_Account_Balance` table. If the table is not empty, all the data it contains will be lost.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `Bank_Account_Balance` DROP FOREIGN KEY `Bank_Account_Balance_bankAccountId_fkey`;
|
|
||||||
|
|
||||||
-- DropTable
|
|
||||||
DROP TABLE `Bank_Account_Balance`;
|
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
CREATE OR REPLACE VIEW Stock_Available_View AS
|
|
||||||
SELECT
|
|
||||||
sb.productId,
|
|
||||||
sb.inventoryId,
|
|
||||||
sb.quantity AS physicalQuantity,
|
|
||||||
COALESCE(SUM(sr.quantity), 0) AS reservedQuantity,
|
|
||||||
(
|
|
||||||
sb.quantity - COALESCE(SUM(sr.quantity), 0)
|
|
||||||
) AS availableQuantity
|
|
||||||
FROM
|
|
||||||
Stock_Balance sb
|
|
||||||
LEFT JOIN Stock_Reservations sr ON sr.productId = sb.productId
|
|
||||||
AND sr.inventoryId = sb.inventoryId
|
|
||||||
GROUP BY
|
|
||||||
sb.productId,
|
|
||||||
sb.inventoryId,
|
|
||||||
sb.quantity;
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to drop the column `expiresAt` on the `Stock_Reservations` table. All the data in the column will be lost.
|
|
||||||
- Added the required column `posAccountId` to the `Orders` table without a default value. This is not possible if the table is not empty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Orders` ADD COLUMN `posAccountId` INTEGER NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Reservations` DROP COLUMN `expiresAt`;
|
|
||||||
|
|
||||||
-- CreateIndex
|
|
||||||
CREATE INDEX `Orders_posAccountId_idx` ON `Orders`(`posAccountId`);
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Orders` ADD CONSTRAINT `Orders_posAccountId_fkey` FOREIGN KEY (`posAccountId`) REFERENCES `Pos_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Reservations` ADD CONSTRAINT `Stock_Reservations_orderId_fkey` FOREIGN KEY (`orderId`) REFERENCES `Orders`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
||||||
@@ -0,0 +1,155 @@
|
|||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Goods` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`sku` VARCHAR(100) NOT NULL,
|
||||||
|
`localSku` VARCHAR(100) NOT NULL,
|
||||||
|
`barcode` VARCHAR(100) NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
`categoryId` INTEGER NULL,
|
||||||
|
`baseSalePrice` DECIMAL(15, 0) NOT NULL DEFAULT 0.00,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Goods_localSku_key`(`localSku`),
|
||||||
|
UNIQUE INDEX `Goods_barcode_key`(`barcode`),
|
||||||
|
INDEX `Goods_categoryId_idx`(`categoryId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Good_categories` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(100) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`imageUrl` VARCHAR(255) NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Customers` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`firstName` VARCHAR(255) NOT NULL,
|
||||||
|
`lastName` VARCHAR(255) NOT NULL,
|
||||||
|
`email` VARCHAR(255) NULL,
|
||||||
|
`mobileNumber` CHAR(11) NOT NULL,
|
||||||
|
`address` TEXT NULL,
|
||||||
|
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Customers_mobileNumber_key`(`mobileNumber`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Trigger_Logs` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`message` TEXT NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`name` TEXT NOT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Sales_Invoices` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` VARCHAR(100) NOT NULL,
|
||||||
|
`totalAmount` DECIMAL(15, 2) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`customerId` INTEGER NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Sales_Invoices_code_key`(`code`),
|
||||||
|
INDEX `Sales_Invoices_customerId_idx`(`customerId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Sales_Invoice_Items` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`count` DECIMAL(10, 0) NOT NULL,
|
||||||
|
`unitPrice` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
||||||
|
`totalAmount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`invoiceId` INTEGER NOT NULL,
|
||||||
|
`goodId` INTEGER NOT NULL,
|
||||||
|
`serviceId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
INDEX `Sales_Invoice_Items_invoiceId_goodId_idx`(`invoiceId`, `goodId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Sales_Invoice_Payments` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`invoiceId` INTEGER NOT NULL,
|
||||||
|
`amount` DECIMAL(15, 2) NOT NULL,
|
||||||
|
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
||||||
|
`paidAt` DATETIME(3) NOT NULL,
|
||||||
|
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
|
||||||
|
INDEX `Sales_Invoice_Payments_invoiceId_idx`(`invoiceId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Services` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`sku` VARCHAR(100) NOT NULL,
|
||||||
|
`barcode` VARCHAR(100) NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
`categoryId` INTEGER NULL,
|
||||||
|
`baseSalePrice` DECIMAL(15, 0) NOT NULL DEFAULT 0.00,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Services_sku_key`(`sku`),
|
||||||
|
UNIQUE INDEX `Services_barcode_key`(`barcode`),
|
||||||
|
INDEX `Services_categoryId_idx`(`categoryId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Service_categories` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(100) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`imageUrl` VARCHAR(255) NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Goods` ADD CONSTRAINT `Goods_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Good_categories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_goodId_fkey` FOREIGN KEY (`goodId`) REFERENCES `Goods`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_serviceId_fkey` FOREIGN KEY (`serviceId`) REFERENCES `Services`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoice_Payments` ADD CONSTRAINT `Sales_Invoice_Payments_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Services` ADD CONSTRAINT `Services_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Service_categories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
@@ -1,344 +0,0 @@
|
|||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_transfer_item_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Inventory_Transfer_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin
|
|
||||||
|
|
||||||
DECLARE fromInv INT;
|
|
||||||
DECLARE toInv INT;
|
|
||||||
DECLARE _avgCost DECIMAL(10,2);
|
|
||||||
DECLARE latestQuantityInOrigin DECIMAL(10,2);
|
|
||||||
DECLARE latestQuantityInDestination DECIMAL(10,2);
|
|
||||||
|
|
||||||
SELECT fromInventoryId, toInventoryId INTO fromInv, toInv
|
|
||||||
FROM Inventory_Transfers WHERE id = NEW.transferId;
|
|
||||||
|
|
||||||
SELECT COALESCE(avgCost, 0), COALESCE(quantity, 0) INTO _avgCost, latestQuantityInOrigin FROM Stock_Balance
|
|
||||||
WHERE ProductId = NEW.productId AND inventoryId = fromInv LIMIT 1;
|
|
||||||
|
|
||||||
SELECT COALESCE(quantity, 0) INTO latestQuantityInDestination FROM Stock_Balance
|
|
||||||
WHERE ProductId = NEW.productId AND inventoryId = toInv LIMIT 1;
|
|
||||||
|
|
||||||
|
|
||||||
-- OUT from source
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
|
||||||
VALUES
|
|
||||||
('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, toInv, NOW(), latestQuantityInOrigin-NEW.count);
|
|
||||||
|
|
||||||
-- IN to destination
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
|
||||||
VALUES
|
|
||||||
('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, fromInv, NOW(), latestQuantityInOrigin-NEW.count);
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_purchase_receipt_item_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Purchase_Receipt_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_purchase_receipt_item_after_insert` AFTER INSERT ON `Purchase_Receipt_Items` FOR EACH ROW BEGIN DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0;
|
|
||||||
|
|
||||||
DECLARE invId INT;
|
|
||||||
DECLARE suppId INT;
|
|
||||||
|
|
||||||
-- Get inventory & supplier from receipt
|
|
||||||
SELECT inventoryId, supplierId
|
|
||||||
INTO invId, suppId
|
|
||||||
FROM Purchase_Receipts
|
|
||||||
WHERE id = NEW.receiptId;
|
|
||||||
|
|
||||||
-- Get current stock quantity (if exists)
|
|
||||||
SELECT COALESCE(quantity, 0)
|
|
||||||
INTO latestQuantity
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE sb.inventoryId = invId
|
|
||||||
AND sb.productId = NEW.productId
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
-- Insert stock movement
|
|
||||||
INSERT INTO Stock_Movements (
|
|
||||||
type,
|
|
||||||
quantity,
|
|
||||||
unitPrice,
|
|
||||||
totalCost,
|
|
||||||
referenceType,
|
|
||||||
referenceId,
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
avgCost,
|
|
||||||
supplierId,
|
|
||||||
remainedInStock,
|
|
||||||
createdAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
'IN',
|
|
||||||
NEW.count,
|
|
||||||
NEW.unitPrice,
|
|
||||||
NEW.total,
|
|
||||||
'PURCHASE',
|
|
||||||
NEW.receiptId,
|
|
||||||
NEW.productId,
|
|
||||||
invId,
|
|
||||||
CASE
|
|
||||||
WHEN NEW.count = 0 THEN 0
|
|
||||||
ELSE NEW.total / NEW.count
|
|
||||||
END
|
|
||||||
|
|
||||||
,
|
|
||||||
suppId,
|
|
||||||
latestQuantity + NEW.count,
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_sales_invoice_items_before_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Sales_Invoice_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
|
||||||
|
|
||||||
DECLARE inventory_id INT;
|
|
||||||
|
|
||||||
|
|
||||||
SELECT inventoryId INTO inventory_id
|
|
||||||
FROM Sales_Invoices si
|
|
||||||
WHERE si.id = NEW.invoiceId
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IF NEW.count > current_stock THEN
|
|
||||||
SIGNAL SQLSTATE '45000'
|
|
||||||
SET MESSAGE_TEXT = 'موجودی کالا در انبار کافی نیست.';
|
|
||||||
END IF;
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_sales_invoice_items_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Sales_Invoice_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
|
||||||
|
|
||||||
DECLARE inventory_id INT;
|
|
||||||
DECLARE customer_id INT;
|
|
||||||
|
|
||||||
|
|
||||||
SELECT inventoryId , customerId INTO inventory_id, customer_id
|
|
||||||
FROM Sales_Invoices si
|
|
||||||
WHERE si.id = NEW.invoiceId
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO Stock_Movements (
|
|
||||||
type,
|
|
||||||
quantity,
|
|
||||||
unitPrice,
|
|
||||||
totalCost,
|
|
||||||
referenceType,
|
|
||||||
referenceId,
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
avgCost,
|
|
||||||
remainedInStock,
|
|
||||||
customerId,
|
|
||||||
createdAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
'OUT',
|
|
||||||
NEW.count,
|
|
||||||
NEW.unitPrice,
|
|
||||||
NEW.total,
|
|
||||||
'SALES',
|
|
||||||
NEW.invoiceId,
|
|
||||||
NEW.productId,
|
|
||||||
inventory_id,
|
|
||||||
|
|
||||||
CASE
|
|
||||||
WHEN NEW.count = 0 THEN 0
|
|
||||||
ELSE NEW.total / NEW.count
|
|
||||||
END,
|
|
||||||
current_stock + NEW.count,
|
|
||||||
customer_id,
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_transfer
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_transfer`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_stock_transfer` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'INVENTORY_TRANSFER' THEN IF NEW.type = 'IN' THEN
|
|
||||||
INSERT INTO
|
|
||||||
Stock_Balance (
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
quantity,
|
|
||||||
totalCost,
|
|
||||||
avgCost,
|
|
||||||
updatedAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.inventoryId,
|
|
||||||
NEW.quantity,
|
|
||||||
NEW.totalCost,
|
|
||||||
CASE
|
|
||||||
WHEN NEW.quantity = 0 THEN 0
|
|
||||||
ELSE NEW.totalCost / NEW.quantity
|
|
||||||
END,
|
|
||||||
NOW()
|
|
||||||
)
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
quantity = quantity + NEW.quantity,
|
|
||||||
totalCost = totalCost + NEW.totalCost,
|
|
||||||
avgCost = CASE
|
|
||||||
WHEN (quantity + NEW.quantity) = 0 THEN 0
|
|
||||||
ELSE (totalCost + NEW.totalCost) / (quantity + NEW.quantity)
|
|
||||||
END,
|
|
||||||
updatedAt = NOW();
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NEW.type = 'OUT' THEN IF EXISTS (
|
|
||||||
SELECT 1
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE
|
|
||||||
sb.productId = NEW.productId
|
|
||||||
AND sb.inventoryId = NEW.inventoryId
|
|
||||||
) THEN
|
|
||||||
|
|
||||||
UPDATE Stock_Balance sb
|
|
||||||
SET
|
|
||||||
sb.quantity = sb.quantity - NEW.quantity,
|
|
||||||
sb.totalCost = sb.totalCost - (sb.avgCost * NEW.quantity),
|
|
||||||
sb.updatedAt = NOW()
|
|
||||||
WHERE
|
|
||||||
sb.productId = NEW.productId
|
|
||||||
AND sb.inventoryId = NEW.inventoryId;
|
|
||||||
|
|
||||||
ELSE
|
|
||||||
INSERT INTO
|
|
||||||
Stock_Balance (
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
quantity,
|
|
||||||
totalCost,
|
|
||||||
avgCost,
|
|
||||||
updatedAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.inventoryId,
|
|
||||||
- NEW.quantity,
|
|
||||||
- COALESCE(NEW.unitPrice, 0) * NEW.quantity,
|
|
||||||
COALESCE(NEW.unitPrice, 0),
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_purchase_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN
|
|
||||||
|
|
||||||
INSERT INTO
|
|
||||||
Stock_Balance (
|
|
||||||
productId,
|
|
||||||
quantity,
|
|
||||||
avgCost,
|
|
||||||
totalCost,
|
|
||||||
inventoryId,
|
|
||||||
updatedAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.quantity,
|
|
||||||
NEW.unitPrice,
|
|
||||||
NEW.totalCost,
|
|
||||||
NEW.inventoryId,
|
|
||||||
NOW()
|
|
||||||
)
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
quantity = quantity + NEW.quantity,
|
|
||||||
totalCost = totalCost + NEW.totalCost,
|
|
||||||
avgCost = totalCost / quantity;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_sale_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_sale_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN
|
|
||||||
|
|
||||||
INSERT INTO
|
|
||||||
Stock_Balance (
|
|
||||||
productId,
|
|
||||||
quantity,
|
|
||||||
avgCost,
|
|
||||||
totalCost,
|
|
||||||
inventoryId,
|
|
||||||
updatedAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.quantity,
|
|
||||||
NEW.unitPrice,
|
|
||||||
NEW.totalCost,
|
|
||||||
NEW.inventoryId,
|
|
||||||
NOW()
|
|
||||||
)
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
quantity = quantity - NEW.quantity,
|
|
||||||
totalCost = totalCost - NEW.totalCost,
|
|
||||||
avgCost = totalCost / quantity;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END;
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
model User {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
mobileNumber String @unique @db.Char(11)
|
|
||||||
password String
|
|
||||||
firstName String
|
|
||||||
lastName String
|
|
||||||
roleId Int
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
refreshTokens RefreshToken[]
|
|
||||||
role Role @relation("User_Role", fields: [roleId], references: [id], onUpdate: NoAction)
|
|
||||||
|
|
||||||
@@index([roleId], map: "Users_roleId_fkey")
|
|
||||||
@@map("Users")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Role {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @unique @db.VarChar(100)
|
|
||||||
description String? @db.Text
|
|
||||||
permissions Json?
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
users User[] @relation("User_Role")
|
|
||||||
|
|
||||||
@@map("Roles")
|
|
||||||
}
|
|
||||||
|
|
||||||
model OtpCode {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
mobileNumber String @db.VarChar(20)
|
|
||||||
code String @db.VarChar(10)
|
|
||||||
used Boolean @default(false)
|
|
||||||
expiresAt DateTime @db.Timestamp(0)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
|
|
||||||
@@index([mobileNumber])
|
|
||||||
@@map("Otp_Codes")
|
|
||||||
}
|
|
||||||
|
|
||||||
model RefreshToken {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
tokenHash String @db.VarChar(255)
|
|
||||||
userId Int
|
|
||||||
revoked Boolean @default(false)
|
|
||||||
expiresAt DateTime @db.Timestamp(0)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
user User @relation(fields: [userId], references: [id])
|
|
||||||
|
|
||||||
@@index([userId])
|
|
||||||
@@map("Refresh_Tokens")
|
|
||||||
}
|
|
||||||
@@ -1,51 +0,0 @@
|
|||||||
model BankBranch {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
code String @unique() @db.VarChar(10)
|
|
||||||
address String? @db.VarChar(500)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
bankId Int
|
|
||||||
|
|
||||||
bank Bank @relation("bank_branches", fields: [bankId], references: [id])
|
|
||||||
bankAccounts BankAccount[] @relation("Bank_Accounts_branchId_fkey")
|
|
||||||
|
|
||||||
@@map("Bank_Branches")
|
|
||||||
}
|
|
||||||
|
|
||||||
model BankAccount {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
accountNumber String? @unique @db.VarChar(20)
|
|
||||||
cardNumber String? @unique @db.VarChar(16)
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
iban String? @unique @db.VarChar(34)
|
|
||||||
branchId Int
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
|
|
||||||
branch BankBranch @relation("Bank_Accounts_branchId_fkey", fields: [branchId], references: [id])
|
|
||||||
inventoryBankAccounts InventoryBankAccount[]
|
|
||||||
purchaseReceiptPayments PurchaseReceiptPayments[]
|
|
||||||
bankAccountTransactions BankAccountTransaction[]
|
|
||||||
|
|
||||||
@@map("Bank_Accounts")
|
|
||||||
}
|
|
||||||
|
|
||||||
model BankAccountTransaction {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
bankAccountId Int
|
|
||||||
type BankAccountTransactionType
|
|
||||||
amount Decimal @db.Decimal(15, 2)
|
|
||||||
balanceAfter Decimal @db.Decimal(15, 2)
|
|
||||||
referenceId Int
|
|
||||||
referenceType BankTransactionRefType
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
|
|
||||||
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
|
|
||||||
|
|
||||||
@@index([bankAccountId])
|
|
||||||
@@map("Bank_Account_Transactions")
|
|
||||||
}
|
|
||||||
@@ -1,23 +1,3 @@
|
|||||||
enum OrderStatus {
|
|
||||||
PENDING
|
|
||||||
REJECTED
|
|
||||||
CANCELED
|
|
||||||
DONE
|
|
||||||
}
|
|
||||||
|
|
||||||
enum MovementType {
|
|
||||||
IN
|
|
||||||
OUT
|
|
||||||
ADJUST
|
|
||||||
}
|
|
||||||
|
|
||||||
enum MovementReferenceType {
|
|
||||||
PURCHASE
|
|
||||||
SALES
|
|
||||||
ADJUSTMENT
|
|
||||||
INVENTORY_TRANSFER
|
|
||||||
}
|
|
||||||
|
|
||||||
enum PaymentMethodType {
|
enum PaymentMethodType {
|
||||||
CASH
|
CASH
|
||||||
CARD
|
CARD
|
||||||
@@ -26,34 +6,8 @@ enum PaymentMethodType {
|
|||||||
OTHER
|
OTHER
|
||||||
}
|
}
|
||||||
|
|
||||||
enum LedgerSourceType {
|
|
||||||
PURCHASE
|
|
||||||
PAYMENT
|
|
||||||
ADJUSTMENT
|
|
||||||
REFUND
|
|
||||||
}
|
|
||||||
|
|
||||||
enum PaymentType {
|
|
||||||
PAYMENT
|
|
||||||
REFUND
|
|
||||||
}
|
|
||||||
|
|
||||||
enum PurchaseReceiptStatus {
|
enum PurchaseReceiptStatus {
|
||||||
UNPAID
|
UNPAID
|
||||||
PARTIALLY_PAID
|
PARTIALLY_PAID
|
||||||
PAID
|
PAID
|
||||||
}
|
}
|
||||||
|
|
||||||
enum BankAccountTransactionType {
|
|
||||||
DEPOSIT
|
|
||||||
WITHDRAWAL
|
|
||||||
}
|
|
||||||
|
|
||||||
enum BankTransactionRefType {
|
|
||||||
PURCHASE_PAYMENT
|
|
||||||
PURCHASE_REFUND
|
|
||||||
POS_SALE
|
|
||||||
POS_REFUND
|
|
||||||
BANK_TRANSFER
|
|
||||||
MANUAL_ADJUSTMENT
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
model Good {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
description String? @db.Text
|
||||||
|
sku String @db.VarChar(100)
|
||||||
|
localSku String @unique() @db.VarChar(100)
|
||||||
|
barcode String? @unique() @db.VarChar(100)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
categoryId Int?
|
||||||
|
baseSalePrice Decimal @default(0.00) @db.Decimal(15, 0)
|
||||||
|
category GoodCategory? @relation(fields: [categoryId], references: [id])
|
||||||
|
salesInvoiceItems SalesInvoiceItem[]
|
||||||
|
|
||||||
|
@@index([categoryId])
|
||||||
|
@@map("Goods")
|
||||||
|
}
|
||||||
|
|
||||||
|
model GoodCategory {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(100)
|
||||||
|
description String? @db.Text
|
||||||
|
imageUrl String? @db.VarChar(255)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
goods Good[]
|
||||||
|
|
||||||
|
@@map("Good_categories")
|
||||||
|
}
|
||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
@@ -1,83 +0,0 @@
|
|||||||
model Inventory {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
location String? @db.VarChar(255)
|
|
||||||
isActive Boolean @default(true)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
isPointOfSale Boolean @default(false)
|
|
||||||
inventoryTransfersFrom InventoryTransfer[] @relation("Inventory_From")
|
|
||||||
inventoryTransfersTo InventoryTransfer[] @relation("Inventory_To")
|
|
||||||
purchaseReceipts PurchaseReceipt[]
|
|
||||||
stockAdjustments StockAdjustment[] @relation("Inventory_Stock_Adjustments")
|
|
||||||
stockBalances StockBalance[] @relation("StockBalance_inventory")
|
|
||||||
counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory")
|
|
||||||
stockMovements StockMovement[] @relation("StockMovement_Inventory")
|
|
||||||
inventoryBankAccounts InventoryBankAccount[]
|
|
||||||
stockReservations StockReservation[]
|
|
||||||
|
|
||||||
@@map("Inventories")
|
|
||||||
}
|
|
||||||
|
|
||||||
model InventoryBankAccount {
|
|
||||||
inventoryId Int
|
|
||||||
bankAccountId Int
|
|
||||||
|
|
||||||
inventory Inventory @relation(fields: [inventoryId], references: [id])
|
|
||||||
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
|
|
||||||
posAccounts PosAccount[]
|
|
||||||
purchaseReceiptPayments PurchaseReceiptPayments[]
|
|
||||||
|
|
||||||
@@id([inventoryId, bankAccountId])
|
|
||||||
@@index([bankAccountId])
|
|
||||||
@@map("Inventory_Bank_Accounts")
|
|
||||||
}
|
|
||||||
|
|
||||||
model PosAccount {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
code String @unique() @db.VarChar(10)
|
|
||||||
description String? @db.VarChar(500)
|
|
||||||
bankAccountId Int
|
|
||||||
inventoryId Int
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
|
|
||||||
inventoryBankAccount InventoryBankAccount @relation(fields: [inventoryId, bankAccountId], references: [inventoryId, bankAccountId])
|
|
||||||
salesInvoices SalesInvoice[]
|
|
||||||
orders Order[]
|
|
||||||
|
|
||||||
@@index([inventoryId])
|
|
||||||
@@map("Pos_Accounts")
|
|
||||||
}
|
|
||||||
|
|
||||||
model InventoryTransfer {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
code String @unique @db.VarChar(100)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
fromInventoryId Int
|
|
||||||
toInventoryId Int
|
|
||||||
items InventoryTransferItem[] @relation("InventoryTransfer_Items")
|
|
||||||
fromInventory Inventory @relation("Inventory_From", fields: [fromInventoryId], references: [id])
|
|
||||||
toInventory Inventory @relation("Inventory_To", fields: [toInventoryId], references: [id])
|
|
||||||
|
|
||||||
@@index([fromInventoryId], map: "Inventory_Transfers_fromInventoryId_fkey")
|
|
||||||
@@index([toInventoryId], map: "Inventory_Transfers_toInventoryId_fkey")
|
|
||||||
@@map("Inventory_Transfers")
|
|
||||||
}
|
|
||||||
|
|
||||||
model InventoryTransferItem {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
count Decimal @db.Decimal(10, 0)
|
|
||||||
productId Int
|
|
||||||
transferId Int
|
|
||||||
product Product @relation("InventoryTransferItem_Product", fields: [productId], references: [id])
|
|
||||||
transfer InventoryTransfer @relation("InventoryTransfer_Items", fields: [transferId], references: [id])
|
|
||||||
|
|
||||||
@@index([productId], map: "Inventory_Transfer_Items_productId_fkey")
|
|
||||||
@@index([transferId], map: "Inventory_Transfer_Items_transferId_fkey")
|
|
||||||
@@map("Inventory_Transfer_Items")
|
|
||||||
}
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
model Bank {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
shortName String @unique() @db.VarChar(3)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
|
|
||||||
bankBranches BankBranch[] @relation("bank_branches")
|
|
||||||
|
|
||||||
@@map("Banks")
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
model Order {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
orderNumber String @unique @db.VarChar(100)
|
|
||||||
status OrderStatus @default(PENDING)
|
|
||||||
totalAmount Decimal @db.Decimal(15, 2)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
customerId Int?
|
|
||||||
posAccountId Int
|
|
||||||
|
|
||||||
customer Customer? @relation(fields: [customerId], references: [id], onUpdate: NoAction)
|
|
||||||
posAccount PosAccount @relation(fields: [posAccountId], references: [id], onUpdate: NoAction)
|
|
||||||
|
|
||||||
orderItems OrderItem[]
|
|
||||||
stockReservations StockReservation[]
|
|
||||||
|
|
||||||
@@index([posAccountId])
|
|
||||||
@@index([customerId])
|
|
||||||
@@map("Orders")
|
|
||||||
}
|
|
||||||
|
|
||||||
model OrderItem {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
quantity Decimal @db.Decimal(10, 0)
|
|
||||||
unitPrice Decimal @db.Decimal(15, 2)
|
|
||||||
totalAmount Decimal @db.Decimal(15, 2)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
orderId Int
|
|
||||||
productId Int
|
|
||||||
|
|
||||||
order Order @relation(fields: [orderId], references: [id], onUpdate: NoAction)
|
|
||||||
product Product @relation(fields: [productId], references: [id], onUpdate: NoAction)
|
|
||||||
|
|
||||||
@@index([orderId])
|
|
||||||
@@index([productId])
|
|
||||||
@@map("Order_Items")
|
|
||||||
}
|
|
||||||
+11
-16
@@ -1,20 +1,15 @@
|
|||||||
model Customer {
|
model Customer {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
firstName String @db.VarChar(255)
|
firstName String @db.VarChar(255)
|
||||||
lastName String @db.VarChar(255)
|
lastName String @db.VarChar(255)
|
||||||
email String? @db.VarChar(255)
|
email String? @db.VarChar(255)
|
||||||
mobileNumber String @unique @db.Char(11)
|
mobileNumber String @unique @db.Char(11)
|
||||||
address String? @db.Text
|
address String? @db.Text
|
||||||
city String? @db.VarChar(100)
|
isActive Boolean @default(true)
|
||||||
state String? @db.VarChar(100)
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
country String? @db.VarChar(100)
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
isActive Boolean @default(true)
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
salesInvoices SalesInvoice[]
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
orders Order[] @relation()
|
|
||||||
stockMovements StockMovement[] @relation()
|
|
||||||
salesInvoices SalesInvoice[]
|
|
||||||
|
|
||||||
@@map("Customers")
|
@@map("Customers")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,78 +0,0 @@
|
|||||||
model ProductVariant {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
basePrice Decimal @db.Decimal(15, 2)
|
|
||||||
salePrice Decimal @db.Decimal(15, 2)
|
|
||||||
description String? @db.Text
|
|
||||||
barcode String? @unique() @db.VarChar(100)
|
|
||||||
imageUrl String? @db.VarChar(255)
|
|
||||||
unit String? @db.VarChar(10)
|
|
||||||
quantity Decimal? @default(0.00) @db.Decimal(10, 0)
|
|
||||||
alertQuantity Decimal? @default(5.00) @db.Decimal(10, 0)
|
|
||||||
isActive Boolean @default(true)
|
|
||||||
isFeatured Boolean @default(false)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
productId Int
|
|
||||||
product Product @relation("Product_Variant", fields: [productId], references: [id], onUpdate: NoAction)
|
|
||||||
|
|
||||||
@@index([productId], map: "Product_Variants_productId_fkey")
|
|
||||||
@@map("Product_Variants")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Product {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
description String? @db.Text
|
|
||||||
sku String? @unique() @db.VarChar(100)
|
|
||||||
barcode String? @unique() @db.VarChar(100)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
brandId Int?
|
|
||||||
categoryId Int?
|
|
||||||
salePrice Decimal @default(0.00) @db.Decimal(15, 0)
|
|
||||||
minimumStockAlertLevel Decimal @default(1.00) @db.Decimal(10, 0)
|
|
||||||
inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product")
|
|
||||||
variants ProductVariant[] @relation("Product_Variant")
|
|
||||||
brand ProductBrand? @relation("Product_Brand", fields: [brandId], references: [id], onUpdate: NoAction)
|
|
||||||
category ProductCategory? @relation("Product_Category", fields: [categoryId], references: [id], onUpdate: NoAction)
|
|
||||||
purchaseReceiptItems PurchaseReceiptItem[] @relation("Product_PurchaseReceiptItems")
|
|
||||||
stockAdjustments StockAdjustment[] @relation("Product_Stock_Adjustments")
|
|
||||||
stockBalances StockBalance[] @relation("StockBalance_Product")
|
|
||||||
stockMovements StockMovement[] @relation("StockMovement_Product")
|
|
||||||
salesInvoiceItems SalesInvoiceItem[]
|
|
||||||
stockReservations StockReservation[]
|
|
||||||
orderItems OrderItem[]
|
|
||||||
|
|
||||||
@@index([brandId], map: "Products_brandId_fkey")
|
|
||||||
@@index([categoryId], map: "Products_categoryId_fkey")
|
|
||||||
@@map("Products")
|
|
||||||
}
|
|
||||||
|
|
||||||
model ProductBrand {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(100)
|
|
||||||
description String? @db.Text
|
|
||||||
imageUrl String? @db.VarChar(255)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
products Product[] @relation("Product_Brand")
|
|
||||||
|
|
||||||
@@map("Product_brands")
|
|
||||||
}
|
|
||||||
|
|
||||||
model ProductCategory {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(100)
|
|
||||||
description String? @db.Text
|
|
||||||
imageUrl String? @db.VarChar(255)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
products Product[] @relation("Product_Category")
|
|
||||||
|
|
||||||
@@map("Product_categories")
|
|
||||||
}
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
model PurchaseReceipt {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
code String @unique @db.VarChar(100)
|
|
||||||
totalAmount Decimal @db.Decimal(15, 2)
|
|
||||||
paidAmount Decimal @default(0.00) @db.Decimal(15, 2)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
status PurchaseReceiptStatus @default(UNPAID)
|
|
||||||
supplierId Int
|
|
||||||
inventoryId Int
|
|
||||||
items PurchaseReceiptItem[] @relation("PurchaseReceipt_Items")
|
|
||||||
inventory Inventory @relation(fields: [inventoryId], references: [id])
|
|
||||||
supplier Supplier @relation(fields: [supplierId], references: [id])
|
|
||||||
payments PurchaseReceiptPayments[]
|
|
||||||
|
|
||||||
@@index([inventoryId], map: "Purchase_Receipts_inventoryId_fkey")
|
|
||||||
@@index([supplierId], map: "Purchase_Receipts_supplierId_fkey")
|
|
||||||
@@map("Purchase_Receipts")
|
|
||||||
}
|
|
||||||
|
|
||||||
model PurchaseReceiptItem {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
count Decimal @db.Decimal(10, 0)
|
|
||||||
unitPrice Decimal @db.Decimal(15, 2)
|
|
||||||
totalAmount Decimal @db.Decimal(15, 2)
|
|
||||||
receiptId Int
|
|
||||||
productId Int
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
product Product @relation("Product_PurchaseReceiptItems", fields: [productId], references: [id])
|
|
||||||
receipt PurchaseReceipt @relation("PurchaseReceipt_Items", fields: [receiptId], references: [id])
|
|
||||||
|
|
||||||
@@index([productId], map: "Purchase_Receipt_Items_productId_fkey")
|
|
||||||
@@index([receiptId], map: "Purchase_Receipt_Items_receiptId_fkey")
|
|
||||||
@@map("Purchase_Receipt_Items")
|
|
||||||
}
|
|
||||||
|
|
||||||
model PurchaseReceiptPayments {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
amount Decimal @db.Decimal(15, 2)
|
|
||||||
paymentMethod PaymentMethodType
|
|
||||||
type PaymentType
|
|
||||||
bankAccountId Int
|
|
||||||
receiptId Int
|
|
||||||
payedAt DateTime @db.Timestamp(0)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
|
|
||||||
receipt PurchaseReceipt @relation(fields: [receiptId], references: [id])
|
|
||||||
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
|
|
||||||
inventoryBankAccount InventoryBankAccount? @relation(fields: [inventoryBankAccountInventoryId, inventoryBankAccountBankAccountId], references: [inventoryId, bankAccountId])
|
|
||||||
inventoryBankAccountInventoryId Int?
|
|
||||||
inventoryBankAccountBankAccountId Int?
|
|
||||||
|
|
||||||
@@index([receiptId], map: "Purchase_Receipt_Payments_receiptId_fkey")
|
|
||||||
@@map("Purchase_Receipt_Payments")
|
|
||||||
}
|
|
||||||
@@ -6,14 +6,11 @@ model SalesInvoice {
|
|||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
customerId Int?
|
customerId Int?
|
||||||
posAccountId Int
|
|
||||||
customer Customer? @relation(fields: [customerId], references: [id])
|
customer Customer? @relation(fields: [customerId], references: [id])
|
||||||
posAccount PosAccount @relation(fields: [posAccountId], references: [id])
|
|
||||||
items SalesInvoiceItem[]
|
items SalesInvoiceItem[]
|
||||||
salesInvoicePayments SalesInvoicePayment[]
|
salesInvoicePayments SalesInvoicePayment[]
|
||||||
|
|
||||||
@@index([customerId])
|
@@index([customerId])
|
||||||
@@index([posAccountId])
|
|
||||||
@@map("Sales_Invoices")
|
@@map("Sales_Invoices")
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -24,12 +21,13 @@ model SalesInvoiceItem {
|
|||||||
totalAmount Decimal @default(0.00) @db.Decimal(15, 2)
|
totalAmount Decimal @default(0.00) @db.Decimal(15, 2)
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
invoiceId Int
|
invoiceId Int
|
||||||
productId Int
|
goodId Int
|
||||||
|
serviceId Int
|
||||||
invoice SalesInvoice @relation(fields: [invoiceId], references: [id])
|
invoice SalesInvoice @relation(fields: [invoiceId], references: [id])
|
||||||
product Product @relation(fields: [productId], references: [id])
|
good Good? @relation(fields: [goodId], references: [id])
|
||||||
|
service Service? @relation(fields: [serviceId], references: [id])
|
||||||
|
|
||||||
@@index([invoiceId])
|
@@index([invoiceId, goodId])
|
||||||
@@index([productId])
|
|
||||||
@@map("Sales_Invoice_Items")
|
@@map("Sales_Invoice_Items")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
model Service {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
description String? @db.Text
|
||||||
|
sku String @unique() @db.VarChar(100)
|
||||||
|
barcode String? @unique() @db.VarChar(100)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
categoryId Int?
|
||||||
|
baseSalePrice Decimal @default(0.00) @db.Decimal(15, 0)
|
||||||
|
category ServiceCategory? @relation(fields: [categoryId], references: [id])
|
||||||
|
salesInvoiceItems SalesInvoiceItem[]
|
||||||
|
|
||||||
|
@@index([categoryId])
|
||||||
|
@@map("Services")
|
||||||
|
}
|
||||||
|
|
||||||
|
model ServiceCategory {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(100)
|
||||||
|
description String? @db.Text
|
||||||
|
imageUrl String? @db.VarChar(255)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
services Service[]
|
||||||
|
|
||||||
|
@@map("Service_categories")
|
||||||
|
}
|
||||||
@@ -1,87 +0,0 @@
|
|||||||
model StockMovement {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
type MovementType
|
|
||||||
quantity Decimal @db.Decimal(10, 0)
|
|
||||||
unitPrice Decimal @db.Decimal(15, 2)
|
|
||||||
totalCost Decimal @db.Decimal(15, 2)
|
|
||||||
referenceType MovementReferenceType
|
|
||||||
referenceId String
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
productId Int
|
|
||||||
inventoryId Int
|
|
||||||
avgCost Decimal @db.Decimal(15, 2)
|
|
||||||
supplierId Int?
|
|
||||||
remainedInStock Decimal @default(0.00) @db.Decimal(10, 0)
|
|
||||||
counterInventoryId Int?
|
|
||||||
customerId Int?
|
|
||||||
counterInventory Inventory? @relation("StockMovement_CounterInventory", fields: [counterInventoryId], references: [id])
|
|
||||||
customer Customer? @relation(fields: [customerId], references: [id])
|
|
||||||
inventory Inventory @relation("StockMovement_Inventory", fields: [inventoryId], references: [id])
|
|
||||||
product Product @relation("StockMovement_Product", fields: [productId], references: [id])
|
|
||||||
supplier Supplier? @relation("StockMovement_Supplier", fields: [supplierId], references: [id])
|
|
||||||
|
|
||||||
@@index([inventoryId], map: "Stock_Movements_inventoryId_fkey")
|
|
||||||
@@index([productId], map: "Stock_Movements_productId_fkey")
|
|
||||||
@@index([counterInventoryId], map: "Stock_Movements_counterInventoryId_fkey")
|
|
||||||
@@index([customerId], map: "Stock_Movements_customerId_fkey")
|
|
||||||
@@index([supplierId], map: "Stock_Movements_supplierId_fkey")
|
|
||||||
@@map("Stock_Movements")
|
|
||||||
}
|
|
||||||
|
|
||||||
model StockBalance {
|
|
||||||
quantity Decimal @default(0.000) @db.Decimal(14, 3)
|
|
||||||
totalCost Decimal @default(0.00) @db.Decimal(14, 2)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
avgCost Decimal @default(0.00) @db.Decimal(14, 2)
|
|
||||||
inventoryId Int
|
|
||||||
productId Int
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
inventory Inventory @relation("StockBalance_inventory", fields: [inventoryId], references: [id])
|
|
||||||
product Product @relation("StockBalance_Product", fields: [productId], references: [id])
|
|
||||||
|
|
||||||
@@unique([productId, inventoryId])
|
|
||||||
@@index([productId])
|
|
||||||
@@index([inventoryId])
|
|
||||||
@@map("Stock_Balance")
|
|
||||||
}
|
|
||||||
|
|
||||||
model StockAdjustment {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
adjustedQuantity Decimal @db.Decimal(10, 0)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
productId Int
|
|
||||||
inventoryId Int
|
|
||||||
inventory Inventory @relation("Inventory_Stock_Adjustments", fields: [inventoryId], references: [id])
|
|
||||||
product Product @relation("Product_Stock_Adjustments", fields: [productId], references: [id])
|
|
||||||
|
|
||||||
@@index([inventoryId], map: "Stock_Adjustments_inventoryId_fkey")
|
|
||||||
@@index([productId], map: "Stock_Adjustments_productId_fkey")
|
|
||||||
@@map("Stock_Adjustments")
|
|
||||||
}
|
|
||||||
|
|
||||||
model StockReservation {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
quantity Decimal @db.Decimal(10, 0)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
productId Int
|
|
||||||
inventoryId Int
|
|
||||||
orderId Int
|
|
||||||
inventory Inventory @relation(fields: [inventoryId], references: [id])
|
|
||||||
product Product @relation(fields: [productId], references: [id])
|
|
||||||
order Order @relation(fields: [orderId], references: [id], onDelete: Cascade)
|
|
||||||
|
|
||||||
@@index([inventoryId])
|
|
||||||
@@index([productId])
|
|
||||||
@@map("Stock_Reservations")
|
|
||||||
}
|
|
||||||
|
|
||||||
view StockAvailableView {
|
|
||||||
productId Int
|
|
||||||
inventoryId Int
|
|
||||||
physicalQuantity Decimal @db.Decimal(10, 0)
|
|
||||||
reservedQuantity Decimal @db.Decimal(10, 0)
|
|
||||||
availableQuantity Decimal @db.Decimal(10, 0)
|
|
||||||
|
|
||||||
@@map("Stock_Available_View")
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
model Supplier {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
firstName String @db.VarChar(255)
|
|
||||||
lastName String @db.VarChar(255)
|
|
||||||
email String? @db.VarChar(255)
|
|
||||||
mobileNumber String @unique @db.Char(11)
|
|
||||||
address String? @db.Text
|
|
||||||
city String? @db.VarChar(100)
|
|
||||||
state String? @db.VarChar(100)
|
|
||||||
country String? @db.VarChar(100)
|
|
||||||
isActive Boolean @default(true)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
stockMovements StockMovement[] @relation("StockMovement_Supplier")
|
|
||||||
receipts PurchaseReceipt[]
|
|
||||||
ledger SupplierLedger[]
|
|
||||||
|
|
||||||
@@map("Suppliers")
|
|
||||||
}
|
|
||||||
|
|
||||||
model SupplierLedger {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
description String? @db.Text
|
|
||||||
debit Decimal @default(0) @db.Decimal(15, 2)
|
|
||||||
credit Decimal @default(0) @db.Decimal(15, 2)
|
|
||||||
balance Decimal @db.Decimal(15, 2)
|
|
||||||
sourceType LedgerSourceType
|
|
||||||
sourceId Int
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
|
|
||||||
supplierId Int
|
|
||||||
supplier Supplier @relation(fields: [supplierId], references: [id])
|
|
||||||
|
|
||||||
@@index([supplierId])
|
|
||||||
@@map("Supplier_Ledger")
|
|
||||||
}
|
|
||||||
+6
-38
@@ -1,57 +1,25 @@
|
|||||||
import { Module } from '@nestjs/common'
|
import { Module } from '@nestjs/common'
|
||||||
import { AppController } from './app.controller'
|
import { AppController } from './app.controller'
|
||||||
import { AppService } from './app.service'
|
import { AppService } from './app.service'
|
||||||
import { AuthModule } from './auth/auth.module'
|
import { AuthModule } from './modules/auth/auth.module'
|
||||||
import { CustomersModule } from './customers/customers.module'
|
import { CustomersModule } from './modules/customers/customers.module'
|
||||||
import { InventoryTransferItemsModule } from './inventory-transfer-items/inventory-transfer-items.module'
|
import { ProductCategoriesModule } from './modules/product-categories/product-categories.module'
|
||||||
import { InventoryTransfersModule } from './inventory-transfers/inventory-transfers.module'
|
import { ProductsModule } from './modules/products/products.module'
|
||||||
import { BankAccountsModule } from './modules/bank-accounts/bank-accounts.module'
|
|
||||||
import { BankBranchesModule } from './modules/bank-branches/bank-branches.module'
|
|
||||||
import { BanksModule } from './modules/banks/banks.module'
|
|
||||||
import { CardexModule } from './modules/cardex/cardex.module'
|
|
||||||
import { InventoriesModule } from './modules/inventories/inventories.module'
|
|
||||||
import { PosModule } from './modules/pos/pos.module'
|
|
||||||
import { PurchaseReceiptsModule } from './modules/purchase-receipts/purchase-receipts.module'
|
|
||||||
import { SalesInvoicesModule } from './modules/sales-invoices/sales-invoices.module'
|
import { SalesInvoicesModule } from './modules/sales-invoices/sales-invoices.module'
|
||||||
import { StatisticsModule } from './modules/statistics/statistics.module'
|
import { StatisticsModule } from './modules/statistics/statistics.module'
|
||||||
import { SuppliersModule } from './modules/suppliers/suppliers.module'
|
import { UploadsModule } from './modules/uploads/uploads.module'
|
||||||
import { PrismaModule } from './prisma/prisma.module'
|
import { PrismaModule } from './prisma/prisma.module'
|
||||||
import { ProductBrandsModule } from './product-brands/product-brands.module'
|
|
||||||
import { ProductCategoriesModule } from './product-categories/product-categories.module'
|
|
||||||
import { ProductVariantsModule } from './product-variants/product-variants.module'
|
|
||||||
import { ProductsModule } from './products/products.module'
|
|
||||||
import { RolesModule } from './roles/roles.module'
|
|
||||||
import { StockAdjustmentsModule } from './stock-adjustments/stock-adjustments.module'
|
|
||||||
import { StockBalanceModule } from './stock-balance/stock-balance.module'
|
|
||||||
import { StockMovementsModule } from './stock-movements/stock-movements.module'
|
|
||||||
import { UsersModule } from './users/users.module'
|
|
||||||
|
|
||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
PrismaModule,
|
PrismaModule,
|
||||||
UsersModule,
|
|
||||||
AuthModule,
|
AuthModule,
|
||||||
RolesModule,
|
|
||||||
ProductsModule,
|
ProductsModule,
|
||||||
ProductVariantsModule,
|
|
||||||
ProductBrandsModule,
|
|
||||||
ProductCategoriesModule,
|
ProductCategoriesModule,
|
||||||
SuppliersModule,
|
|
||||||
CustomersModule,
|
CustomersModule,
|
||||||
InventoriesModule,
|
|
||||||
PurchaseReceiptsModule,
|
|
||||||
SalesInvoicesModule,
|
SalesInvoicesModule,
|
||||||
InventoryTransfersModule,
|
|
||||||
InventoryTransferItemsModule,
|
|
||||||
StockMovementsModule,
|
|
||||||
StockAdjustmentsModule,
|
|
||||||
StockBalanceModule,
|
|
||||||
PosModule,
|
|
||||||
CardexModule,
|
|
||||||
BanksModule,
|
|
||||||
BankBranchesModule,
|
|
||||||
BankAccountsModule,
|
|
||||||
StatisticsModule,
|
StatisticsModule,
|
||||||
|
UploadsModule,
|
||||||
],
|
],
|
||||||
controllers: [AppController],
|
controllers: [AppController],
|
||||||
providers: [AppService],
|
providers: [AppService],
|
||||||
|
|||||||
@@ -18,80 +18,15 @@ export { Prisma }
|
|||||||
export * as $Enums from './enums.js'
|
export * as $Enums from './enums.js'
|
||||||
export * from './enums.js';
|
export * from './enums.js';
|
||||||
/**
|
/**
|
||||||
* Model User
|
* Model Good
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type User = Prisma.UserModel
|
export type Good = Prisma.GoodModel
|
||||||
/**
|
/**
|
||||||
* Model Role
|
* Model GoodCategory
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Role = Prisma.RoleModel
|
export type GoodCategory = Prisma.GoodCategoryModel
|
||||||
/**
|
|
||||||
* Model OtpCode
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OtpCode = Prisma.OtpCodeModel
|
|
||||||
/**
|
|
||||||
* Model RefreshToken
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type RefreshToken = Prisma.RefreshTokenModel
|
|
||||||
/**
|
|
||||||
* Model BankBranch
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type BankBranch = Prisma.BankBranchModel
|
|
||||||
/**
|
|
||||||
* Model BankAccount
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type BankAccount = Prisma.BankAccountModel
|
|
||||||
/**
|
|
||||||
* Model BankAccountTransaction
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type BankAccountTransaction = Prisma.BankAccountTransactionModel
|
|
||||||
/**
|
|
||||||
* Model Inventory
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Inventory = Prisma.InventoryModel
|
|
||||||
/**
|
|
||||||
* Model InventoryBankAccount
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryBankAccount = Prisma.InventoryBankAccountModel
|
|
||||||
/**
|
|
||||||
* Model PosAccount
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type PosAccount = Prisma.PosAccountModel
|
|
||||||
/**
|
|
||||||
* Model InventoryTransfer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryTransfer = Prisma.InventoryTransferModel
|
|
||||||
/**
|
|
||||||
* Model InventoryTransferItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryTransferItem = Prisma.InventoryTransferItemModel
|
|
||||||
/**
|
|
||||||
* Model Bank
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Bank = Prisma.BankModel
|
|
||||||
/**
|
|
||||||
* Model Order
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Order = Prisma.OrderModel
|
|
||||||
/**
|
|
||||||
* Model OrderItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OrderItem = Prisma.OrderItemModel
|
|
||||||
/**
|
/**
|
||||||
* Model Customer
|
* Model Customer
|
||||||
*
|
*
|
||||||
@@ -102,41 +37,6 @@ export type Customer = Prisma.CustomerModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type TriggerLog = Prisma.TriggerLogModel
|
export type TriggerLog = Prisma.TriggerLogModel
|
||||||
/**
|
|
||||||
* Model ProductVariant
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type ProductVariant = Prisma.ProductVariantModel
|
|
||||||
/**
|
|
||||||
* Model Product
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Product = Prisma.ProductModel
|
|
||||||
/**
|
|
||||||
* Model ProductBrand
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type ProductBrand = Prisma.ProductBrandModel
|
|
||||||
/**
|
|
||||||
* Model ProductCategory
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type ProductCategory = Prisma.ProductCategoryModel
|
|
||||||
/**
|
|
||||||
* Model PurchaseReceipt
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type PurchaseReceipt = Prisma.PurchaseReceiptModel
|
|
||||||
/**
|
|
||||||
* Model PurchaseReceiptItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel
|
|
||||||
/**
|
|
||||||
* Model PurchaseReceiptPayments
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel
|
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoice
|
* Model SalesInvoice
|
||||||
*
|
*
|
||||||
@@ -153,37 +53,12 @@ export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
|||||||
*/
|
*/
|
||||||
export type SalesInvoicePayment = Prisma.SalesInvoicePaymentModel
|
export type SalesInvoicePayment = Prisma.SalesInvoicePaymentModel
|
||||||
/**
|
/**
|
||||||
* Model StockMovement
|
* Model Service
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockMovement = Prisma.StockMovementModel
|
export type Service = Prisma.ServiceModel
|
||||||
/**
|
/**
|
||||||
* Model StockBalance
|
* Model ServiceCategory
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockBalance = Prisma.StockBalanceModel
|
export type ServiceCategory = Prisma.ServiceCategoryModel
|
||||||
/**
|
|
||||||
* Model StockAdjustment
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type StockAdjustment = Prisma.StockAdjustmentModel
|
|
||||||
/**
|
|
||||||
* Model StockReservation
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type StockReservation = Prisma.StockReservationModel
|
|
||||||
/**
|
|
||||||
* Model Supplier
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Supplier = Prisma.SupplierModel
|
|
||||||
/**
|
|
||||||
* Model SupplierLedger
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type SupplierLedger = Prisma.SupplierLedgerModel
|
|
||||||
/**
|
|
||||||
* Model StockAvailableView
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type StockAvailableView = Prisma.StockAvailableViewModel
|
|
||||||
|
|||||||
+10
-135
@@ -27,8 +27,8 @@ export * from "./enums.js"
|
|||||||
* @example
|
* @example
|
||||||
* ```
|
* ```
|
||||||
* const prisma = new PrismaClient()
|
* const prisma = new PrismaClient()
|
||||||
* // Fetch zero or more Users
|
* // Fetch zero or more Goods
|
||||||
* const users = await prisma.user.findMany()
|
* const goods = await prisma.good.findMany()
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Read more in our [docs](https://pris.ly/d/client).
|
* Read more in our [docs](https://pris.ly/d/client).
|
||||||
@@ -38,80 +38,15 @@ export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts exten
|
|||||||
export { Prisma }
|
export { Prisma }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Model User
|
* Model Good
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type User = Prisma.UserModel
|
export type Good = Prisma.GoodModel
|
||||||
/**
|
/**
|
||||||
* Model Role
|
* Model GoodCategory
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Role = Prisma.RoleModel
|
export type GoodCategory = Prisma.GoodCategoryModel
|
||||||
/**
|
|
||||||
* Model OtpCode
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OtpCode = Prisma.OtpCodeModel
|
|
||||||
/**
|
|
||||||
* Model RefreshToken
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type RefreshToken = Prisma.RefreshTokenModel
|
|
||||||
/**
|
|
||||||
* Model BankBranch
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type BankBranch = Prisma.BankBranchModel
|
|
||||||
/**
|
|
||||||
* Model BankAccount
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type BankAccount = Prisma.BankAccountModel
|
|
||||||
/**
|
|
||||||
* Model BankAccountTransaction
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type BankAccountTransaction = Prisma.BankAccountTransactionModel
|
|
||||||
/**
|
|
||||||
* Model Inventory
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Inventory = Prisma.InventoryModel
|
|
||||||
/**
|
|
||||||
* Model InventoryBankAccount
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryBankAccount = Prisma.InventoryBankAccountModel
|
|
||||||
/**
|
|
||||||
* Model PosAccount
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type PosAccount = Prisma.PosAccountModel
|
|
||||||
/**
|
|
||||||
* Model InventoryTransfer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryTransfer = Prisma.InventoryTransferModel
|
|
||||||
/**
|
|
||||||
* Model InventoryTransferItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryTransferItem = Prisma.InventoryTransferItemModel
|
|
||||||
/**
|
|
||||||
* Model Bank
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Bank = Prisma.BankModel
|
|
||||||
/**
|
|
||||||
* Model Order
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Order = Prisma.OrderModel
|
|
||||||
/**
|
|
||||||
* Model OrderItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OrderItem = Prisma.OrderItemModel
|
|
||||||
/**
|
/**
|
||||||
* Model Customer
|
* Model Customer
|
||||||
*
|
*
|
||||||
@@ -122,41 +57,6 @@ export type Customer = Prisma.CustomerModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type TriggerLog = Prisma.TriggerLogModel
|
export type TriggerLog = Prisma.TriggerLogModel
|
||||||
/**
|
|
||||||
* Model ProductVariant
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type ProductVariant = Prisma.ProductVariantModel
|
|
||||||
/**
|
|
||||||
* Model Product
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Product = Prisma.ProductModel
|
|
||||||
/**
|
|
||||||
* Model ProductBrand
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type ProductBrand = Prisma.ProductBrandModel
|
|
||||||
/**
|
|
||||||
* Model ProductCategory
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type ProductCategory = Prisma.ProductCategoryModel
|
|
||||||
/**
|
|
||||||
* Model PurchaseReceipt
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type PurchaseReceipt = Prisma.PurchaseReceiptModel
|
|
||||||
/**
|
|
||||||
* Model PurchaseReceiptItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel
|
|
||||||
/**
|
|
||||||
* Model PurchaseReceiptPayments
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel
|
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoice
|
* Model SalesInvoice
|
||||||
*
|
*
|
||||||
@@ -173,37 +73,12 @@ export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
|||||||
*/
|
*/
|
||||||
export type SalesInvoicePayment = Prisma.SalesInvoicePaymentModel
|
export type SalesInvoicePayment = Prisma.SalesInvoicePaymentModel
|
||||||
/**
|
/**
|
||||||
* Model StockMovement
|
* Model Service
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockMovement = Prisma.StockMovementModel
|
export type Service = Prisma.ServiceModel
|
||||||
/**
|
/**
|
||||||
* Model StockBalance
|
* Model ServiceCategory
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockBalance = Prisma.StockBalanceModel
|
export type ServiceCategory = Prisma.ServiceCategoryModel
|
||||||
/**
|
|
||||||
* Model StockAdjustment
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type StockAdjustment = Prisma.StockAdjustmentModel
|
|
||||||
/**
|
|
||||||
* Model StockReservation
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type StockReservation = Prisma.StockReservationModel
|
|
||||||
/**
|
|
||||||
* Model Supplier
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Supplier = Prisma.SupplierModel
|
|
||||||
/**
|
|
||||||
* Model SupplierLedger
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type SupplierLedger = Prisma.SupplierLedgerModel
|
|
||||||
/**
|
|
||||||
* Model StockAvailableView
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type StockAvailableView = Prisma.StockAvailableViewModel
|
|
||||||
|
|||||||
@@ -40,6 +40,21 @@ export type StringFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type StringNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: string[] | null
|
||||||
|
notIn?: string[] | null
|
||||||
|
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
search?: string
|
||||||
|
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
||||||
|
}
|
||||||
|
|
||||||
export type DateTimeFilter<$PrismaModel = never> = {
|
export type DateTimeFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
in?: Date[] | string[]
|
in?: Date[] | string[]
|
||||||
@@ -62,6 +77,28 @@ export type DateTimeNullableFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type IntNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: number[] | null
|
||||||
|
notIn?: number[] | null
|
||||||
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DecimalFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
export type SortOrderInput = {
|
export type SortOrderInput = {
|
||||||
sort: Prisma.SortOrder
|
sort: Prisma.SortOrder
|
||||||
nulls?: Prisma.NullsOrder
|
nulls?: Prisma.NullsOrder
|
||||||
@@ -101,6 +138,24 @@ export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: string[] | null
|
||||||
|
notIn?: string[] | null
|
||||||
|
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
search?: string
|
||||||
|
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
||||||
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
in?: Date[] | string[]
|
in?: Date[] | string[]
|
||||||
@@ -129,136 +184,20 @@ export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StringNullableFilter<$PrismaModel = never> = {
|
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: string[] | null
|
in?: number[] | null
|
||||||
notIn?: string[] | null
|
notIn?: number[] | null
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
search?: string
|
|
||||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type JsonNullableFilter<$PrismaModel = never> =
|
|
||||||
| Prisma.PatchUndefined<
|
|
||||||
Prisma.Either<Required<JsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
|
||||||
Required<JsonNullableFilterBase<$PrismaModel>>
|
|
||||||
>
|
|
||||||
| Prisma.OptionalFlat<Omit<Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>
|
|
||||||
|
|
||||||
export type JsonNullableFilterBase<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
|
||||||
path?: string
|
|
||||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
|
||||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
|
||||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
|
||||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: runtime.InputJsonValue
|
|
||||||
lte?: runtime.InputJsonValue
|
|
||||||
gt?: runtime.InputJsonValue
|
|
||||||
gte?: runtime.InputJsonValue
|
|
||||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: string[] | null
|
|
||||||
notIn?: string[] | null
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
search?: string
|
|
||||||
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
_avg?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
_sum?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
}
|
_min?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
export type JsonNullableWithAggregatesFilter<$PrismaModel = never> =
|
|
||||||
| Prisma.PatchUndefined<
|
|
||||||
Prisma.Either<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
|
||||||
Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>
|
|
||||||
>
|
|
||||||
| Prisma.OptionalFlat<Omit<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>
|
|
||||||
|
|
||||||
export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
|
||||||
path?: string
|
|
||||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
|
||||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
|
||||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
|
||||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: runtime.InputJsonValue
|
|
||||||
lte?: runtime.InputJsonValue
|
|
||||||
gt?: runtime.InputJsonValue
|
|
||||||
gte?: runtime.InputJsonValue
|
|
||||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedJsonNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedJsonNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type BoolFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumBankAccountTransactionTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.BankAccountTransactionType[]
|
|
||||||
notIn?: $Enums.BankAccountTransactionType[]
|
|
||||||
not?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> | $Enums.BankAccountTransactionType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DecimalFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumBankTransactionRefTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.BankTransactionRefType[]
|
|
||||||
notIn?: $Enums.BankTransactionRefType[]
|
|
||||||
not?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> | $Enums.BankTransactionRefType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.BankAccountTransactionType[]
|
|
||||||
notIn?: $Enums.BankAccountTransactionType[]
|
|
||||||
not?: Prisma.NestedEnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankAccountTransactionType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
@@ -277,102 +216,17 @@ export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type BoolFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel>
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.BankTransactionRefType[]
|
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||||
notIn?: $Enums.BankTransactionRefType[]
|
}
|
||||||
not?: Prisma.NestedEnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankTransactionRefType
|
|
||||||
|
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel>
|
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumOrderStatusFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.OrderStatus[]
|
|
||||||
notIn?: $Enums.OrderStatus[]
|
|
||||||
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
export type IntNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: number[] | null
|
|
||||||
notIn?: number[] | null
|
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.OrderStatus[]
|
|
||||||
notIn?: $Enums.OrderStatus[]
|
|
||||||
not?: Prisma.NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: number[] | null
|
|
||||||
notIn?: number[] | null
|
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DecimalNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumPurchaseReceiptStatusFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PurchaseReceiptStatus | Prisma.EnumPurchaseReceiptStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PurchaseReceiptStatus[]
|
|
||||||
notIn?: $Enums.PurchaseReceiptStatus[]
|
|
||||||
not?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel> | $Enums.PurchaseReceiptStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PurchaseReceiptStatus | Prisma.EnumPurchaseReceiptStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PurchaseReceiptStatus[]
|
|
||||||
notIn?: $Enums.PurchaseReceiptStatus[]
|
|
||||||
not?: Prisma.NestedEnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseReceiptStatus
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||||
@@ -382,13 +236,6 @@ export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType
|
not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPaymentTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PaymentType[]
|
|
||||||
notIn?: $Enums.PaymentType[]
|
|
||||||
not?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> | $Enums.PaymentType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type EnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PaymentMethodType[]
|
in?: $Enums.PaymentMethodType[]
|
||||||
@@ -399,67 +246,6 @@ export type EnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPaymentTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PaymentType[]
|
|
||||||
notIn?: $Enums.PaymentType[]
|
|
||||||
not?: Prisma.NestedEnumPaymentTypeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumMovementTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.MovementType | Prisma.EnumMovementTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.MovementType[]
|
|
||||||
notIn?: $Enums.MovementType[]
|
|
||||||
not?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel> | $Enums.MovementType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumMovementReferenceTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.MovementReferenceType | Prisma.EnumMovementReferenceTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.MovementReferenceType[]
|
|
||||||
notIn?: $Enums.MovementReferenceType[]
|
|
||||||
not?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> | $Enums.MovementReferenceType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumMovementTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.MovementType | Prisma.EnumMovementTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.MovementType[]
|
|
||||||
notIn?: $Enums.MovementType[]
|
|
||||||
not?: Prisma.NestedEnumMovementTypeWithAggregatesFilter<$PrismaModel> | $Enums.MovementType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.MovementReferenceType | Prisma.EnumMovementReferenceTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.MovementReferenceType[]
|
|
||||||
notIn?: $Enums.MovementReferenceType[]
|
|
||||||
not?: Prisma.NestedEnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel> | $Enums.MovementReferenceType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumLedgerSourceTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.LedgerSourceType | Prisma.EnumLedgerSourceTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.LedgerSourceType[]
|
|
||||||
notIn?: $Enums.LedgerSourceType[]
|
|
||||||
not?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel> | $Enums.LedgerSourceType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.LedgerSourceType | Prisma.EnumLedgerSourceTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.LedgerSourceType[]
|
|
||||||
notIn?: $Enums.LedgerSourceType[]
|
|
||||||
not?: Prisma.NestedEnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel> | $Enums.LedgerSourceType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedIntFilter<$PrismaModel = never> = {
|
export type NestedIntFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: number[]
|
in?: number[]
|
||||||
@@ -486,6 +272,21 @@ export type NestedStringFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: string[] | null
|
||||||
|
notIn?: string[] | null
|
||||||
|
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
search?: string
|
||||||
|
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
in?: Date[] | string[]
|
in?: Date[] | string[]
|
||||||
@@ -508,6 +309,28 @@ export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: number[] | null
|
||||||
|
notIn?: number[] | null
|
||||||
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: number[]
|
in?: number[]
|
||||||
@@ -553,6 +376,24 @@ export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: string[] | null
|
||||||
|
notIn?: string[] | null
|
||||||
|
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
search?: string
|
||||||
|
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
||||||
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
in?: Date[] | string[]
|
in?: Date[] | string[]
|
||||||
@@ -581,165 +422,6 @@ export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: number[] | null
|
|
||||||
notIn?: number[] | null
|
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: string[] | null
|
|
||||||
notIn?: string[] | null
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
search?: string
|
|
||||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: string[] | null
|
|
||||||
notIn?: string[] | null
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
search?: string
|
|
||||||
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedJsonNullableFilter<$PrismaModel = never> =
|
|
||||||
| Prisma.PatchUndefined<
|
|
||||||
Prisma.Either<Required<NestedJsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
|
||||||
Required<NestedJsonNullableFilterBase<$PrismaModel>>
|
|
||||||
>
|
|
||||||
| Prisma.OptionalFlat<Omit<Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>
|
|
||||||
|
|
||||||
export type NestedJsonNullableFilterBase<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
|
||||||
path?: string
|
|
||||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
|
||||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
|
||||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
|
||||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
|
||||||
lt?: runtime.InputJsonValue
|
|
||||||
lte?: runtime.InputJsonValue
|
|
||||||
gt?: runtime.InputJsonValue
|
|
||||||
gte?: runtime.InputJsonValue
|
|
||||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedBoolFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumBankAccountTransactionTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.BankAccountTransactionType[]
|
|
||||||
notIn?: $Enums.BankAccountTransactionType[]
|
|
||||||
not?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> | $Enums.BankAccountTransactionType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumBankTransactionRefTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.BankTransactionRefType[]
|
|
||||||
notIn?: $Enums.BankTransactionRefType[]
|
|
||||||
not?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> | $Enums.BankTransactionRefType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.BankAccountTransactionType[]
|
|
||||||
notIn?: $Enums.BankAccountTransactionType[]
|
|
||||||
not?: Prisma.NestedEnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankAccountTransactionType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.BankTransactionRefType[]
|
|
||||||
notIn?: $Enums.BankTransactionRefType[]
|
|
||||||
not?: Prisma.NestedEnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankTransactionRefType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumOrderStatusFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.OrderStatus[]
|
|
||||||
notIn?: $Enums.OrderStatus[]
|
|
||||||
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.OrderStatus[]
|
|
||||||
notIn?: $Enums.OrderStatus[]
|
|
||||||
not?: Prisma.NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
@@ -767,48 +449,33 @@ export type NestedFloatNullableFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null
|
not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDecimalNullableFilter<$PrismaModel = never> = {
|
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
lte?: 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>
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
gte?: 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
|
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumPurchaseReceiptStatusFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PurchaseReceiptStatus | Prisma.EnumPurchaseReceiptStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PurchaseReceiptStatus[]
|
|
||||||
notIn?: $Enums.PurchaseReceiptStatus[]
|
|
||||||
not?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel> | $Enums.PurchaseReceiptStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PurchaseReceiptStatus | Prisma.EnumPurchaseReceiptStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PurchaseReceiptStatus[]
|
|
||||||
notIn?: $Enums.PurchaseReceiptStatus[]
|
|
||||||
not?: Prisma.NestedEnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel> | $Enums.PurchaseReceiptStatus
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel>
|
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel>
|
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedBoolFilter<$PrismaModel = never> = {
|
||||||
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||||
@@ -818,13 +485,6 @@ export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType
|
not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPaymentTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PaymentType[]
|
|
||||||
notIn?: $Enums.PaymentType[]
|
|
||||||
not?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> | $Enums.PaymentType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PaymentMethodType[]
|
in?: $Enums.PaymentMethodType[]
|
||||||
@@ -835,65 +495,4 @@ export type NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never
|
|||||||
_max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPaymentTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PaymentType[]
|
|
||||||
notIn?: $Enums.PaymentType[]
|
|
||||||
not?: Prisma.NestedEnumPaymentTypeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumMovementTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.MovementType | Prisma.EnumMovementTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.MovementType[]
|
|
||||||
notIn?: $Enums.MovementType[]
|
|
||||||
not?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel> | $Enums.MovementType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumMovementReferenceTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.MovementReferenceType | Prisma.EnumMovementReferenceTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.MovementReferenceType[]
|
|
||||||
notIn?: $Enums.MovementReferenceType[]
|
|
||||||
not?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel> | $Enums.MovementReferenceType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumMovementTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.MovementType | Prisma.EnumMovementTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.MovementType[]
|
|
||||||
notIn?: $Enums.MovementType[]
|
|
||||||
not?: Prisma.NestedEnumMovementTypeWithAggregatesFilter<$PrismaModel> | $Enums.MovementType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumMovementTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.MovementReferenceType | Prisma.EnumMovementReferenceTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.MovementReferenceType[]
|
|
||||||
notIn?: $Enums.MovementReferenceType[]
|
|
||||||
not?: Prisma.NestedEnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel> | $Enums.MovementReferenceType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumLedgerSourceTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.LedgerSourceType | Prisma.EnumLedgerSourceTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.LedgerSourceType[]
|
|
||||||
notIn?: $Enums.LedgerSourceType[]
|
|
||||||
not?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel> | $Enums.LedgerSourceType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.LedgerSourceType | Prisma.EnumLedgerSourceTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.LedgerSourceType[]
|
|
||||||
notIn?: $Enums.LedgerSourceType[]
|
|
||||||
not?: Prisma.NestedEnumLedgerSourceTypeWithAggregatesFilter<$PrismaModel> | $Enums.LedgerSourceType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumLedgerSourceTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -9,35 +9,6 @@
|
|||||||
* 🟢 You can import this file directly.
|
* 🟢 You can import this file directly.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const OrderStatus = {
|
|
||||||
PENDING: 'PENDING',
|
|
||||||
REJECTED: 'REJECTED',
|
|
||||||
CANCELED: 'CANCELED',
|
|
||||||
DONE: 'DONE'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus]
|
|
||||||
|
|
||||||
|
|
||||||
export const MovementType = {
|
|
||||||
IN: 'IN',
|
|
||||||
OUT: 'OUT',
|
|
||||||
ADJUST: 'ADJUST'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type MovementType = (typeof MovementType)[keyof typeof MovementType]
|
|
||||||
|
|
||||||
|
|
||||||
export const MovementReferenceType = {
|
|
||||||
PURCHASE: 'PURCHASE',
|
|
||||||
SALES: 'SALES',
|
|
||||||
ADJUSTMENT: 'ADJUSTMENT',
|
|
||||||
INVENTORY_TRANSFER: 'INVENTORY_TRANSFER'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type MovementReferenceType = (typeof MovementReferenceType)[keyof typeof MovementReferenceType]
|
|
||||||
|
|
||||||
|
|
||||||
export const PaymentMethodType = {
|
export const PaymentMethodType = {
|
||||||
CASH: 'CASH',
|
CASH: 'CASH',
|
||||||
CARD: 'CARD',
|
CARD: 'CARD',
|
||||||
@@ -49,24 +20,6 @@ export const PaymentMethodType = {
|
|||||||
export type PaymentMethodType = (typeof PaymentMethodType)[keyof typeof PaymentMethodType]
|
export type PaymentMethodType = (typeof PaymentMethodType)[keyof typeof PaymentMethodType]
|
||||||
|
|
||||||
|
|
||||||
export const LedgerSourceType = {
|
|
||||||
PURCHASE: 'PURCHASE',
|
|
||||||
PAYMENT: 'PAYMENT',
|
|
||||||
ADJUSTMENT: 'ADJUSTMENT',
|
|
||||||
REFUND: 'REFUND'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type LedgerSourceType = (typeof LedgerSourceType)[keyof typeof LedgerSourceType]
|
|
||||||
|
|
||||||
|
|
||||||
export const PaymentType = {
|
|
||||||
PAYMENT: 'PAYMENT',
|
|
||||||
REFUND: 'REFUND'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type PaymentType = (typeof PaymentType)[keyof typeof PaymentType]
|
|
||||||
|
|
||||||
|
|
||||||
export const PurchaseReceiptStatus = {
|
export const PurchaseReceiptStatus = {
|
||||||
UNPAID: 'UNPAID',
|
UNPAID: 'UNPAID',
|
||||||
PARTIALLY_PAID: 'PARTIALLY_PAID',
|
PARTIALLY_PAID: 'PARTIALLY_PAID',
|
||||||
@@ -74,23 +27,3 @@ export const PurchaseReceiptStatus = {
|
|||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type PurchaseReceiptStatus = (typeof PurchaseReceiptStatus)[keyof typeof PurchaseReceiptStatus]
|
export type PurchaseReceiptStatus = (typeof PurchaseReceiptStatus)[keyof typeof PurchaseReceiptStatus]
|
||||||
|
|
||||||
|
|
||||||
export const BankAccountTransactionType = {
|
|
||||||
DEPOSIT: 'DEPOSIT',
|
|
||||||
WITHDRAWAL: 'WITHDRAWAL'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type BankAccountTransactionType = (typeof BankAccountTransactionType)[keyof typeof BankAccountTransactionType]
|
|
||||||
|
|
||||||
|
|
||||||
export const BankTransactionRefType = {
|
|
||||||
PURCHASE_PAYMENT: 'PURCHASE_PAYMENT',
|
|
||||||
PURCHASE_REFUND: 'PURCHASE_REFUND',
|
|
||||||
POS_SALE: 'POS_SALE',
|
|
||||||
POS_REFUND: 'POS_REFUND',
|
|
||||||
BANK_TRANSFER: 'BANK_TRANSFER',
|
|
||||||
MANUAL_ADJUSTMENT: 'MANUAL_ADJUSTMENT'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type BankTransactionRefType = (typeof BankTransactionRefType)[keyof typeof BankTransactionRefType]
|
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -51,40 +51,15 @@ export const AnyNull = runtime.AnyNull
|
|||||||
|
|
||||||
|
|
||||||
export const ModelName = {
|
export const ModelName = {
|
||||||
User: 'User',
|
Good: 'Good',
|
||||||
Role: 'Role',
|
GoodCategory: 'GoodCategory',
|
||||||
OtpCode: 'OtpCode',
|
|
||||||
RefreshToken: 'RefreshToken',
|
|
||||||
BankBranch: 'BankBranch',
|
|
||||||
BankAccount: 'BankAccount',
|
|
||||||
BankAccountTransaction: 'BankAccountTransaction',
|
|
||||||
Inventory: 'Inventory',
|
|
||||||
InventoryBankAccount: 'InventoryBankAccount',
|
|
||||||
PosAccount: 'PosAccount',
|
|
||||||
InventoryTransfer: 'InventoryTransfer',
|
|
||||||
InventoryTransferItem: 'InventoryTransferItem',
|
|
||||||
Bank: 'Bank',
|
|
||||||
Order: 'Order',
|
|
||||||
OrderItem: 'OrderItem',
|
|
||||||
Customer: 'Customer',
|
Customer: 'Customer',
|
||||||
TriggerLog: 'TriggerLog',
|
TriggerLog: 'TriggerLog',
|
||||||
ProductVariant: 'ProductVariant',
|
|
||||||
Product: 'Product',
|
|
||||||
ProductBrand: 'ProductBrand',
|
|
||||||
ProductCategory: 'ProductCategory',
|
|
||||||
PurchaseReceipt: 'PurchaseReceipt',
|
|
||||||
PurchaseReceiptItem: 'PurchaseReceiptItem',
|
|
||||||
PurchaseReceiptPayments: 'PurchaseReceiptPayments',
|
|
||||||
SalesInvoice: 'SalesInvoice',
|
SalesInvoice: 'SalesInvoice',
|
||||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||||
SalesInvoicePayment: 'SalesInvoicePayment',
|
SalesInvoicePayment: 'SalesInvoicePayment',
|
||||||
StockMovement: 'StockMovement',
|
Service: 'Service',
|
||||||
StockBalance: 'StockBalance',
|
ServiceCategory: 'ServiceCategory'
|
||||||
StockAdjustment: 'StockAdjustment',
|
|
||||||
StockReservation: 'StockReservation',
|
|
||||||
Supplier: 'Supplier',
|
|
||||||
SupplierLedger: 'SupplierLedger',
|
|
||||||
StockAvailableView: 'StockAvailableView'
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||||
@@ -103,200 +78,34 @@ export const TransactionIsolationLevel = {
|
|||||||
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
||||||
|
|
||||||
|
|
||||||
export const UserScalarFieldEnum = {
|
export const GoodScalarFieldEnum = {
|
||||||
id: 'id',
|
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
password: 'password',
|
|
||||||
firstName: 'firstName',
|
|
||||||
lastName: 'lastName',
|
|
||||||
roleId: 'roleId',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
deletedAt: 'deletedAt',
|
|
||||||
updatedAt: 'updatedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const RoleScalarFieldEnum = {
|
|
||||||
id: 'id',
|
id: 'id',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
description: 'description',
|
description: 'description',
|
||||||
permissions: 'permissions',
|
sku: 'sku',
|
||||||
|
localSku: 'localSku',
|
||||||
|
barcode: 'barcode',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt',
|
||||||
|
categoryId: 'categoryId',
|
||||||
|
baseSalePrice: 'baseSalePrice'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type GoodScalarFieldEnum = (typeof GoodScalarFieldEnum)[keyof typeof GoodScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const GoodCategoryScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
description: 'description',
|
||||||
|
imageUrl: 'imageUrl',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
updatedAt: 'updatedAt',
|
updatedAt: 'updatedAt',
|
||||||
deletedAt: 'deletedAt'
|
deletedAt: 'deletedAt'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type RoleScalarFieldEnum = (typeof RoleScalarFieldEnum)[keyof typeof RoleScalarFieldEnum]
|
export type GoodCategoryScalarFieldEnum = (typeof GoodCategoryScalarFieldEnum)[keyof typeof GoodCategoryScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const OtpCodeScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
code: 'code',
|
|
||||||
used: 'used',
|
|
||||||
expiresAt: 'expiresAt',
|
|
||||||
createdAt: 'createdAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OtpCodeScalarFieldEnum = (typeof OtpCodeScalarFieldEnum)[keyof typeof OtpCodeScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const RefreshTokenScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
tokenHash: 'tokenHash',
|
|
||||||
userId: 'userId',
|
|
||||||
revoked: 'revoked',
|
|
||||||
expiresAt: 'expiresAt',
|
|
||||||
createdAt: 'createdAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type RefreshTokenScalarFieldEnum = (typeof RefreshTokenScalarFieldEnum)[keyof typeof RefreshTokenScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const BankBranchScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
code: 'code',
|
|
||||||
address: 'address',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt',
|
|
||||||
bankId: 'bankId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type BankBranchScalarFieldEnum = (typeof BankBranchScalarFieldEnum)[keyof typeof BankBranchScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const BankAccountScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
accountNumber: 'accountNumber',
|
|
||||||
cardNumber: 'cardNumber',
|
|
||||||
name: 'name',
|
|
||||||
iban: 'iban',
|
|
||||||
branchId: 'branchId',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type BankAccountScalarFieldEnum = (typeof BankAccountScalarFieldEnum)[keyof typeof BankAccountScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const BankAccountTransactionScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
bankAccountId: 'bankAccountId',
|
|
||||||
type: 'type',
|
|
||||||
amount: 'amount',
|
|
||||||
balanceAfter: 'balanceAfter',
|
|
||||||
referenceId: 'referenceId',
|
|
||||||
referenceType: 'referenceType',
|
|
||||||
description: 'description',
|
|
||||||
createdAt: 'createdAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type BankAccountTransactionScalarFieldEnum = (typeof BankAccountTransactionScalarFieldEnum)[keyof typeof BankAccountTransactionScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
location: 'location',
|
|
||||||
isActive: 'isActive',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt',
|
|
||||||
isPointOfSale: 'isPointOfSale'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryBankAccountScalarFieldEnum = {
|
|
||||||
inventoryId: 'inventoryId',
|
|
||||||
bankAccountId: 'bankAccountId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryBankAccountScalarFieldEnum = (typeof InventoryBankAccountScalarFieldEnum)[keyof typeof InventoryBankAccountScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PosAccountScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
code: 'code',
|
|
||||||
description: 'description',
|
|
||||||
bankAccountId: 'bankAccountId',
|
|
||||||
inventoryId: 'inventoryId',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type PosAccountScalarFieldEnum = (typeof PosAccountScalarFieldEnum)[keyof typeof PosAccountScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryTransferScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
code: 'code',
|
|
||||||
description: 'description',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
fromInventoryId: 'fromInventoryId',
|
|
||||||
toInventoryId: 'toInventoryId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryTransferScalarFieldEnum = (typeof InventoryTransferScalarFieldEnum)[keyof typeof InventoryTransferScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryTransferItemScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
count: 'count',
|
|
||||||
productId: 'productId',
|
|
||||||
transferId: 'transferId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryTransferItemScalarFieldEnum = (typeof InventoryTransferItemScalarFieldEnum)[keyof typeof InventoryTransferItemScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const BankScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
shortName: 'shortName',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type BankScalarFieldEnum = (typeof BankScalarFieldEnum)[keyof typeof BankScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const OrderScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
orderNumber: 'orderNumber',
|
|
||||||
status: 'status',
|
|
||||||
totalAmount: 'totalAmount',
|
|
||||||
description: 'description',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt',
|
|
||||||
customerId: 'customerId',
|
|
||||||
posAccountId: 'posAccountId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const OrderItemScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
quantity: 'quantity',
|
|
||||||
unitPrice: 'unitPrice',
|
|
||||||
totalAmount: 'totalAmount',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
orderId: 'orderId',
|
|
||||||
productId: 'productId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OrderItemScalarFieldEnum = (typeof OrderItemScalarFieldEnum)[keyof typeof OrderItemScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const CustomerScalarFieldEnum = {
|
export const CustomerScalarFieldEnum = {
|
||||||
@@ -306,9 +115,6 @@ export const CustomerScalarFieldEnum = {
|
|||||||
email: 'email',
|
email: 'email',
|
||||||
mobileNumber: 'mobileNumber',
|
mobileNumber: 'mobileNumber',
|
||||||
address: 'address',
|
address: 'address',
|
||||||
city: 'city',
|
|
||||||
state: 'state',
|
|
||||||
country: 'country',
|
|
||||||
isActive: 'isActive',
|
isActive: 'isActive',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
updatedAt: 'updatedAt',
|
updatedAt: 'updatedAt',
|
||||||
@@ -328,119 +134,6 @@ export const TriggerLogScalarFieldEnum = {
|
|||||||
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const ProductVariantScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
basePrice: 'basePrice',
|
|
||||||
salePrice: 'salePrice',
|
|
||||||
description: 'description',
|
|
||||||
barcode: 'barcode',
|
|
||||||
imageUrl: 'imageUrl',
|
|
||||||
unit: 'unit',
|
|
||||||
quantity: 'quantity',
|
|
||||||
alertQuantity: 'alertQuantity',
|
|
||||||
isActive: 'isActive',
|
|
||||||
isFeatured: 'isFeatured',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt',
|
|
||||||
productId: 'productId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductVariantScalarFieldEnum = (typeof ProductVariantScalarFieldEnum)[keyof typeof ProductVariantScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const ProductScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
description: 'description',
|
|
||||||
sku: 'sku',
|
|
||||||
barcode: 'barcode',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt',
|
|
||||||
brandId: 'brandId',
|
|
||||||
categoryId: 'categoryId',
|
|
||||||
salePrice: 'salePrice',
|
|
||||||
minimumStockAlertLevel: 'minimumStockAlertLevel'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const ProductBrandScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
description: 'description',
|
|
||||||
imageUrl: 'imageUrl',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductBrandScalarFieldEnum = (typeof ProductBrandScalarFieldEnum)[keyof typeof ProductBrandScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const ProductCategoryScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
description: 'description',
|
|
||||||
imageUrl: 'imageUrl',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PurchaseReceiptScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
code: 'code',
|
|
||||||
totalAmount: 'totalAmount',
|
|
||||||
paidAmount: 'paidAmount',
|
|
||||||
description: 'description',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
status: 'status',
|
|
||||||
supplierId: 'supplierId',
|
|
||||||
inventoryId: 'inventoryId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type PurchaseReceiptScalarFieldEnum = (typeof PurchaseReceiptScalarFieldEnum)[keyof typeof PurchaseReceiptScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PurchaseReceiptItemScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
count: 'count',
|
|
||||||
unitPrice: 'unitPrice',
|
|
||||||
totalAmount: 'totalAmount',
|
|
||||||
receiptId: 'receiptId',
|
|
||||||
productId: 'productId',
|
|
||||||
description: 'description',
|
|
||||||
createdAt: 'createdAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PurchaseReceiptPaymentsScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
amount: 'amount',
|
|
||||||
paymentMethod: 'paymentMethod',
|
|
||||||
type: 'type',
|
|
||||||
bankAccountId: 'bankAccountId',
|
|
||||||
receiptId: 'receiptId',
|
|
||||||
payedAt: 'payedAt',
|
|
||||||
description: 'description',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
inventoryBankAccountInventoryId: 'inventoryBankAccountInventoryId',
|
|
||||||
inventoryBankAccountBankAccountId: 'inventoryBankAccountBankAccountId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoiceScalarFieldEnum = {
|
export const SalesInvoiceScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
code: 'code',
|
code: 'code',
|
||||||
@@ -448,8 +141,7 @@ export const SalesInvoiceScalarFieldEnum = {
|
|||||||
description: 'description',
|
description: 'description',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
updatedAt: 'updatedAt',
|
updatedAt: 'updatedAt',
|
||||||
customerId: 'customerId',
|
customerId: 'customerId'
|
||||||
posAccountId: 'posAccountId'
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||||
@@ -462,7 +154,8 @@ export const SalesInvoiceItemScalarFieldEnum = {
|
|||||||
totalAmount: 'totalAmount',
|
totalAmount: 'totalAmount',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
invoiceId: 'invoiceId',
|
invoiceId: 'invoiceId',
|
||||||
productId: 'productId'
|
goodId: 'goodId',
|
||||||
|
serviceId: 'serviceId'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
||||||
@@ -480,107 +173,33 @@ export const SalesInvoicePaymentScalarFieldEnum = {
|
|||||||
export type SalesInvoicePaymentScalarFieldEnum = (typeof SalesInvoicePaymentScalarFieldEnum)[keyof typeof SalesInvoicePaymentScalarFieldEnum]
|
export type SalesInvoicePaymentScalarFieldEnum = (typeof SalesInvoicePaymentScalarFieldEnum)[keyof typeof SalesInvoicePaymentScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const StockMovementScalarFieldEnum = {
|
export const ServiceScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
type: 'type',
|
name: 'name',
|
||||||
quantity: 'quantity',
|
description: 'description',
|
||||||
unitPrice: 'unitPrice',
|
sku: 'sku',
|
||||||
totalCost: 'totalCost',
|
barcode: 'barcode',
|
||||||
referenceType: 'referenceType',
|
|
||||||
referenceId: 'referenceId',
|
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
productId: 'productId',
|
|
||||||
inventoryId: 'inventoryId',
|
|
||||||
avgCost: 'avgCost',
|
|
||||||
supplierId: 'supplierId',
|
|
||||||
remainedInStock: 'remainedInStock',
|
|
||||||
counterInventoryId: 'counterInventoryId',
|
|
||||||
customerId: 'customerId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type StockMovementScalarFieldEnum = (typeof StockMovementScalarFieldEnum)[keyof typeof StockMovementScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const StockBalanceScalarFieldEnum = {
|
|
||||||
quantity: 'quantity',
|
|
||||||
totalCost: 'totalCost',
|
|
||||||
updatedAt: 'updatedAt',
|
updatedAt: 'updatedAt',
|
||||||
avgCost: 'avgCost',
|
deletedAt: 'deletedAt',
|
||||||
inventoryId: 'inventoryId',
|
categoryId: 'categoryId',
|
||||||
productId: 'productId',
|
baseSalePrice: 'baseSalePrice'
|
||||||
createdAt: 'createdAt',
|
|
||||||
id: 'id'
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type StockBalanceScalarFieldEnum = (typeof StockBalanceScalarFieldEnum)[keyof typeof StockBalanceScalarFieldEnum]
|
export type ServiceScalarFieldEnum = (typeof ServiceScalarFieldEnum)[keyof typeof ServiceScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const StockAdjustmentScalarFieldEnum = {
|
export const ServiceCategoryScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
adjustedQuantity: 'adjustedQuantity',
|
name: 'name',
|
||||||
createdAt: 'createdAt',
|
description: 'description',
|
||||||
productId: 'productId',
|
imageUrl: 'imageUrl',
|
||||||
inventoryId: 'inventoryId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const StockReservationScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
quantity: 'quantity',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
productId: 'productId',
|
|
||||||
inventoryId: 'inventoryId',
|
|
||||||
orderId: 'orderId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type StockReservationScalarFieldEnum = (typeof StockReservationScalarFieldEnum)[keyof typeof StockReservationScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SupplierScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
firstName: 'firstName',
|
|
||||||
lastName: 'lastName',
|
|
||||||
email: 'email',
|
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
address: 'address',
|
|
||||||
city: 'city',
|
|
||||||
state: 'state',
|
|
||||||
country: 'country',
|
|
||||||
isActive: 'isActive',
|
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
updatedAt: 'updatedAt',
|
updatedAt: 'updatedAt',
|
||||||
deletedAt: 'deletedAt'
|
deletedAt: 'deletedAt'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum]
|
export type ServiceCategoryScalarFieldEnum = (typeof ServiceCategoryScalarFieldEnum)[keyof typeof ServiceCategoryScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SupplierLedgerScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
description: 'description',
|
|
||||||
debit: 'debit',
|
|
||||||
credit: 'credit',
|
|
||||||
balance: 'balance',
|
|
||||||
sourceType: 'sourceType',
|
|
||||||
sourceId: 'sourceId',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
supplierId: 'supplierId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SupplierLedgerScalarFieldEnum = (typeof SupplierLedgerScalarFieldEnum)[keyof typeof SupplierLedgerScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const StockAvailableViewScalarFieldEnum = {
|
|
||||||
productId: 'productId',
|
|
||||||
inventoryId: 'inventoryId',
|
|
||||||
physicalQuantity: 'physicalQuantity',
|
|
||||||
reservedQuantity: 'reservedQuantity',
|
|
||||||
availableQuantity: 'availableQuantity'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type StockAvailableViewScalarFieldEnum = (typeof StockAvailableViewScalarFieldEnum)[keyof typeof StockAvailableViewScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SortOrder = {
|
export const SortOrder = {
|
||||||
@@ -591,14 +210,6 @@ export const SortOrder = {
|
|||||||
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
export type SortOrder = (typeof SortOrder)[keyof typeof SortOrder]
|
||||||
|
|
||||||
|
|
||||||
export const NullableJsonNullValueInput = {
|
|
||||||
DbNull: 'DbNull',
|
|
||||||
JsonNull: 'JsonNull'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
|
||||||
|
|
||||||
|
|
||||||
export const NullsOrder = {
|
export const NullsOrder = {
|
||||||
first: 'first',
|
first: 'first',
|
||||||
last: 'last'
|
last: 'last'
|
||||||
@@ -607,121 +218,24 @@ export const NullsOrder = {
|
|||||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||||
|
|
||||||
|
|
||||||
export const UserOrderByRelevanceFieldEnum = {
|
export const GoodOrderByRelevanceFieldEnum = {
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
password: 'password',
|
|
||||||
firstName: 'firstName',
|
|
||||||
lastName: 'lastName'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type UserOrderByRelevanceFieldEnum = (typeof UserOrderByRelevanceFieldEnum)[keyof typeof UserOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const JsonNullValueFilter = {
|
|
||||||
DbNull: 'DbNull',
|
|
||||||
JsonNull: 'JsonNull',
|
|
||||||
AnyNull: 'AnyNull'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type JsonNullValueFilter = (typeof JsonNullValueFilter)[keyof typeof JsonNullValueFilter]
|
|
||||||
|
|
||||||
|
|
||||||
export const QueryMode = {
|
|
||||||
default: 'default',
|
|
||||||
insensitive: 'insensitive'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type QueryMode = (typeof QueryMode)[keyof typeof QueryMode]
|
|
||||||
|
|
||||||
|
|
||||||
export const RoleOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
name: 'name',
|
||||||
description: 'description'
|
description: 'description',
|
||||||
|
sku: 'sku',
|
||||||
|
localSku: 'localSku',
|
||||||
|
barcode: 'barcode'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type RoleOrderByRelevanceFieldEnum = (typeof RoleOrderByRelevanceFieldEnum)[keyof typeof RoleOrderByRelevanceFieldEnum]
|
export type GoodOrderByRelevanceFieldEnum = (typeof GoodOrderByRelevanceFieldEnum)[keyof typeof GoodOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const OtpCodeOrderByRelevanceFieldEnum = {
|
export const GoodCategoryOrderByRelevanceFieldEnum = {
|
||||||
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',
|
name: 'name',
|
||||||
code: 'code',
|
description: 'description',
|
||||||
address: 'address'
|
imageUrl: 'imageUrl'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type BankBranchOrderByRelevanceFieldEnum = (typeof BankBranchOrderByRelevanceFieldEnum)[keyof typeof BankBranchOrderByRelevanceFieldEnum]
|
export type GoodCategoryOrderByRelevanceFieldEnum = (typeof GoodCategoryOrderByRelevanceFieldEnum)[keyof typeof GoodCategoryOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const BankAccountOrderByRelevanceFieldEnum = {
|
|
||||||
accountNumber: 'accountNumber',
|
|
||||||
cardNumber: 'cardNumber',
|
|
||||||
name: 'name',
|
|
||||||
iban: 'iban'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type BankAccountOrderByRelevanceFieldEnum = (typeof BankAccountOrderByRelevanceFieldEnum)[keyof typeof BankAccountOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const BankAccountTransactionOrderByRelevanceFieldEnum = {
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type BankAccountTransactionOrderByRelevanceFieldEnum = (typeof BankAccountTransactionOrderByRelevanceFieldEnum)[keyof typeof BankAccountTransactionOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
location: 'location'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryOrderByRelevanceFieldEnum = (typeof InventoryOrderByRelevanceFieldEnum)[keyof typeof InventoryOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PosAccountOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
code: 'code',
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type PosAccountOrderByRelevanceFieldEnum = (typeof PosAccountOrderByRelevanceFieldEnum)[keyof typeof PosAccountOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryTransferOrderByRelevanceFieldEnum = {
|
|
||||||
code: 'code',
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const BankOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
shortName: 'shortName'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type BankOrderByRelevanceFieldEnum = (typeof BankOrderByRelevanceFieldEnum)[keyof typeof BankOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const OrderOrderByRelevanceFieldEnum = {
|
|
||||||
orderNumber: 'orderNumber',
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const CustomerOrderByRelevanceFieldEnum = {
|
export const CustomerOrderByRelevanceFieldEnum = {
|
||||||
@@ -729,10 +243,7 @@ export const CustomerOrderByRelevanceFieldEnum = {
|
|||||||
lastName: 'lastName',
|
lastName: 'lastName',
|
||||||
email: 'email',
|
email: 'email',
|
||||||
mobileNumber: 'mobileNumber',
|
mobileNumber: 'mobileNumber',
|
||||||
address: 'address',
|
address: 'address'
|
||||||
city: 'city',
|
|
||||||
state: 'state',
|
|
||||||
country: 'country'
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
||||||
@@ -746,67 +257,6 @@ export const TriggerLogOrderByRelevanceFieldEnum = {
|
|||||||
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const ProductVariantOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
description: 'description',
|
|
||||||
barcode: 'barcode',
|
|
||||||
imageUrl: 'imageUrl',
|
|
||||||
unit: 'unit'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductVariantOrderByRelevanceFieldEnum = (typeof ProductVariantOrderByRelevanceFieldEnum)[keyof typeof ProductVariantOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const ProductOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
description: 'description',
|
|
||||||
sku: 'sku',
|
|
||||||
barcode: 'barcode'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductOrderByRelevanceFieldEnum = (typeof ProductOrderByRelevanceFieldEnum)[keyof typeof ProductOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const ProductBrandOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
description: 'description',
|
|
||||||
imageUrl: 'imageUrl'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductBrandOrderByRelevanceFieldEnum = (typeof ProductBrandOrderByRelevanceFieldEnum)[keyof typeof ProductBrandOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const ProductCategoryOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
description: 'description',
|
|
||||||
imageUrl: 'imageUrl'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PurchaseReceiptOrderByRelevanceFieldEnum = {
|
|
||||||
code: 'code',
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type PurchaseReceiptOrderByRelevanceFieldEnum = (typeof PurchaseReceiptOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PurchaseReceiptItemOrderByRelevanceFieldEnum = {
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type PurchaseReceiptItemOrderByRelevanceFieldEnum = (typeof PurchaseReceiptItemOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptItemOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = {
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = (typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||||
code: 'code',
|
code: 'code',
|
||||||
description: 'description'
|
description: 'description'
|
||||||
@@ -815,30 +265,21 @@ export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
|||||||
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const StockMovementOrderByRelevanceFieldEnum = {
|
export const ServiceOrderByRelevanceFieldEnum = {
|
||||||
referenceId: 'referenceId'
|
name: 'name',
|
||||||
|
description: 'description',
|
||||||
|
sku: 'sku',
|
||||||
|
barcode: 'barcode'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type StockMovementOrderByRelevanceFieldEnum = (typeof StockMovementOrderByRelevanceFieldEnum)[keyof typeof StockMovementOrderByRelevanceFieldEnum]
|
export type ServiceOrderByRelevanceFieldEnum = (typeof ServiceOrderByRelevanceFieldEnum)[keyof typeof ServiceOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SupplierOrderByRelevanceFieldEnum = {
|
export const ServiceCategoryOrderByRelevanceFieldEnum = {
|
||||||
firstName: 'firstName',
|
name: 'name',
|
||||||
lastName: 'lastName',
|
description: 'description',
|
||||||
email: 'email',
|
imageUrl: 'imageUrl'
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
address: 'address',
|
|
||||||
city: 'city',
|
|
||||||
state: 'state',
|
|
||||||
country: 'country'
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum]
|
export type ServiceCategoryOrderByRelevanceFieldEnum = (typeof ServiceCategoryOrderByRelevanceFieldEnum)[keyof typeof ServiceCategoryOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SupplierLedgerOrderByRelevanceFieldEnum = {
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SupplierLedgerOrderByRelevanceFieldEnum = (typeof SupplierLedgerOrderByRelevanceFieldEnum)[keyof typeof SupplierLedgerOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|||||||
@@ -8,38 +8,13 @@
|
|||||||
*
|
*
|
||||||
* 🟢 You can import this file directly.
|
* 🟢 You can import this file directly.
|
||||||
*/
|
*/
|
||||||
export type * from './models/User.js'
|
export type * from './models/Good.js'
|
||||||
export type * from './models/Role.js'
|
export type * from './models/GoodCategory.js'
|
||||||
export type * from './models/OtpCode.js'
|
|
||||||
export type * from './models/RefreshToken.js'
|
|
||||||
export type * from './models/BankBranch.js'
|
|
||||||
export type * from './models/BankAccount.js'
|
|
||||||
export type * from './models/BankAccountTransaction.js'
|
|
||||||
export type * from './models/Inventory.js'
|
|
||||||
export type * from './models/InventoryBankAccount.js'
|
|
||||||
export type * from './models/PosAccount.js'
|
|
||||||
export type * from './models/InventoryTransfer.js'
|
|
||||||
export type * from './models/InventoryTransferItem.js'
|
|
||||||
export type * from './models/Bank.js'
|
|
||||||
export type * from './models/Order.js'
|
|
||||||
export type * from './models/OrderItem.js'
|
|
||||||
export type * from './models/Customer.js'
|
export type * from './models/Customer.js'
|
||||||
export type * from './models/TriggerLog.js'
|
export type * from './models/TriggerLog.js'
|
||||||
export type * from './models/ProductVariant.js'
|
|
||||||
export type * from './models/Product.js'
|
|
||||||
export type * from './models/ProductBrand.js'
|
|
||||||
export type * from './models/ProductCategory.js'
|
|
||||||
export type * from './models/PurchaseReceipt.js'
|
|
||||||
export type * from './models/PurchaseReceiptItem.js'
|
|
||||||
export type * from './models/PurchaseReceiptPayments.js'
|
|
||||||
export type * from './models/SalesInvoice.js'
|
export type * from './models/SalesInvoice.js'
|
||||||
export type * from './models/SalesInvoiceItem.js'
|
export type * from './models/SalesInvoiceItem.js'
|
||||||
export type * from './models/SalesInvoicePayment.js'
|
export type * from './models/SalesInvoicePayment.js'
|
||||||
export type * from './models/StockMovement.js'
|
export type * from './models/Service.js'
|
||||||
export type * from './models/StockBalance.js'
|
export type * from './models/ServiceCategory.js'
|
||||||
export type * from './models/StockAdjustment.js'
|
|
||||||
export type * from './models/StockReservation.js'
|
|
||||||
export type * from './models/Supplier.js'
|
|
||||||
export type * from './models/SupplierLedger.js'
|
|
||||||
export type * from './models/StockAvailableView.js'
|
|
||||||
export type * from './commonInputTypes.js'
|
export type * from './commonInputTypes.js'
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -41,9 +41,6 @@ export type CustomerMinAggregateOutputType = {
|
|||||||
email: string | null
|
email: string | null
|
||||||
mobileNumber: string | null
|
mobileNumber: string | null
|
||||||
address: string | null
|
address: string | null
|
||||||
city: string | null
|
|
||||||
state: string | null
|
|
||||||
country: string | null
|
|
||||||
isActive: boolean | null
|
isActive: boolean | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
@@ -57,9 +54,6 @@ export type CustomerMaxAggregateOutputType = {
|
|||||||
email: string | null
|
email: string | null
|
||||||
mobileNumber: string | null
|
mobileNumber: string | null
|
||||||
address: string | null
|
address: string | null
|
||||||
city: string | null
|
|
||||||
state: string | null
|
|
||||||
country: string | null
|
|
||||||
isActive: boolean | null
|
isActive: boolean | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
@@ -73,9 +67,6 @@ export type CustomerCountAggregateOutputType = {
|
|||||||
email: number
|
email: number
|
||||||
mobileNumber: number
|
mobileNumber: number
|
||||||
address: number
|
address: number
|
||||||
city: number
|
|
||||||
state: number
|
|
||||||
country: number
|
|
||||||
isActive: number
|
isActive: number
|
||||||
createdAt: number
|
createdAt: number
|
||||||
updatedAt: number
|
updatedAt: number
|
||||||
@@ -99,9 +90,6 @@ export type CustomerMinAggregateInputType = {
|
|||||||
email?: true
|
email?: true
|
||||||
mobileNumber?: true
|
mobileNumber?: true
|
||||||
address?: true
|
address?: true
|
||||||
city?: true
|
|
||||||
state?: true
|
|
||||||
country?: true
|
|
||||||
isActive?: true
|
isActive?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
@@ -115,9 +103,6 @@ export type CustomerMaxAggregateInputType = {
|
|||||||
email?: true
|
email?: true
|
||||||
mobileNumber?: true
|
mobileNumber?: true
|
||||||
address?: true
|
address?: true
|
||||||
city?: true
|
|
||||||
state?: true
|
|
||||||
country?: true
|
|
||||||
isActive?: true
|
isActive?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
@@ -131,9 +116,6 @@ export type CustomerCountAggregateInputType = {
|
|||||||
email?: true
|
email?: true
|
||||||
mobileNumber?: true
|
mobileNumber?: true
|
||||||
address?: true
|
address?: true
|
||||||
city?: true
|
|
||||||
state?: true
|
|
||||||
country?: true
|
|
||||||
isActive?: true
|
isActive?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
@@ -234,9 +216,6 @@ export type CustomerGroupByOutputType = {
|
|||||||
email: string | null
|
email: string | null
|
||||||
mobileNumber: string
|
mobileNumber: string
|
||||||
address: string | null
|
address: string | null
|
||||||
city: string | null
|
|
||||||
state: string | null
|
|
||||||
country: string | null
|
|
||||||
isActive: boolean
|
isActive: boolean
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
@@ -273,15 +252,10 @@ export type CustomerWhereInput = {
|
|||||||
email?: Prisma.StringNullableFilter<"Customer"> | string | null
|
email?: Prisma.StringNullableFilter<"Customer"> | string | null
|
||||||
mobileNumber?: Prisma.StringFilter<"Customer"> | string
|
mobileNumber?: Prisma.StringFilter<"Customer"> | string
|
||||||
address?: Prisma.StringNullableFilter<"Customer"> | string | null
|
address?: Prisma.StringNullableFilter<"Customer"> | string | null
|
||||||
city?: Prisma.StringNullableFilter<"Customer"> | string | null
|
|
||||||
state?: Prisma.StringNullableFilter<"Customer"> | string | null
|
|
||||||
country?: Prisma.StringNullableFilter<"Customer"> | string | null
|
|
||||||
isActive?: Prisma.BoolFilter<"Customer"> | boolean
|
isActive?: Prisma.BoolFilter<"Customer"> | boolean
|
||||||
createdAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
||||||
orders?: Prisma.OrderListRelationFilter
|
|
||||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,15 +266,10 @@ export type CustomerOrderByWithRelationInput = {
|
|||||||
email?: Prisma.SortOrderInput | Prisma.SortOrder
|
email?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
mobileNumber?: Prisma.SortOrder
|
mobileNumber?: Prisma.SortOrder
|
||||||
address?: Prisma.SortOrderInput | Prisma.SortOrder
|
address?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
city?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
state?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
country?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
isActive?: Prisma.SortOrder
|
isActive?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
orders?: Prisma.OrderOrderByRelationAggregateInput
|
|
||||||
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
salesInvoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.CustomerOrderByRelevanceInput
|
_relevance?: Prisma.CustomerOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
@@ -315,15 +284,10 @@ export type CustomerWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
lastName?: Prisma.StringFilter<"Customer"> | string
|
lastName?: Prisma.StringFilter<"Customer"> | string
|
||||||
email?: Prisma.StringNullableFilter<"Customer"> | string | null
|
email?: Prisma.StringNullableFilter<"Customer"> | string | null
|
||||||
address?: Prisma.StringNullableFilter<"Customer"> | string | null
|
address?: Prisma.StringNullableFilter<"Customer"> | string | null
|
||||||
city?: Prisma.StringNullableFilter<"Customer"> | string | null
|
|
||||||
state?: Prisma.StringNullableFilter<"Customer"> | string | null
|
|
||||||
country?: Prisma.StringNullableFilter<"Customer"> | string | null
|
|
||||||
isActive?: Prisma.BoolFilter<"Customer"> | boolean
|
isActive?: Prisma.BoolFilter<"Customer"> | boolean
|
||||||
createdAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
||||||
orders?: Prisma.OrderListRelationFilter
|
|
||||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
salesInvoices?: Prisma.SalesInvoiceListRelationFilter
|
||||||
}, "id" | "mobileNumber">
|
}, "id" | "mobileNumber">
|
||||||
|
|
||||||
@@ -334,9 +298,6 @@ export type CustomerOrderByWithAggregationInput = {
|
|||||||
email?: Prisma.SortOrderInput | Prisma.SortOrder
|
email?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
mobileNumber?: Prisma.SortOrder
|
mobileNumber?: Prisma.SortOrder
|
||||||
address?: Prisma.SortOrderInput | Prisma.SortOrder
|
address?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
city?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
state?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
country?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
isActive?: Prisma.SortOrder
|
isActive?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
@@ -358,9 +319,6 @@ export type CustomerScalarWhereWithAggregatesInput = {
|
|||||||
email?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null
|
email?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null
|
||||||
mobileNumber?: Prisma.StringWithAggregatesFilter<"Customer"> | string
|
mobileNumber?: Prisma.StringWithAggregatesFilter<"Customer"> | string
|
||||||
address?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null
|
address?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null
|
||||||
city?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null
|
|
||||||
state?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null
|
|
||||||
country?: Prisma.StringNullableWithAggregatesFilter<"Customer"> | string | null
|
|
||||||
isActive?: Prisma.BoolWithAggregatesFilter<"Customer"> | boolean
|
isActive?: Prisma.BoolWithAggregatesFilter<"Customer"> | boolean
|
||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string
|
||||||
@@ -373,15 +331,10 @@ export type CustomerCreateInput = {
|
|||||||
email?: string | null
|
email?: string | null
|
||||||
mobileNumber: string
|
mobileNumber: string
|
||||||
address?: string | null
|
address?: string | null
|
||||||
city?: string | null
|
|
||||||
state?: string | null
|
|
||||||
country?: string | null
|
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput
|
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -392,15 +345,10 @@ export type CustomerUncheckedCreateInput = {
|
|||||||
email?: string | null
|
email?: string | null
|
||||||
mobileNumber: string
|
mobileNumber: string
|
||||||
address?: string | null
|
address?: string | null
|
||||||
city?: string | null
|
|
||||||
state?: string | null
|
|
||||||
country?: string | null
|
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput
|
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -410,15 +358,10 @@ export type CustomerUpdateInput = {
|
|||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput
|
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,15 +372,10 @@ export type CustomerUncheckedUpdateInput = {
|
|||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput
|
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -448,9 +386,6 @@ export type CustomerCreateManyInput = {
|
|||||||
email?: string | null
|
email?: string | null
|
||||||
mobileNumber: string
|
mobileNumber: string
|
||||||
address?: string | null
|
address?: string | null
|
||||||
city?: string | null
|
|
||||||
state?: string | null
|
|
||||||
country?: string | null
|
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
@@ -463,9 +398,6 @@ export type CustomerUpdateManyMutationInput = {
|
|||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -479,20 +411,12 @@ export type CustomerUncheckedUpdateManyInput = {
|
|||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerNullableScalarRelationFilter = {
|
|
||||||
is?: Prisma.CustomerWhereInput | null
|
|
||||||
isNot?: Prisma.CustomerWhereInput | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerOrderByRelevanceInput = {
|
export type CustomerOrderByRelevanceInput = {
|
||||||
fields: Prisma.CustomerOrderByRelevanceFieldEnum | Prisma.CustomerOrderByRelevanceFieldEnum[]
|
fields: Prisma.CustomerOrderByRelevanceFieldEnum | Prisma.CustomerOrderByRelevanceFieldEnum[]
|
||||||
sort: Prisma.SortOrder
|
sort: Prisma.SortOrder
|
||||||
@@ -506,9 +430,6 @@ export type CustomerCountOrderByAggregateInput = {
|
|||||||
email?: Prisma.SortOrder
|
email?: Prisma.SortOrder
|
||||||
mobileNumber?: Prisma.SortOrder
|
mobileNumber?: Prisma.SortOrder
|
||||||
address?: Prisma.SortOrder
|
address?: Prisma.SortOrder
|
||||||
city?: Prisma.SortOrder
|
|
||||||
state?: Prisma.SortOrder
|
|
||||||
country?: Prisma.SortOrder
|
|
||||||
isActive?: Prisma.SortOrder
|
isActive?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
@@ -526,9 +447,6 @@ export type CustomerMaxOrderByAggregateInput = {
|
|||||||
email?: Prisma.SortOrder
|
email?: Prisma.SortOrder
|
||||||
mobileNumber?: Prisma.SortOrder
|
mobileNumber?: Prisma.SortOrder
|
||||||
address?: Prisma.SortOrder
|
address?: Prisma.SortOrder
|
||||||
city?: Prisma.SortOrder
|
|
||||||
state?: Prisma.SortOrder
|
|
||||||
country?: Prisma.SortOrder
|
|
||||||
isActive?: Prisma.SortOrder
|
isActive?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
@@ -542,9 +460,6 @@ export type CustomerMinOrderByAggregateInput = {
|
|||||||
email?: Prisma.SortOrder
|
email?: Prisma.SortOrder
|
||||||
mobileNumber?: Prisma.SortOrder
|
mobileNumber?: Prisma.SortOrder
|
||||||
address?: Prisma.SortOrder
|
address?: Prisma.SortOrder
|
||||||
city?: Prisma.SortOrder
|
|
||||||
state?: Prisma.SortOrder
|
|
||||||
country?: Prisma.SortOrder
|
|
||||||
isActive?: Prisma.SortOrder
|
isActive?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
@@ -555,20 +470,13 @@ export type CustomerSumOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerCreateNestedOneWithoutOrdersInput = {
|
export type CustomerNullableScalarRelationFilter = {
|
||||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutOrdersInput, Prisma.CustomerUncheckedCreateWithoutOrdersInput>
|
is?: Prisma.CustomerWhereInput | null
|
||||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput
|
isNot?: Prisma.CustomerWhereInput | null
|
||||||
connect?: Prisma.CustomerWhereUniqueInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerUpdateOneWithoutOrdersNestedInput = {
|
export type BoolFieldUpdateOperationsInput = {
|
||||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutOrdersInput, Prisma.CustomerUncheckedCreateWithoutOrdersInput>
|
set?: boolean
|
||||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput
|
|
||||||
upsert?: Prisma.CustomerUpsertWithoutOrdersInput
|
|
||||||
disconnect?: Prisma.CustomerWhereInput | boolean
|
|
||||||
delete?: Prisma.CustomerWhereInput | boolean
|
|
||||||
connect?: Prisma.CustomerWhereUniqueInput
|
|
||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutOrdersInput, Prisma.CustomerUpdateWithoutOrdersInput>, Prisma.CustomerUncheckedUpdateWithoutOrdersInput>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerCreateNestedOneWithoutSalesInvoicesInput = {
|
export type CustomerCreateNestedOneWithoutSalesInvoicesInput = {
|
||||||
@@ -587,123 +495,16 @@ export type CustomerUpdateOneWithoutSalesInvoicesNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutSalesInvoicesInput, Prisma.CustomerUpdateWithoutSalesInvoicesInput>, Prisma.CustomerUncheckedUpdateWithoutSalesInvoicesInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutSalesInvoicesInput, Prisma.CustomerUpdateWithoutSalesInvoicesInput>, Prisma.CustomerUncheckedUpdateWithoutSalesInvoicesInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerCreateNestedOneWithoutStockMovementsInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutStockMovementsInput, Prisma.CustomerUncheckedCreateWithoutStockMovementsInput>
|
|
||||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutStockMovementsInput
|
|
||||||
connect?: Prisma.CustomerWhereUniqueInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUpdateOneWithoutStockMovementsNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutStockMovementsInput, Prisma.CustomerUncheckedCreateWithoutStockMovementsInput>
|
|
||||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutStockMovementsInput
|
|
||||||
upsert?: Prisma.CustomerUpsertWithoutStockMovementsInput
|
|
||||||
disconnect?: Prisma.CustomerWhereInput | boolean
|
|
||||||
delete?: Prisma.CustomerWhereInput | boolean
|
|
||||||
connect?: Prisma.CustomerWhereUniqueInput
|
|
||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutStockMovementsInput, Prisma.CustomerUpdateWithoutStockMovementsInput>, Prisma.CustomerUncheckedUpdateWithoutStockMovementsInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerCreateWithoutOrdersInput = {
|
|
||||||
firstName: string
|
|
||||||
lastName: string
|
|
||||||
email?: string | null
|
|
||||||
mobileNumber: string
|
|
||||||
address?: string | null
|
|
||||||
city?: string | null
|
|
||||||
state?: string | null
|
|
||||||
country?: string | null
|
|
||||||
isActive?: boolean
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
deletedAt?: Date | string | null
|
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUncheckedCreateWithoutOrdersInput = {
|
|
||||||
id?: number
|
|
||||||
firstName: string
|
|
||||||
lastName: string
|
|
||||||
email?: string | null
|
|
||||||
mobileNumber: string
|
|
||||||
address?: string | null
|
|
||||||
city?: string | null
|
|
||||||
state?: string | null
|
|
||||||
country?: string | null
|
|
||||||
isActive?: boolean
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
deletedAt?: Date | string | null
|
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerCreateOrConnectWithoutOrdersInput = {
|
|
||||||
where: Prisma.CustomerWhereUniqueInput
|
|
||||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutOrdersInput, Prisma.CustomerUncheckedCreateWithoutOrdersInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUpsertWithoutOrdersInput = {
|
|
||||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutOrdersInput, Prisma.CustomerUncheckedUpdateWithoutOrdersInput>
|
|
||||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutOrdersInput, Prisma.CustomerUncheckedCreateWithoutOrdersInput>
|
|
||||||
where?: Prisma.CustomerWhereInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUpdateToOneWithWhereWithoutOrdersInput = {
|
|
||||||
where?: Prisma.CustomerWhereInput
|
|
||||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutOrdersInput, Prisma.CustomerUncheckedUpdateWithoutOrdersInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUpdateWithoutOrdersInput = {
|
|
||||||
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUncheckedUpdateWithoutOrdersInput = {
|
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerCreateWithoutSalesInvoicesInput = {
|
export type CustomerCreateWithoutSalesInvoicesInput = {
|
||||||
firstName: string
|
firstName: string
|
||||||
lastName: string
|
lastName: string
|
||||||
email?: string | null
|
email?: string | null
|
||||||
mobileNumber: string
|
mobileNumber: string
|
||||||
address?: string | null
|
address?: string | null
|
||||||
city?: string | null
|
|
||||||
state?: string | null
|
|
||||||
country?: string | null
|
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput
|
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutCustomerInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerUncheckedCreateWithoutSalesInvoicesInput = {
|
export type CustomerUncheckedCreateWithoutSalesInvoicesInput = {
|
||||||
@@ -713,15 +514,10 @@ export type CustomerUncheckedCreateWithoutSalesInvoicesInput = {
|
|||||||
email?: string | null
|
email?: string | null
|
||||||
mobileNumber: string
|
mobileNumber: string
|
||||||
address?: string | null
|
address?: string | null
|
||||||
city?: string | null
|
|
||||||
state?: string | null
|
|
||||||
country?: string | null
|
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput
|
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCustomerInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerCreateOrConnectWithoutSalesInvoicesInput = {
|
export type CustomerCreateOrConnectWithoutSalesInvoicesInput = {
|
||||||
@@ -746,15 +542,10 @@ export type CustomerUpdateWithoutSalesInvoicesInput = {
|
|||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput
|
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutCustomerNestedInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerUncheckedUpdateWithoutSalesInvoicesInput = {
|
export type CustomerUncheckedUpdateWithoutSalesInvoicesInput = {
|
||||||
@@ -764,101 +555,10 @@ export type CustomerUncheckedUpdateWithoutSalesInvoicesInput = {
|
|||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput
|
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCustomerNestedInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerCreateWithoutStockMovementsInput = {
|
|
||||||
firstName: string
|
|
||||||
lastName: string
|
|
||||||
email?: string | null
|
|
||||||
mobileNumber: string
|
|
||||||
address?: string | null
|
|
||||||
city?: string | null
|
|
||||||
state?: string | null
|
|
||||||
country?: string | null
|
|
||||||
isActive?: boolean
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
deletedAt?: Date | string | null
|
|
||||||
orders?: Prisma.OrderCreateNestedManyWithoutCustomerInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUncheckedCreateWithoutStockMovementsInput = {
|
|
||||||
id?: number
|
|
||||||
firstName: string
|
|
||||||
lastName: string
|
|
||||||
email?: string | null
|
|
||||||
mobileNumber: string
|
|
||||||
address?: string | null
|
|
||||||
city?: string | null
|
|
||||||
state?: string | null
|
|
||||||
country?: string | null
|
|
||||||
isActive?: boolean
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
deletedAt?: Date | string | null
|
|
||||||
orders?: Prisma.OrderUncheckedCreateNestedManyWithoutCustomerInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerCreateOrConnectWithoutStockMovementsInput = {
|
|
||||||
where: Prisma.CustomerWhereUniqueInput
|
|
||||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutStockMovementsInput, Prisma.CustomerUncheckedCreateWithoutStockMovementsInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUpsertWithoutStockMovementsInput = {
|
|
||||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutStockMovementsInput, Prisma.CustomerUncheckedUpdateWithoutStockMovementsInput>
|
|
||||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutStockMovementsInput, Prisma.CustomerUncheckedCreateWithoutStockMovementsInput>
|
|
||||||
where?: Prisma.CustomerWhereInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUpdateToOneWithWhereWithoutStockMovementsInput = {
|
|
||||||
where?: Prisma.CustomerWhereInput
|
|
||||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutStockMovementsInput, Prisma.CustomerUncheckedUpdateWithoutStockMovementsInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUpdateWithoutStockMovementsInput = {
|
|
||||||
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
||||||
orders?: Prisma.OrderUpdateManyWithoutCustomerNestedInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerUncheckedUpdateWithoutStockMovementsInput = {
|
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
mobileNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
city?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
state?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
country?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
|
||||||
orders?: Prisma.OrderUncheckedUpdateManyWithoutCustomerNestedInput
|
|
||||||
salesInvoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -867,14 +567,10 @@ export type CustomerUncheckedUpdateWithoutStockMovementsInput = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export type CustomerCountOutputType = {
|
export type CustomerCountOutputType = {
|
||||||
orders: number
|
|
||||||
stockMovements: number
|
|
||||||
salesInvoices: number
|
salesInvoices: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type CustomerCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
orders?: boolean | CustomerCountOutputTypeCountOrdersArgs
|
|
||||||
stockMovements?: boolean | CustomerCountOutputTypeCountStockMovementsArgs
|
|
||||||
salesInvoices?: boolean | CustomerCountOutputTypeCountSalesInvoicesArgs
|
salesInvoices?: boolean | CustomerCountOutputTypeCountSalesInvoicesArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -888,20 +584,6 @@ export type CustomerCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Ext
|
|||||||
select?: Prisma.CustomerCountOutputTypeSelect<ExtArgs> | null
|
select?: Prisma.CustomerCountOutputTypeSelect<ExtArgs> | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* CustomerCountOutputType without action
|
|
||||||
*/
|
|
||||||
export type CustomerCountOutputTypeCountOrdersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
where?: Prisma.OrderWhereInput
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* CustomerCountOutputType without action
|
|
||||||
*/
|
|
||||||
export type CustomerCountOutputTypeCountStockMovementsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
where?: Prisma.StockMovementWhereInput
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* CustomerCountOutputType without action
|
* CustomerCountOutputType without action
|
||||||
*/
|
*/
|
||||||
@@ -917,15 +599,10 @@ export type CustomerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
|||||||
email?: boolean
|
email?: boolean
|
||||||
mobileNumber?: boolean
|
mobileNumber?: boolean
|
||||||
address?: boolean
|
address?: boolean
|
||||||
city?: boolean
|
|
||||||
state?: boolean
|
|
||||||
country?: boolean
|
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
deletedAt?: boolean
|
deletedAt?: boolean
|
||||||
orders?: boolean | Prisma.Customer$ordersArgs<ExtArgs>
|
|
||||||
stockMovements?: boolean | Prisma.Customer$stockMovementsArgs<ExtArgs>
|
|
||||||
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
|
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["customer"]>
|
}, ExtArgs["result"]["customer"]>
|
||||||
@@ -939,19 +616,14 @@ export type CustomerSelectScalar = {
|
|||||||
email?: boolean
|
email?: boolean
|
||||||
mobileNumber?: boolean
|
mobileNumber?: boolean
|
||||||
address?: boolean
|
address?: boolean
|
||||||
city?: boolean
|
|
||||||
state?: boolean
|
|
||||||
country?: boolean
|
|
||||||
isActive?: boolean
|
isActive?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
deletedAt?: boolean
|
deletedAt?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "firstName" | "lastName" | "email" | "mobileNumber" | "address" | "city" | "state" | "country" | "isActive" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["customer"]>
|
export type CustomerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "firstName" | "lastName" | "email" | "mobileNumber" | "address" | "isActive" | "createdAt" | "updatedAt" | "deletedAt", ExtArgs["result"]["customer"]>
|
||||||
export type CustomerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type CustomerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
orders?: boolean | Prisma.Customer$ordersArgs<ExtArgs>
|
|
||||||
stockMovements?: boolean | Prisma.Customer$stockMovementsArgs<ExtArgs>
|
|
||||||
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
|
salesInvoices?: boolean | Prisma.Customer$salesInvoicesArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
@@ -959,8 +631,6 @@ export type CustomerInclude<ExtArgs extends runtime.Types.Extensions.InternalArg
|
|||||||
export type $CustomerPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $CustomerPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "Customer"
|
name: "Customer"
|
||||||
objects: {
|
objects: {
|
||||||
orders: Prisma.$OrderPayload<ExtArgs>[]
|
|
||||||
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
|
||||||
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
salesInvoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
@@ -970,9 +640,6 @@ export type $CustomerPayload<ExtArgs extends runtime.Types.Extensions.InternalAr
|
|||||||
email: string | null
|
email: string | null
|
||||||
mobileNumber: string
|
mobileNumber: string
|
||||||
address: string | null
|
address: string | null
|
||||||
city: string | null
|
|
||||||
state: string | null
|
|
||||||
country: string | null
|
|
||||||
isActive: boolean
|
isActive: boolean
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
@@ -1317,8 +984,6 @@ readonly fields: CustomerFieldRefs;
|
|||||||
*/
|
*/
|
||||||
export interface Prisma__CustomerClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__CustomerClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||||
orders<T extends Prisma.Customer$ordersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$ordersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrderPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
|
||||||
stockMovements<T extends Prisma.Customer$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
|
||||||
salesInvoices<T extends Prisma.Customer$salesInvoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$salesInvoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
salesInvoices<T extends Prisma.Customer$salesInvoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$salesInvoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
/**
|
/**
|
||||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||||
@@ -1355,9 +1020,6 @@ export interface CustomerFieldRefs {
|
|||||||
readonly email: Prisma.FieldRef<"Customer", 'String'>
|
readonly email: Prisma.FieldRef<"Customer", 'String'>
|
||||||
readonly mobileNumber: Prisma.FieldRef<"Customer", 'String'>
|
readonly mobileNumber: Prisma.FieldRef<"Customer", 'String'>
|
||||||
readonly address: Prisma.FieldRef<"Customer", 'String'>
|
readonly address: Prisma.FieldRef<"Customer", 'String'>
|
||||||
readonly city: Prisma.FieldRef<"Customer", 'String'>
|
|
||||||
readonly state: Prisma.FieldRef<"Customer", 'String'>
|
|
||||||
readonly country: Prisma.FieldRef<"Customer", 'String'>
|
|
||||||
readonly isActive: Prisma.FieldRef<"Customer", 'Boolean'>
|
readonly isActive: Prisma.FieldRef<"Customer", 'Boolean'>
|
||||||
readonly createdAt: Prisma.FieldRef<"Customer", 'DateTime'>
|
readonly createdAt: Prisma.FieldRef<"Customer", 'DateTime'>
|
||||||
readonly updatedAt: Prisma.FieldRef<"Customer", 'DateTime'>
|
readonly updatedAt: Prisma.FieldRef<"Customer", 'DateTime'>
|
||||||
@@ -1704,54 +1366,6 @@ export type CustomerDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Inte
|
|||||||
limit?: number
|
limit?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Customer.orders
|
|
||||||
*/
|
|
||||||
export type Customer$ordersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the Order
|
|
||||||
*/
|
|
||||||
select?: Prisma.OrderSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the Order
|
|
||||||
*/
|
|
||||||
omit?: Prisma.OrderOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Choose, which related nodes to fetch as well
|
|
||||||
*/
|
|
||||||
include?: Prisma.OrderInclude<ExtArgs> | null
|
|
||||||
where?: Prisma.OrderWhereInput
|
|
||||||
orderBy?: Prisma.OrderOrderByWithRelationInput | Prisma.OrderOrderByWithRelationInput[]
|
|
||||||
cursor?: Prisma.OrderWhereUniqueInput
|
|
||||||
take?: number
|
|
||||||
skip?: number
|
|
||||||
distinct?: Prisma.OrderScalarFieldEnum | Prisma.OrderScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Customer.stockMovements
|
|
||||||
*/
|
|
||||||
export type Customer$stockMovementsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the StockMovement
|
|
||||||
*/
|
|
||||||
select?: Prisma.StockMovementSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the StockMovement
|
|
||||||
*/
|
|
||||||
omit?: Prisma.StockMovementOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Choose, which related nodes to fetch as well
|
|
||||||
*/
|
|
||||||
include?: Prisma.StockMovementInclude<ExtArgs> | null
|
|
||||||
where?: Prisma.StockMovementWhereInput
|
|
||||||
orderBy?: Prisma.StockMovementOrderByWithRelationInput | Prisma.StockMovementOrderByWithRelationInput[]
|
|
||||||
cursor?: Prisma.StockMovementWhereUniqueInput
|
|
||||||
take?: number
|
|
||||||
skip?: number
|
|
||||||
distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Customer.salesInvoices
|
* Customer.salesInvoices
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -30,14 +30,12 @@ export type SalesInvoiceAvgAggregateOutputType = {
|
|||||||
id: number | null
|
id: number | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
customerId: number | null
|
customerId: number | null
|
||||||
posAccountId: number | null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceSumAggregateOutputType = {
|
export type SalesInvoiceSumAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
customerId: number | null
|
customerId: number | null
|
||||||
posAccountId: number | null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceMinAggregateOutputType = {
|
export type SalesInvoiceMinAggregateOutputType = {
|
||||||
@@ -48,7 +46,6 @@ export type SalesInvoiceMinAggregateOutputType = {
|
|||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
customerId: number | null
|
customerId: number | null
|
||||||
posAccountId: number | null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceMaxAggregateOutputType = {
|
export type SalesInvoiceMaxAggregateOutputType = {
|
||||||
@@ -59,7 +56,6 @@ export type SalesInvoiceMaxAggregateOutputType = {
|
|||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
customerId: number | null
|
customerId: number | null
|
||||||
posAccountId: number | null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCountAggregateOutputType = {
|
export type SalesInvoiceCountAggregateOutputType = {
|
||||||
@@ -70,7 +66,6 @@ export type SalesInvoiceCountAggregateOutputType = {
|
|||||||
createdAt: number
|
createdAt: number
|
||||||
updatedAt: number
|
updatedAt: number
|
||||||
customerId: number
|
customerId: number
|
||||||
posAccountId: number
|
|
||||||
_all: number
|
_all: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -79,14 +74,12 @@ export type SalesInvoiceAvgAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
customerId?: true
|
customerId?: true
|
||||||
posAccountId?: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceSumAggregateInputType = {
|
export type SalesInvoiceSumAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
customerId?: true
|
customerId?: true
|
||||||
posAccountId?: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceMinAggregateInputType = {
|
export type SalesInvoiceMinAggregateInputType = {
|
||||||
@@ -97,7 +90,6 @@ export type SalesInvoiceMinAggregateInputType = {
|
|||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
customerId?: true
|
customerId?: true
|
||||||
posAccountId?: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceMaxAggregateInputType = {
|
export type SalesInvoiceMaxAggregateInputType = {
|
||||||
@@ -108,7 +100,6 @@ export type SalesInvoiceMaxAggregateInputType = {
|
|||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
customerId?: true
|
customerId?: true
|
||||||
posAccountId?: true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCountAggregateInputType = {
|
export type SalesInvoiceCountAggregateInputType = {
|
||||||
@@ -119,7 +110,6 @@ export type SalesInvoiceCountAggregateInputType = {
|
|||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
customerId?: true
|
customerId?: true
|
||||||
posAccountId?: true
|
|
||||||
_all?: true
|
_all?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -217,7 +207,6 @@ export type SalesInvoiceGroupByOutputType = {
|
|||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
customerId: number | null
|
customerId: number | null
|
||||||
posAccountId: number
|
|
||||||
_count: SalesInvoiceCountAggregateOutputType | null
|
_count: SalesInvoiceCountAggregateOutputType | null
|
||||||
_avg: SalesInvoiceAvgAggregateOutputType | null
|
_avg: SalesInvoiceAvgAggregateOutputType | null
|
||||||
_sum: SalesInvoiceSumAggregateOutputType | null
|
_sum: SalesInvoiceSumAggregateOutputType | null
|
||||||
@@ -251,9 +240,7 @@ export type SalesInvoiceWhereInput = {
|
|||||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
||||||
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
|
||||||
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||||
posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
|
|
||||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter
|
||||||
}
|
}
|
||||||
@@ -266,9 +253,7 @@ export type SalesInvoiceOrderByWithRelationInput = {
|
|||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
posAccountId?: Prisma.SortOrder
|
|
||||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||||
posAccount?: Prisma.PosAccountOrderByWithRelationInput
|
|
||||||
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentOrderByRelationAggregateInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
|
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
|
||||||
@@ -285,9 +270,7 @@ export type SalesInvoiceWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
||||||
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
|
||||||
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||||
posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
|
|
||||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter
|
||||||
}, "id" | "code">
|
}, "id" | "code">
|
||||||
@@ -300,7 +283,6 @@ export type SalesInvoiceOrderByWithAggregationInput = {
|
|||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
posAccountId?: Prisma.SortOrder
|
|
||||||
_count?: Prisma.SalesInvoiceCountOrderByAggregateInput
|
_count?: Prisma.SalesInvoiceCountOrderByAggregateInput
|
||||||
_avg?: Prisma.SalesInvoiceAvgOrderByAggregateInput
|
_avg?: Prisma.SalesInvoiceAvgOrderByAggregateInput
|
||||||
_max?: Prisma.SalesInvoiceMaxOrderByAggregateInput
|
_max?: Prisma.SalesInvoiceMaxOrderByAggregateInput
|
||||||
@@ -319,7 +301,6 @@ export type SalesInvoiceScalarWhereWithAggregatesInput = {
|
|||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoice"> | Date | string
|
||||||
customerId?: Prisma.IntNullableWithAggregatesFilter<"SalesInvoice"> | number | null
|
customerId?: Prisma.IntNullableWithAggregatesFilter<"SalesInvoice"> | number | null
|
||||||
posAccountId?: Prisma.IntWithAggregatesFilter<"SalesInvoice"> | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateInput = {
|
export type SalesInvoiceCreateInput = {
|
||||||
@@ -329,7 +310,6 @@ export type SalesInvoiceCreateInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
@@ -342,7 +322,6 @@ export type SalesInvoiceUncheckedCreateInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customerId?: number | null
|
customerId?: number | null
|
||||||
posAccountId: number
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
@@ -354,7 +333,6 @@ export type SalesInvoiceUpdateInput = {
|
|||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
@@ -367,7 +345,6 @@ export type SalesInvoiceUncheckedUpdateInput = {
|
|||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
@@ -380,7 +357,6 @@ export type SalesInvoiceCreateManyInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customerId?: number | null
|
customerId?: number | null
|
||||||
posAccountId: number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUpdateManyMutationInput = {
|
export type SalesInvoiceUpdateManyMutationInput = {
|
||||||
@@ -399,7 +375,6 @@ export type SalesInvoiceUncheckedUpdateManyInput = {
|
|||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceListRelationFilter = {
|
export type SalesInvoiceListRelationFilter = {
|
||||||
@@ -426,14 +401,12 @@ export type SalesInvoiceCountOrderByAggregateInput = {
|
|||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
customerId?: Prisma.SortOrder
|
customerId?: Prisma.SortOrder
|
||||||
posAccountId?: Prisma.SortOrder
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceAvgOrderByAggregateInput = {
|
export type SalesInvoiceAvgOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
customerId?: Prisma.SortOrder
|
customerId?: Prisma.SortOrder
|
||||||
posAccountId?: Prisma.SortOrder
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceMaxOrderByAggregateInput = {
|
export type SalesInvoiceMaxOrderByAggregateInput = {
|
||||||
@@ -444,7 +417,6 @@ export type SalesInvoiceMaxOrderByAggregateInput = {
|
|||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
customerId?: Prisma.SortOrder
|
customerId?: Prisma.SortOrder
|
||||||
posAccountId?: Prisma.SortOrder
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceMinOrderByAggregateInput = {
|
export type SalesInvoiceMinOrderByAggregateInput = {
|
||||||
@@ -455,14 +427,12 @@ export type SalesInvoiceMinOrderByAggregateInput = {
|
|||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
customerId?: Prisma.SortOrder
|
customerId?: Prisma.SortOrder
|
||||||
posAccountId?: Prisma.SortOrder
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceSumOrderByAggregateInput = {
|
export type SalesInvoiceSumOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
customerId?: Prisma.SortOrder
|
customerId?: Prisma.SortOrder
|
||||||
posAccountId?: Prisma.SortOrder
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceScalarRelationFilter = {
|
export type SalesInvoiceScalarRelationFilter = {
|
||||||
@@ -470,48 +440,6 @@ export type SalesInvoiceScalarRelationFilter = {
|
|||||||
isNot?: Prisma.SalesInvoiceWhereInput
|
isNot?: Prisma.SalesInvoiceWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateNestedManyWithoutPosAccountInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
|
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateNestedManyWithoutPosAccountInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
|
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpdateManyWithoutPosAccountNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
|
|
||||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
|
|
||||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput[]
|
|
||||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput[]
|
|
||||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput> | Prisma.SalesInvoiceCreateWithoutPosAccountInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput | Prisma.SalesInvoiceCreateOrConnectWithoutPosAccountInput[]
|
|
||||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceCreateManyPosAccountInputEnvelope
|
|
||||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput[]
|
|
||||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput[]
|
|
||||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateNestedManyWithoutCustomerInput = {
|
export type SalesInvoiceCreateNestedManyWithoutCustomerInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
||||||
@@ -582,76 +510,12 @@ export type SalesInvoiceUpdateOneRequiredWithoutSalesInvoicePaymentsNestedInput
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateWithoutPosAccountInput = {
|
|
||||||
code: string
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: string | null
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutPosAccountInput = {
|
|
||||||
id?: number
|
|
||||||
code: string
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: string | null
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
customerId?: number | null
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutPosAccountInput = {
|
|
||||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyPosAccountInputEnvelope = {
|
|
||||||
data: Prisma.SalesInvoiceCreateManyPosAccountInput | Prisma.SalesInvoiceCreateManyPosAccountInput[]
|
|
||||||
skipDuplicates?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpsertWithWhereUniqueWithoutPosAccountInput = {
|
|
||||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
|
||||||
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedUpdateWithoutPosAccountInput>
|
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedCreateWithoutPosAccountInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpdateWithWhereUniqueWithoutPosAccountInput = {
|
|
||||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutPosAccountInput, Prisma.SalesInvoiceUncheckedUpdateWithoutPosAccountInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpdateManyWithWhereWithoutPosAccountInput = {
|
|
||||||
where: Prisma.SalesInvoiceScalarWhereInput
|
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceScalarWhereInput = {
|
|
||||||
AND?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
|
||||||
OR?: Prisma.SalesInvoiceScalarWhereInput[]
|
|
||||||
NOT?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
|
||||||
id?: Prisma.IntFilter<"SalesInvoice"> | number
|
|
||||||
code?: Prisma.StringFilter<"SalesInvoice"> | string
|
|
||||||
totalAmount?: Prisma.DecimalFilter<"SalesInvoice"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
|
||||||
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
|
||||||
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateWithoutCustomerInput = {
|
export type SalesInvoiceCreateWithoutCustomerInput = {
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
@@ -663,7 +527,6 @@ export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
|||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
posAccountId: number
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
@@ -694,6 +557,19 @@ export type SalesInvoiceUpdateManyWithWhereWithoutCustomerInput = {
|
|||||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerInput>
|
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceScalarWhereInput = {
|
||||||
|
AND?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
|
OR?: Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
|
NOT?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
|
id?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||||
|
code?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||||
|
totalAmount?: Prisma.DecimalFilter<"SalesInvoice"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
|
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
||||||
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateWithoutItemsInput = {
|
export type SalesInvoiceCreateWithoutItemsInput = {
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
@@ -701,7 +577,6 @@ export type SalesInvoiceCreateWithoutItemsInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -713,7 +588,6 @@ export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customerId?: number | null
|
customerId?: number | null
|
||||||
posAccountId: number
|
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -740,7 +614,6 @@ export type SalesInvoiceUpdateWithoutItemsInput = {
|
|||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -752,7 +625,6 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
|||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -763,7 +635,6 @@ export type SalesInvoiceCreateWithoutSalesInvoicePaymentsInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -775,7 +646,6 @@ export type SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customerId?: number | null
|
customerId?: number | null
|
||||||
posAccountId: number
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -802,7 +672,6 @@ export type SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput = {
|
|||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -814,53 +683,9 @@ export type SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput = {
|
|||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyPosAccountInput = {
|
|
||||||
id?: number
|
|
||||||
code: string
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: string | null
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
customerId?: number | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpdateWithoutPosAccountInput = {
|
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutPosAccountInput = {
|
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput = {
|
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyCustomerInput = {
|
export type SalesInvoiceCreateManyCustomerInput = {
|
||||||
id?: number
|
id?: number
|
||||||
code: string
|
code: string
|
||||||
@@ -868,7 +693,6 @@ export type SalesInvoiceCreateManyCustomerInput = {
|
|||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
posAccountId: number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUpdateWithoutCustomerInput = {
|
export type SalesInvoiceUpdateWithoutCustomerInput = {
|
||||||
@@ -877,7 +701,6 @@ export type SalesInvoiceUpdateWithoutCustomerInput = {
|
|||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
@@ -889,7 +712,6 @@ export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
|||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
@@ -901,7 +723,6 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
|||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -952,9 +773,7 @@ export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
|||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
customerId?: boolean
|
customerId?: boolean
|
||||||
posAccountId?: boolean
|
|
||||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||||
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
|
|
||||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||||
salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>
|
salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
@@ -970,13 +789,11 @@ export type SalesInvoiceSelectScalar = {
|
|||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
customerId?: boolean
|
customerId?: boolean
|
||||||
posAccountId?: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "customerId" | "posAccountId", ExtArgs["result"]["salesInvoice"]>
|
export type SalesInvoiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "customerId", ExtArgs["result"]["salesInvoice"]>
|
||||||
export type SalesInvoiceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SalesInvoiceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||||
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
|
|
||||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||||
salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>
|
salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
@@ -986,7 +803,6 @@ export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.Intern
|
|||||||
name: "SalesInvoice"
|
name: "SalesInvoice"
|
||||||
objects: {
|
objects: {
|
||||||
customer: Prisma.$CustomerPayload<ExtArgs> | null
|
customer: Prisma.$CustomerPayload<ExtArgs> | null
|
||||||
posAccount: Prisma.$PosAccountPayload<ExtArgs>
|
|
||||||
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||||
salesInvoicePayments: Prisma.$SalesInvoicePaymentPayload<ExtArgs>[]
|
salesInvoicePayments: Prisma.$SalesInvoicePaymentPayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
@@ -998,7 +814,6 @@ export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.Intern
|
|||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
customerId: number | null
|
customerId: number | null
|
||||||
posAccountId: number
|
|
||||||
}, ExtArgs["result"]["salesInvoice"]>
|
}, ExtArgs["result"]["salesInvoice"]>
|
||||||
composites: {}
|
composites: {}
|
||||||
}
|
}
|
||||||
@@ -1340,7 +1155,6 @@ readonly fields: SalesInvoiceFieldRefs;
|
|||||||
export interface Prisma__SalesInvoiceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__SalesInvoiceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||||
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||||
posAccount<T extends Prisma.PosAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PosAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__PosAccountClient<runtime.Types.Result.GetResult<Prisma.$PosAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
|
||||||
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
salesInvoicePayments<T extends Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
salesInvoicePayments<T extends Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
/**
|
/**
|
||||||
@@ -1379,7 +1193,6 @@ export interface SalesInvoiceFieldRefs {
|
|||||||
readonly createdAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'>
|
readonly createdAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'>
|
||||||
readonly updatedAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'>
|
readonly updatedAt: Prisma.FieldRef<"SalesInvoice", 'DateTime'>
|
||||||
readonly customerId: Prisma.FieldRef<"SalesInvoice", 'Int'>
|
readonly customerId: Prisma.FieldRef<"SalesInvoice", 'Int'>
|
||||||
readonly posAccountId: Prisma.FieldRef<"SalesInvoice", 'Int'>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ export type SalesInvoiceItemAvgAggregateOutputType = {
|
|||||||
unitPrice: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
invoiceId: number | null
|
invoiceId: number | null
|
||||||
productId: number | null
|
goodId: number | null
|
||||||
|
serviceId: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemSumAggregateOutputType = {
|
export type SalesInvoiceItemSumAggregateOutputType = {
|
||||||
@@ -41,7 +42,8 @@ export type SalesInvoiceItemSumAggregateOutputType = {
|
|||||||
unitPrice: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
invoiceId: number | null
|
invoiceId: number | null
|
||||||
productId: number | null
|
goodId: number | null
|
||||||
|
serviceId: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemMinAggregateOutputType = {
|
export type SalesInvoiceItemMinAggregateOutputType = {
|
||||||
@@ -51,7 +53,8 @@ export type SalesInvoiceItemMinAggregateOutputType = {
|
|||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
invoiceId: number | null
|
invoiceId: number | null
|
||||||
productId: number | null
|
goodId: number | null
|
||||||
|
serviceId: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemMaxAggregateOutputType = {
|
export type SalesInvoiceItemMaxAggregateOutputType = {
|
||||||
@@ -61,7 +64,8 @@ export type SalesInvoiceItemMaxAggregateOutputType = {
|
|||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
invoiceId: number | null
|
invoiceId: number | null
|
||||||
productId: number | null
|
goodId: number | null
|
||||||
|
serviceId: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCountAggregateOutputType = {
|
export type SalesInvoiceItemCountAggregateOutputType = {
|
||||||
@@ -71,7 +75,8 @@ export type SalesInvoiceItemCountAggregateOutputType = {
|
|||||||
totalAmount: number
|
totalAmount: number
|
||||||
createdAt: number
|
createdAt: number
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
goodId: number
|
||||||
|
serviceId: number
|
||||||
_all: number
|
_all: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -82,7 +87,8 @@ export type SalesInvoiceItemAvgAggregateInputType = {
|
|||||||
unitPrice?: true
|
unitPrice?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
goodId?: true
|
||||||
|
serviceId?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemSumAggregateInputType = {
|
export type SalesInvoiceItemSumAggregateInputType = {
|
||||||
@@ -91,7 +97,8 @@ export type SalesInvoiceItemSumAggregateInputType = {
|
|||||||
unitPrice?: true
|
unitPrice?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
goodId?: true
|
||||||
|
serviceId?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemMinAggregateInputType = {
|
export type SalesInvoiceItemMinAggregateInputType = {
|
||||||
@@ -101,7 +108,8 @@ export type SalesInvoiceItemMinAggregateInputType = {
|
|||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
goodId?: true
|
||||||
|
serviceId?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemMaxAggregateInputType = {
|
export type SalesInvoiceItemMaxAggregateInputType = {
|
||||||
@@ -111,7 +119,8 @@ export type SalesInvoiceItemMaxAggregateInputType = {
|
|||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
goodId?: true
|
||||||
|
serviceId?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCountAggregateInputType = {
|
export type SalesInvoiceItemCountAggregateInputType = {
|
||||||
@@ -121,7 +130,8 @@ export type SalesInvoiceItemCountAggregateInputType = {
|
|||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
goodId?: true
|
||||||
|
serviceId?: true
|
||||||
_all?: true
|
_all?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,7 +228,8 @@ export type SalesInvoiceItemGroupByOutputType = {
|
|||||||
totalAmount: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
goodId: number
|
||||||
|
serviceId: number
|
||||||
_count: SalesInvoiceItemCountAggregateOutputType | null
|
_count: SalesInvoiceItemCountAggregateOutputType | null
|
||||||
_avg: SalesInvoiceItemAvgAggregateOutputType | null
|
_avg: SalesInvoiceItemAvgAggregateOutputType | null
|
||||||
_sum: SalesInvoiceItemSumAggregateOutputType | null
|
_sum: SalesInvoiceItemSumAggregateOutputType | null
|
||||||
@@ -251,9 +262,11 @@ export type SalesInvoiceItemWhereInput = {
|
|||||||
totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
goodId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
|
serviceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||||
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
good?: Prisma.XOR<Prisma.GoodNullableScalarRelationFilter, Prisma.GoodWhereInput> | null
|
||||||
|
service?: Prisma.XOR<Prisma.ServiceNullableScalarRelationFilter, Prisma.ServiceWhereInput> | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemOrderByWithRelationInput = {
|
export type SalesInvoiceItemOrderByWithRelationInput = {
|
||||||
@@ -263,9 +276,11 @@ export type SalesInvoiceItemOrderByWithRelationInput = {
|
|||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
goodId?: Prisma.SortOrder
|
||||||
|
serviceId?: Prisma.SortOrder
|
||||||
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
||||||
product?: Prisma.ProductOrderByWithRelationInput
|
good?: Prisma.GoodOrderByWithRelationInput
|
||||||
|
service?: Prisma.ServiceOrderByWithRelationInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{
|
export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{
|
||||||
@@ -278,9 +293,11 @@ export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
goodId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
|
serviceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||||
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
good?: Prisma.XOR<Prisma.GoodNullableScalarRelationFilter, Prisma.GoodWhereInput> | null
|
||||||
|
service?: Prisma.XOR<Prisma.ServiceNullableScalarRelationFilter, Prisma.ServiceWhereInput> | null
|
||||||
}, "id">
|
}, "id">
|
||||||
|
|
||||||
export type SalesInvoiceItemOrderByWithAggregationInput = {
|
export type SalesInvoiceItemOrderByWithAggregationInput = {
|
||||||
@@ -290,7 +307,8 @@ export type SalesInvoiceItemOrderByWithAggregationInput = {
|
|||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
goodId?: Prisma.SortOrder
|
||||||
|
serviceId?: Prisma.SortOrder
|
||||||
_count?: Prisma.SalesInvoiceItemCountOrderByAggregateInput
|
_count?: Prisma.SalesInvoiceItemCountOrderByAggregateInput
|
||||||
_avg?: Prisma.SalesInvoiceItemAvgOrderByAggregateInput
|
_avg?: Prisma.SalesInvoiceItemAvgOrderByAggregateInput
|
||||||
_max?: Prisma.SalesInvoiceItemMaxOrderByAggregateInput
|
_max?: Prisma.SalesInvoiceItemMaxOrderByAggregateInput
|
||||||
@@ -308,7 +326,8 @@ export type SalesInvoiceItemScalarWhereWithAggregatesInput = {
|
|||||||
totalAmount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoiceItem"> | Date | string
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoiceItem"> | Date | string
|
||||||
invoiceId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
invoiceId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
||||||
productId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
goodId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
||||||
|
serviceId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateInput = {
|
export type SalesInvoiceItemCreateInput = {
|
||||||
@@ -317,7 +336,8 @@ export type SalesInvoiceItemCreateInput = {
|
|||||||
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
product: Prisma.ProductCreateNestedOneWithoutSalesInvoiceItemsInput
|
good?: Prisma.GoodCreateNestedOneWithoutSalesInvoiceItemsInput
|
||||||
|
service?: Prisma.ServiceCreateNestedOneWithoutSalesInvoiceItemsInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedCreateInput = {
|
export type SalesInvoiceItemUncheckedCreateInput = {
|
||||||
@@ -327,7 +347,8 @@ export type SalesInvoiceItemUncheckedCreateInput = {
|
|||||||
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
goodId: number
|
||||||
|
serviceId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateInput = {
|
export type SalesInvoiceItemUpdateInput = {
|
||||||
@@ -336,7 +357,8 @@ export type SalesInvoiceItemUpdateInput = {
|
|||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
product?: Prisma.ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput
|
good?: Prisma.GoodUpdateOneWithoutSalesInvoiceItemsNestedInput
|
||||||
|
service?: Prisma.ServiceUpdateOneWithoutSalesInvoiceItemsNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateInput = {
|
export type SalesInvoiceItemUncheckedUpdateInput = {
|
||||||
@@ -346,7 +368,8 @@ export type SalesInvoiceItemUncheckedUpdateInput = {
|
|||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
goodId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
serviceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyInput = {
|
export type SalesInvoiceItemCreateManyInput = {
|
||||||
@@ -356,7 +379,8 @@ export type SalesInvoiceItemCreateManyInput = {
|
|||||||
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
goodId: number
|
||||||
|
serviceId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateManyMutationInput = {
|
export type SalesInvoiceItemUpdateManyMutationInput = {
|
||||||
@@ -373,7 +397,8 @@ export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
|||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
goodId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
serviceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemListRelationFilter = {
|
export type SalesInvoiceItemListRelationFilter = {
|
||||||
@@ -393,7 +418,8 @@ export type SalesInvoiceItemCountOrderByAggregateInput = {
|
|||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
goodId?: Prisma.SortOrder
|
||||||
|
serviceId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemAvgOrderByAggregateInput = {
|
export type SalesInvoiceItemAvgOrderByAggregateInput = {
|
||||||
@@ -402,7 +428,8 @@ export type SalesInvoiceItemAvgOrderByAggregateInput = {
|
|||||||
unitPrice?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
goodId?: Prisma.SortOrder
|
||||||
|
serviceId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
||||||
@@ -412,7 +439,8 @@ export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
|||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
goodId?: Prisma.SortOrder
|
||||||
|
serviceId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemMinOrderByAggregateInput = {
|
export type SalesInvoiceItemMinOrderByAggregateInput = {
|
||||||
@@ -422,7 +450,8 @@ export type SalesInvoiceItemMinOrderByAggregateInput = {
|
|||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
goodId?: Prisma.SortOrder
|
||||||
|
serviceId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemSumOrderByAggregateInput = {
|
export type SalesInvoiceItemSumOrderByAggregateInput = {
|
||||||
@@ -431,48 +460,49 @@ export type SalesInvoiceItemSumOrderByAggregateInput = {
|
|||||||
unitPrice?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
goodId?: Prisma.SortOrder
|
||||||
|
serviceId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateNestedManyWithoutProductInput = {
|
export type SalesInvoiceItemCreateNestedManyWithoutGoodInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutGoodInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput> | Prisma.SalesInvoiceItemCreateWithoutGoodInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput[]
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput[]
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
createMany?: Prisma.SalesInvoiceItemCreateManyGoodInputEnvelope
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput = {
|
export type SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutGoodInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput> | Prisma.SalesInvoiceItemCreateWithoutGoodInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput[]
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput[]
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
createMany?: Prisma.SalesInvoiceItemCreateManyGoodInputEnvelope
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateManyWithoutProductNestedInput = {
|
export type SalesInvoiceItemUpdateManyWithoutGoodNestedInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutGoodInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput> | Prisma.SalesInvoiceItemCreateWithoutGoodInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput[]
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput[]
|
||||||
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[]
|
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput[]
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
createMany?: Prisma.SalesInvoiceItemCreateManyGoodInputEnvelope
|
||||||
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput[]
|
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput[]
|
||||||
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput[]
|
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput[]
|
||||||
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput = {
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutGoodInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput> | Prisma.SalesInvoiceItemCreateWithoutGoodInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput[]
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutGoodInput[]
|
||||||
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[]
|
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput[]
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
createMany?: Prisma.SalesInvoiceItemCreateManyGoodInputEnvelope
|
||||||
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput[]
|
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput[]
|
||||||
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput[]
|
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput[]
|
||||||
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -518,47 +548,91 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput = {
|
|||||||
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateWithoutProductInput = {
|
export type SalesInvoiceItemCreateNestedManyWithoutServiceInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput> | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[]
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceItemCreateManyServiceInputEnvelope
|
||||||
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedCreateNestedManyWithoutServiceInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput> | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[]
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceItemCreateManyServiceInputEnvelope
|
||||||
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpdateManyWithoutServiceNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput> | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[]
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[]
|
||||||
|
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceItemCreateManyServiceInputEnvelope
|
||||||
|
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput[]
|
||||||
|
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput[]
|
||||||
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput> | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[]
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[]
|
||||||
|
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceItemCreateManyServiceInputEnvelope
|
||||||
|
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput[]
|
||||||
|
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput[]
|
||||||
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemCreateWithoutGoodInput = {
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
|
service?: Prisma.ServiceCreateNestedOneWithoutSalesInvoiceItemsInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedCreateWithoutProductInput = {
|
export type SalesInvoiceItemUncheckedCreateWithoutGoodInput = {
|
||||||
id?: number
|
id?: number
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
|
serviceId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateOrConnectWithoutProductInput = {
|
export type SalesInvoiceItemCreateOrConnectWithoutGoodInput = {
|
||||||
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput>
|
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutGoodInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyProductInputEnvelope = {
|
export type SalesInvoiceItemCreateManyGoodInputEnvelope = {
|
||||||
data: Prisma.SalesInvoiceItemCreateManyProductInput | Prisma.SalesInvoiceItemCreateManyProductInput[]
|
data: Prisma.SalesInvoiceItemCreateManyGoodInput | Prisma.SalesInvoiceItemCreateManyGoodInput[]
|
||||||
skipDuplicates?: boolean
|
skipDuplicates?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput = {
|
export type SalesInvoiceItemUpsertWithWhereUniqueWithoutGoodInput = {
|
||||||
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
update: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutProductInput>
|
update: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutGoodInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutGoodInput>
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput>
|
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutGoodInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutGoodInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput = {
|
export type SalesInvoiceItemUpdateWithWhereUniqueWithoutGoodInput = {
|
||||||
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutProductInput>
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutGoodInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutGoodInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateManyWithWhereWithoutProductInput = {
|
export type SalesInvoiceItemUpdateManyWithWhereWithoutGoodInput = {
|
||||||
where: Prisma.SalesInvoiceItemScalarWhereInput
|
where: Prisma.SalesInvoiceItemScalarWhereInput
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductInput>
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemScalarWhereInput = {
|
export type SalesInvoiceItemScalarWhereInput = {
|
||||||
@@ -571,7 +645,8 @@ export type SalesInvoiceItemScalarWhereInput = {
|
|||||||
totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
goodId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
|
serviceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
||||||
@@ -579,7 +654,8 @@ export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
|||||||
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
product: Prisma.ProductCreateNestedOneWithoutSalesInvoiceItemsInput
|
good?: Prisma.GoodCreateNestedOneWithoutSalesInvoiceItemsInput
|
||||||
|
service?: Prisma.ServiceCreateNestedOneWithoutSalesInvoiceItemsInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = {
|
export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = {
|
||||||
@@ -588,7 +664,8 @@ export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = {
|
|||||||
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
productId: number
|
goodId: number
|
||||||
|
serviceId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateOrConnectWithoutInvoiceInput = {
|
export type SalesInvoiceItemCreateOrConnectWithoutInvoiceInput = {
|
||||||
@@ -617,39 +694,88 @@ export type SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput = {
|
|||||||
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput>
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyProductInput = {
|
export type SalesInvoiceItemCreateWithoutServiceInput = {
|
||||||
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
|
good?: Prisma.GoodCreateNestedOneWithoutSalesInvoiceItemsInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedCreateWithoutServiceInput = {
|
||||||
id?: number
|
id?: number
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
|
goodId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateWithoutProductInput = {
|
export type SalesInvoiceItemCreateOrConnectWithoutServiceInput = {
|
||||||
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemCreateManyServiceInputEnvelope = {
|
||||||
|
data: Prisma.SalesInvoiceItemCreateManyServiceInput | Prisma.SalesInvoiceItemCreateManyServiceInput[]
|
||||||
|
skipDuplicates?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpsertWithWhereUniqueWithoutServiceInput = {
|
||||||
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
|
update: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutServiceInput>
|
||||||
|
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpdateWithWhereUniqueWithoutServiceInput = {
|
||||||
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutServiceInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpdateManyWithWhereWithoutServiceInput = {
|
||||||
|
where: Prisma.SalesInvoiceItemScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemCreateManyGoodInput = {
|
||||||
|
id?: number
|
||||||
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
invoiceId: number
|
||||||
|
serviceId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpdateWithoutGoodInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
|
service?: Prisma.ServiceUpdateOneWithoutSalesInvoiceItemsNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateWithoutProductInput = {
|
export type SalesInvoiceItemUncheckedUpdateWithoutGoodInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
serviceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutProductInput = {
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutGoodInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
serviceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyInvoiceInput = {
|
export type SalesInvoiceItemCreateManyInvoiceInput = {
|
||||||
@@ -658,7 +784,8 @@ export type SalesInvoiceItemCreateManyInvoiceInput = {
|
|||||||
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
productId: number
|
goodId: number
|
||||||
|
serviceId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
||||||
@@ -666,7 +793,8 @@ export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
|||||||
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
product?: Prisma.ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput
|
good?: Prisma.GoodUpdateOneWithoutSalesInvoiceItemsNestedInput
|
||||||
|
service?: Prisma.ServiceUpdateOneWithoutSalesInvoiceItemsNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = {
|
export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = {
|
||||||
@@ -675,7 +803,8 @@ export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = {
|
|||||||
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
goodId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
serviceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
||||||
@@ -684,7 +813,47 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
|||||||
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
goodId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
serviceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemCreateManyServiceInput = {
|
||||||
|
id?: number
|
||||||
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
invoiceId: number
|
||||||
|
goodId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpdateWithoutServiceInput = {
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
|
good?: Prisma.GoodUpdateOneWithoutSalesInvoiceItemsNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedUpdateWithoutServiceInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
goodId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
goodId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -696,9 +865,11 @@ export type SalesInvoiceItemSelect<ExtArgs extends runtime.Types.Extensions.Inte
|
|||||||
totalAmount?: boolean
|
totalAmount?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
invoiceId?: boolean
|
invoiceId?: boolean
|
||||||
productId?: boolean
|
goodId?: boolean
|
||||||
|
serviceId?: boolean
|
||||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||||
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
good?: boolean | Prisma.SalesInvoiceItem$goodArgs<ExtArgs>
|
||||||
|
service?: boolean | Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["salesInvoiceItem"]>
|
}, ExtArgs["result"]["salesInvoiceItem"]>
|
||||||
|
|
||||||
|
|
||||||
@@ -710,20 +881,23 @@ export type SalesInvoiceItemSelectScalar = {
|
|||||||
totalAmount?: boolean
|
totalAmount?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
invoiceId?: boolean
|
invoiceId?: boolean
|
||||||
productId?: boolean
|
goodId?: boolean
|
||||||
|
serviceId?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "unitPrice" | "totalAmount" | "createdAt" | "invoiceId" | "productId", ExtArgs["result"]["salesInvoiceItem"]>
|
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "unitPrice" | "totalAmount" | "createdAt" | "invoiceId" | "goodId" | "serviceId", ExtArgs["result"]["salesInvoiceItem"]>
|
||||||
export type SalesInvoiceItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SalesInvoiceItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||||
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
good?: boolean | Prisma.SalesInvoiceItem$goodArgs<ExtArgs>
|
||||||
|
service?: boolean | Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "SalesInvoiceItem"
|
name: "SalesInvoiceItem"
|
||||||
objects: {
|
objects: {
|
||||||
invoice: Prisma.$SalesInvoicePayload<ExtArgs>
|
invoice: Prisma.$SalesInvoicePayload<ExtArgs>
|
||||||
product: Prisma.$ProductPayload<ExtArgs>
|
good: Prisma.$GoodPayload<ExtArgs> | null
|
||||||
|
service: Prisma.$ServicePayload<ExtArgs> | null
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
@@ -732,7 +906,8 @@ export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.In
|
|||||||
totalAmount: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
goodId: number
|
||||||
|
serviceId: number
|
||||||
}, ExtArgs["result"]["salesInvoiceItem"]>
|
}, ExtArgs["result"]["salesInvoiceItem"]>
|
||||||
composites: {}
|
composites: {}
|
||||||
}
|
}
|
||||||
@@ -1074,7 +1249,8 @@ readonly fields: SalesInvoiceItemFieldRefs;
|
|||||||
export interface Prisma__SalesInvoiceItemClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__SalesInvoiceItemClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||||
invoice<T extends Prisma.SalesInvoiceDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceDefaultArgs<ExtArgs>>): Prisma.Prisma__SalesInvoiceClient<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
invoice<T extends Prisma.SalesInvoiceDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceDefaultArgs<ExtArgs>>): Prisma.Prisma__SalesInvoiceClient<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||||
product<T extends Prisma.ProductDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ProductDefaultArgs<ExtArgs>>): Prisma.Prisma__ProductClient<runtime.Types.Result.GetResult<Prisma.$ProductPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
good<T extends Prisma.SalesInvoiceItem$goodArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceItem$goodArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||||
|
service<T extends Prisma.SalesInvoiceItem$serviceArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>>): Prisma.Prisma__ServiceClient<runtime.Types.Result.GetResult<Prisma.$ServicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||||
/**
|
/**
|
||||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||||
@@ -1110,7 +1286,8 @@ export interface SalesInvoiceItemFieldRefs {
|
|||||||
readonly totalAmount: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
readonly totalAmount: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
||||||
readonly createdAt: Prisma.FieldRef<"SalesInvoiceItem", 'DateTime'>
|
readonly createdAt: Prisma.FieldRef<"SalesInvoiceItem", 'DateTime'>
|
||||||
readonly invoiceId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
readonly invoiceId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
||||||
readonly productId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
readonly goodId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
||||||
|
readonly serviceId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1453,6 +1630,44 @@ export type SalesInvoiceItemDeleteManyArgs<ExtArgs extends runtime.Types.Extensi
|
|||||||
limit?: number
|
limit?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SalesInvoiceItem.good
|
||||||
|
*/
|
||||||
|
export type SalesInvoiceItem$goodArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the Good
|
||||||
|
*/
|
||||||
|
select?: Prisma.GoodSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the Good
|
||||||
|
*/
|
||||||
|
omit?: Prisma.GoodOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.GoodInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.GoodWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SalesInvoiceItem.service
|
||||||
|
*/
|
||||||
|
export type SalesInvoiceItem$serviceArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the Service
|
||||||
|
*/
|
||||||
|
select?: Prisma.ServiceSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the Service
|
||||||
|
*/
|
||||||
|
omit?: Prisma.ServiceOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.ServiceInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.ServiceWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SalesInvoiceItem without action
|
* SalesInvoiceItem without action
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -434,6 +434,10 @@ export type SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput = {
|
|||||||
deleteMany?: Prisma.SalesInvoicePaymentScalarWhereInput | Prisma.SalesInvoicePaymentScalarWhereInput[]
|
deleteMany?: Prisma.SalesInvoicePaymentScalarWhereInput | Prisma.SalesInvoicePaymentScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumPaymentMethodTypeFieldUpdateOperationsInput = {
|
||||||
|
set?: $Enums.PaymentMethodType
|
||||||
|
}
|
||||||
|
|
||||||
export type SalesInvoicePaymentCreateWithoutInvoiceInput = {
|
export type SalesInvoicePaymentCreateWithoutInvoiceInput = {
|
||||||
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
amount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
paymentMethod: $Enums.PaymentMethodType
|
paymentMethod: $Enums.PaymentMethodType
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,719 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* This file exports the `StockAvailableView` model and its related types.
|
|
||||||
*
|
|
||||||
* 🟢 You can import this file directly.
|
|
||||||
*/
|
|
||||||
import type * as runtime from "@prisma/client/runtime/client"
|
|
||||||
import type * as $Enums from "../enums.js"
|
|
||||||
import type * as Prisma from "../internal/prismaNamespace.js"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model StockAvailableView
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type StockAvailableViewModel = runtime.Types.Result.DefaultSelection<Prisma.$StockAvailableViewPayload>
|
|
||||||
|
|
||||||
export type AggregateStockAvailableView = {
|
|
||||||
_count: StockAvailableViewCountAggregateOutputType | null
|
|
||||||
_avg: StockAvailableViewAvgAggregateOutputType | null
|
|
||||||
_sum: StockAvailableViewSumAggregateOutputType | null
|
|
||||||
_min: StockAvailableViewMinAggregateOutputType | null
|
|
||||||
_max: StockAvailableViewMaxAggregateOutputType | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewAvgAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
physicalQuantity: runtime.Decimal | null
|
|
||||||
reservedQuantity: runtime.Decimal | null
|
|
||||||
availableQuantity: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewSumAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
physicalQuantity: runtime.Decimal | null
|
|
||||||
reservedQuantity: runtime.Decimal | null
|
|
||||||
availableQuantity: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewMinAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
physicalQuantity: runtime.Decimal | null
|
|
||||||
reservedQuantity: runtime.Decimal | null
|
|
||||||
availableQuantity: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewMaxAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
physicalQuantity: runtime.Decimal | null
|
|
||||||
reservedQuantity: runtime.Decimal | null
|
|
||||||
availableQuantity: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewCountAggregateOutputType = {
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
physicalQuantity: number
|
|
||||||
reservedQuantity: number
|
|
||||||
availableQuantity: number
|
|
||||||
_all: number
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export type StockAvailableViewAvgAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
physicalQuantity?: true
|
|
||||||
reservedQuantity?: true
|
|
||||||
availableQuantity?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewSumAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
physicalQuantity?: true
|
|
||||||
reservedQuantity?: true
|
|
||||||
availableQuantity?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewMinAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
physicalQuantity?: true
|
|
||||||
reservedQuantity?: true
|
|
||||||
availableQuantity?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewMaxAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
physicalQuantity?: true
|
|
||||||
reservedQuantity?: true
|
|
||||||
availableQuantity?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewCountAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
physicalQuantity?: true
|
|
||||||
reservedQuantity?: true
|
|
||||||
availableQuantity?: true
|
|
||||||
_all?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Filter which StockAvailableView to aggregate.
|
|
||||||
*/
|
|
||||||
where?: Prisma.StockAvailableViewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of StockAvailableViews to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.StockAvailableViewOrderByWithRelationInput | Prisma.StockAvailableViewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` StockAvailableViews from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` StockAvailableViews.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Count returned StockAvailableViews
|
|
||||||
**/
|
|
||||||
_count?: true | StockAvailableViewCountAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to average
|
|
||||||
**/
|
|
||||||
_avg?: StockAvailableViewAvgAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to sum
|
|
||||||
**/
|
|
||||||
_sum?: StockAvailableViewSumAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to find the minimum value
|
|
||||||
**/
|
|
||||||
_min?: StockAvailableViewMinAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to find the maximum value
|
|
||||||
**/
|
|
||||||
_max?: StockAvailableViewMaxAggregateInputType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type GetStockAvailableViewAggregateType<T extends StockAvailableViewAggregateArgs> = {
|
|
||||||
[P in keyof T & keyof AggregateStockAvailableView]: P extends '_count' | 'count'
|
|
||||||
? T[P] extends true
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T[P], AggregateStockAvailableView[P]>
|
|
||||||
: Prisma.GetScalarType<T[P], AggregateStockAvailableView[P]>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type StockAvailableViewGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
where?: Prisma.StockAvailableViewWhereInput
|
|
||||||
orderBy?: Prisma.StockAvailableViewOrderByWithAggregationInput | Prisma.StockAvailableViewOrderByWithAggregationInput[]
|
|
||||||
by: Prisma.StockAvailableViewScalarFieldEnum[] | Prisma.StockAvailableViewScalarFieldEnum
|
|
||||||
having?: Prisma.StockAvailableViewScalarWhereWithAggregatesInput
|
|
||||||
take?: number
|
|
||||||
skip?: number
|
|
||||||
_count?: StockAvailableViewCountAggregateInputType | true
|
|
||||||
_avg?: StockAvailableViewAvgAggregateInputType
|
|
||||||
_sum?: StockAvailableViewSumAggregateInputType
|
|
||||||
_min?: StockAvailableViewMinAggregateInputType
|
|
||||||
_max?: StockAvailableViewMaxAggregateInputType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewGroupByOutputType = {
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
physicalQuantity: runtime.Decimal
|
|
||||||
reservedQuantity: runtime.Decimal
|
|
||||||
availableQuantity: runtime.Decimal
|
|
||||||
_count: StockAvailableViewCountAggregateOutputType | null
|
|
||||||
_avg: StockAvailableViewAvgAggregateOutputType | null
|
|
||||||
_sum: StockAvailableViewSumAggregateOutputType | null
|
|
||||||
_min: StockAvailableViewMinAggregateOutputType | null
|
|
||||||
_max: StockAvailableViewMaxAggregateOutputType | null
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetStockAvailableViewGroupByPayload<T extends StockAvailableViewGroupByArgs> = Prisma.PrismaPromise<
|
|
||||||
Array<
|
|
||||||
Prisma.PickEnumerable<StockAvailableViewGroupByOutputType, T['by']> &
|
|
||||||
{
|
|
||||||
[P in ((keyof T) & (keyof StockAvailableViewGroupByOutputType))]: P extends '_count'
|
|
||||||
? T[P] extends boolean
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T[P], StockAvailableViewGroupByOutputType[P]>
|
|
||||||
: Prisma.GetScalarType<T[P], StockAvailableViewGroupByOutputType[P]>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type StockAvailableViewWhereInput = {
|
|
||||||
AND?: Prisma.StockAvailableViewWhereInput | Prisma.StockAvailableViewWhereInput[]
|
|
||||||
OR?: Prisma.StockAvailableViewWhereInput[]
|
|
||||||
NOT?: Prisma.StockAvailableViewWhereInput | Prisma.StockAvailableViewWhereInput[]
|
|
||||||
productId?: Prisma.IntFilter<"StockAvailableView"> | number
|
|
||||||
inventoryId?: Prisma.IntFilter<"StockAvailableView"> | number
|
|
||||||
physicalQuantity?: Prisma.DecimalFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
reservedQuantity?: Prisma.DecimalFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
availableQuantity?: Prisma.DecimalFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewOrderByWithRelationInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
physicalQuantity?: Prisma.SortOrder
|
|
||||||
reservedQuantity?: Prisma.SortOrder
|
|
||||||
availableQuantity?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewOrderByWithAggregationInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
physicalQuantity?: Prisma.SortOrder
|
|
||||||
reservedQuantity?: Prisma.SortOrder
|
|
||||||
availableQuantity?: Prisma.SortOrder
|
|
||||||
_count?: Prisma.StockAvailableViewCountOrderByAggregateInput
|
|
||||||
_avg?: Prisma.StockAvailableViewAvgOrderByAggregateInput
|
|
||||||
_max?: Prisma.StockAvailableViewMaxOrderByAggregateInput
|
|
||||||
_min?: Prisma.StockAvailableViewMinOrderByAggregateInput
|
|
||||||
_sum?: Prisma.StockAvailableViewSumOrderByAggregateInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewScalarWhereWithAggregatesInput = {
|
|
||||||
AND?: Prisma.StockAvailableViewScalarWhereWithAggregatesInput | Prisma.StockAvailableViewScalarWhereWithAggregatesInput[]
|
|
||||||
OR?: Prisma.StockAvailableViewScalarWhereWithAggregatesInput[]
|
|
||||||
NOT?: Prisma.StockAvailableViewScalarWhereWithAggregatesInput | Prisma.StockAvailableViewScalarWhereWithAggregatesInput[]
|
|
||||||
productId?: Prisma.IntWithAggregatesFilter<"StockAvailableView"> | number
|
|
||||||
inventoryId?: Prisma.IntWithAggregatesFilter<"StockAvailableView"> | number
|
|
||||||
physicalQuantity?: Prisma.DecimalWithAggregatesFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
reservedQuantity?: Prisma.DecimalWithAggregatesFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
availableQuantity?: Prisma.DecimalWithAggregatesFilter<"StockAvailableView"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewCountOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
physicalQuantity?: Prisma.SortOrder
|
|
||||||
reservedQuantity?: Prisma.SortOrder
|
|
||||||
availableQuantity?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewAvgOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
physicalQuantity?: Prisma.SortOrder
|
|
||||||
reservedQuantity?: Prisma.SortOrder
|
|
||||||
availableQuantity?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewMaxOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
physicalQuantity?: Prisma.SortOrder
|
|
||||||
reservedQuantity?: Prisma.SortOrder
|
|
||||||
availableQuantity?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewMinOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
physicalQuantity?: Prisma.SortOrder
|
|
||||||
reservedQuantity?: Prisma.SortOrder
|
|
||||||
availableQuantity?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewSumOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
physicalQuantity?: Prisma.SortOrder
|
|
||||||
reservedQuantity?: Prisma.SortOrder
|
|
||||||
availableQuantity?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type StockAvailableViewSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
||||||
productId?: boolean
|
|
||||||
inventoryId?: boolean
|
|
||||||
physicalQuantity?: boolean
|
|
||||||
reservedQuantity?: boolean
|
|
||||||
availableQuantity?: boolean
|
|
||||||
}, ExtArgs["result"]["stockAvailableView"]>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type StockAvailableViewSelectScalar = {
|
|
||||||
productId?: boolean
|
|
||||||
inventoryId?: boolean
|
|
||||||
physicalQuantity?: boolean
|
|
||||||
reservedQuantity?: boolean
|
|
||||||
availableQuantity?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"productId" | "inventoryId" | "physicalQuantity" | "reservedQuantity" | "availableQuantity", ExtArgs["result"]["stockAvailableView"]>
|
|
||||||
|
|
||||||
export type $StockAvailableViewPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
name: "StockAvailableView"
|
|
||||||
objects: {}
|
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
physicalQuantity: runtime.Decimal
|
|
||||||
reservedQuantity: runtime.Decimal
|
|
||||||
availableQuantity: runtime.Decimal
|
|
||||||
}, ExtArgs["result"]["stockAvailableView"]>
|
|
||||||
composites: {}
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAvailableViewGetPayload<S extends boolean | null | undefined | StockAvailableViewDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$StockAvailableViewPayload, S>
|
|
||||||
|
|
||||||
export type StockAvailableViewCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
|
|
||||||
Omit<StockAvailableViewFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
|
||||||
select?: StockAvailableViewCountAggregateInputType | true
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface StockAvailableViewDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
||||||
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['StockAvailableView'], meta: { name: 'StockAvailableView' } }
|
|
||||||
/**
|
|
||||||
* Find the first StockAvailableView that matches the filter.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {StockAvailableViewFindFirstArgs} args - Arguments to find a StockAvailableView
|
|
||||||
* @example
|
|
||||||
* // Get one StockAvailableView
|
|
||||||
* const stockAvailableView = await prisma.stockAvailableView.findFirst({
|
|
||||||
* where: {
|
|
||||||
* // ... provide filter here
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
findFirst<T extends StockAvailableViewFindFirstArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, StockAvailableViewFindFirstArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__StockAvailableViewClient<runtime.Types.Result.GetResult<Prisma.$StockAvailableViewPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the first StockAvailableView that matches the filter or
|
|
||||||
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {StockAvailableViewFindFirstOrThrowArgs} args - Arguments to find a StockAvailableView
|
|
||||||
* @example
|
|
||||||
* // Get one StockAvailableView
|
|
||||||
* const stockAvailableView = await prisma.stockAvailableView.findFirstOrThrow({
|
|
||||||
* where: {
|
|
||||||
* // ... provide filter here
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
findFirstOrThrow<T extends StockAvailableViewFindFirstOrThrowArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, StockAvailableViewFindFirstOrThrowArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__StockAvailableViewClient<runtime.Types.Result.GetResult<Prisma.$StockAvailableViewPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find zero or more StockAvailableViews that matches the filter.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {StockAvailableViewFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
||||||
* @example
|
|
||||||
* // Get all StockAvailableViews
|
|
||||||
* const stockAvailableViews = await prisma.stockAvailableView.findMany()
|
|
||||||
*
|
|
||||||
* // Get first 10 StockAvailableViews
|
|
||||||
* const stockAvailableViews = await prisma.stockAvailableView.findMany({ take: 10 })
|
|
||||||
*
|
|
||||||
* // Only select the `productId`
|
|
||||||
* const stockAvailableViewWithProductIdOnly = await prisma.stockAvailableView.findMany({ select: { productId: true } })
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
findMany<T extends StockAvailableViewFindManyArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, StockAvailableViewFindManyArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockAvailableViewPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Count the number of StockAvailableViews.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {StockAvailableViewCountArgs} args - Arguments to filter StockAvailableViews to count.
|
|
||||||
* @example
|
|
||||||
* // Count the number of StockAvailableViews
|
|
||||||
* const count = await prisma.stockAvailableView.count({
|
|
||||||
* where: {
|
|
||||||
* // ... the filter for the StockAvailableViews we want to count
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
**/
|
|
||||||
count<T extends StockAvailableViewCountArgs>(
|
|
||||||
args?: Prisma.Subset<T, StockAvailableViewCountArgs>,
|
|
||||||
): Prisma.PrismaPromise<
|
|
||||||
T extends runtime.Types.Utils.Record<'select', any>
|
|
||||||
? T['select'] extends true
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T['select'], StockAvailableViewCountAggregateOutputType>
|
|
||||||
: number
|
|
||||||
>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allows you to perform aggregations operations on a StockAvailableView.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {StockAvailableViewAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
|
|
||||||
* @example
|
|
||||||
* // Ordered by age ascending
|
|
||||||
* // Where email contains prisma.io
|
|
||||||
* // Limited to the 10 users
|
|
||||||
* const aggregations = await prisma.user.aggregate({
|
|
||||||
* _avg: {
|
|
||||||
* age: true,
|
|
||||||
* },
|
|
||||||
* where: {
|
|
||||||
* email: {
|
|
||||||
* contains: "prisma.io",
|
|
||||||
* },
|
|
||||||
* },
|
|
||||||
* orderBy: {
|
|
||||||
* age: "asc",
|
|
||||||
* },
|
|
||||||
* take: 10,
|
|
||||||
* })
|
|
||||||
**/
|
|
||||||
aggregate<T extends StockAvailableViewAggregateArgs>(args: Prisma.Subset<T, StockAvailableViewAggregateArgs>): Prisma.PrismaPromise<GetStockAvailableViewAggregateType<T>>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Group by StockAvailableView.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {StockAvailableViewGroupByArgs} args - Group by arguments.
|
|
||||||
* @example
|
|
||||||
* // Group by city, order by createdAt, get count
|
|
||||||
* const result = await prisma.user.groupBy({
|
|
||||||
* by: ['city', 'createdAt'],
|
|
||||||
* orderBy: {
|
|
||||||
* createdAt: true
|
|
||||||
* },
|
|
||||||
* _count: {
|
|
||||||
* _all: true
|
|
||||||
* },
|
|
||||||
* })
|
|
||||||
*
|
|
||||||
**/
|
|
||||||
groupBy<
|
|
||||||
T extends StockAvailableViewGroupByArgs,
|
|
||||||
HasSelectOrTake extends Prisma.Or<
|
|
||||||
Prisma.Extends<'skip', Prisma.Keys<T>>,
|
|
||||||
Prisma.Extends<'take', Prisma.Keys<T>>
|
|
||||||
>,
|
|
||||||
OrderByArg extends Prisma.True extends HasSelectOrTake
|
|
||||||
? { orderBy: StockAvailableViewGroupByArgs['orderBy'] }
|
|
||||||
: { orderBy?: StockAvailableViewGroupByArgs['orderBy'] },
|
|
||||||
OrderFields extends Prisma.ExcludeUnderscoreKeys<Prisma.Keys<Prisma.MaybeTupleToUnion<T['orderBy']>>>,
|
|
||||||
ByFields extends Prisma.MaybeTupleToUnion<T['by']>,
|
|
||||||
ByValid extends Prisma.Has<ByFields, OrderFields>,
|
|
||||||
HavingFields extends Prisma.GetHavingFields<T['having']>,
|
|
||||||
HavingValid extends Prisma.Has<ByFields, HavingFields>,
|
|
||||||
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<T>
|
|
||||||
? 'orderBy' extends Prisma.Keys<T>
|
|
||||||
? 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<T>
|
|
||||||
? 'orderBy' extends Prisma.Keys<T>
|
|
||||||
? 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<T, StockAvailableViewGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetStockAvailableViewGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
||||||
/**
|
|
||||||
* Fields of the StockAvailableView model
|
|
||||||
*/
|
|
||||||
readonly fields: StockAvailableViewFieldRefs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The delegate class that acts as a "Promise-like" for StockAvailableView.
|
|
||||||
* Why is this prefixed with `Prisma__`?
|
|
||||||
* Because we want to prevent naming conflicts as mentioned in
|
|
||||||
* https://github.com/prisma/prisma-client-js/issues/707
|
|
||||||
*/
|
|
||||||
export interface Prisma__StockAvailableViewClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
|
||||||
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<TResult1 = T, TResult2 = never>(onfulfilled?: ((value: T) => TResult1 | PromiseLike<TResult1>) | undefined | null, onrejected?: ((reason: any) => TResult2 | PromiseLike<TResult2>) | undefined | null): runtime.Types.Utils.JsPromise<TResult1 | TResult2>
|
|
||||||
/**
|
|
||||||
* 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<TResult = never>(onrejected?: ((reason: any) => TResult | PromiseLike<TResult>) | undefined | null): runtime.Types.Utils.JsPromise<T | TResult>
|
|
||||||
/**
|
|
||||||
* 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<T>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Fields of the StockAvailableView model
|
|
||||||
*/
|
|
||||||
export interface StockAvailableViewFieldRefs {
|
|
||||||
readonly productId: Prisma.FieldRef<"StockAvailableView", 'Int'>
|
|
||||||
readonly inventoryId: Prisma.FieldRef<"StockAvailableView", 'Int'>
|
|
||||||
readonly physicalQuantity: Prisma.FieldRef<"StockAvailableView", 'Decimal'>
|
|
||||||
readonly reservedQuantity: Prisma.FieldRef<"StockAvailableView", 'Decimal'>
|
|
||||||
readonly availableQuantity: Prisma.FieldRef<"StockAvailableView", 'Decimal'>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Custom InputTypes
|
|
||||||
/**
|
|
||||||
* StockAvailableView findFirst
|
|
||||||
*/
|
|
||||||
export type StockAvailableViewFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the StockAvailableView
|
|
||||||
*/
|
|
||||||
select?: Prisma.StockAvailableViewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the StockAvailableView
|
|
||||||
*/
|
|
||||||
omit?: Prisma.StockAvailableViewOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which StockAvailableView to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.StockAvailableViewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of StockAvailableViews to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.StockAvailableViewOrderByWithRelationInput | Prisma.StockAvailableViewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` StockAvailableViews from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` StockAvailableViews.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
||||||
*
|
|
||||||
* Filter by unique combinations of StockAvailableViews.
|
|
||||||
*/
|
|
||||||
distinct?: Prisma.StockAvailableViewScalarFieldEnum | Prisma.StockAvailableViewScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* StockAvailableView findFirstOrThrow
|
|
||||||
*/
|
|
||||||
export type StockAvailableViewFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the StockAvailableView
|
|
||||||
*/
|
|
||||||
select?: Prisma.StockAvailableViewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the StockAvailableView
|
|
||||||
*/
|
|
||||||
omit?: Prisma.StockAvailableViewOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which StockAvailableView to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.StockAvailableViewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of StockAvailableViews to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.StockAvailableViewOrderByWithRelationInput | Prisma.StockAvailableViewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` StockAvailableViews from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` StockAvailableViews.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
||||||
*
|
|
||||||
* Filter by unique combinations of StockAvailableViews.
|
|
||||||
*/
|
|
||||||
distinct?: Prisma.StockAvailableViewScalarFieldEnum | Prisma.StockAvailableViewScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* StockAvailableView findMany
|
|
||||||
*/
|
|
||||||
export type StockAvailableViewFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the StockAvailableView
|
|
||||||
*/
|
|
||||||
select?: Prisma.StockAvailableViewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the StockAvailableView
|
|
||||||
*/
|
|
||||||
omit?: Prisma.StockAvailableViewOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which StockAvailableViews to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.StockAvailableViewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of StockAvailableViews to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.StockAvailableViewOrderByWithRelationInput | Prisma.StockAvailableViewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` StockAvailableViews from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` StockAvailableViews.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
distinct?: Prisma.StockAvailableViewScalarFieldEnum | Prisma.StockAvailableViewScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* StockAvailableView without action
|
|
||||||
*/
|
|
||||||
export type StockAvailableViewDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the StockAvailableView
|
|
||||||
*/
|
|
||||||
select?: Prisma.StockAvailableViewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the StockAvailableView
|
|
||||||
*/
|
|
||||||
omit?: Prisma.StockAvailableViewOmit<ExtArgs> | null
|
|
||||||
}
|
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,20 +0,0 @@
|
|||||||
import { ApiProperty } from '@nestjs/swagger'
|
|
||||||
import { Type } from 'class-transformer'
|
|
||||||
import { IsInt, IsNumber } from 'class-validator'
|
|
||||||
|
|
||||||
export class CreateInventoryTransferItemDto {
|
|
||||||
@ApiProperty()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber()
|
|
||||||
count: number
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
productId: number
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
transferId: number
|
|
||||||
}
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
import { ApiPropertyOptional } from '@nestjs/swagger'
|
|
||||||
import { Type } from 'class-transformer'
|
|
||||||
import { IsInt, IsNumber, IsOptional } from 'class-validator'
|
|
||||||
|
|
||||||
export class UpdateInventoryTransferItemDto {
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber()
|
|
||||||
count?: number
|
|
||||||
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
productId?: number
|
|
||||||
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
transferId?: number
|
|
||||||
}
|
|
||||||
@@ -1,42 +0,0 @@
|
|||||||
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
|
|
||||||
import { CreateInventoryTransferItemDto } from './dto/create-inventory-transfer-item.dto'
|
|
||||||
import { UpdateInventoryTransferItemDto } from './dto/update-inventory-transfer-item.dto'
|
|
||||||
import { InventoryTransferItemsService } from './inventory-transfer-items.service'
|
|
||||||
|
|
||||||
@Controller('inventory-transfers/:transferId/items')
|
|
||||||
export class InventoryTransferItemsController {
|
|
||||||
constructor(private readonly service: InventoryTransferItemsService) {}
|
|
||||||
|
|
||||||
@Post()
|
|
||||||
create(
|
|
||||||
@Param('transferId') transferId: string,
|
|
||||||
@Body() dto: CreateInventoryTransferItemDto,
|
|
||||||
) {
|
|
||||||
// ensure transferId from route is used
|
|
||||||
return this.service.createForTransfer(Number(transferId), dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get()
|
|
||||||
findAll(@Param('transferId') transferId: string) {
|
|
||||||
return this.service.findAllForTransfer(Number(transferId))
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get(':id')
|
|
||||||
findOne(@Param('transferId') transferId: string, @Param('id') id: string) {
|
|
||||||
return this.service.findOneForTransfer(Number(transferId), Number(id))
|
|
||||||
}
|
|
||||||
|
|
||||||
@Patch(':id')
|
|
||||||
update(
|
|
||||||
@Param('transferId') transferId: string,
|
|
||||||
@Param('id') id: string,
|
|
||||||
@Body() dto: UpdateInventoryTransferItemDto,
|
|
||||||
) {
|
|
||||||
return this.service.updateForTransfer(Number(transferId), Number(id), dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Delete(':id')
|
|
||||||
remove(@Param('transferId') transferId: string, @Param('id') id: string) {
|
|
||||||
return this.service.removeForTransfer(Number(transferId), Number(id))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { Module } from '@nestjs/common'
|
|
||||||
import { PrismaModule } from '../prisma/prisma.module'
|
|
||||||
import { InventoryTransferItemsController } from './inventory-transfer-items.controller'
|
|
||||||
import { InventoryTransferItemsService } from './inventory-transfer-items.service'
|
|
||||||
|
|
||||||
@Module({
|
|
||||||
imports: [PrismaModule],
|
|
||||||
controllers: [InventoryTransferItemsController],
|
|
||||||
providers: [InventoryTransferItemsService],
|
|
||||||
})
|
|
||||||
export class InventoryTransferItemsModule {}
|
|
||||||
@@ -1,101 +0,0 @@
|
|||||||
import { Injectable } from '@nestjs/common'
|
|
||||||
import { ResponseMapper } from '../common/response/response-mapper'
|
|
||||||
import { PrismaService } from '../prisma/prisma.service'
|
|
||||||
import { CreateInventoryTransferItemDto } from './dto/create-inventory-transfer-item.dto'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class InventoryTransferItemsService {
|
|
||||||
constructor(private prisma: PrismaService) {}
|
|
||||||
|
|
||||||
async create(dto: CreateInventoryTransferItemDto) {
|
|
||||||
const payload: any = { ...dto }
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'productId')) {
|
|
||||||
payload.product = { connect: { id: Number(payload.productId) } }
|
|
||||||
delete payload.productId
|
|
||||||
}
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'transferId')) {
|
|
||||||
payload.transfer = { connect: { id: Number(payload.transferId) } }
|
|
||||||
delete payload.transferId
|
|
||||||
}
|
|
||||||
|
|
||||||
const item = await this.prisma.inventoryTransferItem.create({ data: payload })
|
|
||||||
return ResponseMapper.create(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findAll(transferId?: number) {
|
|
||||||
const where = transferId ? { transferId: Number(transferId) } : undefined
|
|
||||||
const items = await this.prisma.inventoryTransferItem.findMany({
|
|
||||||
where,
|
|
||||||
include: { product: true },
|
|
||||||
})
|
|
||||||
return ResponseMapper.list(items)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findOne(id: number) {
|
|
||||||
const item = await this.prisma.inventoryTransferItem.findUnique({
|
|
||||||
where: { id },
|
|
||||||
include: { product: true, transfer: true },
|
|
||||||
})
|
|
||||||
if (!item) return null
|
|
||||||
return ResponseMapper.single(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
// scoped helpers for nested routes
|
|
||||||
async createForTransfer(transferId: number, dto: CreateInventoryTransferItemDto) {
|
|
||||||
const payload: any = { ...dto, transferId }
|
|
||||||
return this.create(payload)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findAllForTransfer(transferId: number) {
|
|
||||||
return this.findAll(transferId)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findOneForTransfer(transferId: number, id: number) {
|
|
||||||
const item = await this.prisma.inventoryTransferItem.findFirst({
|
|
||||||
where: { id, transferId },
|
|
||||||
include: { product: true, transfer: true },
|
|
||||||
})
|
|
||||||
if (!item) return null
|
|
||||||
return ResponseMapper.single(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async update(id: number, data: any) {
|
|
||||||
const payload: any = { ...data }
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'productId')) {
|
|
||||||
payload.product = { connect: { id: Number(payload.productId) } }
|
|
||||||
delete payload.productId
|
|
||||||
}
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'transferId')) {
|
|
||||||
payload.transfer = { connect: { id: Number(payload.transferId) } }
|
|
||||||
delete payload.transferId
|
|
||||||
}
|
|
||||||
|
|
||||||
const item = await this.prisma.inventoryTransferItem.update({
|
|
||||||
where: { id },
|
|
||||||
data: payload,
|
|
||||||
})
|
|
||||||
return ResponseMapper.update(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async updateForTransfer(transferId: number, id: number, data: any) {
|
|
||||||
// ensure the item belongs to the transfer
|
|
||||||
const existing = await this.prisma.inventoryTransferItem.findFirst({
|
|
||||||
where: { id, transferId },
|
|
||||||
})
|
|
||||||
if (!existing) return null
|
|
||||||
return this.update(id, data)
|
|
||||||
}
|
|
||||||
|
|
||||||
async remove(id: number) {
|
|
||||||
const item = await this.prisma.inventoryTransferItem.delete({ where: { id } })
|
|
||||||
return ResponseMapper.single(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async removeForTransfer(transferId: number, id: number) {
|
|
||||||
const existing = await this.prisma.inventoryTransferItem.findFirst({
|
|
||||||
where: { id, transferId },
|
|
||||||
})
|
|
||||||
if (!existing) return null
|
|
||||||
return this.remove(id)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,30 +0,0 @@
|
|||||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
|
|
||||||
import { Type } from 'class-transformer'
|
|
||||||
import { ArrayMinSize, IsInt, IsOptional, IsString } from 'class-validator'
|
|
||||||
import { CreateInventoryTransferItemDto } from '../../inventory-transfer-items/dto/create-inventory-transfer-item.dto'
|
|
||||||
|
|
||||||
export class CreateInventoryTransferDto {
|
|
||||||
@ApiProperty()
|
|
||||||
@IsString()
|
|
||||||
code: string
|
|
||||||
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
description?: string
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
fromInventoryId: number
|
|
||||||
|
|
||||||
@ApiProperty()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
toInventoryId: number
|
|
||||||
|
|
||||||
@ApiProperty({ type: [CreateInventoryTransferItemDto] })
|
|
||||||
@Type(() => Array)
|
|
||||||
@ArrayMinSize(1)
|
|
||||||
items: Array<Omit<CreateInventoryTransferItemDto, 'transferId'>>
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import { ApiPropertyOptional } from '@nestjs/swagger'
|
|
||||||
import { Type } from 'class-transformer'
|
|
||||||
import { IsInt, IsOptional, IsString } from 'class-validator'
|
|
||||||
|
|
||||||
export class UpdateInventoryTransferDto {
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
code?: string
|
|
||||||
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
description?: string
|
|
||||||
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
fromInventoryId?: number | null
|
|
||||||
|
|
||||||
@ApiPropertyOptional()
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
toInventoryId?: number | null
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
|
|
||||||
import { CreateInventoryTransferDto } from './dto/create-inventory-transfer.dto'
|
|
||||||
import { UpdateInventoryTransferDto } from './dto/update-inventory-transfer.dto'
|
|
||||||
import { InventoryTransfersService } from './inventory-transfers.service'
|
|
||||||
|
|
||||||
@Controller('inventories/transfers')
|
|
||||||
export class InventoryTransfersController {
|
|
||||||
constructor(private readonly service: InventoryTransfersService) {}
|
|
||||||
|
|
||||||
@Post()
|
|
||||||
create(@Body() dto: CreateInventoryTransferDto) {
|
|
||||||
return this.service.create(dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get()
|
|
||||||
findAll() {
|
|
||||||
return this.service.findAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get(':id')
|
|
||||||
findOne(@Param('id') id: string) {
|
|
||||||
return this.service.findOne(Number(id))
|
|
||||||
}
|
|
||||||
|
|
||||||
@Patch(':id')
|
|
||||||
update(@Param('id') id: string, @Body() dto: UpdateInventoryTransferDto) {
|
|
||||||
return this.service.update(Number(id), dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Delete(':id')
|
|
||||||
remove(@Param('id') id: string) {
|
|
||||||
return this.service.remove(Number(id))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { Module } from '@nestjs/common'
|
|
||||||
import { PrismaModule } from '../prisma/prisma.module'
|
|
||||||
import { InventoryTransfersController } from './inventory-transfers.controller'
|
|
||||||
import { InventoryTransfersService } from './inventory-transfers.service'
|
|
||||||
|
|
||||||
@Module({
|
|
||||||
imports: [PrismaModule],
|
|
||||||
controllers: [InventoryTransfersController],
|
|
||||||
providers: [InventoryTransfersService],
|
|
||||||
})
|
|
||||||
export class InventoryTransfersModule {}
|
|
||||||
@@ -1,74 +0,0 @@
|
|||||||
import { Injectable } from '@nestjs/common'
|
|
||||||
import { ResponseMapper } from '../common/response/response-mapper'
|
|
||||||
import { PrismaService } from '../prisma/prisma.service'
|
|
||||||
import { CreateInventoryTransferDto } from './dto/create-inventory-transfer.dto'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class InventoryTransfersService {
|
|
||||||
constructor(private prisma: PrismaService) {}
|
|
||||||
|
|
||||||
async create(dto: CreateInventoryTransferDto) {
|
|
||||||
const payload: any = { ...dto }
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'fromInventoryId')) {
|
|
||||||
payload.fromInventory = { connect: { id: Number(payload.fromInventoryId) } }
|
|
||||||
delete payload.fromInventoryId
|
|
||||||
}
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'toInventoryId')) {
|
|
||||||
payload.toInventory = { connect: { id: Number(payload.toInventoryId) } }
|
|
||||||
delete payload.toInventoryId
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'items')) {
|
|
||||||
payload.items = {
|
|
||||||
create: payload.items.map((item: any) => ({
|
|
||||||
product: { connect: { id: Number(item.productId) } },
|
|
||||||
count: item.count,
|
|
||||||
})),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
const item = await this.prisma.inventoryTransfer.create({ data: payload })
|
|
||||||
return ResponseMapper.create(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findAll() {
|
|
||||||
const items = await this.prisma.inventoryTransfer.findMany({
|
|
||||||
include: { fromInventory: true, toInventory: true },
|
|
||||||
})
|
|
||||||
return ResponseMapper.list(items)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findOne(id: number) {
|
|
||||||
const item = await this.prisma.inventoryTransfer.findUnique({
|
|
||||||
where: { id },
|
|
||||||
include: { items: true, fromInventory: true, toInventory: true },
|
|
||||||
})
|
|
||||||
if (!item) return null
|
|
||||||
return ResponseMapper.single(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async update(id: number, data: any) {
|
|
||||||
const payload: any = { ...data }
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'fromInventoryId')) {
|
|
||||||
if (payload.fromInventoryId === null) payload.fromInventory = { disconnect: true }
|
|
||||||
else payload.fromInventory = { connect: { id: Number(payload.fromInventoryId) } }
|
|
||||||
delete payload.fromInventoryId
|
|
||||||
}
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'toInventoryId')) {
|
|
||||||
if (payload.toInventoryId === null) payload.toInventory = { disconnect: true }
|
|
||||||
else payload.toInventory = { connect: { id: Number(payload.toInventoryId) } }
|
|
||||||
delete payload.toInventoryId
|
|
||||||
}
|
|
||||||
|
|
||||||
const item = await this.prisma.inventoryTransfer.update({
|
|
||||||
where: { id },
|
|
||||||
data: payload,
|
|
||||||
})
|
|
||||||
return ResponseMapper.update(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async remove(id: number) {
|
|
||||||
const item = await this.prisma.inventoryTransfer.delete({ where: { id } })
|
|
||||||
return ResponseMapper.single(item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
|
|
||||||
import { BankAccountsService } from './bank-accounts.service'
|
|
||||||
import { CreateBankAccountDto } from './dto/create-bank-account.dto'
|
|
||||||
import { UpdateBankAccountDto } from './dto/update-bank-account.dto'
|
|
||||||
|
|
||||||
@Controller('bank-accounts')
|
|
||||||
export class BankAccountsController {
|
|
||||||
constructor(private readonly bankAccountsService: BankAccountsService) {}
|
|
||||||
|
|
||||||
@Post()
|
|
||||||
create(@Body() dto: CreateBankAccountDto) {
|
|
||||||
return this.bankAccountsService.create(dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get()
|
|
||||||
findAll() {
|
|
||||||
return this.bankAccountsService.findAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get(':id')
|
|
||||||
findOne(@Param('id') id: string) {
|
|
||||||
return this.bankAccountsService.findOne(Number(id))
|
|
||||||
}
|
|
||||||
|
|
||||||
@Patch(':id')
|
|
||||||
update(@Param('id') id: string, @Body() dto: UpdateBankAccountDto) {
|
|
||||||
return this.bankAccountsService.update(Number(id), dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Delete(':id')
|
|
||||||
remove(@Param('id') id: string) {
|
|
||||||
return this.bankAccountsService.remove(Number(id))
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get(':id/transactions')
|
|
||||||
getTransactions(@Param('id') id: string) {
|
|
||||||
return this.bankAccountsService.getTransactions(Number(id))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,13 +0,0 @@
|
|||||||
import { Module } from '@nestjs/common'
|
|
||||||
import { PrismaModule } from '../../prisma/prisma.module'
|
|
||||||
import { BankAccountsController } from './bank-accounts.controller'
|
|
||||||
import { BankAccountsService } from './bank-accounts.service'
|
|
||||||
import { BankAccountsWorkflow } from './bank-accounts.workflow'
|
|
||||||
|
|
||||||
@Module({
|
|
||||||
imports: [PrismaModule],
|
|
||||||
controllers: [BankAccountsController],
|
|
||||||
providers: [BankAccountsService, BankAccountsWorkflow],
|
|
||||||
exports: [BankAccountsWorkflow],
|
|
||||||
})
|
|
||||||
export class BankAccountsModule {}
|
|
||||||
@@ -1,153 +0,0 @@
|
|||||||
import { Injectable } from '@nestjs/common'
|
|
||||||
import { ResponseMapper } from '../../common/response/response-mapper'
|
|
||||||
import { BankTransactionRefType } from '../../generated/prisma/enums'
|
|
||||||
import { PrismaService } from '../../prisma/prisma.service'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class BankAccountsService {
|
|
||||||
constructor(private prisma: PrismaService) {}
|
|
||||||
|
|
||||||
private readonly bankAccountQuery = {
|
|
||||||
include: {
|
|
||||||
branch: {
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
name: true,
|
|
||||||
code: true,
|
|
||||||
bank: {
|
|
||||||
select: { id: true, name: true, shortName: true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
bankAccountTransactions: {
|
|
||||||
take: 1,
|
|
||||||
select: { id: true, createdAt: true, balanceAfter: true },
|
|
||||||
orderBy: { createdAt: 'desc' as const },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
omit: {
|
|
||||||
branchId: true,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
async create(data: any) {
|
|
||||||
const item = await this.prisma.bankAccount.create({ data })
|
|
||||||
return ResponseMapper.create(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findAll() {
|
|
||||||
const items = await this.prisma.bankAccount.findMany(this.bankAccountQuery)
|
|
||||||
const mappedData = items.map(({ bankAccountTransactions, ...rest }) => ({
|
|
||||||
...rest,
|
|
||||||
currentBalance: Number(bankAccountTransactions[0]?.balanceAfter || 0),
|
|
||||||
}))
|
|
||||||
|
|
||||||
return ResponseMapper.list(mappedData)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findOne(id: number) {
|
|
||||||
const item = await this.prisma.bankAccount.findUniqueOrThrow({
|
|
||||||
...this.bankAccountQuery,
|
|
||||||
where: { id },
|
|
||||||
})
|
|
||||||
|
|
||||||
const { bankAccountTransactions, ...rest } = item
|
|
||||||
return ResponseMapper.single({
|
|
||||||
...rest,
|
|
||||||
currentBalance: Number(bankAccountTransactions[0]?.balanceAfter || 0),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
async update(id: number, data: any) {
|
|
||||||
const item = await this.prisma.bankAccount.update({ where: { id }, data })
|
|
||||||
return ResponseMapper.update(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async remove(id: number) {
|
|
||||||
const item = await this.prisma.bankAccount.delete({ where: { id } })
|
|
||||||
return ResponseMapper.single(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async getTransactions(bankAccountId: number, page = 1, pageSize = 50) {
|
|
||||||
const query = {
|
|
||||||
where: { bankAccountId },
|
|
||||||
orderBy: { createdAt: 'desc' as const },
|
|
||||||
skip: (page - 1) * pageSize,
|
|
||||||
take: pageSize,
|
|
||||||
}
|
|
||||||
|
|
||||||
const [items, count] = await this.prisma.$transaction([
|
|
||||||
this.prisma.bankAccountTransaction.findMany({
|
|
||||||
...query,
|
|
||||||
omit: { bankAccountId: true },
|
|
||||||
}),
|
|
||||||
this.prisma.bankAccountTransaction.count({ where: { bankAccountId } }),
|
|
||||||
])
|
|
||||||
|
|
||||||
const PosReferenceIds = [] as number[]
|
|
||||||
const purchaseReferenceIds = [] as number[]
|
|
||||||
|
|
||||||
items.forEach(({ referenceType, referenceId }) => {
|
|
||||||
if (referenceId && referenceType) {
|
|
||||||
if (
|
|
||||||
referenceType === BankTransactionRefType.POS_SALE ||
|
|
||||||
referenceType === BankTransactionRefType.POS_REFUND
|
|
||||||
) {
|
|
||||||
PosReferenceIds.push(referenceId)
|
|
||||||
} else if (
|
|
||||||
referenceType === BankTransactionRefType.PURCHASE_PAYMENT ||
|
|
||||||
referenceType === BankTransactionRefType.PURCHASE_REFUND
|
|
||||||
) {
|
|
||||||
purchaseReferenceIds.push(referenceId)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
const posRecords = await this.prisma.salesInvoice.findMany({
|
|
||||||
where: { id: { in: PosReferenceIds } },
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
code: true,
|
|
||||||
totalAmount: true,
|
|
||||||
posAccount: {
|
|
||||||
select: { id: true, name: true },
|
|
||||||
},
|
|
||||||
customer: {
|
|
||||||
select: { id: true, firstName: true, lastName: true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const purchaseRecords = await this.prisma.purchaseReceipt.findMany({
|
|
||||||
where: { id: { in: purchaseReferenceIds } },
|
|
||||||
select: {
|
|
||||||
id: true,
|
|
||||||
code: true,
|
|
||||||
totalAmount: true,
|
|
||||||
supplier: {
|
|
||||||
select: { id: true, firstName: true, lastName: true },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const mappedItems = items.map(tx => {
|
|
||||||
let reference = null as any
|
|
||||||
if (tx.referenceId && tx.referenceType) {
|
|
||||||
if (
|
|
||||||
tx.referenceType === BankTransactionRefType.POS_SALE ||
|
|
||||||
tx.referenceType === BankTransactionRefType.POS_REFUND
|
|
||||||
) {
|
|
||||||
reference = posRecords.find(r => r.id === tx.referenceId) || null
|
|
||||||
} else if (
|
|
||||||
tx.referenceType === BankTransactionRefType.PURCHASE_PAYMENT ||
|
|
||||||
tx.referenceType === BankTransactionRefType.PURCHASE_REFUND
|
|
||||||
) {
|
|
||||||
reference = purchaseRecords.find(r => r.id === tx.referenceId) || null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return { ...tx, reference }
|
|
||||||
})
|
|
||||||
|
|
||||||
return ResponseMapper.paginate(mappedItems, count, page, pageSize)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,39 +0,0 @@
|
|||||||
import { Injectable } from '@nestjs/common'
|
|
||||||
import { Prisma } from '../../generated/prisma/client'
|
|
||||||
import { AddTransactionToBankAccountDto } from './dto/add-transaction.dto'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class BankAccountsWorkflow {
|
|
||||||
async addTransaction(
|
|
||||||
tx: Prisma.TransactionClient,
|
|
||||||
payload: AddTransactionToBankAccountDto,
|
|
||||||
) {
|
|
||||||
const item = await tx.bankAccountTransaction.findFirst({
|
|
||||||
where: {
|
|
||||||
bankAccountId: payload.bankAccountId,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
|
|
||||||
const balance = item ? Number(item?.balanceAfter) : 0
|
|
||||||
|
|
||||||
const newBalance = item
|
|
||||||
? payload.type === 'DEPOSIT'
|
|
||||||
? balance + payload.amount
|
|
||||||
: balance - payload.amount
|
|
||||||
: payload.type === 'DEPOSIT'
|
|
||||||
? payload.amount
|
|
||||||
: -payload.amount
|
|
||||||
|
|
||||||
await tx.bankAccountTransaction.create({
|
|
||||||
data: {
|
|
||||||
bankAccount: { connect: { id: payload.bankAccountId } },
|
|
||||||
amount: payload.amount,
|
|
||||||
type: payload.type,
|
|
||||||
balanceAfter: newBalance,
|
|
||||||
|
|
||||||
referenceId: payload.referenceId,
|
|
||||||
referenceType: payload.referenceType,
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
import { IsEnum, IsInt } from 'class-validator'
|
|
||||||
import {
|
|
||||||
BankAccountTransactionType,
|
|
||||||
BankTransactionRefType,
|
|
||||||
} from '../../../generated/prisma/enums'
|
|
||||||
|
|
||||||
export class AddTransactionToBankAccountDto {
|
|
||||||
@IsInt()
|
|
||||||
bankAccountId: number
|
|
||||||
|
|
||||||
@IsInt()
|
|
||||||
amount: number
|
|
||||||
|
|
||||||
@IsInt()
|
|
||||||
referenceId: number
|
|
||||||
|
|
||||||
@IsEnum(BankTransactionRefType)
|
|
||||||
referenceType: BankTransactionRefType
|
|
||||||
|
|
||||||
@IsEnum(BankAccountTransactionType)
|
|
||||||
type: BankAccountTransactionType
|
|
||||||
}
|
|
||||||
@@ -1,27 +0,0 @@
|
|||||||
import { IsInt, IsOptional, IsString } from 'class-validator'
|
|
||||||
|
|
||||||
export class CreateBankAccountDto {
|
|
||||||
@IsString()
|
|
||||||
accountNumber: string
|
|
||||||
|
|
||||||
@IsString()
|
|
||||||
name: string
|
|
||||||
|
|
||||||
@IsString()
|
|
||||||
iban: string
|
|
||||||
|
|
||||||
@IsInt()
|
|
||||||
branchId: number
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
createdAt?: string
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
updatedAt?: string
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
deletedAt?: string
|
|
||||||
}
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
import { PartialType } from '@nestjs/swagger'
|
|
||||||
import { CreateBankAccountDto } from './create-bank-account.dto'
|
|
||||||
|
|
||||||
export class UpdateBankAccountDto extends PartialType(CreateBankAccountDto) {}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
|
|
||||||
import { BankBranchesService } from './bank-branches.service'
|
|
||||||
import { CreateBankBranchDto } from './dto/create-bank-branches.dto'
|
|
||||||
import { UpdateBankBranchDto } from './dto/update-bank-branches.dto'
|
|
||||||
|
|
||||||
@Controller('bank-branches')
|
|
||||||
export class BankBranchesController {
|
|
||||||
constructor(private readonly bankBranchesService: BankBranchesService) {}
|
|
||||||
|
|
||||||
@Post()
|
|
||||||
create(@Body() dto: CreateBankBranchDto) {
|
|
||||||
return this.bankBranchesService.create(dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get()
|
|
||||||
findAll() {
|
|
||||||
return this.bankBranchesService.findAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get(':id')
|
|
||||||
findOne(@Param('id') id: string) {
|
|
||||||
return this.bankBranchesService.findOne(Number(id))
|
|
||||||
}
|
|
||||||
|
|
||||||
@Patch(':id')
|
|
||||||
update(@Param('id') id: string, @Body() dto: UpdateBankBranchDto) {
|
|
||||||
return this.bankBranchesService.update(Number(id), dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Delete(':id')
|
|
||||||
remove(@Param('id') id: string) {
|
|
||||||
return this.bankBranchesService.remove(Number(id))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { Module } from '@nestjs/common'
|
|
||||||
import { PrismaModule } from '../../prisma/prisma.module'
|
|
||||||
import { BankBranchesController } from './bank-branches.controller'
|
|
||||||
import { BankBranchesService } from './bank-branches.service'
|
|
||||||
|
|
||||||
@Module({
|
|
||||||
imports: [PrismaModule],
|
|
||||||
controllers: [BankBranchesController],
|
|
||||||
providers: [BankBranchesService],
|
|
||||||
})
|
|
||||||
export class BankBranchesModule {}
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user