feat: implement bank accounts, branches, and banks modules with CRUD operations
- Added BankAccountsController, BankAccountsService, and related DTOs for managing bank accounts. - Implemented BankBranchesController, BankBranchesService, and related DTOs for managing bank branches. - Created BanksController and BanksService for retrieving bank information. - Integrated Prisma for database operations across all modules. - Added response mapping for consistent API responses.
This commit is contained in:
Vendored
+4
-1
@@ -13,6 +13,9 @@
|
|||||||
},
|
},
|
||||||
"editor.formatOnSave": true,
|
"editor.formatOnSave": true,
|
||||||
"cSpell.words": [
|
"cSpell.words": [
|
||||||
"Cardex"
|
"autoincrement",
|
||||||
|
"Cardex",
|
||||||
|
"fkey",
|
||||||
|
"iban"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,7 @@
|
|||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nest build",
|
"build": "nest build",
|
||||||
|
"db:reset": "tsx scripts/dump-triggers.ts && npx prisma migrate reset --force",
|
||||||
"dump-triggers": "tsx scripts/dump-triggers.ts",
|
"dump-triggers": "tsx scripts/dump-triggers.ts",
|
||||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||||
"generate:permissions": "tsx scripts/generate-permissions.ts",
|
"generate:permissions": "tsx scripts/generate-permissions.ts",
|
||||||
|
|||||||
+1
-1
@@ -4,7 +4,7 @@ import 'dotenv/config'
|
|||||||
import { defineConfig, env } from 'prisma/config'
|
import { defineConfig, env } from 'prisma/config'
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
schema: 'prisma/schema.prisma',
|
schema: 'prisma/schema',
|
||||||
migrations: {
|
migrations: {
|
||||||
path: 'prisma/migrations',
|
path: 'prisma/migrations',
|
||||||
seed: 'tsx prisma/seed.ts',
|
seed: 'tsx prisma/seed.ts',
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to alter the column `quantity` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
||||||
- You are about to alter the column `totalCost` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
||||||
- You are about to alter the column `avgCost` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(65,30)` to `Decimal(10,2)`.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Balance` MODIFY `quantity` DECIMAL(10, 2) NOT NULL,
|
|
||||||
MODIFY `totalCost` DECIMAL(10, 2) NOT NULL,
|
|
||||||
MODIFY `avgCost` DECIMAL(10, 2) NOT NULL;
|
|
||||||
@@ -1,21 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- The primary key for the `Stock_Balance` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
|
||||||
- You are about to drop the column `ProductId` on the `Stock_Balance` table. All the data in the column will be lost.
|
|
||||||
- Added the required column `inventoryId` to the `Stock_Balance` table without a default value. This is not possible if the table is not empty.
|
|
||||||
- Added the required column `productId` to the `Stock_Balance` table without a default value. This is not possible if the table is not empty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Balance` DROP PRIMARY KEY,
|
|
||||||
DROP COLUMN `ProductId`,
|
|
||||||
ADD COLUMN `inventoryId` INTEGER NOT NULL,
|
|
||||||
ADD COLUMN `productId` INTEGER NOT NULL,
|
|
||||||
ADD PRIMARY KEY (`productId`);
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Inventories` ADD COLUMN `isPointOfSale` BOOLEAN NOT NULL DEFAULT false;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Movements` MODIFY `referenceType` ENUM('PURCHASE', 'SALES', 'ADJUSTMENT', 'INVENTORY_TRANSFER') NOT NULL;
|
|
||||||
@@ -1,77 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- The primary key for the `Stock_Balance` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
|
||||||
- You are about to alter the column `quantity` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(14,3)`.
|
|
||||||
- You are about to alter the column `totalCost` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(14,2)`.
|
|
||||||
- You are about to alter the column `avgCost` on the `Stock_Balance` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(14,2)`.
|
|
||||||
- A unique constraint covering the columns `[productId,inventoryId]` on the table `Stock_Balance` will be added. If there are existing duplicate values, this will fail.
|
|
||||||
- Added the required column `id` to the `Stock_Balance` table without a default value. This is not possible if the table is not empty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `Stock_Balance` DROP FOREIGN KEY `Stock_Balance_inventoryId_fkey`;
|
|
||||||
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `Stock_Balance` DROP FOREIGN KEY `Stock_Balance_productId_fkey`;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Products` ADD COLUMN `stockBalanceId` INTEGER NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Balance` DROP PRIMARY KEY,
|
|
||||||
ADD COLUMN `createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
|
||||||
ADD COLUMN `id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
MODIFY `quantity` DECIMAL(14, 3) NOT NULL DEFAULT 0,
|
|
||||||
MODIFY `totalCost` DECIMAL(14, 2) NOT NULL DEFAULT 0,
|
|
||||||
MODIFY `updatedAt` DATETIME(3) NOT NULL,
|
|
||||||
MODIFY `avgCost` DECIMAL(14, 2) NOT NULL DEFAULT 0,
|
|
||||||
ADD PRIMARY KEY (`id`);
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Trigger_Logs` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`message` TEXT NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `_StockBalance_product` (
|
|
||||||
`A` INTEGER NOT NULL,
|
|
||||||
`B` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `_StockBalance_product_AB_unique`(`A`, `B`),
|
|
||||||
INDEX `_StockBalance_product_B_index`(`B`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `_StockBalance_inventory` (
|
|
||||||
`A` INTEGER NOT NULL,
|
|
||||||
`B` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `_StockBalance_inventory_AB_unique`(`A`, `B`),
|
|
||||||
INDEX `_StockBalance_inventory_B_index`(`B`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateIndex
|
|
||||||
CREATE INDEX `Stock_Balance_productId_idx` ON `Stock_Balance`(`productId`);
|
|
||||||
|
|
||||||
-- CreateIndex
|
|
||||||
CREATE UNIQUE INDEX `Stock_Balance_productId_inventoryId_key` ON `Stock_Balance`(`productId`, `inventoryId`);
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `_StockBalance_product` ADD CONSTRAINT `_StockBalance_product_A_fkey` FOREIGN KEY (`A`) REFERENCES `Products`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `_StockBalance_product` ADD CONSTRAINT `_StockBalance_product_B_fkey` FOREIGN KEY (`B`) REFERENCES `Stock_Balance`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `_StockBalance_inventory` ADD CONSTRAINT `_StockBalance_inventory_A_fkey` FOREIGN KEY (`A`) REFERENCES `Inventories`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `_StockBalance_inventory` ADD CONSTRAINT `_StockBalance_inventory_B_fkey` FOREIGN KEY (`B`) REFERENCES `Stock_Balance`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- RenameIndex
|
|
||||||
ALTER TABLE `Stock_Balance` RENAME INDEX `Stock_Balance_inventoryId_fkey` TO `Stock_Balance_inventoryId_idx`;
|
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- Added the required column `name` to the `Trigger_Logs` table without a default value. This is not possible if the table is not empty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Balance` MODIFY `updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
MODIFY `createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0);
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Trigger_Logs` ADD COLUMN `name` TEXT NOT NULL;
|
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to drop the column `stockBalanceId` on the `Products` table. All the data in the column will be lost.
|
|
||||||
- You are about to drop the `_StockBalance_inventory` table. If the table is not empty, all the data it contains will be lost.
|
|
||||||
- You are about to drop the `_StockBalance_product` table. If the table is not empty, all the data it contains will be lost.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `_StockBalance_inventory` DROP FOREIGN KEY `_StockBalance_inventory_A_fkey`;
|
|
||||||
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `_StockBalance_inventory` DROP FOREIGN KEY `_StockBalance_inventory_B_fkey`;
|
|
||||||
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `_StockBalance_product` DROP FOREIGN KEY `_StockBalance_product_A_fkey`;
|
|
||||||
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `_StockBalance_product` DROP FOREIGN KEY `_StockBalance_product_B_fkey`;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Products` DROP COLUMN `stockBalanceId`;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Movements` ADD COLUMN `supplierId` INTEGER NULL;
|
|
||||||
|
|
||||||
-- DropTable
|
|
||||||
DROP TABLE `_StockBalance_inventory`;
|
|
||||||
|
|
||||||
-- DropTable
|
|
||||||
DROP TABLE `_StockBalance_product`;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- Added the required column `remainedInStock` to the `Stock_Movements` table without a default value. This is not possible if the table is not empty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Movements` ADD COLUMN `remainedInStock` DECIMAL(10, 2) NOT NULL;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Movements` MODIFY `remainedInStock` DECIMAL(10, 2) NOT NULL DEFAULT 0;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Products` ADD COLUMN `salePrice` DECIMAL(10, 2) NOT NULL DEFAULT 0.00;
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- A unique constraint covering the columns `[name]` on the table `Roles` will be added. If there are existing duplicate values, this will fail.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Otp_Codes` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`mobileNumber` VARCHAR(20) NOT NULL,
|
|
||||||
`code` VARCHAR(10) NOT NULL,
|
|
||||||
`used` BOOLEAN NOT NULL DEFAULT false,
|
|
||||||
`expiresAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
|
|
||||||
INDEX `Otp_Codes_mobileNumber_idx`(`mobileNumber`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Refresh_Tokens` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`tokenHash` VARCHAR(255) NOT NULL,
|
|
||||||
`userId` INTEGER NOT NULL,
|
|
||||||
`revoked` BOOLEAN NOT NULL DEFAULT false,
|
|
||||||
`expiresAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
|
|
||||||
INDEX `Refresh_Tokens_userId_idx`(`userId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateIndex
|
|
||||||
CREATE UNIQUE INDEX `Roles_name_key` ON `Roles`(`name`);
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Refresh_Tokens` ADD CONSTRAINT `Refresh_Tokens_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `Users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
+383
-201
@@ -25,6 +25,261 @@ CREATE TABLE `Roles` (
|
|||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Roles_name_key`(`name`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Otp_Codes` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`mobileNumber` VARCHAR(20) NOT NULL,
|
||||||
|
`code` VARCHAR(10) NOT NULL,
|
||||||
|
`used` BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
`expiresAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
|
||||||
|
INDEX `Otp_Codes_mobileNumber_idx`(`mobileNumber`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Refresh_Tokens` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`tokenHash` VARCHAR(255) NOT NULL,
|
||||||
|
`userId` INTEGER NOT NULL,
|
||||||
|
`revoked` BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
`expiresAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
|
||||||
|
INDEX `Refresh_Tokens_userId_idx`(`userId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Bank_Branches` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL,
|
||||||
|
`code` VARCHAR(10) NOT NULL,
|
||||||
|
`address` VARCHAR(500) NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
`bankId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Bank_Branches_code_key`(`code`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Bank_Accounts` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`accountNumber` VARCHAR(20) NULL,
|
||||||
|
`cardNumber` VARCHAR(16) NULL,
|
||||||
|
`name` VARCHAR(255) NOT NULL,
|
||||||
|
`iban` VARCHAR(34) NULL,
|
||||||
|
`branchId` INTEGER NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Bank_Accounts_accountNumber_key`(`accountNumber`),
|
||||||
|
UNIQUE INDEX `Bank_Accounts_cardNumber_key`(`cardNumber`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Inventories` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL,
|
||||||
|
`location` VARCHAR(255) NULL,
|
||||||
|
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
`isPointOfSale` BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
`bankAccountId` INTEGER NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Inventory_Transfers` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` VARCHAR(100) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`fromInventoryId` INTEGER NOT NULL,
|
||||||
|
`toInventoryId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Inventory_Transfers_code_key`(`code`),
|
||||||
|
INDEX `Inventory_Transfers_fromInventoryId_fkey`(`fromInventoryId`),
|
||||||
|
INDEX `Inventory_Transfers_toInventoryId_fkey`(`toInventoryId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Inventory_Transfer_Items` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`count` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`productId` INTEGER NOT NULL,
|
||||||
|
`transferId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
INDEX `Inventory_Transfer_Items_productId_fkey`(`productId`),
|
||||||
|
INDEX `Inventory_Transfer_Items_transferId_fkey`(`transferId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Inventory_Bank_Accounts` (
|
||||||
|
`inventoryId` INTEGER NOT NULL,
|
||||||
|
`bankAccountId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
INDEX `Inventory_Bank_Accounts_bankAccountId_idx`(`bankAccountId`),
|
||||||
|
PRIMARY KEY (`inventoryId`, `bankAccountId`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Pos_Accounts` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL,
|
||||||
|
`code` VARCHAR(10) NOT NULL,
|
||||||
|
`description` VARCHAR(500) NULL,
|
||||||
|
`bankAccountId` INTEGER NULL,
|
||||||
|
`inventoryId` INTEGER NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Pos_Accounts_code_key`(`code`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Banks` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL,
|
||||||
|
`shortName` VARCHAR(3) NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Banks_shortName_key`(`shortName`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Suppliers` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`firstName` VARCHAR(255) NOT NULL,
|
||||||
|
`lastName` VARCHAR(255) NOT NULL,
|
||||||
|
`email` VARCHAR(255) NULL,
|
||||||
|
`mobileNumber` CHAR(11) NOT NULL,
|
||||||
|
`address` TEXT NULL,
|
||||||
|
`city` VARCHAR(100) NULL,
|
||||||
|
`state` VARCHAR(100) NULL,
|
||||||
|
`country` VARCHAR(100) NULL,
|
||||||
|
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Suppliers_mobileNumber_key`(`mobileNumber`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Supplier_Ledger` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`debit` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`credit` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`balance` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`sourceType` ENUM('PURCHASE', 'PAYMENT', 'ADJUSTMENT', 'REFUND') NOT NULL,
|
||||||
|
`sourceId` INTEGER NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`supplierId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
INDEX `Supplier_Ledger_supplierId_fkey`(`supplierId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Customers` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`firstName` VARCHAR(255) NOT NULL,
|
||||||
|
`lastName` VARCHAR(255) NOT NULL,
|
||||||
|
`email` VARCHAR(255) NULL,
|
||||||
|
`mobileNumber` CHAR(11) NOT NULL,
|
||||||
|
`address` TEXT NULL,
|
||||||
|
`city` VARCHAR(100) NULL,
|
||||||
|
`state` VARCHAR(100) NULL,
|
||||||
|
`country` VARCHAR(100) NULL,
|
||||||
|
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Customers_mobileNumber_key`(`mobileNumber`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Orders` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`orderNumber` VARCHAR(100) NOT NULL,
|
||||||
|
`status` ENUM('PENDING', 'REJECT', 'DONE') NOT NULL DEFAULT 'PENDING',
|
||||||
|
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL DEFAULT 'CARD',
|
||||||
|
`totalAmount` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
`customerId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Orders_orderNumber_key`(`orderNumber`),
|
||||||
|
INDEX `Orders_customerId_fkey`(`customerId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Sales_Invoices` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` VARCHAR(100) NOT NULL,
|
||||||
|
`totalAmount` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`customerId` INTEGER NULL,
|
||||||
|
`inventoryId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Sales_Invoices_code_key`(`code`),
|
||||||
|
INDEX `Sales_Invoices_inventoryId_fkey`(`inventoryId`),
|
||||||
|
INDEX `Sales_Invoices_customerId_fkey`(`customerId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Sales_Invoice_Items` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`count` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`fee` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`total` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`invoiceId` INTEGER NOT NULL,
|
||||||
|
`productId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
INDEX `Sales_Invoice_Items_invoiceId_fkey`(`invoiceId`),
|
||||||
|
INDEX `Sales_Invoice_Items_productId_fkey`(`productId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Trigger_Logs` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`message` TEXT NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`name` TEXT NOT NULL,
|
||||||
|
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
@@ -64,6 +319,7 @@ CREATE TABLE `Products` (
|
|||||||
`deletedAt` TIMESTAMP(0) NULL,
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
`brandId` INTEGER NULL,
|
`brandId` INTEGER NULL,
|
||||||
`categoryId` INTEGER NULL,
|
`categoryId` INTEGER NULL,
|
||||||
|
`salePrice` DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
|
||||||
|
|
||||||
UNIQUE INDEX `products_sku_unique`(`sku`),
|
UNIQUE INDEX `products_sku_unique`(`sku`),
|
||||||
UNIQUE INDEX `products_barcode_unique`(`barcode`),
|
UNIQUE INDEX `products_barcode_unique`(`barcode`),
|
||||||
@@ -98,116 +354,13 @@ CREATE TABLE `Product_categories` (
|
|||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Suppliers` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`firstName` VARCHAR(255) NOT NULL,
|
|
||||||
`lastName` VARCHAR(255) NOT NULL,
|
|
||||||
`email` VARCHAR(255) NULL,
|
|
||||||
`mobileNumber` CHAR(11) NOT NULL,
|
|
||||||
`address` TEXT NULL,
|
|
||||||
`city` VARCHAR(100) NULL,
|
|
||||||
`state` VARCHAR(100) NULL,
|
|
||||||
`country` VARCHAR(100) NULL,
|
|
||||||
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Suppliers_mobileNumber_key`(`mobileNumber`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Customers` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`firstName` VARCHAR(255) NOT NULL,
|
|
||||||
`lastName` VARCHAR(255) NOT NULL,
|
|
||||||
`email` VARCHAR(255) NULL,
|
|
||||||
`mobileNumber` CHAR(11) NOT NULL,
|
|
||||||
`address` TEXT NULL,
|
|
||||||
`city` VARCHAR(100) NULL,
|
|
||||||
`state` VARCHAR(100) NULL,
|
|
||||||
`country` VARCHAR(100) NULL,
|
|
||||||
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Customers_mobileNumber_key`(`mobileNumber`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Inventories` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(255) NOT NULL,
|
|
||||||
`location` VARCHAR(255) NULL,
|
|
||||||
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Stores` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`name` VARCHAR(255) NOT NULL,
|
|
||||||
`location` VARCHAR(255) NULL,
|
|
||||||
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Product_Charges` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`count` DECIMAL(10, 2) NOT NULL,
|
|
||||||
`fee` DECIMAL(10, 2) NOT NULL,
|
|
||||||
`totalAmount` DECIMAL(10, 2) NOT NULL,
|
|
||||||
`isSettled` BOOLEAN NOT NULL DEFAULT false,
|
|
||||||
`buyAt` TIMESTAMP(0) NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
`inventoryId` INTEGER NOT NULL,
|
|
||||||
`supplierId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
INDEX `Product_Charges_inventoryId_fkey`(`inventoryId`),
|
|
||||||
INDEX `Product_Charges_productId_fkey`(`productId`),
|
|
||||||
INDEX `Product_Charges_supplierId_fkey`(`supplierId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Orders` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`orderNumber` VARCHAR(100) NOT NULL,
|
|
||||||
`status` ENUM('pending', 'reject', 'done') NOT NULL DEFAULT 'pending',
|
|
||||||
`paymentMethod` ENUM('cash', 'card') NOT NULL DEFAULT 'card',
|
|
||||||
`totalAmount` DECIMAL(10, 2) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
|
||||||
`customerId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Orders_orderNumber_key`(`orderNumber`),
|
|
||||||
INDEX `Orders_customerId_fkey`(`customerId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Purchase_Receipts` (
|
CREATE TABLE `Purchase_Receipts` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`code` VARCHAR(100) NOT NULL,
|
`code` VARCHAR(100) NOT NULL,
|
||||||
`totalAmount` DECIMAL(10, 2) NOT NULL,
|
`totalAmount` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`paidAmount` DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
|
||||||
|
`isSettled` BOOLEAN NOT NULL DEFAULT false,
|
||||||
`description` TEXT NULL,
|
`description` TEXT NULL,
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
@@ -237,32 +390,18 @@ CREATE TABLE `Purchase_Receipt_Items` (
|
|||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Sales_Invoices` (
|
CREATE TABLE `Purchase_Receipt_Payments` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`code` VARCHAR(100) NOT NULL,
|
`amount` DECIMAL(10, 2) NOT NULL,
|
||||||
`totalAmount` DECIMAL(10, 2) NOT NULL,
|
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
||||||
|
`bankAccountId` INTEGER NULL,
|
||||||
`description` TEXT NULL,
|
`description` TEXT NULL,
|
||||||
|
`payedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`receiptId` INTEGER NOT NULL,
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
`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 `Purchase_Receipt_Payments_receiptId_fkey`(`receiptId`),
|
||||||
INDEX `Sales_Invoices_customerId_fkey`(`customerId`),
|
INDEX `Purchase_Receipt_Payments_bankAccountId_fkey`(`bankAccountId`),
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Sales_Invoice_Items` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`count` DECIMAL(10, 2) NOT NULL,
|
|
||||||
`fee` DECIMAL(10, 2) NOT NULL,
|
|
||||||
`total` DECIMAL(10, 2) NOT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`invoiceId` INTEGER NOT NULL,
|
|
||||||
`productId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
INDEX `Sales_Invoice_Items_invoiceId_fkey`(`invoiceId`),
|
|
||||||
INDEX `Sales_Invoice_Items_productId_fkey`(`productId`),
|
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
@@ -273,53 +412,39 @@ CREATE TABLE `Stock_Movements` (
|
|||||||
`quantity` DECIMAL(10, 2) NOT NULL,
|
`quantity` DECIMAL(10, 2) NOT NULL,
|
||||||
`fee` DECIMAL(10, 2) NOT NULL,
|
`fee` DECIMAL(10, 2) NOT NULL,
|
||||||
`totalCost` DECIMAL(10, 2) NOT NULL,
|
`totalCost` DECIMAL(10, 2) NOT NULL,
|
||||||
`referenceType` ENUM('PURCHASE', 'SALES', 'ADJUSTMENT') NOT NULL,
|
`referenceType` ENUM('PURCHASE', 'SALES', 'ADJUSTMENT', 'INVENTORY_TRANSFER') NOT NULL,
|
||||||
`referenceId` VARCHAR(191) NOT NULL,
|
`referenceId` VARCHAR(191) NOT NULL,
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
`productId` INTEGER NOT NULL,
|
`productId` INTEGER NOT NULL,
|
||||||
`inventoryId` INTEGER NOT NULL,
|
`inventoryId` INTEGER NOT NULL,
|
||||||
`avgCost` DECIMAL(10, 2) NOT NULL,
|
`avgCost` DECIMAL(10, 2) NOT NULL,
|
||||||
|
`supplierId` INTEGER NULL,
|
||||||
|
`remainedInStock` DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
|
||||||
|
`counterInventoryId` INTEGER NULL,
|
||||||
|
`customerId` INTEGER NULL,
|
||||||
|
|
||||||
INDEX `Stock_Movements_inventoryId_fkey`(`inventoryId`),
|
INDEX `Stock_Movements_inventoryId_fkey`(`inventoryId`),
|
||||||
INDEX `Stock_Movements_productId_fkey`(`productId`),
|
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`)
|
PRIMARY KEY (`id`)
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Stock_Balance` (
|
CREATE TABLE `Stock_Balance` (
|
||||||
`quantity` DECIMAL(65, 30) NOT NULL,
|
`quantity` DECIMAL(14, 3) NOT NULL DEFAULT 0.000,
|
||||||
`totalCost` DECIMAL(65, 30) NOT NULL,
|
`totalCost` DECIMAL(14, 2) NOT NULL DEFAULT 0.00,
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
`ProductId` INTEGER NOT NULL,
|
`avgCost` DECIMAL(14, 2) NOT NULL DEFAULT 0.00,
|
||||||
`avgCost` DECIMAL(65, 30) NOT NULL,
|
`inventoryId` INTEGER NOT NULL,
|
||||||
|
|
||||||
PRIMARY KEY (`ProductId`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Inventory_Transfers` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`code` VARCHAR(100) NOT NULL,
|
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`fromInventoryId` INTEGER NOT NULL,
|
|
||||||
`toInventoryId` INTEGER NOT NULL,
|
|
||||||
|
|
||||||
UNIQUE INDEX `Inventory_Transfers_code_key`(`code`),
|
|
||||||
INDEX `Inventory_Transfers_fromInventoryId_fkey`(`fromInventoryId`),
|
|
||||||
INDEX `Inventory_Transfers_toInventoryId_fkey`(`toInventoryId`),
|
|
||||||
PRIMARY KEY (`id`)
|
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
|
||||||
|
|
||||||
-- CreateTable
|
|
||||||
CREATE TABLE `Inventory_Transfer_Items` (
|
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
|
||||||
`count` DECIMAL(10, 2) NOT NULL,
|
|
||||||
`productId` INTEGER NOT NULL,
|
`productId` INTEGER NOT NULL,
|
||||||
`transferId` INTEGER NOT NULL,
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
|
||||||
INDEX `Inventory_Transfer_Items_productId_fkey`(`productId`),
|
INDEX `Stock_Balance_productId_idx`(`productId`),
|
||||||
INDEX `Inventory_Transfer_Items_transferId_fkey`(`transferId`),
|
INDEX `Stock_Balance_inventoryId_idx`(`inventoryId`),
|
||||||
|
UNIQUE INDEX `Stock_Balance_productId_inventoryId_key`(`productId`, `inventoryId`),
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
@@ -336,56 +461,26 @@ CREATE TABLE `Stock_Adjustments` (
|
|||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `_Bank_Accounts_inventoryId_fkey` (
|
||||||
|
`A` INTEGER NOT NULL,
|
||||||
|
`B` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `_Bank_Accounts_inventoryId_fkey_AB_unique`(`A`, `B`),
|
||||||
|
INDEX `_Bank_Accounts_inventoryId_fkey_B_index`(`B`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Users` ADD CONSTRAINT `Users_roleId_fkey` FOREIGN KEY (`roleId`) REFERENCES `Roles`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
ALTER TABLE `Users` ADD CONSTRAINT `Users_roleId_fkey` FOREIGN KEY (`roleId`) REFERENCES `Roles`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Product_Variants` ADD CONSTRAINT `Product_Variants_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
ALTER TABLE `Refresh_Tokens` ADD CONSTRAINT `Refresh_Tokens_userId_fkey` FOREIGN KEY (`userId`) REFERENCES `Users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Products` ADD CONSTRAINT `Products_brandId_fkey` FOREIGN KEY (`brandId`) REFERENCES `Product_brands`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION;
|
ALTER TABLE `Bank_Branches` ADD CONSTRAINT `Bank_Branches_bankId_fkey` FOREIGN KEY (`bankId`) REFERENCES `Banks`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Products` ADD CONSTRAINT `Products_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Product_categories`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION;
|
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 `Product_Charges` ADD CONSTRAINT `Product_Charges_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Product_Charges` ADD CONSTRAINT `Product_Charges_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Product_Charges` ADD CONSTRAINT `Product_Charges_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Orders` ADD CONSTRAINT `Orders_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipts` ADD CONSTRAINT `Purchase_Receipts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipts` ADD CONSTRAINT `Purchase_Receipts_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Items` ADD CONSTRAINT `Purchase_Receipt_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Items` ADD CONSTRAINT `Purchase_Receipt_Items_receiptId_fkey` FOREIGN KEY (`receiptId`) REFERENCES `Purchase_Receipts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Inventory_Transfers` ADD CONSTRAINT `Inventory_Transfers_fromInventoryId_fkey` FOREIGN KEY (`fromInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
ALTER TABLE `Inventory_Transfers` ADD CONSTRAINT `Inventory_Transfers_fromInventoryId_fkey` FOREIGN KEY (`fromInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
@@ -399,8 +494,95 @@ ALTER TABLE `Inventory_Transfer_Items` ADD CONSTRAINT `Inventory_Transfer_Items_
|
|||||||
-- AddForeignKey
|
-- 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;
|
ALTER TABLE `Inventory_Transfer_Items` ADD CONSTRAINT `Inventory_Transfer_Items_transferId_fkey` FOREIGN KEY (`transferId`) REFERENCES `Inventory_Transfers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Inventory_Bank_Accounts` ADD CONSTRAINT `Inventory_Bank_Accounts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Inventory_Bank_Accounts` ADD CONSTRAINT `Inventory_Bank_Accounts_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Pos_Accounts` ADD CONSTRAINT `Pos_Accounts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Pos_Accounts` ADD CONSTRAINT `Pos_Accounts_bankAccountId_inventoryId_fkey` FOREIGN KEY (`bankAccountId`, `inventoryId`) REFERENCES `Inventory_Bank_Accounts`(`bankAccountId`, `inventoryId`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Pos_Accounts` ADD CONSTRAINT `Pos_Accounts_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Supplier_Ledger` ADD CONSTRAINT `Supplier_Ledger_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Orders` ADD CONSTRAINT `Orders_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Product_Variants` ADD CONSTRAINT `Product_Variants_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Products` ADD CONSTRAINT `Products_brandId_fkey` FOREIGN KEY (`brandId`) REFERENCES `Product_brands`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Products` ADD CONSTRAINT `Products_categoryId_fkey` FOREIGN KEY (`categoryId`) REFERENCES `Product_categories`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Purchase_Receipts` ADD CONSTRAINT `Purchase_Receipts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Purchase_Receipts` ADD CONSTRAINT `Purchase_Receipts_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Purchase_Receipt_Items` ADD CONSTRAINT `Purchase_Receipt_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Purchase_Receipt_Items` ADD CONSTRAINT `Purchase_Receipt_Items_receiptId_fkey` FOREIGN KEY (`receiptId`) REFERENCES `Purchase_Receipts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_receiptId_fkey` FOREIGN KEY (`receiptId`) REFERENCES `Purchase_Receipts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_counterInventoryId_fkey` FOREIGN KEY (`counterInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Stock_Balance` ADD CONSTRAINT `Stock_Balance_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Stock_Adjustments` ADD CONSTRAINT `Stock_Adjustments_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
ALTER TABLE `Stock_Adjustments` ADD CONSTRAINT `Stock_Adjustments_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Stock_Adjustments` ADD CONSTRAINT `Stock_Adjustments_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
ALTER TABLE `Stock_Adjustments` ADD CONSTRAINT `Stock_Adjustments_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `_Bank_Accounts_inventoryId_fkey` ADD CONSTRAINT `_Bank_Accounts_inventoryId_fkey_A_fkey` FOREIGN KEY (`A`) REFERENCES `Bank_Accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `_Bank_Accounts_inventoryId_fkey` ADD CONSTRAINT `_Bank_Accounts_inventoryId_fkey_B_fkey` FOREIGN KEY (`B`) REFERENCES `Inventories`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
-- This is an empty migration.
|
||||||
+27
-44
@@ -1,25 +1,14 @@
|
|||||||
/*
|
-- AUTO-GENERATED MYSQL TRIGGER DUMP
|
||||||
Warnings:
|
-- Generated at: 2025-12-22T15:32:20.184Z
|
||||||
|
|
||||||
- Added the required column `inventoryId` to the `Sales_Invoices` table without a default value. This is not possible if the table is not empty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Sales_Invoices`
|
|
||||||
ADD COLUMN `inventoryId` INTEGER NOT NULL;
|
|
||||||
|
|
||||||
-- CreateIndex
|
|
||||||
CREATE INDEX `Sales_Invoices_inventoryId_fkey` ON `Sales_Invoices` (`inventoryId`);
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoices`
|
|
||||||
ADD CONSTRAINT `Sales_Invoices_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- Trigger: trg_transfer_item_after_insert
|
||||||
|
-- Event: INSERT
|
||||||
|
-- Table: Inventory_Transfer_Items
|
||||||
|
-- ------------------------------------------
|
||||||
DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`;
|
DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`;
|
||||||
|
|
||||||
CREATE TRIGGER `trg_transfer_item_after_insert` AFTER
|
CREATE TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin
|
||||||
INSERT
|
|
||||||
ON `Inventory_Transfer_Items` FOR EACH ROW begin
|
|
||||||
|
|
||||||
DECLARE fromInv INT;
|
DECLARE fromInv INT;
|
||||||
DECLARE toInv INT;
|
DECLARE toInv INT;
|
||||||
@@ -39,15 +28,15 @@ DECLARE fromInv INT;
|
|||||||
|
|
||||||
-- OUT from source
|
-- OUT from source
|
||||||
INSERT INTO Stock_Movements
|
INSERT INTO Stock_Movements
|
||||||
(type, quantity, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, createdAt, remainedInStock)
|
(type, quantity, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, cuonterInventoryId, createdAt, remainedInStock)
|
||||||
VALUES
|
VALUES
|
||||||
('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, NOW(), latestQuantityInOrigin-NEW.count);
|
('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, toInv, NOW(), latestQuantityInOrigin-NEW.count);
|
||||||
|
|
||||||
-- IN to destination
|
-- IN to destination
|
||||||
INSERT INTO Stock_Movements
|
INSERT INTO Stock_Movements
|
||||||
(type, quantity, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, createdAt, remainedInStock)
|
(type, quantity, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, cuonterInventoryId, createdAt, remainedInStock)
|
||||||
VALUES
|
VALUES
|
||||||
('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, NOW(), latestQuantityInOrigin-NEW.count);
|
('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, fromInv, NOW(), latestQuantityInOrigin-NEW.count);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
@@ -57,9 +46,7 @@ end;
|
|||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`;
|
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`;
|
||||||
|
|
||||||
CREATE TRIGGER `trg_purchase_receipt_item_after_insert` AFTER
|
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;
|
||||||
INSERT
|
|
||||||
ON `Purchase_Receipt_Items` FOR EACH ROW BEGIN DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0;
|
|
||||||
|
|
||||||
DECLARE invId INT;
|
DECLARE invId INT;
|
||||||
DECLARE suppId INT;
|
DECLARE suppId INT;
|
||||||
@@ -122,9 +109,7 @@ END;
|
|||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`;
|
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`;
|
||||||
|
|
||||||
CREATE TRIGGER `trg_sales_invoice_items_before_insert` BEFORE
|
CREATE TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
||||||
INSERT
|
|
||||||
ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
|
||||||
|
|
||||||
DECLARE inventory_id INT;
|
DECLARE inventory_id INT;
|
||||||
|
|
||||||
@@ -154,14 +139,13 @@ end;
|
|||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`;
|
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`;
|
||||||
|
|
||||||
CREATE TRIGGER `trg_sales_invoice_items_after_insert` AFTER
|
CREATE TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
||||||
INSERT
|
|
||||||
ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
|
||||||
|
|
||||||
DECLARE inventory_id INT;
|
DECLARE inventory_id INT;
|
||||||
|
DECLARE customer_id INT;
|
||||||
|
|
||||||
|
|
||||||
SELECT inventoryId INTO inventory_id
|
SELECT inventoryId , customerId INTO inventory_id, customer_id
|
||||||
FROM Sales_Invoices si
|
FROM Sales_Invoices si
|
||||||
WHERE si.id = NEW.invoiceId
|
WHERE si.id = NEW.invoiceId
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
@@ -184,6 +168,7 @@ DECLARE inventory_id INT;
|
|||||||
inventoryId,
|
inventoryId,
|
||||||
avgCost,
|
avgCost,
|
||||||
remainedInStock,
|
remainedInStock,
|
||||||
|
customerId,
|
||||||
createdAt
|
createdAt
|
||||||
)
|
)
|
||||||
VALUES (
|
VALUES (
|
||||||
@@ -195,12 +180,16 @@ DECLARE inventory_id INT;
|
|||||||
NEW.invoiceId,
|
NEW.invoiceId,
|
||||||
NEW.productId,
|
NEW.productId,
|
||||||
inventory_id,
|
inventory_id,
|
||||||
|
|
||||||
CASE
|
CASE
|
||||||
WHEN NEW.count = 0 THEN 0
|
WHEN NEW.count = 0 THEN 0
|
||||||
ELSE NEW.total / NEW.count
|
ELSE NEW.total / NEW.count
|
||||||
END
|
END,
|
||||||
|
current_stock + NEW.count,
|
||||||
|
customer_id,
|
||||||
|
NOW()
|
||||||
|
);
|
||||||
|
|
||||||
, current_stock + NEW.count, NOW() );
|
|
||||||
|
|
||||||
END;
|
END;
|
||||||
|
|
||||||
@@ -211,9 +200,7 @@ END;
|
|||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_transfer`;
|
DROP TRIGGER IF EXISTS `trg_stock_transfer`;
|
||||||
|
|
||||||
CREATE TRIGGER `trg_stock_transfer` AFTER
|
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
|
|
||||||
ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'INVENTORY_TRANSFER' THEN IF NEW.type = 'IN' THEN
|
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
Stock_Balance (
|
Stock_Balance (
|
||||||
productId,
|
productId,
|
||||||
@@ -296,9 +283,7 @@ END;
|
|||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`;
|
DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`;
|
||||||
|
|
||||||
CREATE TRIGGER `trg_stock_purchase_insert` AFTER
|
CREATE TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN
|
||||||
INSERT
|
|
||||||
ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN
|
|
||||||
|
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
Stock_Balance (
|
Stock_Balance (
|
||||||
@@ -333,9 +318,7 @@ END;
|
|||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_sale_insert`;
|
DROP TRIGGER IF EXISTS `trg_stock_sale_insert`;
|
||||||
|
|
||||||
CREATE TRIGGER `trg_stock_sale_insert` AFTER
|
CREATE TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN
|
||||||
INSERT
|
|
||||||
ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN
|
|
||||||
|
|
||||||
INSERT INTO
|
INSERT INTO
|
||||||
Stock_Balance (
|
Stock_Balance (
|
||||||
@@ -1,16 +1,3 @@
|
|||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Movements`
|
|
||||||
ADD COLUMN `counterInventoryId` INTEGER NULL,
|
|
||||||
ADD COLUMN `customerId` INTEGER NULL;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements`
|
|
||||||
ADD CONSTRAINT `Stock_Movements_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Stock_Movements`
|
|
||||||
ADD CONSTRAINT `Stock_Movements_counterInventoryId_fkey` FOREIGN KEY (`counterInventoryId`) REFERENCES `Inventories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
-- Trigger: trg_transfer_item_after_insert
|
-- Trigger: trg_transfer_item_after_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
@@ -1,522 +0,0 @@
|
|||||||
generator client {
|
|
||||||
provider = "prisma-client"
|
|
||||||
output = "../src/generated/prisma"
|
|
||||||
previewFeatures = ["views"]
|
|
||||||
moduleFormat = "cjs"
|
|
||||||
}
|
|
||||||
|
|
||||||
datasource db {
|
|
||||||
provider = "mysql"
|
|
||||||
}
|
|
||||||
|
|
||||||
model User {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
mobileNumber String @unique @db.Char(11)
|
|
||||||
password String
|
|
||||||
firstName String
|
|
||||||
lastName String
|
|
||||||
roleId Int
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
role Role @relation("User_Role", fields: [roleId], references: [id], onUpdate: NoAction)
|
|
||||||
refreshTokens RefreshToken[]
|
|
||||||
|
|
||||||
@@index([roleId], map: "Users_roleId_fkey")
|
|
||||||
@@map("Users")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Role {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @unique() @db.VarChar(100)
|
|
||||||
description String? @db.Text
|
|
||||||
permissions Json?
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
users User[] @relation("User_Role")
|
|
||||||
|
|
||||||
@@map("Roles")
|
|
||||||
}
|
|
||||||
|
|
||||||
model ProductVariant {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
basePrice Decimal @db.Decimal(10, 2)
|
|
||||||
salePrice Decimal @db.Decimal(10, 2)
|
|
||||||
description String? @db.Text
|
|
||||||
barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100)
|
|
||||||
imageUrl String? @db.VarChar(255)
|
|
||||||
unit String? @db.VarChar(10)
|
|
||||||
quantity Decimal? @default(0.00) @db.Decimal(10, 2)
|
|
||||||
alertQuantity Decimal? @default(5.00) @db.Decimal(10, 2)
|
|
||||||
isActive Boolean @default(true)
|
|
||||||
isFeatured Boolean @default(false)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
productId Int
|
|
||||||
product Product @relation("Product_Variant", fields: [productId], references: [id], onUpdate: NoAction)
|
|
||||||
|
|
||||||
@@index([productId], map: "Product_Variants_productId_fkey")
|
|
||||||
@@map("Product_Variants")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Product {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
description String? @db.Text
|
|
||||||
sku String? @unique(map: "products_sku_unique") @db.VarChar(100)
|
|
||||||
barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
salePrice Decimal @default(0.00) @db.Decimal(10, 2)
|
|
||||||
brandId Int?
|
|
||||||
categoryId Int?
|
|
||||||
inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product")
|
|
||||||
productCharges ProductCharge[] @relation("Product_Charges")
|
|
||||||
variants ProductVariant[] @relation("Product_Variant")
|
|
||||||
brand ProductBrand? @relation("Product_Brand", fields: [brandId], references: [id], onUpdate: NoAction)
|
|
||||||
category ProductCategory? @relation("Product_Category", fields: [categoryId], references: [id], onUpdate: NoAction)
|
|
||||||
purchaseReceiptItems PurchaseReceiptItem[] @relation("Product_PurchaseReceiptItems")
|
|
||||||
salesInvoiceItems SalesInvoiceItem[] @relation("Product_SalesInvoiceItems")
|
|
||||||
stockAdjustments StockAdjustment[] @relation("Product_Stock_Adjustments")
|
|
||||||
stockMovements StockMovement[] @relation("StockMovement_Product")
|
|
||||||
|
|
||||||
stockBalances StockBalance[] @relation("StockBalance_Product")
|
|
||||||
|
|
||||||
@@index([brandId], map: "Products_brandId_fkey")
|
|
||||||
@@index([categoryId], map: "Products_categoryId_fkey")
|
|
||||||
@@map("Products")
|
|
||||||
}
|
|
||||||
|
|
||||||
model ProductBrand {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(100)
|
|
||||||
description String? @db.Text
|
|
||||||
imageUrl String? @db.VarChar(255)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
products Product[] @relation("Product_Brand")
|
|
||||||
|
|
||||||
@@map("Product_brands")
|
|
||||||
}
|
|
||||||
|
|
||||||
model ProductCategory {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(100)
|
|
||||||
description String? @db.Text
|
|
||||||
imageUrl String? @db.VarChar(255)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
products Product[] @relation("Product_Category")
|
|
||||||
|
|
||||||
@@map("Product_categories")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Supplier {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
firstName String @db.VarChar(255)
|
|
||||||
lastName String @db.VarChar(255)
|
|
||||||
email String? @db.VarChar(255)
|
|
||||||
mobileNumber String @unique @db.Char(11)
|
|
||||||
address String? @db.Text
|
|
||||||
city String? @db.VarChar(100)
|
|
||||||
state String? @db.VarChar(100)
|
|
||||||
country String? @db.VarChar(100)
|
|
||||||
isActive Boolean @default(true)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
productCharges ProductCharge[] @relation("Supplier_Product_Charges")
|
|
||||||
purchaseReceipts PurchaseReceipt[]
|
|
||||||
stockMovements StockMovement[] @relation("StockMovement_Supplier")
|
|
||||||
|
|
||||||
@@map("Suppliers")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Customer {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
firstName String @db.VarChar(255)
|
|
||||||
lastName String @db.VarChar(255)
|
|
||||||
email String? @db.VarChar(255)
|
|
||||||
mobileNumber String @unique @db.Char(11)
|
|
||||||
address String? @db.Text
|
|
||||||
city String? @db.VarChar(100)
|
|
||||||
state String? @db.VarChar(100)
|
|
||||||
country String? @db.VarChar(100)
|
|
||||||
isActive Boolean @default(true)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
orders Order[] @relation("Customer_Orders")
|
|
||||||
salesInvoices SalesInvoice[] @relation("Customer_Sales_Invoices")
|
|
||||||
|
|
||||||
@@map("Customers")
|
|
||||||
stockMovements StockMovement[] @relation("StockMovement_Customer")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Inventory {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
location String? @db.VarChar(255)
|
|
||||||
isActive Boolean @default(true)
|
|
||||||
isPointOfSale Boolean @default(false)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
inventoryTransfersFrom InventoryTransfer[] @relation("Inventory_From")
|
|
||||||
inventoryTransfersTo InventoryTransfer[] @relation("Inventory_To")
|
|
||||||
productCharges ProductCharge[] @relation("Inventory_Product_Charges")
|
|
||||||
purchaseReceipts PurchaseReceipt[]
|
|
||||||
stockAdjustments StockAdjustment[] @relation("Inventory_Stock_Adjustments")
|
|
||||||
stockMovements StockMovement[] @relation("StockMovement_Inventory")
|
|
||||||
counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory")
|
|
||||||
stockBalances StockBalance[] @relation("StockBalance_inventory")
|
|
||||||
salesInvoices SalesInvoice[] @relation("Inventory_SalesInvoices")
|
|
||||||
|
|
||||||
@@map("Inventories")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Store {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
location String? @db.VarChar(255)
|
|
||||||
isActive Boolean @default(true)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
|
|
||||||
@@map("Stores")
|
|
||||||
}
|
|
||||||
|
|
||||||
model ProductCharge {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
count Decimal @db.Decimal(10, 2)
|
|
||||||
fee Decimal @db.Decimal(10, 2)
|
|
||||||
totalAmount Decimal @db.Decimal(10, 2)
|
|
||||||
isSettled Boolean @default(false)
|
|
||||||
buyAt DateTime? @db.Timestamp(0)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
productId Int
|
|
||||||
inventoryId Int
|
|
||||||
supplierId Int
|
|
||||||
inventory Inventory @relation("Inventory_Product_Charges", fields: [inventoryId], references: [id], onUpdate: NoAction)
|
|
||||||
product Product @relation("Product_Charges", fields: [productId], references: [id], onUpdate: NoAction)
|
|
||||||
supplier Supplier @relation("Supplier_Product_Charges", fields: [supplierId], references: [id], onUpdate: NoAction)
|
|
||||||
|
|
||||||
@@index([inventoryId], map: "Product_Charges_inventoryId_fkey")
|
|
||||||
@@index([productId], map: "Product_Charges_productId_fkey")
|
|
||||||
@@index([supplierId], map: "Product_Charges_supplierId_fkey")
|
|
||||||
@@map("Product_Charges")
|
|
||||||
}
|
|
||||||
|
|
||||||
model Order {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
orderNumber String @unique @db.VarChar(100)
|
|
||||||
status OrderStatus @default(pending)
|
|
||||||
paymentMethod paymentMethod @default(card)
|
|
||||||
totalAmount Decimal @db.Decimal(10, 2)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
customerId Int
|
|
||||||
customer Customer @relation("Customer_Orders", fields: [customerId], references: [id], onUpdate: NoAction)
|
|
||||||
|
|
||||||
@@index([customerId], map: "Orders_customerId_fkey")
|
|
||||||
@@map("Orders")
|
|
||||||
}
|
|
||||||
|
|
||||||
model PurchaseReceipt {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
code String @unique @db.VarChar(100)
|
|
||||||
totalAmount Decimal @db.Decimal(10, 2)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
supplierId Int
|
|
||||||
inventoryId Int
|
|
||||||
items PurchaseReceiptItem[] @relation("PurchaseReceipt_Items")
|
|
||||||
inventory Inventory @relation(fields: [inventoryId], references: [id])
|
|
||||||
supplier Supplier @relation(fields: [supplierId], references: [id])
|
|
||||||
|
|
||||||
@@index([inventoryId], map: "Purchase_Receipts_inventoryId_fkey")
|
|
||||||
@@index([supplierId], map: "Purchase_Receipts_supplierId_fkey")
|
|
||||||
@@map("Purchase_Receipts")
|
|
||||||
}
|
|
||||||
|
|
||||||
model PurchaseReceiptItem {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
count Decimal @db.Decimal(10, 2)
|
|
||||||
fee Decimal @db.Decimal(10, 2)
|
|
||||||
total Decimal @db.Decimal(10, 2)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
receiptId Int
|
|
||||||
productId Int
|
|
||||||
receipt PurchaseReceipt @relation("PurchaseReceipt_Items", fields: [receiptId], references: [id])
|
|
||||||
product Product @relation("Product_PurchaseReceiptItems", fields: [productId], references: [id])
|
|
||||||
|
|
||||||
@@index([productId], map: "Purchase_Receipt_Items_productId_fkey")
|
|
||||||
@@index([receiptId], map: "Purchase_Receipt_Items_receiptId_fkey")
|
|
||||||
@@map("Purchase_Receipt_Items")
|
|
||||||
}
|
|
||||||
|
|
||||||
model SalesInvoice {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
code String @unique @db.VarChar(100)
|
|
||||||
totalAmount Decimal @db.Decimal(10, 2)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
customerId Int?
|
|
||||||
inventoryId Int
|
|
||||||
items SalesInvoiceItem[] @relation("SalesInvoice_Items")
|
|
||||||
customer Customer? @relation("Customer_Sales_Invoices", fields: [customerId], references: [id])
|
|
||||||
inventory Inventory @relation("Inventory_SalesInvoices", fields: [inventoryId], references: [id])
|
|
||||||
|
|
||||||
@@index([inventoryId], map: "Sales_Invoices_inventoryId_fkey")
|
|
||||||
@@index([customerId], map: "Sales_Invoices_customerId_fkey")
|
|
||||||
@@map("Sales_Invoices")
|
|
||||||
}
|
|
||||||
|
|
||||||
model SalesInvoiceItem {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
count Decimal @db.Decimal(10, 2)
|
|
||||||
fee Decimal @db.Decimal(10, 2)
|
|
||||||
total Decimal @db.Decimal(10, 2)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
invoiceId Int
|
|
||||||
productId Int
|
|
||||||
invoice SalesInvoice @relation("SalesInvoice_Items", fields: [invoiceId], references: [id])
|
|
||||||
product Product @relation("Product_SalesInvoiceItems", fields: [productId], references: [id])
|
|
||||||
|
|
||||||
@@index([invoiceId], map: "Sales_Invoice_Items_invoiceId_fkey")
|
|
||||||
@@index([productId], map: "Sales_Invoice_Items_productId_fkey")
|
|
||||||
@@map("Sales_Invoice_Items")
|
|
||||||
}
|
|
||||||
|
|
||||||
model StockMovement {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
type MovementType
|
|
||||||
quantity Decimal @db.Decimal(10, 2)
|
|
||||||
fee Decimal @db.Decimal(10, 2)
|
|
||||||
totalCost Decimal @db.Decimal(10, 2)
|
|
||||||
referenceType MovementReferenceType
|
|
||||||
referenceId String
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
productId Int
|
|
||||||
inventoryId Int
|
|
||||||
avgCost Decimal @db.Decimal(10, 2)
|
|
||||||
remainedInStock Decimal @default(0) @db.Decimal(10, 2)
|
|
||||||
inventory Inventory @relation("StockMovement_Inventory", fields: [inventoryId], references: [id])
|
|
||||||
product Product @relation("StockMovement_Product", fields: [productId], references: [id])
|
|
||||||
supplierId Int?
|
|
||||||
supplier Supplier? @relation("StockMovement_Supplier", fields: [supplierId], references: [id])
|
|
||||||
customerId Int?
|
|
||||||
customer Customer? @relation("StockMovement_Customer", fields: [customerId], references: [id])
|
|
||||||
counterInventoryId Int?
|
|
||||||
counterInventory Inventory? @relation("StockMovement_CounterInventory", fields: [counterInventoryId], references: [id])
|
|
||||||
|
|
||||||
@@index([inventoryId], map: "Stock_Movements_inventoryId_fkey")
|
|
||||||
@@index([productId], map: "Stock_Movements_productId_fkey")
|
|
||||||
@@map("Stock_Movements")
|
|
||||||
}
|
|
||||||
|
|
||||||
model StockBalance {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
|
|
||||||
productId Int
|
|
||||||
inventoryId Int
|
|
||||||
|
|
||||||
quantity Decimal @default(0) @db.Decimal(14, 3)
|
|
||||||
|
|
||||||
avgCost Decimal @default(0) @db.Decimal(14, 2)
|
|
||||||
totalCost Decimal @default(0) @db.Decimal(14, 2)
|
|
||||||
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
|
|
||||||
product Product @relation("StockBalance_Product", fields: [productId], references: [id])
|
|
||||||
inventory Inventory @relation("StockBalance_inventory", fields: [inventoryId], references: [id])
|
|
||||||
|
|
||||||
@@unique([productId, inventoryId])
|
|
||||||
@@index([productId])
|
|
||||||
@@index([inventoryId])
|
|
||||||
@@map("Stock_Balance")
|
|
||||||
}
|
|
||||||
|
|
||||||
model OtpCode {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
mobileNumber String @db.VarChar(20)
|
|
||||||
code String @db.VarChar(10)
|
|
||||||
used Boolean @default(false)
|
|
||||||
expiresAt DateTime @db.Timestamp(0)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
|
|
||||||
@@index([mobileNumber])
|
|
||||||
@@map("Otp_Codes")
|
|
||||||
}
|
|
||||||
|
|
||||||
model RefreshToken {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
tokenHash String @db.VarChar(255)
|
|
||||||
userId Int
|
|
||||||
revoked Boolean @default(false)
|
|
||||||
expiresAt DateTime @db.Timestamp(0)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
|
|
||||||
user User @relation(fields: [userId], references: [id])
|
|
||||||
|
|
||||||
@@index([userId])
|
|
||||||
@@map("Refresh_Tokens")
|
|
||||||
}
|
|
||||||
|
|
||||||
model InventoryTransfer {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
code String @unique @db.VarChar(100)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
fromInventoryId Int
|
|
||||||
toInventoryId Int
|
|
||||||
items InventoryTransferItem[] @relation("InventoryTransfer_Items")
|
|
||||||
fromInventory Inventory @relation("Inventory_From", fields: [fromInventoryId], references: [id])
|
|
||||||
toInventory Inventory @relation("Inventory_To", fields: [toInventoryId], references: [id])
|
|
||||||
|
|
||||||
@@index([fromInventoryId], map: "Inventory_Transfers_fromInventoryId_fkey")
|
|
||||||
@@index([toInventoryId], map: "Inventory_Transfers_toInventoryId_fkey")
|
|
||||||
@@map("Inventory_Transfers")
|
|
||||||
}
|
|
||||||
|
|
||||||
model InventoryTransferItem {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
count Decimal @db.Decimal(10, 2)
|
|
||||||
productId Int
|
|
||||||
transferId Int
|
|
||||||
product Product @relation("InventoryTransferItem_Product", fields: [productId], references: [id])
|
|
||||||
transfer InventoryTransfer @relation("InventoryTransfer_Items", fields: [transferId], references: [id])
|
|
||||||
|
|
||||||
@@index([productId], map: "Inventory_Transfer_Items_productId_fkey")
|
|
||||||
@@index([transferId], map: "Inventory_Transfer_Items_transferId_fkey")
|
|
||||||
@@map("Inventory_Transfer_Items")
|
|
||||||
}
|
|
||||||
|
|
||||||
model StockAdjustment {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
adjustedQuantity Decimal @db.Decimal(10, 2)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
productId Int
|
|
||||||
inventoryId Int
|
|
||||||
inventory Inventory @relation("Inventory_Stock_Adjustments", fields: [inventoryId], references: [id])
|
|
||||||
product Product @relation("Product_Stock_Adjustments", fields: [productId], references: [id])
|
|
||||||
|
|
||||||
@@index([inventoryId], map: "Stock_Adjustments_inventoryId_fkey")
|
|
||||||
@@index([productId], map: "Stock_Adjustments_productId_fkey")
|
|
||||||
@@map("Stock_Adjustments")
|
|
||||||
}
|
|
||||||
|
|
||||||
view StockMovements_View {
|
|
||||||
id Int @default(0)
|
|
||||||
productId Int
|
|
||||||
type stock_movements_view_type
|
|
||||||
quantity Decimal @db.Decimal(10, 2)
|
|
||||||
fee Decimal @db.Decimal(10, 2)
|
|
||||||
totalCost Decimal @db.Decimal(10, 2)
|
|
||||||
referenceId String
|
|
||||||
referenceType stock_movements_view_referenceType
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
current_stock Decimal?
|
|
||||||
current_avg_cost Decimal?
|
|
||||||
|
|
||||||
@@map("Stock_Movements_View")
|
|
||||||
@@ignore
|
|
||||||
}
|
|
||||||
|
|
||||||
view inventory_overview {
|
|
||||||
ProductId Int
|
|
||||||
stock_quantity Decimal
|
|
||||||
avgCost Decimal
|
|
||||||
totalCost Decimal
|
|
||||||
updatedAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
|
|
||||||
@@map("Inventory_Overview")
|
|
||||||
}
|
|
||||||
|
|
||||||
view stock_cardex {
|
|
||||||
productId Int
|
|
||||||
movement_id Int @default(0)
|
|
||||||
type stock_cardex_type
|
|
||||||
quantity Decimal @db.Decimal(10, 2)
|
|
||||||
fee Decimal @db.Decimal(10, 2)
|
|
||||||
totalCost Decimal @db.Decimal(10, 2)
|
|
||||||
balance_quantity Decimal?
|
|
||||||
balance_avg_cost Decimal?
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
|
|
||||||
@@map("Stock_Cardex")
|
|
||||||
}
|
|
||||||
|
|
||||||
view stock_view {
|
|
||||||
productId Int
|
|
||||||
inventoryId Int
|
|
||||||
stock Decimal? @db.Decimal(32, 2)
|
|
||||||
|
|
||||||
@@map("Stock_View")
|
|
||||||
}
|
|
||||||
|
|
||||||
enum OrderStatus {
|
|
||||||
pending
|
|
||||||
reject
|
|
||||||
done
|
|
||||||
}
|
|
||||||
|
|
||||||
enum paymentMethod {
|
|
||||||
cash
|
|
||||||
card
|
|
||||||
}
|
|
||||||
|
|
||||||
enum MovementType {
|
|
||||||
IN
|
|
||||||
OUT
|
|
||||||
ADJUST
|
|
||||||
}
|
|
||||||
|
|
||||||
enum MovementReferenceType {
|
|
||||||
PURCHASE
|
|
||||||
SALES
|
|
||||||
ADJUSTMENT
|
|
||||||
INVENTORY_TRANSFER
|
|
||||||
}
|
|
||||||
|
|
||||||
enum stock_cardex_type {
|
|
||||||
IN
|
|
||||||
OUT
|
|
||||||
ADJUST
|
|
||||||
}
|
|
||||||
|
|
||||||
enum stock_movements_view_type {
|
|
||||||
IN
|
|
||||||
OUT
|
|
||||||
ADJUST
|
|
||||||
}
|
|
||||||
|
|
||||||
enum stock_movements_view_referenceType {
|
|
||||||
PURCHASE
|
|
||||||
SALES
|
|
||||||
ADJUSTMENT
|
|
||||||
}
|
|
||||||
|
|
||||||
model TriggerLog {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
name String @db.Text
|
|
||||||
message String @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
|
|
||||||
@@map("Trigger_Logs")
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,54 @@
|
|||||||
|
model User {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
mobileNumber String @unique @db.Char(11)
|
||||||
|
password String
|
||||||
|
firstName String
|
||||||
|
lastName String
|
||||||
|
roleId Int
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
refreshTokens RefreshToken[]
|
||||||
|
role Role @relation("User_Role", fields: [roleId], references: [id], onUpdate: NoAction)
|
||||||
|
|
||||||
|
@@index([roleId], map: "Users_roleId_fkey")
|
||||||
|
@@map("Users")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Role {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @unique @db.VarChar(100)
|
||||||
|
description String? @db.Text
|
||||||
|
permissions Json?
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
users User[] @relation("User_Role")
|
||||||
|
|
||||||
|
@@map("Roles")
|
||||||
|
}
|
||||||
|
|
||||||
|
model OtpCode {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
mobileNumber String @db.VarChar(20)
|
||||||
|
code String @db.VarChar(10)
|
||||||
|
used Boolean @default(false)
|
||||||
|
expiresAt DateTime @db.Timestamp(0)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
|
||||||
|
@@index([mobileNumber])
|
||||||
|
@@map("Otp_Codes")
|
||||||
|
}
|
||||||
|
|
||||||
|
model RefreshToken {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
tokenHash String @db.VarChar(255)
|
||||||
|
userId Int
|
||||||
|
revoked Boolean @default(false)
|
||||||
|
expiresAt DateTime @db.Timestamp(0)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
user User @relation(fields: [userId], references: [id])
|
||||||
|
|
||||||
|
@@index([userId])
|
||||||
|
@@map("Refresh_Tokens")
|
||||||
|
}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
model BankBranch {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
code String @unique() @db.VarChar(10)
|
||||||
|
address String? @db.VarChar(500)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
bankId Int
|
||||||
|
|
||||||
|
bank Bank @relation("bank_branches", fields: [bankId], references: [id])
|
||||||
|
bankAccounts BankAccount[] @relation("Bank_Accounts_branchId_fkey")
|
||||||
|
|
||||||
|
@@map("Bank_Branches")
|
||||||
|
}
|
||||||
|
|
||||||
|
model BankAccount {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
accountNumber String? @unique @db.VarChar(20)
|
||||||
|
cardNumber String? @unique @db.VarChar(16)
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
iban String? @db.VarChar(34)
|
||||||
|
branchId Int
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
|
||||||
|
branch BankBranch @relation("Bank_Accounts_branchId_fkey", fields: [branchId], references: [id])
|
||||||
|
inventories Inventory[] @relation("Bank_Accounts_inventoryId_fkey")
|
||||||
|
purchaseReceiptPayments PurchaseReceiptPayments[]
|
||||||
|
posAccounts PosAccount[]
|
||||||
|
inventoryBankAccounts InventoryBankAccount[] @relation("Inventory_Bank_Accounts_bankAccountId_fkey")
|
||||||
|
|
||||||
|
@@map("Bank_Accounts")
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
enum OrderStatus {
|
||||||
|
PENDING
|
||||||
|
REJECT
|
||||||
|
DONE
|
||||||
|
}
|
||||||
|
|
||||||
|
enum MovementType {
|
||||||
|
IN
|
||||||
|
OUT
|
||||||
|
ADJUST
|
||||||
|
}
|
||||||
|
|
||||||
|
enum MovementReferenceType {
|
||||||
|
PURCHASE
|
||||||
|
SALES
|
||||||
|
ADJUSTMENT
|
||||||
|
INVENTORY_TRANSFER
|
||||||
|
}
|
||||||
|
|
||||||
|
enum payment_method_type {
|
||||||
|
CASH
|
||||||
|
CARD
|
||||||
|
BANK
|
||||||
|
CHECK
|
||||||
|
OTHER
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ledgerSourceType {
|
||||||
|
PURCHASE
|
||||||
|
PAYMENT
|
||||||
|
ADJUSTMENT
|
||||||
|
REFUND
|
||||||
|
}
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
|
||||||
@@ -0,0 +1,85 @@
|
|||||||
|
model Inventory {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
location String? @db.VarChar(255)
|
||||||
|
isActive Boolean @default(true)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
isPointOfSale Boolean @default(false)
|
||||||
|
inventoryTransfersFrom InventoryTransfer[] @relation("Inventory_From")
|
||||||
|
inventoryTransfersTo InventoryTransfer[] @relation("Inventory_To")
|
||||||
|
// productCharges ProductCharge[] @relation("Inventory_Product_Charges")
|
||||||
|
purchaseReceipts PurchaseReceipt[]
|
||||||
|
salesInvoices SalesInvoice[] @relation("Inventory_SalesInvoices")
|
||||||
|
stockAdjustments StockAdjustment[] @relation("Inventory_Stock_Adjustments")
|
||||||
|
stockBalances StockBalance[] @relation("StockBalance_inventory")
|
||||||
|
counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory")
|
||||||
|
stockMovements StockMovement[] @relation("StockMovement_Inventory")
|
||||||
|
bankAccountId Int?
|
||||||
|
bankAccounts BankAccount[] @relation("Bank_Accounts_inventoryId_fkey")
|
||||||
|
posAccounts PosAccount[] @relation("Inventory_PosAccounts")
|
||||||
|
inventoryBankAccounts InventoryBankAccount[] @relation("Inventory_Bank_Accounts_inventoryId_fkey")
|
||||||
|
|
||||||
|
@@map("Inventories")
|
||||||
|
}
|
||||||
|
|
||||||
|
model InventoryTransfer {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
code String @unique @db.VarChar(100)
|
||||||
|
description String? @db.Text
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
fromInventoryId Int
|
||||||
|
toInventoryId Int
|
||||||
|
items InventoryTransferItem[] @relation("InventoryTransfer_Items")
|
||||||
|
fromInventory Inventory @relation("Inventory_From", fields: [fromInventoryId], references: [id])
|
||||||
|
toInventory Inventory @relation("Inventory_To", fields: [toInventoryId], references: [id])
|
||||||
|
|
||||||
|
@@index([fromInventoryId], map: "Inventory_Transfers_fromInventoryId_fkey")
|
||||||
|
@@index([toInventoryId], map: "Inventory_Transfers_toInventoryId_fkey")
|
||||||
|
@@map("Inventory_Transfers")
|
||||||
|
}
|
||||||
|
|
||||||
|
model InventoryTransferItem {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
count Decimal @db.Decimal(10, 2)
|
||||||
|
productId Int
|
||||||
|
transferId Int
|
||||||
|
product Product @relation("InventoryTransferItem_Product", fields: [productId], references: [id])
|
||||||
|
transfer InventoryTransfer @relation("InventoryTransfer_Items", fields: [transferId], references: [id])
|
||||||
|
|
||||||
|
@@index([productId], map: "Inventory_Transfer_Items_productId_fkey")
|
||||||
|
@@index([transferId], map: "Inventory_Transfer_Items_transferId_fkey")
|
||||||
|
@@map("Inventory_Transfer_Items")
|
||||||
|
}
|
||||||
|
|
||||||
|
model InventoryBankAccount {
|
||||||
|
inventoryId Int
|
||||||
|
bankAccountId Int
|
||||||
|
|
||||||
|
inventory Inventory @relation("Inventory_Bank_Accounts_inventoryId_fkey", fields: [inventoryId], references: [id])
|
||||||
|
bankAccount BankAccount @relation("Inventory_Bank_Accounts_bankAccountId_fkey", fields: [bankAccountId], references: [id])
|
||||||
|
posAccounts PosAccount[] @relation("Pos_Accounts_inventoryBankAccountId_fkey")
|
||||||
|
|
||||||
|
@@id([inventoryId, bankAccountId])
|
||||||
|
@@index([bankAccountId])
|
||||||
|
@@map("Inventory_Bank_Accounts")
|
||||||
|
}
|
||||||
|
|
||||||
|
model PosAccount {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
code String @unique() @db.VarChar(10)
|
||||||
|
description String? @db.VarChar(500)
|
||||||
|
bankAccountId Int?
|
||||||
|
inventoryId Int
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
|
||||||
|
inventory Inventory @relation("Inventory_PosAccounts", fields: [inventoryId], references: [id])
|
||||||
|
inventoryBankAccount InventoryBankAccount? @relation("Pos_Accounts_inventoryBankAccountId_fkey", fields: [bankAccountId, inventoryId], references: [bankAccountId, inventoryId])
|
||||||
|
bankAccount BankAccount? @relation(fields: [bankAccountId], references: [id])
|
||||||
|
|
||||||
|
@@map("Pos_Accounts")
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
model Bank {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
shortName String @unique() @db.VarChar(3)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
|
||||||
|
bankBranches BankBranch[] @relation("bank_branches")
|
||||||
|
|
||||||
|
@@map("Banks")
|
||||||
|
}
|
||||||
@@ -0,0 +1,118 @@
|
|||||||
|
model Supplier {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
firstName String @db.VarChar(255)
|
||||||
|
lastName String @db.VarChar(255)
|
||||||
|
email String? @db.VarChar(255)
|
||||||
|
mobileNumber String @unique @db.Char(11)
|
||||||
|
address String? @db.Text
|
||||||
|
city String? @db.VarChar(100)
|
||||||
|
state String? @db.VarChar(100)
|
||||||
|
country String? @db.VarChar(100)
|
||||||
|
isActive Boolean @default(true)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
purchaseReceipts PurchaseReceipt[]
|
||||||
|
stockMovements StockMovement[] @relation("StockMovement_Supplier")
|
||||||
|
supplierLedgers SupplierLedger[]
|
||||||
|
|
||||||
|
@@map("Suppliers")
|
||||||
|
}
|
||||||
|
|
||||||
|
model SupplierLedger {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
description String? @db.Text
|
||||||
|
debit Decimal @db.Decimal(10, 2)
|
||||||
|
credit Decimal @db.Decimal(10, 2)
|
||||||
|
balance Decimal @db.Decimal(10, 2)
|
||||||
|
sourceType ledgerSourceType
|
||||||
|
sourceId Int
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
|
||||||
|
supplierId Int
|
||||||
|
supplier Supplier @relation(fields: [supplierId], references: [id])
|
||||||
|
|
||||||
|
@@index([supplierId], map: "Supplier_Ledger_supplierId_fkey")
|
||||||
|
@@map("Supplier_Ledger")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Customer {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
firstName String @db.VarChar(255)
|
||||||
|
lastName String @db.VarChar(255)
|
||||||
|
email String? @db.VarChar(255)
|
||||||
|
mobileNumber String @unique @db.Char(11)
|
||||||
|
address String? @db.Text
|
||||||
|
city String? @db.VarChar(100)
|
||||||
|
state String? @db.VarChar(100)
|
||||||
|
country String? @db.VarChar(100)
|
||||||
|
isActive Boolean @default(true)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
orders Order[] @relation("Customer_Orders")
|
||||||
|
salesInvoices SalesInvoice[] @relation("Customer_Sales_Invoices")
|
||||||
|
stockMovements StockMovement[] @relation("StockMovement_Customer")
|
||||||
|
|
||||||
|
@@map("Customers")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Order {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
orderNumber String @unique @db.VarChar(100)
|
||||||
|
status OrderStatus @default(PENDING)
|
||||||
|
paymentMethod payment_method_type @default(CARD)
|
||||||
|
totalAmount Decimal @db.Decimal(10, 2)
|
||||||
|
description String? @db.Text
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
customerId Int
|
||||||
|
customer Customer @relation("Customer_Orders", fields: [customerId], references: [id], onUpdate: NoAction)
|
||||||
|
|
||||||
|
@@index([customerId], map: "Orders_customerId_fkey")
|
||||||
|
@@map("Orders")
|
||||||
|
}
|
||||||
|
|
||||||
|
model SalesInvoice {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
code String @unique @db.VarChar(100)
|
||||||
|
totalAmount Decimal @db.Decimal(10, 2)
|
||||||
|
description String? @db.Text
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
customerId Int?
|
||||||
|
inventoryId Int
|
||||||
|
items SalesInvoiceItem[] @relation("SalesInvoice_Items")
|
||||||
|
customer Customer? @relation("Customer_Sales_Invoices", fields: [customerId], references: [id])
|
||||||
|
inventory Inventory @relation("Inventory_SalesInvoices", fields: [inventoryId], references: [id])
|
||||||
|
|
||||||
|
@@index([inventoryId], map: "Sales_Invoices_inventoryId_fkey")
|
||||||
|
@@index([customerId], map: "Sales_Invoices_customerId_fkey")
|
||||||
|
@@map("Sales_Invoices")
|
||||||
|
}
|
||||||
|
|
||||||
|
model SalesInvoiceItem {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
count Decimal @db.Decimal(10, 2)
|
||||||
|
fee Decimal @db.Decimal(10, 2)
|
||||||
|
total Decimal @db.Decimal(10, 2)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
invoiceId Int
|
||||||
|
productId Int
|
||||||
|
invoice SalesInvoice @relation("SalesInvoice_Items", fields: [invoiceId], references: [id])
|
||||||
|
product Product @relation("Product_SalesInvoiceItems", fields: [productId], references: [id])
|
||||||
|
|
||||||
|
@@index([invoiceId], map: "Sales_Invoice_Items_invoiceId_fkey")
|
||||||
|
@@index([productId], map: "Sales_Invoice_Items_productId_fkey")
|
||||||
|
@@map("Sales_Invoice_Items")
|
||||||
|
}
|
||||||
|
|
||||||
|
model TriggerLog {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
message String @db.Text
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
name String @db.Text
|
||||||
|
|
||||||
|
@@map("Trigger_Logs")
|
||||||
|
}
|
||||||
@@ -0,0 +1,76 @@
|
|||||||
|
model ProductVariant {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
basePrice Decimal @db.Decimal(10, 2)
|
||||||
|
salePrice Decimal @db.Decimal(10, 2)
|
||||||
|
description String? @db.Text
|
||||||
|
barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100)
|
||||||
|
imageUrl String? @db.VarChar(255)
|
||||||
|
unit String? @db.VarChar(10)
|
||||||
|
quantity Decimal? @default(0.00) @db.Decimal(10, 2)
|
||||||
|
alertQuantity Decimal? @default(5.00) @db.Decimal(10, 2)
|
||||||
|
isActive Boolean @default(true)
|
||||||
|
isFeatured Boolean @default(false)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
productId Int
|
||||||
|
product Product @relation("Product_Variant", fields: [productId], references: [id], onUpdate: NoAction)
|
||||||
|
|
||||||
|
@@index([productId], map: "Product_Variants_productId_fkey")
|
||||||
|
@@map("Product_Variants")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Product {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
description String? @db.Text
|
||||||
|
sku String? @unique(map: "products_sku_unique") @db.VarChar(100)
|
||||||
|
barcode String? @unique(map: "products_barcode_unique") @db.VarChar(100)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
brandId Int?
|
||||||
|
categoryId Int?
|
||||||
|
salePrice Decimal @default(0.00) @db.Decimal(10, 2)
|
||||||
|
inventoryTransferItems InventoryTransferItem[] @relation("InventoryTransferItem_Product")
|
||||||
|
// productCharges ProductCharge[] @relation("Product_Charges")
|
||||||
|
variants ProductVariant[] @relation("Product_Variant")
|
||||||
|
brand ProductBrand? @relation("Product_Brand", fields: [brandId], references: [id], onUpdate: NoAction)
|
||||||
|
category ProductCategory? @relation("Product_Category", fields: [categoryId], references: [id], onUpdate: NoAction)
|
||||||
|
purchaseReceiptItems PurchaseReceiptItem[] @relation("Product_PurchaseReceiptItems")
|
||||||
|
salesInvoiceItems SalesInvoiceItem[] @relation("Product_SalesInvoiceItems")
|
||||||
|
stockAdjustments StockAdjustment[] @relation("Product_Stock_Adjustments")
|
||||||
|
stockBalances StockBalance[] @relation("StockBalance_Product")
|
||||||
|
stockMovements StockMovement[] @relation("StockMovement_Product")
|
||||||
|
|
||||||
|
@@index([brandId], map: "Products_brandId_fkey")
|
||||||
|
@@index([categoryId], map: "Products_categoryId_fkey")
|
||||||
|
@@map("Products")
|
||||||
|
}
|
||||||
|
|
||||||
|
model ProductBrand {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(100)
|
||||||
|
description String? @db.Text
|
||||||
|
imageUrl String? @db.VarChar(255)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
products Product[] @relation("Product_Brand")
|
||||||
|
|
||||||
|
@@map("Product_brands")
|
||||||
|
}
|
||||||
|
|
||||||
|
model ProductCategory {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
name String @db.VarChar(100)
|
||||||
|
description String? @db.Text
|
||||||
|
imageUrl String? @db.VarChar(255)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
products Product[] @relation("Product_Category")
|
||||||
|
|
||||||
|
@@map("Product_categories")
|
||||||
|
}
|
||||||
@@ -0,0 +1,55 @@
|
|||||||
|
model PurchaseReceipt {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
code String @unique @db.VarChar(100)
|
||||||
|
totalAmount Decimal @db.Decimal(10, 2)
|
||||||
|
paidAmount Decimal @default(0.00) @db.Decimal(10, 2)
|
||||||
|
isSettled Boolean @default(false)
|
||||||
|
description String? @db.Text
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
supplierId Int
|
||||||
|
inventoryId Int
|
||||||
|
items PurchaseReceiptItem[] @relation("PurchaseReceipt_Items")
|
||||||
|
inventory Inventory @relation(fields: [inventoryId], references: [id])
|
||||||
|
supplier Supplier @relation(fields: [supplierId], references: [id])
|
||||||
|
purchaseReceiptPayments PurchaseReceiptPayments[]
|
||||||
|
|
||||||
|
@@index([inventoryId], map: "Purchase_Receipts_inventoryId_fkey")
|
||||||
|
@@index([supplierId], map: "Purchase_Receipts_supplierId_fkey")
|
||||||
|
@@map("Purchase_Receipts")
|
||||||
|
}
|
||||||
|
|
||||||
|
model PurchaseReceiptItem {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
count Decimal @db.Decimal(10, 2)
|
||||||
|
fee Decimal @db.Decimal(10, 2)
|
||||||
|
total Decimal @db.Decimal(10, 2)
|
||||||
|
description String? @db.Text
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
receiptId Int
|
||||||
|
productId Int
|
||||||
|
product Product @relation("Product_PurchaseReceiptItems", fields: [productId], references: [id])
|
||||||
|
receipt PurchaseReceipt @relation("PurchaseReceipt_Items", fields: [receiptId], references: [id])
|
||||||
|
|
||||||
|
@@index([productId], map: "Purchase_Receipt_Items_productId_fkey")
|
||||||
|
@@index([receiptId], map: "Purchase_Receipt_Items_receiptId_fkey")
|
||||||
|
@@map("Purchase_Receipt_Items")
|
||||||
|
}
|
||||||
|
|
||||||
|
model PurchaseReceiptPayments {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
amount Decimal @db.Decimal(10, 2)
|
||||||
|
paymentMethod payment_method_type
|
||||||
|
bankAccountId Int?
|
||||||
|
description String? @db.Text
|
||||||
|
payedAt DateTime @db.Timestamp(0)
|
||||||
|
receiptId Int
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
|
||||||
|
purchaseReceipt PurchaseReceipt @relation(fields: [receiptId], references: [id])
|
||||||
|
bankAccount BankAccount? @relation(fields: [bankAccountId], references: [id])
|
||||||
|
|
||||||
|
@@index([receiptId], map: "Purchase_Receipt_Payments_receiptId_fkey")
|
||||||
|
@@index([bankAccountId], map: "Purchase_Receipt_Payments_bankAccountId_fkey")
|
||||||
|
@@map("Purchase_Receipt_Payments")
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
generator client {
|
||||||
|
provider = "prisma-client"
|
||||||
|
output = "../../src/generated/prisma"
|
||||||
|
moduleFormat = "cjs"
|
||||||
|
}
|
||||||
|
|
||||||
|
datasource db {
|
||||||
|
provider = "mysql"
|
||||||
|
}
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
model StockMovement {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
type MovementType
|
||||||
|
quantity Decimal @db.Decimal(10, 2)
|
||||||
|
fee Decimal @db.Decimal(10, 2)
|
||||||
|
totalCost Decimal @db.Decimal(10, 2)
|
||||||
|
referenceType MovementReferenceType
|
||||||
|
referenceId String
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
productId Int
|
||||||
|
inventoryId Int
|
||||||
|
avgCost Decimal @db.Decimal(10, 2)
|
||||||
|
supplierId Int?
|
||||||
|
remainedInStock Decimal @default(0.00) @db.Decimal(10, 2)
|
||||||
|
counterInventoryId Int?
|
||||||
|
customerId Int?
|
||||||
|
counterInventory Inventory? @relation("StockMovement_CounterInventory", fields: [counterInventoryId], references: [id])
|
||||||
|
customer Customer? @relation("StockMovement_Customer", fields: [customerId], references: [id])
|
||||||
|
inventory Inventory @relation("StockMovement_Inventory", fields: [inventoryId], references: [id])
|
||||||
|
product Product @relation("StockMovement_Product", fields: [productId], references: [id])
|
||||||
|
supplier Supplier? @relation("StockMovement_Supplier", fields: [supplierId], references: [id])
|
||||||
|
|
||||||
|
@@index([inventoryId], map: "Stock_Movements_inventoryId_fkey")
|
||||||
|
@@index([productId], map: "Stock_Movements_productId_fkey")
|
||||||
|
@@index([counterInventoryId], map: "Stock_Movements_counterInventoryId_fkey")
|
||||||
|
@@index([customerId], map: "Stock_Movements_customerId_fkey")
|
||||||
|
@@index([supplierId], map: "Stock_Movements_supplierId_fkey")
|
||||||
|
@@map("Stock_Movements")
|
||||||
|
}
|
||||||
|
|
||||||
|
model StockBalance {
|
||||||
|
quantity Decimal @default(0.000) @db.Decimal(14, 3)
|
||||||
|
totalCost Decimal @default(0.00) @db.Decimal(14, 2)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
avgCost Decimal @default(0.00) @db.Decimal(14, 2)
|
||||||
|
inventoryId Int
|
||||||
|
productId Int
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
inventory Inventory @relation("StockBalance_inventory", fields: [inventoryId], references: [id])
|
||||||
|
product Product @relation("StockBalance_Product", fields: [productId], references: [id])
|
||||||
|
|
||||||
|
@@unique([productId, inventoryId])
|
||||||
|
@@index([productId])
|
||||||
|
@@index([inventoryId])
|
||||||
|
@@map("Stock_Balance")
|
||||||
|
}
|
||||||
|
|
||||||
|
model StockAdjustment {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
adjustedQuantity Decimal @db.Decimal(10, 2)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
productId Int
|
||||||
|
inventoryId Int
|
||||||
|
inventory Inventory @relation("Inventory_Stock_Adjustments", fields: [inventoryId], references: [id])
|
||||||
|
product Product @relation("Product_Stock_Adjustments", fields: [productId], references: [id])
|
||||||
|
|
||||||
|
@@index([inventoryId], map: "Stock_Adjustments_inventoryId_fkey")
|
||||||
|
@@index([productId], map: "Stock_Adjustments_productId_fkey")
|
||||||
|
@@map("Stock_Adjustments")
|
||||||
|
}
|
||||||
+295
-102
@@ -1,111 +1,304 @@
|
|||||||
import { prisma } from '../src/lib/prisma'
|
import { prisma } from '../src/lib/prisma'
|
||||||
|
import { PurchaseReceiptsService } from '../src/purchase-receipts/purchase-receipts.service'
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
if ((await prisma.role.count()) === 0) {
|
// if ((await prisma.role.count()) === 0) {
|
||||||
await prisma.role.upsert({
|
// await prisma.role.upsert({
|
||||||
where: { id: 0, name: 'Admin' },
|
// where: { id: 0, name: 'Admin' },
|
||||||
update: {},
|
// update: {},
|
||||||
create: {
|
// create: {
|
||||||
name: 'Admin',
|
// name: 'Admin',
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((await prisma.user.count()) === 0) {
|
|
||||||
const adminRole = await prisma.role.findUnique({ where: { name: 'Admin' } })
|
|
||||||
if (!adminRole) {
|
|
||||||
return
|
|
||||||
}
|
|
||||||
await prisma.user.upsert({
|
|
||||||
where: { id: 1, firstName: 'عباس', lastName: 'حسنی' },
|
|
||||||
update: {},
|
|
||||||
create: {
|
|
||||||
firstName: 'عباس',
|
|
||||||
lastName: 'حسنی',
|
|
||||||
roleId: adminRole.id,
|
|
||||||
mobileNumber: '09120258156',
|
|
||||||
password: '12345678',
|
|
||||||
},
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((await prisma.inventory.count()) === 0) {
|
|
||||||
await prisma.inventory.createMany({
|
|
||||||
data: [
|
|
||||||
{ name: 'انبار مرکزی', location: 'تهران', isPointOfSale: false, isActive: true },
|
|
||||||
{
|
|
||||||
name: 'فروشگاه حضوری',
|
|
||||||
location: 'مرکز شهر',
|
|
||||||
isPointOfSale: true,
|
|
||||||
isActive: true,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: 'فروشگاه اینترنتی',
|
|
||||||
location: 'مرکز شهر',
|
|
||||||
isPointOfSale: true,
|
|
||||||
isActive: true,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((await prisma.productCategory.count()) === 0) {
|
|
||||||
await prisma.productCategory.createMany({
|
|
||||||
data: Array.from({ length: 10 }, (_, i) => ({ name: `دستهی ${i + 1}` })),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((await prisma.productBrand.count()) === 0) {
|
|
||||||
await prisma.productBrand.createMany({
|
|
||||||
data: Array.from({ length: 10 }, (_, i) => ({ name: `برند ${i + 1}` })),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((await prisma.supplier.count()) === 0) {
|
|
||||||
await prisma.supplier.createMany({
|
|
||||||
data: Array.from({ length: 9 }, (_, i) => ({
|
|
||||||
firstName: 'تامین',
|
|
||||||
lastName: `کننده ${i + 1}`,
|
|
||||||
mobileNumber: `0912000000${i + 1}`,
|
|
||||||
email: `supplier${i + 1}@example.com`,
|
|
||||||
})),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((await prisma.customer.count()) === 0) {
|
|
||||||
await prisma.customer.createMany({
|
|
||||||
data: Array.from({ length: 5 }, (_, i) => ({
|
|
||||||
firstName: 'مشتری',
|
|
||||||
lastName: `${i + 1}`,
|
|
||||||
mobileNumber: `0913000000${i + 1}`,
|
|
||||||
email: `customer${i + 1}@example.com`,
|
|
||||||
})),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((await prisma.product.count()) === 0) {
|
|
||||||
const categories = await prisma.productCategory.findMany()
|
|
||||||
const brands = await prisma.productBrand.findMany()
|
|
||||||
await prisma.product.createMany({
|
|
||||||
data: Array.from({ length: 100 }, (_, i) => ({
|
|
||||||
name: `کالای ${i + 1}`,
|
|
||||||
sku: `SKU-${1000 + i + 1}`,
|
|
||||||
salePrice: parseInt((Math.random() * (100 - 10) + 10).toString()) * 10000,
|
|
||||||
categoryId: categories[i % categories.length].id,
|
|
||||||
brandId: brands[i % brands.length].id,
|
|
||||||
})),
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// const products = await prisma.product.findMany()
|
|
||||||
// for (const product of products) {
|
|
||||||
// await prisma.product.update({
|
|
||||||
// where: { id: product.id },
|
|
||||||
// data: {
|
|
||||||
// salePrice: parseInt((Math.random() * (100 - 10) + 10).toString()) * 10000,
|
|
||||||
// },
|
// },
|
||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.user.count()) === 0) {
|
||||||
|
// const adminRole = await prisma.role.findUnique({ where: { name: 'Admin' } })
|
||||||
|
// if (!adminRole) {
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
// await prisma.user.upsert({
|
||||||
|
// where: { id: 1, firstName: 'عباس', lastName: 'حسنی' },
|
||||||
|
// update: {},
|
||||||
|
// create: {
|
||||||
|
// firstName: 'عباس',
|
||||||
|
// lastName: 'حسنی',
|
||||||
|
// roleId: adminRole.id,
|
||||||
|
// mobileNumber: '09120258156',
|
||||||
|
// password: '12345678',
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.inventory.count()) === 0) {
|
||||||
|
// await prisma.inventory.createMany({
|
||||||
|
// data: [
|
||||||
|
// { name: 'انبار مرکزی', location: 'تهران', isPointOfSale: false, isActive: true },
|
||||||
|
// {
|
||||||
|
// name: 'فروشگاه حضوری',
|
||||||
|
// location: 'مرکز شهر',
|
||||||
|
// isPointOfSale: true,
|
||||||
|
// isActive: true,
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'فروشگاه اینترنتی',
|
||||||
|
// location: 'مرکز شهر',
|
||||||
|
// isPointOfSale: true,
|
||||||
|
// isActive: true,
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.productCategory.count()) === 0) {
|
||||||
|
// await prisma.productCategory.createMany({
|
||||||
|
// data: Array.from({ length: 10 }, (_, i) => ({ name: `دستهی ${i + 1}` })),
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.productBrand.count()) === 0) {
|
||||||
|
// await prisma.productBrand.createMany({
|
||||||
|
// data: Array.from({ length: 10 }, (_, i) => ({ name: `برند ${i + 1}` })),
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.supplier.count()) === 0) {
|
||||||
|
// await prisma.supplier.createMany({
|
||||||
|
// data: Array.from({ length: 9 }, (_, i) => ({
|
||||||
|
// firstName: 'تامین',
|
||||||
|
// lastName: `کننده ${i + 1}`,
|
||||||
|
// mobileNumber: `0912000000${i + 1}`,
|
||||||
|
// email: `supplier${i + 1}@example.com`,
|
||||||
|
// })),
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.customer.count()) === 0) {
|
||||||
|
// await prisma.customer.createMany({
|
||||||
|
// data: Array.from({ length: 5 }, (_, i) => ({
|
||||||
|
// firstName: 'مشتری',
|
||||||
|
// lastName: `${i + 1}`,
|
||||||
|
// mobileNumber: `0913000000${i + 1}`,
|
||||||
|
// email: `customer${i + 1}@example.com`,
|
||||||
|
// })),
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.product.count()) === 0) {
|
||||||
|
// const categories = await prisma.productCategory.findMany()
|
||||||
|
// const brands = await prisma.productBrand.findMany()
|
||||||
|
// await prisma.product.createMany({
|
||||||
|
// data: Array.from({ length: 100 }, (_, i) => ({
|
||||||
|
// name: `کالای ${i + 1}`,
|
||||||
|
// sku: `SKU-${1000 + i + 1}`,
|
||||||
|
// salePrice: parseInt((Math.random() * (100 - 10) + 10).toString()) * 10000,
|
||||||
|
// categoryId: categories[i % categories.length].id,
|
||||||
|
// brandId: brands[i % brands.length].id,
|
||||||
|
// })),
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.bank.count()) === 0) {
|
||||||
|
// await prisma.bank.createMany({
|
||||||
|
// data: [
|
||||||
|
// {
|
||||||
|
// name: 'آینده',
|
||||||
|
// shortName: 'ain',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'ایران زمین',
|
||||||
|
// shortName: 'irz',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'اقتصاد نوین',
|
||||||
|
// shortName: 'eqn',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'انصار',
|
||||||
|
// shortName: 'ans',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'پاسارگاد',
|
||||||
|
// shortName: 'pas',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'پارسیان',
|
||||||
|
// shortName: 'prs',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'پست بانک ایران',
|
||||||
|
// shortName: 'pbi',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'تجارت',
|
||||||
|
// shortName: 'tej',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'توسعه تعاون',
|
||||||
|
// shortName: 'tav',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'توسعه صادرات',
|
||||||
|
// shortName: 'tes',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'حکمت ایرانیان',
|
||||||
|
// shortName: 'hek',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'رفاه کارگران',
|
||||||
|
// shortName: 'ref',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'قرضالحسنه رسالت',
|
||||||
|
// shortName: 'res',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'قرضالحسنه مهر ایران',
|
||||||
|
// shortName: 'meh',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'قوامین',
|
||||||
|
// shortName: 'qva',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'کشاورزی',
|
||||||
|
// shortName: 'kes',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'کوثر',
|
||||||
|
// shortName: 'kos',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'دی',
|
||||||
|
// shortName: 'diy',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'صنعت و معدن',
|
||||||
|
// shortName: 'san',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'سینا',
|
||||||
|
// shortName: 'sin',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'سرمایه',
|
||||||
|
// shortName: 'sar',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'سپه',
|
||||||
|
// shortName: 'sep',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'شهر',
|
||||||
|
// shortName: 'shr',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'صادرات ایران',
|
||||||
|
// shortName: 'sir',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'سامان',
|
||||||
|
// shortName: 'sam',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'مرکزی',
|
||||||
|
// shortName: 'mar',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'مسکن',
|
||||||
|
// shortName: 'mas',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'ملت',
|
||||||
|
// shortName: 'mel',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'ملی ایران',
|
||||||
|
// shortName: 'mli',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'مهر اقتصاد',
|
||||||
|
// shortName: 'meg',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'کارآفرین',
|
||||||
|
// shortName: 'kar',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// name: 'تات',
|
||||||
|
// shortName: 'tat',
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.bankBranch.count()) === 0) {
|
||||||
|
// await prisma.bankBranch.createMany({
|
||||||
|
// data: [
|
||||||
|
// {
|
||||||
|
// bankId: 1,
|
||||||
|
// name: 'شعبه مرکزی',
|
||||||
|
// code: '001',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// bankId: 2,
|
||||||
|
// name: 'شعبه مرکزی',
|
||||||
|
// code: '002',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// bankId: 1,
|
||||||
|
// name: 'شعبه ونک',
|
||||||
|
// code: '003',
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
|
||||||
|
// if ((await prisma.bankAccount.count()) === 0) {
|
||||||
|
// await prisma.bankAccount.createMany({
|
||||||
|
// data: [
|
||||||
|
// {
|
||||||
|
// branchId: 4,
|
||||||
|
// accountNumber: '1234567890',
|
||||||
|
// name: 'حساب اصلی آینده',
|
||||||
|
// iban: 'IR000123456789012345678901',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// branchId: 5,
|
||||||
|
// accountNumber: '0987654321',
|
||||||
|
// name: 'حساب اصلی ایران زمین',
|
||||||
|
// iban: 'IR000987654321098765432109',
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// branchId: 6,
|
||||||
|
// accountNumber: '1122334455',
|
||||||
|
// name: 'حساب ونک آینده',
|
||||||
|
// iban: 'IR000112233445566778899001',
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
|
// })
|
||||||
|
// }
|
||||||
|
// // Seed purchase, transfer, and sales transactions
|
||||||
|
const inventories = await prisma.inventory.findMany()
|
||||||
|
const products = await prisma.product.findMany({ take: 5 }) // select 5 products for demo
|
||||||
|
const supplier = await prisma.supplier.findFirst()
|
||||||
|
const customers = await prisma.customer.findMany({ take: 2 })
|
||||||
|
if (supplier && customers.length > 0) {
|
||||||
|
PurchaseReceiptsService.prototype.create({
|
||||||
|
code: '123123',
|
||||||
|
inventoryId: inventories[0].id,
|
||||||
|
supplierId: supplier.id,
|
||||||
|
paidAmount: 0,
|
||||||
|
totalAmount: products.reduce((acc, a) => (acc += Number(a.salePrice) * 10), 0),
|
||||||
|
items: products.map(product => ({
|
||||||
|
productId: product.id,
|
||||||
|
count: 10,
|
||||||
|
fee: Number(product.salePrice),
|
||||||
|
total: 10 * Number(product.salePrice),
|
||||||
|
})),
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|||||||
@@ -0,0 +1,5 @@
|
|||||||
|
-- Auto-generated trigger dump
|
||||||
|
DELIMITER 8488
|
||||||
|
-- Trigger: 1
|
||||||
|
8488
|
||||||
|
DELIMITER ;
|
||||||
@@ -1,17 +0,0 @@
|
|||||||
SELECT
|
|
||||||
`sm`.`id` AS `id`,
|
|
||||||
`sm`.`productId` AS `productId`,
|
|
||||||
`sm`.`type` AS `type`,
|
|
||||||
`sm`.`quantity` AS `quantity`,
|
|
||||||
`sm`.`fee` AS `fee`,
|
|
||||||
`sm`.`totalCost` AS `totalCost`,
|
|
||||||
`sm`.`referenceId` AS `referenceId`,
|
|
||||||
`sm`.`referenceType` AS `referenceType`,
|
|
||||||
`sm`.`createdAt` AS `createdAt`,
|
|
||||||
`sb`.`quantity` AS `current_stock`,
|
|
||||||
`sb`.`avgCost` AS `current_avg_cost`
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
`pos`.`Stock_Movements` `sm`
|
|
||||||
LEFT JOIN `pos`.`stock_balance` `sb` ON((`sb`.`ProductId` = `sm`.`productId`))
|
|
||||||
)
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
SELECT
|
|
||||||
`pos`.`stock_balance`.`ProductId` AS `ProductId`,
|
|
||||||
`pos`.`stock_balance`.`quantity` AS `stock_quantity`,
|
|
||||||
`pos`.`stock_balance`.`avgCost` AS `avgCost`,
|
|
||||||
`pos`.`stock_balance`.`totalCost` AS `totalCost`,
|
|
||||||
`pos`.`stock_balance`.`updatedAt` AS `updatedAt`
|
|
||||||
FROM
|
|
||||||
`pos`.`stock_balance`
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
SELECT
|
|
||||||
`sm`.`productId` AS `productId`,
|
|
||||||
`sm`.`id` AS `movement_id`,
|
|
||||||
`sm`.`type` AS `type`,
|
|
||||||
`sm`.`quantity` AS `quantity`,
|
|
||||||
`sm`.`fee` AS `fee`,
|
|
||||||
`sm`.`totalCost` AS `totalCost`,
|
|
||||||
`sb`.`quantity` AS `balance_quantity`,
|
|
||||||
`sb`.`avgCost` AS `balance_avg_cost`,
|
|
||||||
`sm`.`createdAt` AS `createdAt`
|
|
||||||
FROM
|
|
||||||
(
|
|
||||||
`pos`.`Stock_Movements` `sm`
|
|
||||||
LEFT JOIN `pos`.`stock_balance` `sb` ON((`sb`.`ProductId` = `sm`.`productId`))
|
|
||||||
)
|
|
||||||
ORDER BY
|
|
||||||
`sm`.`productId`,
|
|
||||||
`sm`.`createdAt`
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
SELECT
|
|
||||||
`pos`.`Stock_Movements`.`productId` AS `productId`,
|
|
||||||
`pos`.`Stock_Movements`.`inventoryId` AS `inventoryId`,
|
|
||||||
sum(
|
|
||||||
(
|
|
||||||
CASE
|
|
||||||
WHEN (`pos`.`Stock_Movements`.`type` = 'IN') THEN `pos`.`Stock_Movements`.`quantity`
|
|
||||||
WHEN (`pos`.`Stock_Movements`.`type` = 'OUT') THEN -(`pos`.`Stock_Movements`.`quantity`)
|
|
||||||
WHEN (`pos`.`Stock_Movements`.`type` = 'ADJUST') THEN `pos`.`Stock_Movements`.`quantity`
|
|
||||||
ELSE 0
|
|
||||||
END
|
|
||||||
)
|
|
||||||
) AS `stock`
|
|
||||||
FROM
|
|
||||||
`pos`.`Stock_Movements`
|
|
||||||
GROUP BY
|
|
||||||
`pos`.`Stock_Movements`.`productId`,
|
|
||||||
`pos`.`Stock_Movements`.`inventoryId`
|
|
||||||
@@ -1,3 +0,0 @@
|
|||||||
|
|
||||||
SELECT avgCost FROM Stock_Balance
|
|
||||||
WHERE ProductId = 1 And inventoryId = 1;
|
|
||||||
+6
-4
@@ -6,12 +6,14 @@ import { CustomersModule } from './customers/customers.module'
|
|||||||
import { InventoriesModule } from './inventories/inventories.module'
|
import { InventoriesModule } from './inventories/inventories.module'
|
||||||
import { InventoryTransferItemsModule } from './inventory-transfer-items/inventory-transfer-items.module'
|
import { InventoryTransferItemsModule } from './inventory-transfer-items/inventory-transfer-items.module'
|
||||||
import { InventoryTransfersModule } from './inventory-transfers/inventory-transfers.module'
|
import { InventoryTransfersModule } from './inventory-transfers/inventory-transfers.module'
|
||||||
|
import { BankAccountsModule } from './modules/bank-accounts/bank-accounts.module'
|
||||||
|
import { BankBranchesModule } from './modules/bank-branches/bank-branches.module'
|
||||||
|
import { BanksModule } from './modules/banks/banks.module'
|
||||||
import { CardexModule } from './modules/cardex/cardex.module'
|
import { CardexModule } from './modules/cardex/cardex.module'
|
||||||
import { PosModule } from './modules/pos/pos.module'
|
import { PosModule } from './modules/pos/pos.module'
|
||||||
import { PrismaModule } from './prisma/prisma.module'
|
import { PrismaModule } from './prisma/prisma.module'
|
||||||
import { ProductBrandsModule } from './product-brands/product-brands.module'
|
import { ProductBrandsModule } from './product-brands/product-brands.module'
|
||||||
import { ProductCategoriesModule } from './product-categories/product-categories.module'
|
import { ProductCategoriesModule } from './product-categories/product-categories.module'
|
||||||
import { ProductChargesModule } from './product-charges/product-charges.module'
|
|
||||||
import { ProductVariantsModule } from './product-variants/product-variants.module'
|
import { ProductVariantsModule } from './product-variants/product-variants.module'
|
||||||
import { ProductsModule } from './products/products.module'
|
import { ProductsModule } from './products/products.module'
|
||||||
import { PurchaseReceiptItemsModule } from './purchase-receipt-items/purchase-receipt-items.module'
|
import { PurchaseReceiptItemsModule } from './purchase-receipt-items/purchase-receipt-items.module'
|
||||||
@@ -22,7 +24,6 @@ import { SalesInvoicesModule } from './sales-invoices/sales-invoices.module'
|
|||||||
import { StockAdjustmentsModule } from './stock-adjustments/stock-adjustments.module'
|
import { StockAdjustmentsModule } from './stock-adjustments/stock-adjustments.module'
|
||||||
import { StockBalanceModule } from './stock-balance/stock-balance.module'
|
import { StockBalanceModule } from './stock-balance/stock-balance.module'
|
||||||
import { StockMovementsModule } from './stock-movements/stock-movements.module'
|
import { StockMovementsModule } from './stock-movements/stock-movements.module'
|
||||||
import { StoresModule } from './stores/stores.module'
|
|
||||||
import { SuppliersModule } from './suppliers/suppliers.module'
|
import { SuppliersModule } from './suppliers/suppliers.module'
|
||||||
import { UsersModule } from './users/users.module'
|
import { UsersModule } from './users/users.module'
|
||||||
|
|
||||||
@@ -36,11 +37,9 @@ import { UsersModule } from './users/users.module'
|
|||||||
ProductVariantsModule,
|
ProductVariantsModule,
|
||||||
ProductBrandsModule,
|
ProductBrandsModule,
|
||||||
ProductCategoriesModule,
|
ProductCategoriesModule,
|
||||||
ProductChargesModule,
|
|
||||||
SuppliersModule,
|
SuppliersModule,
|
||||||
CustomersModule,
|
CustomersModule,
|
||||||
InventoriesModule,
|
InventoriesModule,
|
||||||
StoresModule,
|
|
||||||
PurchaseReceiptsModule,
|
PurchaseReceiptsModule,
|
||||||
PurchaseReceiptItemsModule,
|
PurchaseReceiptItemsModule,
|
||||||
SalesInvoicesModule,
|
SalesInvoicesModule,
|
||||||
@@ -52,6 +51,9 @@ import { UsersModule } from './users/users.module'
|
|||||||
StockBalanceModule,
|
StockBalanceModule,
|
||||||
PosModule,
|
PosModule,
|
||||||
CardexModule,
|
CardexModule,
|
||||||
|
BanksModule,
|
||||||
|
BankBranchesModule,
|
||||||
|
BankAccountsModule,
|
||||||
],
|
],
|
||||||
controllers: [AppController],
|
controllers: [AppController],
|
||||||
providers: [AppService],
|
providers: [AppService],
|
||||||
|
|||||||
@@ -27,6 +27,91 @@ export type User = Prisma.UserModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Role = Prisma.RoleModel
|
export type Role = Prisma.RoleModel
|
||||||
|
/**
|
||||||
|
* Model OtpCode
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type OtpCode = Prisma.OtpCodeModel
|
||||||
|
/**
|
||||||
|
* Model RefreshToken
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type RefreshToken = Prisma.RefreshTokenModel
|
||||||
|
/**
|
||||||
|
* Model BankBranch
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BankBranch = Prisma.BankBranchModel
|
||||||
|
/**
|
||||||
|
* Model BankAccount
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BankAccount = Prisma.BankAccountModel
|
||||||
|
/**
|
||||||
|
* Model Inventory
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Inventory = Prisma.InventoryModel
|
||||||
|
/**
|
||||||
|
* Model InventoryTransfer
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type InventoryTransfer = Prisma.InventoryTransferModel
|
||||||
|
/**
|
||||||
|
* Model InventoryTransferItem
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type InventoryTransferItem = Prisma.InventoryTransferItemModel
|
||||||
|
/**
|
||||||
|
* Model InventoryBankAccount
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type InventoryBankAccount = Prisma.InventoryBankAccountModel
|
||||||
|
/**
|
||||||
|
* Model PosAccount
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type PosAccount = Prisma.PosAccountModel
|
||||||
|
/**
|
||||||
|
* Model Bank
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Bank = Prisma.BankModel
|
||||||
|
/**
|
||||||
|
* Model Supplier
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Supplier = Prisma.SupplierModel
|
||||||
|
/**
|
||||||
|
* Model SupplierLedger
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SupplierLedger = Prisma.SupplierLedgerModel
|
||||||
|
/**
|
||||||
|
* Model Customer
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Customer = Prisma.CustomerModel
|
||||||
|
/**
|
||||||
|
* Model Order
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Order = Prisma.OrderModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoice
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoice = Prisma.SalesInvoiceModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoiceItem
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
||||||
|
/**
|
||||||
|
* Model TriggerLog
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type TriggerLog = Prisma.TriggerLogModel
|
||||||
/**
|
/**
|
||||||
* Model ProductVariant
|
* Model ProductVariant
|
||||||
*
|
*
|
||||||
@@ -47,36 +132,6 @@ export type ProductBrand = Prisma.ProductBrandModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type ProductCategory = Prisma.ProductCategoryModel
|
export type ProductCategory = Prisma.ProductCategoryModel
|
||||||
/**
|
|
||||||
* Model Supplier
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Supplier = Prisma.SupplierModel
|
|
||||||
/**
|
|
||||||
* Model Customer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Customer = Prisma.CustomerModel
|
|
||||||
/**
|
|
||||||
* Model Inventory
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Inventory = Prisma.InventoryModel
|
|
||||||
/**
|
|
||||||
* Model Store
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Store = Prisma.StoreModel
|
|
||||||
/**
|
|
||||||
* Model ProductCharge
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type ProductCharge = Prisma.ProductChargeModel
|
|
||||||
/**
|
|
||||||
* Model Order
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Order = Prisma.OrderModel
|
|
||||||
/**
|
/**
|
||||||
* Model PurchaseReceipt
|
* Model PurchaseReceipt
|
||||||
*
|
*
|
||||||
@@ -88,15 +143,10 @@ export type PurchaseReceipt = Prisma.PurchaseReceiptModel
|
|||||||
*/
|
*/
|
||||||
export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel
|
export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoice
|
* Model PurchaseReceiptPayments
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SalesInvoice = Prisma.SalesInvoiceModel
|
export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel
|
||||||
/**
|
|
||||||
* Model SalesInvoiceItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
|
||||||
/**
|
/**
|
||||||
* Model StockMovement
|
* Model StockMovement
|
||||||
*
|
*
|
||||||
@@ -107,48 +157,8 @@ export type StockMovement = Prisma.StockMovementModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockBalance = Prisma.StockBalanceModel
|
export type StockBalance = Prisma.StockBalanceModel
|
||||||
/**
|
|
||||||
* Model OtpCode
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OtpCode = Prisma.OtpCodeModel
|
|
||||||
/**
|
|
||||||
* Model RefreshToken
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type RefreshToken = Prisma.RefreshTokenModel
|
|
||||||
/**
|
|
||||||
* Model InventoryTransfer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryTransfer = Prisma.InventoryTransferModel
|
|
||||||
/**
|
|
||||||
* Model InventoryTransferItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryTransferItem = Prisma.InventoryTransferItemModel
|
|
||||||
/**
|
/**
|
||||||
* Model StockAdjustment
|
* Model StockAdjustment
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockAdjustment = Prisma.StockAdjustmentModel
|
export type StockAdjustment = Prisma.StockAdjustmentModel
|
||||||
/**
|
|
||||||
* Model TriggerLog
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type TriggerLog = Prisma.TriggerLogModel
|
|
||||||
/**
|
|
||||||
* Model inventory_overview
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type inventory_overview = Prisma.inventory_overviewModel
|
|
||||||
/**
|
|
||||||
* Model stock_cardex
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type stock_cardex = Prisma.stock_cardexModel
|
|
||||||
/**
|
|
||||||
* Model stock_view
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type stock_view = Prisma.stock_viewModel
|
|
||||||
|
|||||||
@@ -47,6 +47,91 @@ export type User = Prisma.UserModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Role = Prisma.RoleModel
|
export type Role = Prisma.RoleModel
|
||||||
|
/**
|
||||||
|
* Model OtpCode
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type OtpCode = Prisma.OtpCodeModel
|
||||||
|
/**
|
||||||
|
* Model RefreshToken
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type RefreshToken = Prisma.RefreshTokenModel
|
||||||
|
/**
|
||||||
|
* Model BankBranch
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BankBranch = Prisma.BankBranchModel
|
||||||
|
/**
|
||||||
|
* Model BankAccount
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BankAccount = Prisma.BankAccountModel
|
||||||
|
/**
|
||||||
|
* Model Inventory
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Inventory = Prisma.InventoryModel
|
||||||
|
/**
|
||||||
|
* Model InventoryTransfer
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type InventoryTransfer = Prisma.InventoryTransferModel
|
||||||
|
/**
|
||||||
|
* Model InventoryTransferItem
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type InventoryTransferItem = Prisma.InventoryTransferItemModel
|
||||||
|
/**
|
||||||
|
* Model InventoryBankAccount
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type InventoryBankAccount = Prisma.InventoryBankAccountModel
|
||||||
|
/**
|
||||||
|
* Model PosAccount
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type PosAccount = Prisma.PosAccountModel
|
||||||
|
/**
|
||||||
|
* Model Bank
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Bank = Prisma.BankModel
|
||||||
|
/**
|
||||||
|
* Model Supplier
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Supplier = Prisma.SupplierModel
|
||||||
|
/**
|
||||||
|
* Model SupplierLedger
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SupplierLedger = Prisma.SupplierLedgerModel
|
||||||
|
/**
|
||||||
|
* Model Customer
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Customer = Prisma.CustomerModel
|
||||||
|
/**
|
||||||
|
* Model Order
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Order = Prisma.OrderModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoice
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoice = Prisma.SalesInvoiceModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoiceItem
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
||||||
|
/**
|
||||||
|
* Model TriggerLog
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type TriggerLog = Prisma.TriggerLogModel
|
||||||
/**
|
/**
|
||||||
* Model ProductVariant
|
* Model ProductVariant
|
||||||
*
|
*
|
||||||
@@ -67,36 +152,6 @@ export type ProductBrand = Prisma.ProductBrandModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type ProductCategory = Prisma.ProductCategoryModel
|
export type ProductCategory = Prisma.ProductCategoryModel
|
||||||
/**
|
|
||||||
* Model Supplier
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Supplier = Prisma.SupplierModel
|
|
||||||
/**
|
|
||||||
* Model Customer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Customer = Prisma.CustomerModel
|
|
||||||
/**
|
|
||||||
* Model Inventory
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Inventory = Prisma.InventoryModel
|
|
||||||
/**
|
|
||||||
* Model Store
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Store = Prisma.StoreModel
|
|
||||||
/**
|
|
||||||
* Model ProductCharge
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type ProductCharge = Prisma.ProductChargeModel
|
|
||||||
/**
|
|
||||||
* Model Order
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Order = Prisma.OrderModel
|
|
||||||
/**
|
/**
|
||||||
* Model PurchaseReceipt
|
* Model PurchaseReceipt
|
||||||
*
|
*
|
||||||
@@ -108,15 +163,10 @@ export type PurchaseReceipt = Prisma.PurchaseReceiptModel
|
|||||||
*/
|
*/
|
||||||
export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel
|
export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoice
|
* Model PurchaseReceiptPayments
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SalesInvoice = Prisma.SalesInvoiceModel
|
export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel
|
||||||
/**
|
|
||||||
* Model SalesInvoiceItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
|
||||||
/**
|
/**
|
||||||
* Model StockMovement
|
* Model StockMovement
|
||||||
*
|
*
|
||||||
@@ -127,48 +177,8 @@ export type StockMovement = Prisma.StockMovementModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockBalance = Prisma.StockBalanceModel
|
export type StockBalance = Prisma.StockBalanceModel
|
||||||
/**
|
|
||||||
* Model OtpCode
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type OtpCode = Prisma.OtpCodeModel
|
|
||||||
/**
|
|
||||||
* Model RefreshToken
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type RefreshToken = Prisma.RefreshTokenModel
|
|
||||||
/**
|
|
||||||
* Model InventoryTransfer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryTransfer = Prisma.InventoryTransferModel
|
|
||||||
/**
|
|
||||||
* Model InventoryTransferItem
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type InventoryTransferItem = Prisma.InventoryTransferItemModel
|
|
||||||
/**
|
/**
|
||||||
* Model StockAdjustment
|
* Model StockAdjustment
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockAdjustment = Prisma.StockAdjustmentModel
|
export type StockAdjustment = Prisma.StockAdjustmentModel
|
||||||
/**
|
|
||||||
* Model TriggerLog
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type TriggerLog = Prisma.TriggerLogModel
|
|
||||||
/**
|
|
||||||
* Model inventory_overview
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type inventory_overview = Prisma.inventory_overviewModel
|
|
||||||
/**
|
|
||||||
* Model stock_cardex
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type stock_cardex = Prisma.stock_cardexModel
|
|
||||||
/**
|
|
||||||
* Model stock_view
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type stock_view = Prisma.stock_viewModel
|
|
||||||
|
|||||||
@@ -213,65 +213,11 @@ export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedJsonNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedJsonNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DecimalNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type BoolFilter<$PrismaModel = never> = {
|
export type BoolFilter<$PrismaModel = never> = {
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||||
@@ -307,6 +253,50 @@ export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type DecimalFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumledgerSourceTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.ledgerSourceType | Prisma.EnumledgerSourceTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.ledgerSourceType[]
|
||||||
|
notIn?: $Enums.ledgerSourceType[]
|
||||||
|
not?: Prisma.NestedEnumledgerSourceTypeFilter<$PrismaModel> | $Enums.ledgerSourceType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumledgerSourceTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.ledgerSourceType | Prisma.EnumledgerSourceTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.ledgerSourceType[]
|
||||||
|
notIn?: $Enums.ledgerSourceType[]
|
||||||
|
not?: Prisma.NestedEnumledgerSourceTypeWithAggregatesFilter<$PrismaModel> | $Enums.ledgerSourceType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumledgerSourceTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumledgerSourceTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type EnumOrderStatusFilter<$PrismaModel = never> = {
|
export type EnumOrderStatusFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.OrderStatus[]
|
in?: $Enums.OrderStatus[]
|
||||||
@@ -314,11 +304,11 @@ export type EnumOrderStatusFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumpaymentMethodFilter<$PrismaModel = never> = {
|
export type Enumpayment_method_typeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.paymentMethod | Prisma.EnumpaymentMethodFieldRefInput<$PrismaModel>
|
equals?: $Enums.payment_method_type | Prisma.Enumpayment_method_typeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.paymentMethod[]
|
in?: $Enums.payment_method_type[]
|
||||||
notIn?: $Enums.paymentMethod[]
|
notIn?: $Enums.payment_method_type[]
|
||||||
not?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel> | $Enums.paymentMethod
|
not?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel> | $Enums.payment_method_type
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
@@ -331,14 +321,41 @@ export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumpaymentMethodWithAggregatesFilter<$PrismaModel = never> = {
|
export type Enumpayment_method_typeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.paymentMethod | Prisma.EnumpaymentMethodFieldRefInput<$PrismaModel>
|
equals?: $Enums.payment_method_type | Prisma.Enumpayment_method_typeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.paymentMethod[]
|
in?: $Enums.payment_method_type[]
|
||||||
notIn?: $Enums.paymentMethod[]
|
notIn?: $Enums.payment_method_type[]
|
||||||
not?: Prisma.NestedEnumpaymentMethodWithAggregatesFilter<$PrismaModel> | $Enums.paymentMethod
|
not?: Prisma.NestedEnumpayment_method_typeWithAggregatesFilter<$PrismaModel> | $Enums.payment_method_type
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel>
|
_min?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DecimalNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||||
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumMovementTypeFilter<$PrismaModel = never> = {
|
export type EnumMovementTypeFilter<$PrismaModel = never> = {
|
||||||
@@ -375,23 +392,6 @@ export type EnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel = never>
|
|||||||
_max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type Enumstock_cardex_typeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.stock_cardex_type | Prisma.Enumstock_cardex_typeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.stock_cardex_type[]
|
|
||||||
notIn?: $Enums.stock_cardex_type[]
|
|
||||||
not?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel> | $Enums.stock_cardex_type
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Enumstock_cardex_typeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.stock_cardex_type | Prisma.Enumstock_cardex_typeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.stock_cardex_type[]
|
|
||||||
notIn?: $Enums.stock_cardex_type[]
|
|
||||||
not?: Prisma.NestedEnumstock_cardex_typeWithAggregatesFilter<$PrismaModel> | $Enums.stock_cardex_type
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedIntFilter<$PrismaModel = never> = {
|
export type NestedIntFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
in?: number[]
|
in?: number[]
|
||||||
@@ -581,65 +581,11 @@ export type NestedJsonNullableFilterBase<$PrismaModel = never> = {
|
|||||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDecimalNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedBoolFilter<$PrismaModel = never> = {
|
export type NestedBoolFilter<$PrismaModel = never> = {
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||||
@@ -675,6 +621,50 @@ export type NestedFloatNullableFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null
|
not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumledgerSourceTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.ledgerSourceType | Prisma.EnumledgerSourceTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.ledgerSourceType[]
|
||||||
|
notIn?: $Enums.ledgerSourceType[]
|
||||||
|
not?: Prisma.NestedEnumledgerSourceTypeFilter<$PrismaModel> | $Enums.ledgerSourceType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumledgerSourceTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.ledgerSourceType | Prisma.EnumledgerSourceTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.ledgerSourceType[]
|
||||||
|
notIn?: $Enums.ledgerSourceType[]
|
||||||
|
not?: Prisma.NestedEnumledgerSourceTypeWithAggregatesFilter<$PrismaModel> | $Enums.ledgerSourceType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumledgerSourceTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumledgerSourceTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedEnumOrderStatusFilter<$PrismaModel = never> = {
|
export type NestedEnumOrderStatusFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.OrderStatus[]
|
in?: $Enums.OrderStatus[]
|
||||||
@@ -682,11 +672,11 @@ export type NestedEnumOrderStatusFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumpaymentMethodFilter<$PrismaModel = never> = {
|
export type NestedEnumpayment_method_typeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.paymentMethod | Prisma.EnumpaymentMethodFieldRefInput<$PrismaModel>
|
equals?: $Enums.payment_method_type | Prisma.Enumpayment_method_typeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.paymentMethod[]
|
in?: $Enums.payment_method_type[]
|
||||||
notIn?: $Enums.paymentMethod[]
|
notIn?: $Enums.payment_method_type[]
|
||||||
not?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel> | $Enums.paymentMethod
|
not?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel> | $Enums.payment_method_type
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
@@ -699,14 +689,41 @@ export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumpaymentMethodWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumpayment_method_typeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.paymentMethod | Prisma.EnumpaymentMethodFieldRefInput<$PrismaModel>
|
equals?: $Enums.payment_method_type | Prisma.Enumpayment_method_typeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.paymentMethod[]
|
in?: $Enums.payment_method_type[]
|
||||||
notIn?: $Enums.paymentMethod[]
|
notIn?: $Enums.payment_method_type[]
|
||||||
not?: Prisma.NestedEnumpaymentMethodWithAggregatesFilter<$PrismaModel> | $Enums.paymentMethod
|
not?: Prisma.NestedEnumpayment_method_typeWithAggregatesFilter<$PrismaModel> | $Enums.payment_method_type
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel>
|
_min?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumpaymentMethodFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumpayment_method_typeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||||
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumMovementTypeFilter<$PrismaModel = never> = {
|
export type NestedEnumMovementTypeFilter<$PrismaModel = never> = {
|
||||||
@@ -743,21 +760,4 @@ export type NestedEnumMovementReferenceTypeWithAggregatesFilter<$PrismaModel = n
|
|||||||
_max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumMovementReferenceTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumstock_cardex_typeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.stock_cardex_type | Prisma.Enumstock_cardex_typeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.stock_cardex_type[]
|
|
||||||
notIn?: $Enums.stock_cardex_type[]
|
|
||||||
not?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel> | $Enums.stock_cardex_type
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumstock_cardex_typeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.stock_cardex_type | Prisma.Enumstock_cardex_typeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.stock_cardex_type[]
|
|
||||||
notIn?: $Enums.stock_cardex_type[]
|
|
||||||
not?: Prisma.NestedEnumstock_cardex_typeWithAggregatesFilter<$PrismaModel> | $Enums.stock_cardex_type
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumstock_cardex_typeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,22 +10,14 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export const OrderStatus = {
|
export const OrderStatus = {
|
||||||
pending: 'pending',
|
PENDING: 'PENDING',
|
||||||
reject: 'reject',
|
REJECT: 'REJECT',
|
||||||
done: 'done'
|
DONE: 'DONE'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus]
|
export type OrderStatus = (typeof OrderStatus)[keyof typeof OrderStatus]
|
||||||
|
|
||||||
|
|
||||||
export const paymentMethod = {
|
|
||||||
cash: 'cash',
|
|
||||||
card: 'card'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type paymentMethod = (typeof paymentMethod)[keyof typeof paymentMethod]
|
|
||||||
|
|
||||||
|
|
||||||
export const MovementType = {
|
export const MovementType = {
|
||||||
IN: 'IN',
|
IN: 'IN',
|
||||||
OUT: 'OUT',
|
OUT: 'OUT',
|
||||||
@@ -45,28 +37,22 @@ export const MovementReferenceType = {
|
|||||||
export type MovementReferenceType = (typeof MovementReferenceType)[keyof typeof MovementReferenceType]
|
export type MovementReferenceType = (typeof MovementReferenceType)[keyof typeof MovementReferenceType]
|
||||||
|
|
||||||
|
|
||||||
export const stock_cardex_type = {
|
export const payment_method_type = {
|
||||||
IN: 'IN',
|
CASH: 'CASH',
|
||||||
OUT: 'OUT',
|
CARD: 'CARD',
|
||||||
ADJUST: 'ADJUST'
|
BANK: 'BANK',
|
||||||
|
CHECK: 'CHECK',
|
||||||
|
OTHER: 'OTHER'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type stock_cardex_type = (typeof stock_cardex_type)[keyof typeof stock_cardex_type]
|
export type payment_method_type = (typeof payment_method_type)[keyof typeof payment_method_type]
|
||||||
|
|
||||||
|
|
||||||
export const stock_movements_view_type = {
|
export const ledgerSourceType = {
|
||||||
IN: 'IN',
|
|
||||||
OUT: 'OUT',
|
|
||||||
ADJUST: 'ADJUST'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type stock_movements_view_type = (typeof stock_movements_view_type)[keyof typeof stock_movements_view_type]
|
|
||||||
|
|
||||||
|
|
||||||
export const stock_movements_view_referenceType = {
|
|
||||||
PURCHASE: 'PURCHASE',
|
PURCHASE: 'PURCHASE',
|
||||||
SALES: 'SALES',
|
PAYMENT: 'PAYMENT',
|
||||||
ADJUSTMENT: 'ADJUSTMENT'
|
ADJUSTMENT: 'ADJUSTMENT',
|
||||||
|
REFUND: 'REFUND'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type stock_movements_view_referenceType = (typeof stock_movements_view_referenceType)[keyof typeof stock_movements_view_referenceType]
|
export type ledgerSourceType = (typeof ledgerSourceType)[keyof typeof ledgerSourceType]
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -53,31 +53,33 @@ export const AnyNull = runtime.AnyNull
|
|||||||
export const ModelName = {
|
export const ModelName = {
|
||||||
User: 'User',
|
User: 'User',
|
||||||
Role: 'Role',
|
Role: 'Role',
|
||||||
|
OtpCode: 'OtpCode',
|
||||||
|
RefreshToken: 'RefreshToken',
|
||||||
|
BankBranch: 'BankBranch',
|
||||||
|
BankAccount: 'BankAccount',
|
||||||
|
Inventory: 'Inventory',
|
||||||
|
InventoryTransfer: 'InventoryTransfer',
|
||||||
|
InventoryTransferItem: 'InventoryTransferItem',
|
||||||
|
InventoryBankAccount: 'InventoryBankAccount',
|
||||||
|
PosAccount: 'PosAccount',
|
||||||
|
Bank: 'Bank',
|
||||||
|
Supplier: 'Supplier',
|
||||||
|
SupplierLedger: 'SupplierLedger',
|
||||||
|
Customer: 'Customer',
|
||||||
|
Order: 'Order',
|
||||||
|
SalesInvoice: 'SalesInvoice',
|
||||||
|
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||||
|
TriggerLog: 'TriggerLog',
|
||||||
ProductVariant: 'ProductVariant',
|
ProductVariant: 'ProductVariant',
|
||||||
Product: 'Product',
|
Product: 'Product',
|
||||||
ProductBrand: 'ProductBrand',
|
ProductBrand: 'ProductBrand',
|
||||||
ProductCategory: 'ProductCategory',
|
ProductCategory: 'ProductCategory',
|
||||||
Supplier: 'Supplier',
|
|
||||||
Customer: 'Customer',
|
|
||||||
Inventory: 'Inventory',
|
|
||||||
Store: 'Store',
|
|
||||||
ProductCharge: 'ProductCharge',
|
|
||||||
Order: 'Order',
|
|
||||||
PurchaseReceipt: 'PurchaseReceipt',
|
PurchaseReceipt: 'PurchaseReceipt',
|
||||||
PurchaseReceiptItem: 'PurchaseReceiptItem',
|
PurchaseReceiptItem: 'PurchaseReceiptItem',
|
||||||
SalesInvoice: 'SalesInvoice',
|
PurchaseReceiptPayments: 'PurchaseReceiptPayments',
|
||||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
|
||||||
StockMovement: 'StockMovement',
|
StockMovement: 'StockMovement',
|
||||||
StockBalance: 'StockBalance',
|
StockBalance: 'StockBalance',
|
||||||
OtpCode: 'OtpCode',
|
StockAdjustment: 'StockAdjustment'
|
||||||
RefreshToken: 'RefreshToken',
|
|
||||||
InventoryTransfer: 'InventoryTransfer',
|
|
||||||
InventoryTransferItem: 'InventoryTransferItem',
|
|
||||||
StockAdjustment: 'StockAdjustment',
|
|
||||||
TriggerLog: 'TriggerLog',
|
|
||||||
inventory_overview: 'inventory_overview',
|
|
||||||
stock_cardex: 'stock_cardex',
|
|
||||||
stock_view: 'stock_view'
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
export type ModelName = (typeof ModelName)[keyof typeof ModelName]
|
||||||
@@ -124,6 +126,237 @@ export const RoleScalarFieldEnum = {
|
|||||||
export type RoleScalarFieldEnum = (typeof RoleScalarFieldEnum)[keyof typeof RoleScalarFieldEnum]
|
export type RoleScalarFieldEnum = (typeof RoleScalarFieldEnum)[keyof typeof RoleScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const OtpCodeScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
mobileNumber: 'mobileNumber',
|
||||||
|
code: 'code',
|
||||||
|
used: 'used',
|
||||||
|
expiresAt: 'expiresAt',
|
||||||
|
createdAt: 'createdAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type OtpCodeScalarFieldEnum = (typeof OtpCodeScalarFieldEnum)[keyof typeof OtpCodeScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const RefreshTokenScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
tokenHash: 'tokenHash',
|
||||||
|
userId: 'userId',
|
||||||
|
revoked: 'revoked',
|
||||||
|
expiresAt: 'expiresAt',
|
||||||
|
createdAt: 'createdAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type RefreshTokenScalarFieldEnum = (typeof RefreshTokenScalarFieldEnum)[keyof typeof RefreshTokenScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankBranchScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
code: 'code',
|
||||||
|
address: 'address',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt',
|
||||||
|
bankId: 'bankId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankBranchScalarFieldEnum = (typeof BankBranchScalarFieldEnum)[keyof typeof BankBranchScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankAccountScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
accountNumber: 'accountNumber',
|
||||||
|
cardNumber: 'cardNumber',
|
||||||
|
name: 'name',
|
||||||
|
iban: 'iban',
|
||||||
|
branchId: 'branchId',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankAccountScalarFieldEnum = (typeof BankAccountScalarFieldEnum)[keyof typeof BankAccountScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const InventoryScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
location: 'location',
|
||||||
|
isActive: 'isActive',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt',
|
||||||
|
isPointOfSale: 'isPointOfSale',
|
||||||
|
bankAccountId: 'bankAccountId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const InventoryTransferScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
code: 'code',
|
||||||
|
description: 'description',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
fromInventoryId: 'fromInventoryId',
|
||||||
|
toInventoryId: 'toInventoryId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type InventoryTransferScalarFieldEnum = (typeof InventoryTransferScalarFieldEnum)[keyof typeof InventoryTransferScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const InventoryTransferItemScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
count: 'count',
|
||||||
|
productId: 'productId',
|
||||||
|
transferId: 'transferId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type InventoryTransferItemScalarFieldEnum = (typeof InventoryTransferItemScalarFieldEnum)[keyof typeof InventoryTransferItemScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const InventoryBankAccountScalarFieldEnum = {
|
||||||
|
inventoryId: 'inventoryId',
|
||||||
|
bankAccountId: 'bankAccountId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type InventoryBankAccountScalarFieldEnum = (typeof InventoryBankAccountScalarFieldEnum)[keyof typeof InventoryBankAccountScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const PosAccountScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
code: 'code',
|
||||||
|
description: 'description',
|
||||||
|
bankAccountId: 'bankAccountId',
|
||||||
|
inventoryId: 'inventoryId',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type PosAccountScalarFieldEnum = (typeof PosAccountScalarFieldEnum)[keyof typeof PosAccountScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
shortName: 'shortName',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankScalarFieldEnum = (typeof BankScalarFieldEnum)[keyof typeof BankScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SupplierScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
firstName: 'firstName',
|
||||||
|
lastName: 'lastName',
|
||||||
|
email: 'email',
|
||||||
|
mobileNumber: 'mobileNumber',
|
||||||
|
address: 'address',
|
||||||
|
city: 'city',
|
||||||
|
state: 'state',
|
||||||
|
country: 'country',
|
||||||
|
isActive: 'isActive',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SupplierLedgerScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
description: 'description',
|
||||||
|
debit: 'debit',
|
||||||
|
credit: 'credit',
|
||||||
|
balance: 'balance',
|
||||||
|
sourceType: 'sourceType',
|
||||||
|
sourceId: 'sourceId',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
supplierId: 'supplierId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SupplierLedgerScalarFieldEnum = (typeof SupplierLedgerScalarFieldEnum)[keyof typeof SupplierLedgerScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const CustomerScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
firstName: 'firstName',
|
||||||
|
lastName: 'lastName',
|
||||||
|
email: 'email',
|
||||||
|
mobileNumber: 'mobileNumber',
|
||||||
|
address: 'address',
|
||||||
|
city: 'city',
|
||||||
|
state: 'state',
|
||||||
|
country: 'country',
|
||||||
|
isActive: 'isActive',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const OrderScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
orderNumber: 'orderNumber',
|
||||||
|
status: 'status',
|
||||||
|
paymentMethod: 'paymentMethod',
|
||||||
|
totalAmount: 'totalAmount',
|
||||||
|
description: 'description',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt',
|
||||||
|
customerId: 'customerId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SalesInvoiceScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
code: 'code',
|
||||||
|
totalAmount: 'totalAmount',
|
||||||
|
description: 'description',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
customerId: 'customerId',
|
||||||
|
inventoryId: 'inventoryId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SalesInvoiceItemScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
count: 'count',
|
||||||
|
fee: 'fee',
|
||||||
|
total: 'total',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
invoiceId: 'invoiceId',
|
||||||
|
productId: 'productId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const TriggerLogScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
message: 'message',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
name: 'name'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const ProductVariantScalarFieldEnum = {
|
export const ProductVariantScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
@@ -155,9 +388,9 @@ export const ProductScalarFieldEnum = {
|
|||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
updatedAt: 'updatedAt',
|
updatedAt: 'updatedAt',
|
||||||
deletedAt: 'deletedAt',
|
deletedAt: 'deletedAt',
|
||||||
salePrice: 'salePrice',
|
|
||||||
brandId: 'brandId',
|
brandId: 'brandId',
|
||||||
categoryId: 'categoryId'
|
categoryId: 'categoryId',
|
||||||
|
salePrice: 'salePrice'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum]
|
export type ProductScalarFieldEnum = (typeof ProductScalarFieldEnum)[keyof typeof ProductScalarFieldEnum]
|
||||||
@@ -189,109 +422,12 @@ export const ProductCategoryScalarFieldEnum = {
|
|||||||
export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum]
|
export type ProductCategoryScalarFieldEnum = (typeof ProductCategoryScalarFieldEnum)[keyof typeof ProductCategoryScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SupplierScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
firstName: 'firstName',
|
|
||||||
lastName: 'lastName',
|
|
||||||
email: 'email',
|
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
address: 'address',
|
|
||||||
city: 'city',
|
|
||||||
state: 'state',
|
|
||||||
country: 'country',
|
|
||||||
isActive: 'isActive',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SupplierScalarFieldEnum = (typeof SupplierScalarFieldEnum)[keyof typeof SupplierScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const CustomerScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
firstName: 'firstName',
|
|
||||||
lastName: 'lastName',
|
|
||||||
email: 'email',
|
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
address: 'address',
|
|
||||||
city: 'city',
|
|
||||||
state: 'state',
|
|
||||||
country: 'country',
|
|
||||||
isActive: 'isActive',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
location: 'location',
|
|
||||||
isActive: 'isActive',
|
|
||||||
isPointOfSale: 'isPointOfSale',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryScalarFieldEnum = (typeof InventoryScalarFieldEnum)[keyof typeof InventoryScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const StoreScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
location: 'location',
|
|
||||||
isActive: 'isActive',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type StoreScalarFieldEnum = (typeof StoreScalarFieldEnum)[keyof typeof StoreScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const ProductChargeScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
count: 'count',
|
|
||||||
fee: 'fee',
|
|
||||||
totalAmount: 'totalAmount',
|
|
||||||
isSettled: 'isSettled',
|
|
||||||
buyAt: 'buyAt',
|
|
||||||
description: 'description',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt',
|
|
||||||
productId: 'productId',
|
|
||||||
inventoryId: 'inventoryId',
|
|
||||||
supplierId: 'supplierId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductChargeScalarFieldEnum = (typeof ProductChargeScalarFieldEnum)[keyof typeof ProductChargeScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const OrderScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
orderNumber: 'orderNumber',
|
|
||||||
status: 'status',
|
|
||||||
paymentMethod: 'paymentMethod',
|
|
||||||
totalAmount: 'totalAmount',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
updatedAt: 'updatedAt',
|
|
||||||
deletedAt: 'deletedAt',
|
|
||||||
customerId: 'customerId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PurchaseReceiptScalarFieldEnum = {
|
export const PurchaseReceiptScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
code: 'code',
|
code: 'code',
|
||||||
totalAmount: 'totalAmount',
|
totalAmount: 'totalAmount',
|
||||||
|
paidAmount: 'paidAmount',
|
||||||
|
isSettled: 'isSettled',
|
||||||
description: 'description',
|
description: 'description',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
updatedAt: 'updatedAt',
|
updatedAt: 'updatedAt',
|
||||||
@@ -316,31 +452,18 @@ export const PurchaseReceiptItemScalarFieldEnum = {
|
|||||||
export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum]
|
export type PurchaseReceiptItemScalarFieldEnum = (typeof PurchaseReceiptItemScalarFieldEnum)[keyof typeof PurchaseReceiptItemScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoiceScalarFieldEnum = {
|
export const PurchaseReceiptPaymentsScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
code: 'code',
|
amount: 'amount',
|
||||||
totalAmount: 'totalAmount',
|
paymentMethod: 'paymentMethod',
|
||||||
|
bankAccountId: 'bankAccountId',
|
||||||
description: 'description',
|
description: 'description',
|
||||||
createdAt: 'createdAt',
|
payedAt: 'payedAt',
|
||||||
updatedAt: 'updatedAt',
|
receiptId: 'receiptId',
|
||||||
customerId: 'customerId',
|
createdAt: 'createdAt'
|
||||||
inventoryId: 'inventoryId'
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoiceItemScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
count: 'count',
|
|
||||||
fee: 'fee',
|
|
||||||
total: 'total',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
invoiceId: 'invoiceId',
|
|
||||||
productId: 'productId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const StockMovementScalarFieldEnum = {
|
export const StockMovementScalarFieldEnum = {
|
||||||
@@ -355,75 +478,29 @@ export const StockMovementScalarFieldEnum = {
|
|||||||
productId: 'productId',
|
productId: 'productId',
|
||||||
inventoryId: 'inventoryId',
|
inventoryId: 'inventoryId',
|
||||||
avgCost: 'avgCost',
|
avgCost: 'avgCost',
|
||||||
remainedInStock: 'remainedInStock',
|
|
||||||
supplierId: 'supplierId',
|
supplierId: 'supplierId',
|
||||||
customerId: 'customerId',
|
remainedInStock: 'remainedInStock',
|
||||||
counterInventoryId: 'counterInventoryId'
|
counterInventoryId: 'counterInventoryId',
|
||||||
|
customerId: 'customerId'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type StockMovementScalarFieldEnum = (typeof StockMovementScalarFieldEnum)[keyof typeof StockMovementScalarFieldEnum]
|
export type StockMovementScalarFieldEnum = (typeof StockMovementScalarFieldEnum)[keyof typeof StockMovementScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const StockBalanceScalarFieldEnum = {
|
export const StockBalanceScalarFieldEnum = {
|
||||||
id: 'id',
|
|
||||||
productId: 'productId',
|
|
||||||
inventoryId: 'inventoryId',
|
|
||||||
quantity: 'quantity',
|
quantity: 'quantity',
|
||||||
avgCost: 'avgCost',
|
|
||||||
totalCost: 'totalCost',
|
totalCost: 'totalCost',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
avgCost: 'avgCost',
|
||||||
|
inventoryId: 'inventoryId',
|
||||||
|
productId: 'productId',
|
||||||
createdAt: 'createdAt',
|
createdAt: 'createdAt',
|
||||||
updatedAt: 'updatedAt'
|
id: 'id'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type StockBalanceScalarFieldEnum = (typeof StockBalanceScalarFieldEnum)[keyof typeof StockBalanceScalarFieldEnum]
|
export type StockBalanceScalarFieldEnum = (typeof StockBalanceScalarFieldEnum)[keyof typeof StockBalanceScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const OtpCodeScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
code: 'code',
|
|
||||||
used: 'used',
|
|
||||||
expiresAt: 'expiresAt',
|
|
||||||
createdAt: 'createdAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OtpCodeScalarFieldEnum = (typeof OtpCodeScalarFieldEnum)[keyof typeof OtpCodeScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const RefreshTokenScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
tokenHash: 'tokenHash',
|
|
||||||
userId: 'userId',
|
|
||||||
revoked: 'revoked',
|
|
||||||
expiresAt: 'expiresAt',
|
|
||||||
createdAt: 'createdAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type RefreshTokenScalarFieldEnum = (typeof RefreshTokenScalarFieldEnum)[keyof typeof RefreshTokenScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryTransferScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
code: 'code',
|
|
||||||
description: 'description',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
fromInventoryId: 'fromInventoryId',
|
|
||||||
toInventoryId: 'toInventoryId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryTransferScalarFieldEnum = (typeof InventoryTransferScalarFieldEnum)[keyof typeof InventoryTransferScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryTransferItemScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
count: 'count',
|
|
||||||
productId: 'productId',
|
|
||||||
transferId: 'transferId'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryTransferItemScalarFieldEnum = (typeof InventoryTransferItemScalarFieldEnum)[keyof typeof InventoryTransferItemScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const StockAdjustmentScalarFieldEnum = {
|
export const StockAdjustmentScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
adjustedQuantity: 'adjustedQuantity',
|
adjustedQuantity: 'adjustedQuantity',
|
||||||
@@ -435,51 +512,6 @@ export const StockAdjustmentScalarFieldEnum = {
|
|||||||
export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum]
|
export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const TriggerLogScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
name: 'name',
|
|
||||||
message: 'message',
|
|
||||||
createdAt: 'createdAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const Inventory_overviewScalarFieldEnum = {
|
|
||||||
ProductId: 'ProductId',
|
|
||||||
stock_quantity: 'stock_quantity',
|
|
||||||
avgCost: 'avgCost',
|
|
||||||
totalCost: 'totalCost',
|
|
||||||
updatedAt: 'updatedAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type Inventory_overviewScalarFieldEnum = (typeof Inventory_overviewScalarFieldEnum)[keyof typeof Inventory_overviewScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const Stock_cardexScalarFieldEnum = {
|
|
||||||
productId: 'productId',
|
|
||||||
movement_id: 'movement_id',
|
|
||||||
type: 'type',
|
|
||||||
quantity: 'quantity',
|
|
||||||
fee: 'fee',
|
|
||||||
totalCost: 'totalCost',
|
|
||||||
balance_quantity: 'balance_quantity',
|
|
||||||
balance_avg_cost: 'balance_avg_cost',
|
|
||||||
createdAt: 'createdAt'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type Stock_cardexScalarFieldEnum = (typeof Stock_cardexScalarFieldEnum)[keyof typeof Stock_cardexScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const Stock_viewScalarFieldEnum = {
|
|
||||||
productId: 'productId',
|
|
||||||
inventoryId: 'inventoryId',
|
|
||||||
stock: 'stock'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type Stock_viewScalarFieldEnum = (typeof Stock_viewScalarFieldEnum)[keyof typeof Stock_viewScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SortOrder = {
|
export const SortOrder = {
|
||||||
asc: 'asc',
|
asc: 'asc',
|
||||||
desc: 'desc'
|
desc: 'desc'
|
||||||
@@ -539,6 +571,132 @@ export const RoleOrderByRelevanceFieldEnum = {
|
|||||||
export type RoleOrderByRelevanceFieldEnum = (typeof RoleOrderByRelevanceFieldEnum)[keyof typeof RoleOrderByRelevanceFieldEnum]
|
export type RoleOrderByRelevanceFieldEnum = (typeof RoleOrderByRelevanceFieldEnum)[keyof typeof RoleOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const OtpCodeOrderByRelevanceFieldEnum = {
|
||||||
|
mobileNumber: 'mobileNumber',
|
||||||
|
code: 'code'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type OtpCodeOrderByRelevanceFieldEnum = (typeof OtpCodeOrderByRelevanceFieldEnum)[keyof typeof OtpCodeOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const RefreshTokenOrderByRelevanceFieldEnum = {
|
||||||
|
tokenHash: 'tokenHash'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type RefreshTokenOrderByRelevanceFieldEnum = (typeof RefreshTokenOrderByRelevanceFieldEnum)[keyof typeof RefreshTokenOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankBranchOrderByRelevanceFieldEnum = {
|
||||||
|
name: 'name',
|
||||||
|
code: 'code',
|
||||||
|
address: 'address'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankBranchOrderByRelevanceFieldEnum = (typeof BankBranchOrderByRelevanceFieldEnum)[keyof typeof BankBranchOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankAccountOrderByRelevanceFieldEnum = {
|
||||||
|
accountNumber: 'accountNumber',
|
||||||
|
cardNumber: 'cardNumber',
|
||||||
|
name: 'name',
|
||||||
|
iban: 'iban'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankAccountOrderByRelevanceFieldEnum = (typeof BankAccountOrderByRelevanceFieldEnum)[keyof typeof BankAccountOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const InventoryOrderByRelevanceFieldEnum = {
|
||||||
|
name: 'name',
|
||||||
|
location: 'location'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type InventoryOrderByRelevanceFieldEnum = (typeof InventoryOrderByRelevanceFieldEnum)[keyof typeof InventoryOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const InventoryTransferOrderByRelevanceFieldEnum = {
|
||||||
|
code: 'code',
|
||||||
|
description: 'description'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const PosAccountOrderByRelevanceFieldEnum = {
|
||||||
|
name: 'name',
|
||||||
|
code: 'code',
|
||||||
|
description: 'description'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type PosAccountOrderByRelevanceFieldEnum = (typeof PosAccountOrderByRelevanceFieldEnum)[keyof typeof PosAccountOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankOrderByRelevanceFieldEnum = {
|
||||||
|
name: 'name',
|
||||||
|
shortName: 'shortName'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankOrderByRelevanceFieldEnum = (typeof BankOrderByRelevanceFieldEnum)[keyof typeof BankOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SupplierOrderByRelevanceFieldEnum = {
|
||||||
|
firstName: 'firstName',
|
||||||
|
lastName: 'lastName',
|
||||||
|
email: 'email',
|
||||||
|
mobileNumber: 'mobileNumber',
|
||||||
|
address: 'address',
|
||||||
|
city: 'city',
|
||||||
|
state: 'state',
|
||||||
|
country: 'country'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SupplierLedgerOrderByRelevanceFieldEnum = {
|
||||||
|
description: 'description'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SupplierLedgerOrderByRelevanceFieldEnum = (typeof SupplierLedgerOrderByRelevanceFieldEnum)[keyof typeof SupplierLedgerOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const CustomerOrderByRelevanceFieldEnum = {
|
||||||
|
firstName: 'firstName',
|
||||||
|
lastName: 'lastName',
|
||||||
|
email: 'email',
|
||||||
|
mobileNumber: 'mobileNumber',
|
||||||
|
address: 'address',
|
||||||
|
city: 'city',
|
||||||
|
state: 'state',
|
||||||
|
country: 'country'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const OrderOrderByRelevanceFieldEnum = {
|
||||||
|
orderNumber: 'orderNumber',
|
||||||
|
description: 'description'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||||
|
code: 'code',
|
||||||
|
description: 'description'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const TriggerLogOrderByRelevanceFieldEnum = {
|
||||||
|
message: 'message',
|
||||||
|
name: 'name'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const ProductVariantOrderByRelevanceFieldEnum = {
|
export const ProductVariantOrderByRelevanceFieldEnum = {
|
||||||
name: 'name',
|
name: 'name',
|
||||||
description: 'description',
|
description: 'description',
|
||||||
@@ -578,64 +736,6 @@ export const ProductCategoryOrderByRelevanceFieldEnum = {
|
|||||||
export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum]
|
export type ProductCategoryOrderByRelevanceFieldEnum = (typeof ProductCategoryOrderByRelevanceFieldEnum)[keyof typeof ProductCategoryOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SupplierOrderByRelevanceFieldEnum = {
|
|
||||||
firstName: 'firstName',
|
|
||||||
lastName: 'lastName',
|
|
||||||
email: 'email',
|
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
address: 'address',
|
|
||||||
city: 'city',
|
|
||||||
state: 'state',
|
|
||||||
country: 'country'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type SupplierOrderByRelevanceFieldEnum = (typeof SupplierOrderByRelevanceFieldEnum)[keyof typeof SupplierOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const CustomerOrderByRelevanceFieldEnum = {
|
|
||||||
firstName: 'firstName',
|
|
||||||
lastName: 'lastName',
|
|
||||||
email: 'email',
|
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
address: 'address',
|
|
||||||
city: 'city',
|
|
||||||
state: 'state',
|
|
||||||
country: 'country'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
location: 'location'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryOrderByRelevanceFieldEnum = (typeof InventoryOrderByRelevanceFieldEnum)[keyof typeof InventoryOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const StoreOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
location: 'location'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type StoreOrderByRelevanceFieldEnum = (typeof StoreOrderByRelevanceFieldEnum)[keyof typeof StoreOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const ProductChargeOrderByRelevanceFieldEnum = {
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type ProductChargeOrderByRelevanceFieldEnum = (typeof ProductChargeOrderByRelevanceFieldEnum)[keyof typeof ProductChargeOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const OrderOrderByRelevanceFieldEnum = {
|
|
||||||
orderNumber: 'orderNumber'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const PurchaseReceiptOrderByRelevanceFieldEnum = {
|
export const PurchaseReceiptOrderByRelevanceFieldEnum = {
|
||||||
code: 'code',
|
code: 'code',
|
||||||
description: 'description'
|
description: 'description'
|
||||||
@@ -651,12 +751,11 @@ export const PurchaseReceiptItemOrderByRelevanceFieldEnum = {
|
|||||||
export type PurchaseReceiptItemOrderByRelevanceFieldEnum = (typeof PurchaseReceiptItemOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptItemOrderByRelevanceFieldEnum]
|
export type PurchaseReceiptItemOrderByRelevanceFieldEnum = (typeof PurchaseReceiptItemOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptItemOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
export const PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = {
|
||||||
code: 'code',
|
|
||||||
description: 'description'
|
description: 'description'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
export type PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = (typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const StockMovementOrderByRelevanceFieldEnum = {
|
export const StockMovementOrderByRelevanceFieldEnum = {
|
||||||
@@ -665,34 +764,3 @@ export const StockMovementOrderByRelevanceFieldEnum = {
|
|||||||
|
|
||||||
export type StockMovementOrderByRelevanceFieldEnum = (typeof StockMovementOrderByRelevanceFieldEnum)[keyof typeof StockMovementOrderByRelevanceFieldEnum]
|
export type StockMovementOrderByRelevanceFieldEnum = (typeof StockMovementOrderByRelevanceFieldEnum)[keyof typeof StockMovementOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const OtpCodeOrderByRelevanceFieldEnum = {
|
|
||||||
mobileNumber: 'mobileNumber',
|
|
||||||
code: 'code'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type OtpCodeOrderByRelevanceFieldEnum = (typeof OtpCodeOrderByRelevanceFieldEnum)[keyof typeof OtpCodeOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const RefreshTokenOrderByRelevanceFieldEnum = {
|
|
||||||
tokenHash: 'tokenHash'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type RefreshTokenOrderByRelevanceFieldEnum = (typeof RefreshTokenOrderByRelevanceFieldEnum)[keyof typeof RefreshTokenOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const InventoryTransferOrderByRelevanceFieldEnum = {
|
|
||||||
code: 'code',
|
|
||||||
description: 'description'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type InventoryTransferOrderByRelevanceFieldEnum = (typeof InventoryTransferOrderByRelevanceFieldEnum)[keyof typeof InventoryTransferOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const TriggerLogOrderByRelevanceFieldEnum = {
|
|
||||||
name: 'name',
|
|
||||||
message: 'message'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,29 +10,31 @@
|
|||||||
*/
|
*/
|
||||||
export type * from './models/User.js'
|
export type * from './models/User.js'
|
||||||
export type * from './models/Role.js'
|
export type * from './models/Role.js'
|
||||||
|
export type * from './models/OtpCode.js'
|
||||||
|
export type * from './models/RefreshToken.js'
|
||||||
|
export type * from './models/BankBranch.js'
|
||||||
|
export type * from './models/BankAccount.js'
|
||||||
|
export type * from './models/Inventory.js'
|
||||||
|
export type * from './models/InventoryTransfer.js'
|
||||||
|
export type * from './models/InventoryTransferItem.js'
|
||||||
|
export type * from './models/InventoryBankAccount.js'
|
||||||
|
export type * from './models/PosAccount.js'
|
||||||
|
export type * from './models/Bank.js'
|
||||||
|
export type * from './models/Supplier.js'
|
||||||
|
export type * from './models/SupplierLedger.js'
|
||||||
|
export type * from './models/Customer.js'
|
||||||
|
export type * from './models/Order.js'
|
||||||
|
export type * from './models/SalesInvoice.js'
|
||||||
|
export type * from './models/SalesInvoiceItem.js'
|
||||||
|
export type * from './models/TriggerLog.js'
|
||||||
export type * from './models/ProductVariant.js'
|
export type * from './models/ProductVariant.js'
|
||||||
export type * from './models/Product.js'
|
export type * from './models/Product.js'
|
||||||
export type * from './models/ProductBrand.js'
|
export type * from './models/ProductBrand.js'
|
||||||
export type * from './models/ProductCategory.js'
|
export type * from './models/ProductCategory.js'
|
||||||
export type * from './models/Supplier.js'
|
|
||||||
export type * from './models/Customer.js'
|
|
||||||
export type * from './models/Inventory.js'
|
|
||||||
export type * from './models/Store.js'
|
|
||||||
export type * from './models/ProductCharge.js'
|
|
||||||
export type * from './models/Order.js'
|
|
||||||
export type * from './models/PurchaseReceipt.js'
|
export type * from './models/PurchaseReceipt.js'
|
||||||
export type * from './models/PurchaseReceiptItem.js'
|
export type * from './models/PurchaseReceiptItem.js'
|
||||||
export type * from './models/SalesInvoice.js'
|
export type * from './models/PurchaseReceiptPayments.js'
|
||||||
export type * from './models/SalesInvoiceItem.js'
|
|
||||||
export type * from './models/StockMovement.js'
|
export type * from './models/StockMovement.js'
|
||||||
export type * from './models/StockBalance.js'
|
export type * from './models/StockBalance.js'
|
||||||
export type * from './models/OtpCode.js'
|
|
||||||
export type * from './models/RefreshToken.js'
|
|
||||||
export type * from './models/InventoryTransfer.js'
|
|
||||||
export type * from './models/InventoryTransferItem.js'
|
|
||||||
export type * from './models/StockAdjustment.js'
|
export type * from './models/StockAdjustment.js'
|
||||||
export type * from './models/TriggerLog.js'
|
|
||||||
export type * from './models/inventory_overview.js'
|
|
||||||
export type * from './models/stock_cardex.js'
|
|
||||||
export type * from './models/stock_view.js'
|
|
||||||
export type * from './commonInputTypes.js'
|
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
File diff suppressed because it is too large
Load Diff
@@ -356,48 +356,6 @@ export type InventoryTransferItemSumOrderByAggregateInput = {
|
|||||||
transferId?: Prisma.SortOrder
|
transferId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemCreateNestedManyWithoutProductInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
|
||||||
createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope
|
|
||||||
connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
|
||||||
createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope
|
|
||||||
connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type InventoryTransferItemUpdateManyWithoutProductNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
|
||||||
upsert?: Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput[]
|
|
||||||
createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope
|
|
||||||
set?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
delete?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
update?: Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput[]
|
|
||||||
updateMany?: Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput | Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput[]
|
|
||||||
deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
|
||||||
upsert?: Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput[]
|
|
||||||
createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope
|
|
||||||
set?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
delete?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
|
||||||
update?: Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput[]
|
|
||||||
updateMany?: Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput | Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput[]
|
|
||||||
deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type InventoryTransferItemCreateNestedManyWithoutTransferInput = {
|
export type InventoryTransferItemCreateNestedManyWithoutTransferInput = {
|
||||||
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutTransferInput, Prisma.InventoryTransferItemUncheckedCreateWithoutTransferInput> | Prisma.InventoryTransferItemCreateWithoutTransferInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutTransferInput[]
|
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutTransferInput, Prisma.InventoryTransferItemUncheckedCreateWithoutTransferInput> | Prisma.InventoryTransferItemCreateWithoutTransferInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutTransferInput[]
|
||||||
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput | Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput[]
|
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput | Prisma.InventoryTransferItemCreateOrConnectWithoutTransferInput[]
|
||||||
@@ -440,51 +398,54 @@ export type InventoryTransferItemUncheckedUpdateManyWithoutTransferNestedInput =
|
|||||||
deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemCreateWithoutProductInput = {
|
export type DecimalFieldUpdateOperationsInput = {
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
set?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
transfer: Prisma.InventoryTransferCreateNestedOneWithoutItemsInput
|
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemUncheckedCreateWithoutProductInput = {
|
export type InventoryTransferItemCreateNestedManyWithoutProductInput = {
|
||||||
id?: number
|
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
||||||
transferId: number
|
createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope
|
||||||
|
connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemCreateOrConnectWithoutProductInput = {
|
export type InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput = {
|
||||||
where: Prisma.InventoryTransferItemWhereUniqueInput
|
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
||||||
create: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput>
|
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
||||||
|
createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope
|
||||||
|
connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemCreateManyProductInputEnvelope = {
|
export type InventoryTransferItemUpdateManyWithoutProductNestedInput = {
|
||||||
data: Prisma.InventoryTransferItemCreateManyProductInput | Prisma.InventoryTransferItemCreateManyProductInput[]
|
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
||||||
skipDuplicates?: boolean
|
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
||||||
|
upsert?: Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput[]
|
||||||
|
createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope
|
||||||
|
set?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
|
delete?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
|
connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
|
update?: Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput[]
|
||||||
|
updateMany?: Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput | Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput[]
|
||||||
|
deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput = {
|
export type InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput = {
|
||||||
where: Prisma.InventoryTransferItemWhereUniqueInput
|
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
||||||
update: Prisma.XOR<Prisma.InventoryTransferItemUpdateWithoutProductInput, Prisma.InventoryTransferItemUncheckedUpdateWithoutProductInput>
|
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
||||||
create: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput>
|
upsert?: Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput[]
|
||||||
}
|
createMany?: Prisma.InventoryTransferItemCreateManyProductInputEnvelope
|
||||||
|
set?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
export type InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput = {
|
disconnect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
where: Prisma.InventoryTransferItemWhereUniqueInput
|
delete?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
data: Prisma.XOR<Prisma.InventoryTransferItemUpdateWithoutProductInput, Prisma.InventoryTransferItemUncheckedUpdateWithoutProductInput>
|
connect?: Prisma.InventoryTransferItemWhereUniqueInput | Prisma.InventoryTransferItemWhereUniqueInput[]
|
||||||
}
|
update?: Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput | Prisma.InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput[]
|
||||||
|
updateMany?: Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput | Prisma.InventoryTransferItemUpdateManyWithWhereWithoutProductInput[]
|
||||||
export type InventoryTransferItemUpdateManyWithWhereWithoutProductInput = {
|
deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
||||||
where: Prisma.InventoryTransferItemScalarWhereInput
|
|
||||||
data: Prisma.XOR<Prisma.InventoryTransferItemUpdateManyMutationInput, Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type InventoryTransferItemScalarWhereInput = {
|
|
||||||
AND?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
|
||||||
OR?: Prisma.InventoryTransferItemScalarWhereInput[]
|
|
||||||
NOT?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
|
||||||
id?: Prisma.IntFilter<"InventoryTransferItem"> | number
|
|
||||||
count?: Prisma.DecimalFilter<"InventoryTransferItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
productId?: Prisma.IntFilter<"InventoryTransferItem"> | number
|
|
||||||
transferId?: Prisma.IntFilter<"InventoryTransferItem"> | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemCreateWithoutTransferInput = {
|
export type InventoryTransferItemCreateWithoutTransferInput = {
|
||||||
@@ -524,27 +485,51 @@ export type InventoryTransferItemUpdateManyWithWhereWithoutTransferInput = {
|
|||||||
data: Prisma.XOR<Prisma.InventoryTransferItemUpdateManyMutationInput, Prisma.InventoryTransferItemUncheckedUpdateManyWithoutTransferInput>
|
data: Prisma.XOR<Prisma.InventoryTransferItemUpdateManyMutationInput, Prisma.InventoryTransferItemUncheckedUpdateManyWithoutTransferInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemCreateManyProductInput = {
|
export type InventoryTransferItemScalarWhereInput = {
|
||||||
|
AND?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
||||||
|
OR?: Prisma.InventoryTransferItemScalarWhereInput[]
|
||||||
|
NOT?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
||||||
|
id?: Prisma.IntFilter<"InventoryTransferItem"> | number
|
||||||
|
count?: Prisma.DecimalFilter<"InventoryTransferItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
productId?: Prisma.IntFilter<"InventoryTransferItem"> | number
|
||||||
|
transferId?: Prisma.IntFilter<"InventoryTransferItem"> | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryTransferItemCreateWithoutProductInput = {
|
||||||
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
transfer: Prisma.InventoryTransferCreateNestedOneWithoutItemsInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryTransferItemUncheckedCreateWithoutProductInput = {
|
||||||
id?: number
|
id?: number
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
transferId: number
|
transferId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemUpdateWithoutProductInput = {
|
export type InventoryTransferItemCreateOrConnectWithoutProductInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
where: Prisma.InventoryTransferItemWhereUniqueInput
|
||||||
transfer?: Prisma.InventoryTransferUpdateOneRequiredWithoutItemsNestedInput
|
create: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemUncheckedUpdateWithoutProductInput = {
|
export type InventoryTransferItemCreateManyProductInputEnvelope = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
data: Prisma.InventoryTransferItemCreateManyProductInput | Prisma.InventoryTransferItemCreateManyProductInput[]
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
skipDuplicates?: boolean
|
||||||
transferId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemUncheckedUpdateManyWithoutProductInput = {
|
export type InventoryTransferItemUpsertWithWhereUniqueWithoutProductInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
where: Prisma.InventoryTransferItemWhereUniqueInput
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
update: Prisma.XOR<Prisma.InventoryTransferItemUpdateWithoutProductInput, Prisma.InventoryTransferItemUncheckedUpdateWithoutProductInput>
|
||||||
transferId?: Prisma.IntFieldUpdateOperationsInput | number
|
create: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryTransferItemUpdateWithWhereUniqueWithoutProductInput = {
|
||||||
|
where: Prisma.InventoryTransferItemWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.InventoryTransferItemUpdateWithoutProductInput, Prisma.InventoryTransferItemUncheckedUpdateWithoutProductInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryTransferItemUpdateManyWithWhereWithoutProductInput = {
|
||||||
|
where: Prisma.InventoryTransferItemScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.InventoryTransferItemUpdateManyMutationInput, Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryTransferItemCreateManyTransferInput = {
|
export type InventoryTransferItemCreateManyTransferInput = {
|
||||||
@@ -570,6 +555,29 @@ export type InventoryTransferItemUncheckedUpdateManyWithoutTransferInput = {
|
|||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type InventoryTransferItemCreateManyProductInput = {
|
||||||
|
id?: number
|
||||||
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
transferId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryTransferItemUpdateWithoutProductInput = {
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
transfer?: Prisma.InventoryTransferUpdateOneRequiredWithoutItemsNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryTransferItemUncheckedUpdateWithoutProductInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
transferId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryTransferItemUncheckedUpdateManyWithoutProductInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
transferId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type InventoryTransferItemSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type InventoryTransferItemSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
|
|||||||
@@ -42,8 +42,9 @@ export type OrderMinAggregateOutputType = {
|
|||||||
id: number | null
|
id: number | null
|
||||||
orderNumber: string | null
|
orderNumber: string | null
|
||||||
status: $Enums.OrderStatus | null
|
status: $Enums.OrderStatus | null
|
||||||
paymentMethod: $Enums.paymentMethod | null
|
paymentMethod: $Enums.payment_method_type | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
|
description: string | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
deletedAt: Date | null
|
deletedAt: Date | null
|
||||||
@@ -54,8 +55,9 @@ export type OrderMaxAggregateOutputType = {
|
|||||||
id: number | null
|
id: number | null
|
||||||
orderNumber: string | null
|
orderNumber: string | null
|
||||||
status: $Enums.OrderStatus | null
|
status: $Enums.OrderStatus | null
|
||||||
paymentMethod: $Enums.paymentMethod | null
|
paymentMethod: $Enums.payment_method_type | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
|
description: string | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
deletedAt: Date | null
|
deletedAt: Date | null
|
||||||
@@ -68,6 +70,7 @@ export type OrderCountAggregateOutputType = {
|
|||||||
status: number
|
status: number
|
||||||
paymentMethod: number
|
paymentMethod: number
|
||||||
totalAmount: number
|
totalAmount: number
|
||||||
|
description: number
|
||||||
createdAt: number
|
createdAt: number
|
||||||
updatedAt: number
|
updatedAt: number
|
||||||
deletedAt: number
|
deletedAt: number
|
||||||
@@ -94,6 +97,7 @@ export type OrderMinAggregateInputType = {
|
|||||||
status?: true
|
status?: true
|
||||||
paymentMethod?: true
|
paymentMethod?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
|
description?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
deletedAt?: true
|
deletedAt?: true
|
||||||
@@ -106,6 +110,7 @@ export type OrderMaxAggregateInputType = {
|
|||||||
status?: true
|
status?: true
|
||||||
paymentMethod?: true
|
paymentMethod?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
|
description?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
deletedAt?: true
|
deletedAt?: true
|
||||||
@@ -118,6 +123,7 @@ export type OrderCountAggregateInputType = {
|
|||||||
status?: true
|
status?: true
|
||||||
paymentMethod?: true
|
paymentMethod?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
|
description?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
deletedAt?: true
|
deletedAt?: true
|
||||||
@@ -215,8 +221,9 @@ export type OrderGroupByOutputType = {
|
|||||||
id: number
|
id: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status: $Enums.OrderStatus
|
status: $Enums.OrderStatus
|
||||||
paymentMethod: $Enums.paymentMethod
|
paymentMethod: $Enums.payment_method_type
|
||||||
totalAmount: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
|
description: string | null
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
deletedAt: Date | null
|
deletedAt: Date | null
|
||||||
@@ -250,8 +257,9 @@ export type OrderWhereInput = {
|
|||||||
id?: Prisma.IntFilter<"Order"> | number
|
id?: Prisma.IntFilter<"Order"> | number
|
||||||
orderNumber?: Prisma.StringFilter<"Order"> | string
|
orderNumber?: Prisma.StringFilter<"Order"> | string
|
||||||
status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFilter<"Order"> | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFilter<"Order"> | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.StringNullableFilter<"Order"> | string | null
|
||||||
createdAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableFilter<"Order"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"Order"> | Date | string | null
|
||||||
@@ -265,6 +273,7 @@ export type OrderOrderByWithRelationInput = {
|
|||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
paymentMethod?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
@@ -280,8 +289,9 @@ export type OrderWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
OR?: Prisma.OrderWhereInput[]
|
OR?: Prisma.OrderWhereInput[]
|
||||||
NOT?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[]
|
NOT?: Prisma.OrderWhereInput | Prisma.OrderWhereInput[]
|
||||||
status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFilter<"Order"> | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFilter<"Order"> | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.StringNullableFilter<"Order"> | string | null
|
||||||
createdAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableFilter<"Order"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"Order"> | Date | string | null
|
||||||
@@ -295,6 +305,7 @@ export type OrderOrderByWithAggregationInput = {
|
|||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
paymentMethod?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
@@ -313,8 +324,9 @@ export type OrderScalarWhereWithAggregatesInput = {
|
|||||||
id?: Prisma.IntWithAggregatesFilter<"Order"> | number
|
id?: Prisma.IntWithAggregatesFilter<"Order"> | number
|
||||||
orderNumber?: Prisma.StringWithAggregatesFilter<"Order"> | string
|
orderNumber?: Prisma.StringWithAggregatesFilter<"Order"> | string
|
||||||
status?: Prisma.EnumOrderStatusWithAggregatesFilter<"Order"> | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusWithAggregatesFilter<"Order"> | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodWithAggregatesFilter<"Order"> | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeWithAggregatesFilter<"Order"> | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalWithAggregatesFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalWithAggregatesFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.StringNullableWithAggregatesFilter<"Order"> | string | null
|
||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Order"> | Date | string
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"Order"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Order"> | Date | string
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"Order"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Order"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableWithAggregatesFilter<"Order"> | Date | string | null
|
||||||
@@ -324,8 +336,9 @@ export type OrderScalarWhereWithAggregatesInput = {
|
|||||||
export type OrderCreateInput = {
|
export type OrderCreateInput = {
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.paymentMethod
|
paymentMethod?: $Enums.payment_method_type
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
@@ -336,8 +349,9 @@ export type OrderUncheckedCreateInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.paymentMethod
|
paymentMethod?: $Enums.payment_method_type
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
@@ -347,8 +361,9 @@ export type OrderUncheckedCreateInput = {
|
|||||||
export type OrderUpdateInput = {
|
export type OrderUpdateInput = {
|
||||||
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
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
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -359,8 +374,9 @@ export type OrderUncheckedUpdateInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
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
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -371,8 +387,9 @@ export type OrderCreateManyInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.paymentMethod
|
paymentMethod?: $Enums.payment_method_type
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
@@ -382,8 +399,9 @@ export type OrderCreateManyInput = {
|
|||||||
export type OrderUpdateManyMutationInput = {
|
export type OrderUpdateManyMutationInput = {
|
||||||
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
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
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -393,8 +411,9 @@ export type OrderUncheckedUpdateManyInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
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
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -423,6 +442,7 @@ export type OrderCountOrderByAggregateInput = {
|
|||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
paymentMethod?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
description?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
deletedAt?: Prisma.SortOrder
|
deletedAt?: Prisma.SortOrder
|
||||||
@@ -441,6 +461,7 @@ export type OrderMaxOrderByAggregateInput = {
|
|||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
paymentMethod?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
description?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
deletedAt?: Prisma.SortOrder
|
deletedAt?: Prisma.SortOrder
|
||||||
@@ -453,6 +474,7 @@ export type OrderMinOrderByAggregateInput = {
|
|||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
paymentMethod?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
description?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
deletedAt?: Prisma.SortOrder
|
deletedAt?: Prisma.SortOrder
|
||||||
@@ -511,15 +533,16 @@ export type EnumOrderStatusFieldUpdateOperationsInput = {
|
|||||||
set?: $Enums.OrderStatus
|
set?: $Enums.OrderStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumpaymentMethodFieldUpdateOperationsInput = {
|
export type Enumpayment_method_typeFieldUpdateOperationsInput = {
|
||||||
set?: $Enums.paymentMethod
|
set?: $Enums.payment_method_type
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderCreateWithoutCustomerInput = {
|
export type OrderCreateWithoutCustomerInput = {
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.paymentMethod
|
paymentMethod?: $Enums.payment_method_type
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
@@ -529,8 +552,9 @@ export type OrderUncheckedCreateWithoutCustomerInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.paymentMethod
|
paymentMethod?: $Enums.payment_method_type
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
@@ -569,8 +593,9 @@ export type OrderScalarWhereInput = {
|
|||||||
id?: Prisma.IntFilter<"Order"> | number
|
id?: Prisma.IntFilter<"Order"> | number
|
||||||
orderNumber?: Prisma.StringFilter<"Order"> | string
|
orderNumber?: Prisma.StringFilter<"Order"> | string
|
||||||
status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFilter<"Order"> | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFilter<"Order"> | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFilter<"Order"> | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"Order"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.StringNullableFilter<"Order"> | string | null
|
||||||
createdAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"Order"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableFilter<"Order"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"Order"> | Date | string | null
|
||||||
@@ -581,8 +606,9 @@ export type OrderCreateManyCustomerInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.paymentMethod
|
paymentMethod?: $Enums.payment_method_type
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
@@ -591,8 +617,9 @@ export type OrderCreateManyCustomerInput = {
|
|||||||
export type OrderUpdateWithoutCustomerInput = {
|
export type OrderUpdateWithoutCustomerInput = {
|
||||||
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
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
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -602,8 +629,9 @@ export type OrderUncheckedUpdateWithoutCustomerInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
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
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -613,8 +641,9 @@ export type OrderUncheckedUpdateManyWithoutCustomerInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
||||||
paymentMethod?: Prisma.EnumpaymentMethodFieldUpdateOperationsInput | $Enums.paymentMethod
|
paymentMethod?: Prisma.Enumpayment_method_typeFieldUpdateOperationsInput | $Enums.payment_method_type
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
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
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -628,6 +657,7 @@ export type OrderSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
|||||||
status?: boolean
|
status?: boolean
|
||||||
paymentMethod?: boolean
|
paymentMethod?: boolean
|
||||||
totalAmount?: boolean
|
totalAmount?: boolean
|
||||||
|
description?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
deletedAt?: boolean
|
deletedAt?: boolean
|
||||||
@@ -643,13 +673,14 @@ export type OrderSelectScalar = {
|
|||||||
status?: boolean
|
status?: boolean
|
||||||
paymentMethod?: boolean
|
paymentMethod?: boolean
|
||||||
totalAmount?: boolean
|
totalAmount?: boolean
|
||||||
|
description?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
deletedAt?: boolean
|
deletedAt?: boolean
|
||||||
customerId?: boolean
|
customerId?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "orderNumber" | "status" | "paymentMethod" | "totalAmount" | "createdAt" | "updatedAt" | "deletedAt" | "customerId", ExtArgs["result"]["order"]>
|
export type OrderOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "orderNumber" | "status" | "paymentMethod" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "deletedAt" | "customerId", ExtArgs["result"]["order"]>
|
||||||
export type OrderInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type OrderInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
@@ -663,8 +694,9 @@ export type $OrderPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
|||||||
id: number
|
id: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status: $Enums.OrderStatus
|
status: $Enums.OrderStatus
|
||||||
paymentMethod: $Enums.paymentMethod
|
paymentMethod: $Enums.payment_method_type
|
||||||
totalAmount: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
|
description: string | null
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
deletedAt: Date | null
|
deletedAt: Date | null
|
||||||
@@ -1042,8 +1074,9 @@ export interface OrderFieldRefs {
|
|||||||
readonly id: Prisma.FieldRef<"Order", 'Int'>
|
readonly id: Prisma.FieldRef<"Order", 'Int'>
|
||||||
readonly orderNumber: Prisma.FieldRef<"Order", 'String'>
|
readonly orderNumber: Prisma.FieldRef<"Order", 'String'>
|
||||||
readonly status: Prisma.FieldRef<"Order", 'OrderStatus'>
|
readonly status: Prisma.FieldRef<"Order", 'OrderStatus'>
|
||||||
readonly paymentMethod: Prisma.FieldRef<"Order", 'paymentMethod'>
|
readonly paymentMethod: Prisma.FieldRef<"Order", 'payment_method_type'>
|
||||||
readonly totalAmount: Prisma.FieldRef<"Order", 'Decimal'>
|
readonly totalAmount: Prisma.FieldRef<"Order", 'Decimal'>
|
||||||
|
readonly description: Prisma.FieldRef<"Order", 'String'>
|
||||||
readonly createdAt: Prisma.FieldRef<"Order", 'DateTime'>
|
readonly createdAt: Prisma.FieldRef<"Order", 'DateTime'>
|
||||||
readonly updatedAt: Prisma.FieldRef<"Order", 'DateTime'>
|
readonly updatedAt: Prisma.FieldRef<"Order", 'DateTime'>
|
||||||
readonly deletedAt: Prisma.FieldRef<"Order", 'DateTime'>
|
readonly deletedAt: Prisma.FieldRef<"Order", 'DateTime'>
|
||||||
|
|||||||
@@ -375,6 +375,10 @@ export type OtpCodeSumOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BoolFieldUpdateOperationsInput = {
|
||||||
|
set?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type OtpCodeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type OtpCodeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
|
|||||||
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
@@ -637,14 +637,6 @@ export type ProductVariantOrderByRelationAggregateInput = {
|
|||||||
_count?: Prisma.SortOrder
|
_count?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalFieldUpdateOperationsInput = {
|
|
||||||
set?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
decrement?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
multiply?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NullableDecimalFieldUpdateOperationsInput = {
|
export type NullableDecimalFieldUpdateOperationsInput = {
|
||||||
set?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
set?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||||
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
increment?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
@@ -653,10 +645,6 @@ export type NullableDecimalFieldUpdateOperationsInput = {
|
|||||||
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
divide?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BoolFieldUpdateOperationsInput = {
|
|
||||||
set?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type ProductVariantCreateNestedManyWithoutProductInput = {
|
export type ProductVariantCreateNestedManyWithoutProductInput = {
|
||||||
create?: Prisma.XOR<Prisma.ProductVariantCreateWithoutProductInput, Prisma.ProductVariantUncheckedCreateWithoutProductInput> | Prisma.ProductVariantCreateWithoutProductInput[] | Prisma.ProductVariantUncheckedCreateWithoutProductInput[]
|
create?: Prisma.XOR<Prisma.ProductVariantCreateWithoutProductInput, Prisma.ProductVariantUncheckedCreateWithoutProductInput> | Prisma.ProductVariantCreateWithoutProductInput[] | Prisma.ProductVariantUncheckedCreateWithoutProductInput[]
|
||||||
connectOrCreate?: Prisma.ProductVariantCreateOrConnectWithoutProductInput | Prisma.ProductVariantCreateOrConnectWithoutProductInput[]
|
connectOrCreate?: Prisma.ProductVariantCreateOrConnectWithoutProductInput | Prisma.ProductVariantCreateOrConnectWithoutProductInput[]
|
||||||
|
|||||||
@@ -29,6 +29,7 @@ export type AggregatePurchaseReceipt = {
|
|||||||
export type PurchaseReceiptAvgAggregateOutputType = {
|
export type PurchaseReceiptAvgAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
|
paidAmount: runtime.Decimal | null
|
||||||
supplierId: number | null
|
supplierId: number | null
|
||||||
inventoryId: number | null
|
inventoryId: number | null
|
||||||
}
|
}
|
||||||
@@ -36,6 +37,7 @@ export type PurchaseReceiptAvgAggregateOutputType = {
|
|||||||
export type PurchaseReceiptSumAggregateOutputType = {
|
export type PurchaseReceiptSumAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
|
paidAmount: runtime.Decimal | null
|
||||||
supplierId: number | null
|
supplierId: number | null
|
||||||
inventoryId: number | null
|
inventoryId: number | null
|
||||||
}
|
}
|
||||||
@@ -44,6 +46,8 @@ export type PurchaseReceiptMinAggregateOutputType = {
|
|||||||
id: number | null
|
id: number | null
|
||||||
code: string | null
|
code: string | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
|
paidAmount: runtime.Decimal | null
|
||||||
|
isSettled: boolean | null
|
||||||
description: string | null
|
description: string | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
@@ -55,6 +59,8 @@ export type PurchaseReceiptMaxAggregateOutputType = {
|
|||||||
id: number | null
|
id: number | null
|
||||||
code: string | null
|
code: string | null
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
|
paidAmount: runtime.Decimal | null
|
||||||
|
isSettled: boolean | null
|
||||||
description: string | null
|
description: string | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
@@ -66,6 +72,8 @@ export type PurchaseReceiptCountAggregateOutputType = {
|
|||||||
id: number
|
id: number
|
||||||
code: number
|
code: number
|
||||||
totalAmount: number
|
totalAmount: number
|
||||||
|
paidAmount: number
|
||||||
|
isSettled: number
|
||||||
description: number
|
description: number
|
||||||
createdAt: number
|
createdAt: number
|
||||||
updatedAt: number
|
updatedAt: number
|
||||||
@@ -78,6 +86,7 @@ export type PurchaseReceiptCountAggregateOutputType = {
|
|||||||
export type PurchaseReceiptAvgAggregateInputType = {
|
export type PurchaseReceiptAvgAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
|
paidAmount?: true
|
||||||
supplierId?: true
|
supplierId?: true
|
||||||
inventoryId?: true
|
inventoryId?: true
|
||||||
}
|
}
|
||||||
@@ -85,6 +94,7 @@ export type PurchaseReceiptAvgAggregateInputType = {
|
|||||||
export type PurchaseReceiptSumAggregateInputType = {
|
export type PurchaseReceiptSumAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
|
paidAmount?: true
|
||||||
supplierId?: true
|
supplierId?: true
|
||||||
inventoryId?: true
|
inventoryId?: true
|
||||||
}
|
}
|
||||||
@@ -93,6 +103,8 @@ export type PurchaseReceiptMinAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
code?: true
|
code?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
|
paidAmount?: true
|
||||||
|
isSettled?: true
|
||||||
description?: true
|
description?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
@@ -104,6 +116,8 @@ export type PurchaseReceiptMaxAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
code?: true
|
code?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
|
paidAmount?: true
|
||||||
|
isSettled?: true
|
||||||
description?: true
|
description?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
@@ -115,6 +129,8 @@ export type PurchaseReceiptCountAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
code?: true
|
code?: true
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
|
paidAmount?: true
|
||||||
|
isSettled?: true
|
||||||
description?: true
|
description?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
@@ -213,6 +229,8 @@ export type PurchaseReceiptGroupByOutputType = {
|
|||||||
id: number
|
id: number
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
|
paidAmount: runtime.Decimal
|
||||||
|
isSettled: boolean
|
||||||
description: string | null
|
description: string | null
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
@@ -247,6 +265,8 @@ export type PurchaseReceiptWhereInput = {
|
|||||||
id?: Prisma.IntFilter<"PurchaseReceipt"> | number
|
id?: Prisma.IntFilter<"PurchaseReceipt"> | number
|
||||||
code?: Prisma.StringFilter<"PurchaseReceipt"> | string
|
code?: Prisma.StringFilter<"PurchaseReceipt"> | string
|
||||||
totalAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFilter<"PurchaseReceipt"> | boolean
|
||||||
description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null
|
description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null
|
||||||
createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
||||||
@@ -255,12 +275,15 @@ export type PurchaseReceiptWhereInput = {
|
|||||||
items?: Prisma.PurchaseReceiptItemListRelationFilter
|
items?: Prisma.PurchaseReceiptItemListRelationFilter
|
||||||
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
||||||
supplier?: Prisma.XOR<Prisma.SupplierScalarRelationFilter, Prisma.SupplierWhereInput>
|
supplier?: Prisma.XOR<Prisma.SupplierScalarRelationFilter, Prisma.SupplierWhereInput>
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptOrderByWithRelationInput = {
|
export type PurchaseReceiptOrderByWithRelationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
paidAmount?: Prisma.SortOrder
|
||||||
|
isSettled?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
@@ -269,6 +292,7 @@ export type PurchaseReceiptOrderByWithRelationInput = {
|
|||||||
items?: Prisma.PurchaseReceiptItemOrderByRelationAggregateInput
|
items?: Prisma.PurchaseReceiptItemOrderByRelationAggregateInput
|
||||||
inventory?: Prisma.InventoryOrderByWithRelationInput
|
inventory?: Prisma.InventoryOrderByWithRelationInput
|
||||||
supplier?: Prisma.SupplierOrderByWithRelationInput
|
supplier?: Prisma.SupplierOrderByWithRelationInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.PurchaseReceiptOrderByRelevanceInput
|
_relevance?: Prisma.PurchaseReceiptOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,6 +303,8 @@ export type PurchaseReceiptWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
OR?: Prisma.PurchaseReceiptWhereInput[]
|
OR?: Prisma.PurchaseReceiptWhereInput[]
|
||||||
NOT?: Prisma.PurchaseReceiptWhereInput | Prisma.PurchaseReceiptWhereInput[]
|
NOT?: Prisma.PurchaseReceiptWhereInput | Prisma.PurchaseReceiptWhereInput[]
|
||||||
totalAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFilter<"PurchaseReceipt"> | boolean
|
||||||
description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null
|
description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null
|
||||||
createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
||||||
@@ -287,12 +313,15 @@ export type PurchaseReceiptWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
items?: Prisma.PurchaseReceiptItemListRelationFilter
|
items?: Prisma.PurchaseReceiptItemListRelationFilter
|
||||||
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
||||||
supplier?: Prisma.XOR<Prisma.SupplierScalarRelationFilter, Prisma.SupplierWhereInput>
|
supplier?: Prisma.XOR<Prisma.SupplierScalarRelationFilter, Prisma.SupplierWhereInput>
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
|
||||||
}, "id" | "code">
|
}, "id" | "code">
|
||||||
|
|
||||||
export type PurchaseReceiptOrderByWithAggregationInput = {
|
export type PurchaseReceiptOrderByWithAggregationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
paidAmount?: Prisma.SortOrder
|
||||||
|
isSettled?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
@@ -312,6 +341,8 @@ export type PurchaseReceiptScalarWhereWithAggregatesInput = {
|
|||||||
id?: Prisma.IntWithAggregatesFilter<"PurchaseReceipt"> | number
|
id?: Prisma.IntWithAggregatesFilter<"PurchaseReceipt"> | number
|
||||||
code?: Prisma.StringWithAggregatesFilter<"PurchaseReceipt"> | string
|
code?: Prisma.StringWithAggregatesFilter<"PurchaseReceipt"> | string
|
||||||
totalAmount?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolWithAggregatesFilter<"PurchaseReceipt"> | boolean
|
||||||
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceipt"> | string | null
|
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceipt"> | string | null
|
||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceipt"> | Date | string
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceipt"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceipt"> | Date | string
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"PurchaseReceipt"> | Date | string
|
||||||
@@ -322,53 +353,67 @@ export type PurchaseReceiptScalarWhereWithAggregatesInput = {
|
|||||||
export type PurchaseReceiptCreateInput = {
|
export type PurchaseReceiptCreateInput = {
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
|
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
|
||||||
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
|
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
|
||||||
supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput
|
supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedCreateInput = {
|
export type PurchaseReceiptUncheckedCreateInput = {
|
||||||
id?: number
|
id?: number
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
supplierId: number
|
supplierId: number
|
||||||
inventoryId: number
|
inventoryId: number
|
||||||
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
|
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUpdateInput = {
|
export type PurchaseReceiptUpdateInput = {
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
|
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
|
||||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
||||||
supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedUpdateInput = {
|
export type PurchaseReceiptUncheckedUpdateInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
supplierId?: Prisma.IntFieldUpdateOperationsInput | number
|
supplierId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
|
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCreateManyInput = {
|
export type PurchaseReceiptCreateManyInput = {
|
||||||
id?: number
|
id?: number
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
@@ -379,6 +424,8 @@ export type PurchaseReceiptCreateManyInput = {
|
|||||||
export type PurchaseReceiptUpdateManyMutationInput = {
|
export type PurchaseReceiptUpdateManyMutationInput = {
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
@@ -388,6 +435,8 @@ export type PurchaseReceiptUncheckedUpdateManyInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
@@ -415,6 +464,8 @@ export type PurchaseReceiptCountOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
paidAmount?: Prisma.SortOrder
|
||||||
|
isSettled?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
@@ -425,6 +476,7 @@ export type PurchaseReceiptCountOrderByAggregateInput = {
|
|||||||
export type PurchaseReceiptAvgOrderByAggregateInput = {
|
export type PurchaseReceiptAvgOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
paidAmount?: Prisma.SortOrder
|
||||||
supplierId?: Prisma.SortOrder
|
supplierId?: Prisma.SortOrder
|
||||||
inventoryId?: Prisma.SortOrder
|
inventoryId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
@@ -433,6 +485,8 @@ export type PurchaseReceiptMaxOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
paidAmount?: Prisma.SortOrder
|
||||||
|
isSettled?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
@@ -444,6 +498,8 @@ export type PurchaseReceiptMinOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
code?: Prisma.SortOrder
|
code?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
paidAmount?: Prisma.SortOrder
|
||||||
|
isSettled?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
@@ -454,6 +510,7 @@ export type PurchaseReceiptMinOrderByAggregateInput = {
|
|||||||
export type PurchaseReceiptSumOrderByAggregateInput = {
|
export type PurchaseReceiptSumOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
|
paidAmount?: Prisma.SortOrder
|
||||||
supplierId?: Prisma.SortOrder
|
supplierId?: Prisma.SortOrder
|
||||||
inventoryId?: Prisma.SortOrder
|
inventoryId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
@@ -463,48 +520,6 @@ export type PurchaseReceiptScalarRelationFilter = {
|
|||||||
isNot?: Prisma.PurchaseReceiptWhereInput
|
isNot?: Prisma.PurchaseReceiptWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCreateNestedManyWithoutSupplierInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput> | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[]
|
|
||||||
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[]
|
|
||||||
createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope
|
|
||||||
connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput> | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[]
|
|
||||||
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[]
|
|
||||||
createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope
|
|
||||||
connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptUpdateManyWithoutSupplierNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput> | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[]
|
|
||||||
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[]
|
|
||||||
upsert?: Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput[]
|
|
||||||
createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope
|
|
||||||
set?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
delete?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
update?: Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput[]
|
|
||||||
updateMany?: Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput | Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput[]
|
|
||||||
deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput> | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[]
|
|
||||||
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[]
|
|
||||||
upsert?: Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput[]
|
|
||||||
createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope
|
|
||||||
set?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
delete?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
|
||||||
update?: Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput[]
|
|
||||||
updateMany?: Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput | Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput[]
|
|
||||||
deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptCreateNestedManyWithoutInventoryInput = {
|
export type PurchaseReceiptCreateNestedManyWithoutInventoryInput = {
|
||||||
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutInventoryInput, Prisma.PurchaseReceiptUncheckedCreateWithoutInventoryInput> | Prisma.PurchaseReceiptCreateWithoutInventoryInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutInventoryInput[]
|
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutInventoryInput, Prisma.PurchaseReceiptUncheckedCreateWithoutInventoryInput> | Prisma.PurchaseReceiptCreateWithoutInventoryInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutInventoryInput[]
|
||||||
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput | Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput[]
|
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput | Prisma.PurchaseReceiptCreateOrConnectWithoutInventoryInput[]
|
||||||
@@ -547,6 +562,48 @@ export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput = {
|
|||||||
deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptCreateNestedManyWithoutSupplierInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput> | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[]
|
||||||
|
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[]
|
||||||
|
createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope
|
||||||
|
connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput> | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[]
|
||||||
|
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[]
|
||||||
|
createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope
|
||||||
|
connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUpdateManyWithoutSupplierNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput> | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[]
|
||||||
|
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[]
|
||||||
|
upsert?: Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput[]
|
||||||
|
createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope
|
||||||
|
set?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
delete?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
update?: Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput[]
|
||||||
|
updateMany?: Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput | Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput[]
|
||||||
|
deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput> | Prisma.PurchaseReceiptCreateWithoutSupplierInput[] | Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput[]
|
||||||
|
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput | Prisma.PurchaseReceiptCreateOrConnectWithoutSupplierInput[]
|
||||||
|
upsert?: Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput[]
|
||||||
|
createMany?: Prisma.PurchaseReceiptCreateManySupplierInputEnvelope
|
||||||
|
set?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
delete?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
connect?: Prisma.PurchaseReceiptWhereUniqueInput | Prisma.PurchaseReceiptWhereUniqueInput[]
|
||||||
|
update?: Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput | Prisma.PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput[]
|
||||||
|
updateMany?: Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput | Prisma.PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput[]
|
||||||
|
deleteMany?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCreateNestedOneWithoutItemsInput = {
|
export type PurchaseReceiptCreateNestedOneWithoutItemsInput = {
|
||||||
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutItemsInput, Prisma.PurchaseReceiptUncheckedCreateWithoutItemsInput>
|
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutItemsInput, Prisma.PurchaseReceiptUncheckedCreateWithoutItemsInput>
|
||||||
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutItemsInput
|
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutItemsInput
|
||||||
@@ -561,86 +618,45 @@ export type PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.PurchaseReceiptUpdateToOneWithWhereWithoutItemsInput, Prisma.PurchaseReceiptUpdateWithoutItemsInput>, Prisma.PurchaseReceiptUncheckedUpdateWithoutItemsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.PurchaseReceiptUpdateToOneWithWhereWithoutItemsInput, Prisma.PurchaseReceiptUpdateWithoutItemsInput>, Prisma.PurchaseReceiptUncheckedUpdateWithoutItemsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCreateWithoutSupplierInput = {
|
export type PurchaseReceiptCreateNestedOneWithoutPurchaseReceiptPaymentsInput = {
|
||||||
code: string
|
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutPurchaseReceiptPaymentsInput, Prisma.PurchaseReceiptUncheckedCreateWithoutPurchaseReceiptPaymentsInput>
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutPurchaseReceiptPaymentsInput
|
||||||
description?: string | null
|
connect?: Prisma.PurchaseReceiptWhereUniqueInput
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
|
|
||||||
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedCreateWithoutSupplierInput = {
|
export type PurchaseReceiptUpdateOneRequiredWithoutPurchaseReceiptPaymentsNestedInput = {
|
||||||
id?: number
|
create?: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutPurchaseReceiptPaymentsInput, Prisma.PurchaseReceiptUncheckedCreateWithoutPurchaseReceiptPaymentsInput>
|
||||||
code: string
|
connectOrCreate?: Prisma.PurchaseReceiptCreateOrConnectWithoutPurchaseReceiptPaymentsInput
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
upsert?: Prisma.PurchaseReceiptUpsertWithoutPurchaseReceiptPaymentsInput
|
||||||
description?: string | null
|
connect?: Prisma.PurchaseReceiptWhereUniqueInput
|
||||||
createdAt?: Date | string
|
update?: Prisma.XOR<Prisma.XOR<Prisma.PurchaseReceiptUpdateToOneWithWhereWithoutPurchaseReceiptPaymentsInput, Prisma.PurchaseReceiptUpdateWithoutPurchaseReceiptPaymentsInput>, Prisma.PurchaseReceiptUncheckedUpdateWithoutPurchaseReceiptPaymentsInput>
|
||||||
updatedAt?: Date | string
|
|
||||||
inventoryId: number
|
|
||||||
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptCreateOrConnectWithoutSupplierInput = {
|
|
||||||
where: Prisma.PurchaseReceiptWhereUniqueInput
|
|
||||||
create: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptCreateManySupplierInputEnvelope = {
|
|
||||||
data: Prisma.PurchaseReceiptCreateManySupplierInput | Prisma.PurchaseReceiptCreateManySupplierInput[]
|
|
||||||
skipDuplicates?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput = {
|
|
||||||
where: Prisma.PurchaseReceiptWhereUniqueInput
|
|
||||||
update: Prisma.XOR<Prisma.PurchaseReceiptUpdateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedUpdateWithoutSupplierInput>
|
|
||||||
create: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput = {
|
|
||||||
where: Prisma.PurchaseReceiptWhereUniqueInput
|
|
||||||
data: Prisma.XOR<Prisma.PurchaseReceiptUpdateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedUpdateWithoutSupplierInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput = {
|
|
||||||
where: Prisma.PurchaseReceiptScalarWhereInput
|
|
||||||
data: Prisma.XOR<Prisma.PurchaseReceiptUpdateManyMutationInput, Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptScalarWhereInput = {
|
|
||||||
AND?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
|
||||||
OR?: Prisma.PurchaseReceiptScalarWhereInput[]
|
|
||||||
NOT?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
|
||||||
id?: Prisma.IntFilter<"PurchaseReceipt"> | number
|
|
||||||
code?: Prisma.StringFilter<"PurchaseReceipt"> | string
|
|
||||||
totalAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
|
||||||
supplierId?: Prisma.IntFilter<"PurchaseReceipt"> | number
|
|
||||||
inventoryId?: Prisma.IntFilter<"PurchaseReceipt"> | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCreateWithoutInventoryInput = {
|
export type PurchaseReceiptCreateWithoutInventoryInput = {
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
|
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
|
||||||
supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput
|
supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedCreateWithoutInventoryInput = {
|
export type PurchaseReceiptUncheckedCreateWithoutInventoryInput = {
|
||||||
id?: number
|
id?: number
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
supplierId: number
|
supplierId: number
|
||||||
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
|
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCreateOrConnectWithoutInventoryInput = {
|
export type PurchaseReceiptCreateOrConnectWithoutInventoryInput = {
|
||||||
@@ -669,25 +685,100 @@ export type PurchaseReceiptUpdateManyWithWhereWithoutInventoryInput = {
|
|||||||
data: Prisma.XOR<Prisma.PurchaseReceiptUpdateManyMutationInput, Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryInput>
|
data: Prisma.XOR<Prisma.PurchaseReceiptUpdateManyMutationInput, Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptScalarWhereInput = {
|
||||||
|
AND?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
||||||
|
OR?: Prisma.PurchaseReceiptScalarWhereInput[]
|
||||||
|
NOT?: Prisma.PurchaseReceiptScalarWhereInput | Prisma.PurchaseReceiptScalarWhereInput[]
|
||||||
|
id?: Prisma.IntFilter<"PurchaseReceipt"> | number
|
||||||
|
code?: Prisma.StringFilter<"PurchaseReceipt"> | string
|
||||||
|
totalAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFilter<"PurchaseReceipt"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFilter<"PurchaseReceipt"> | boolean
|
||||||
|
description?: Prisma.StringNullableFilter<"PurchaseReceipt"> | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFilter<"PurchaseReceipt"> | Date | string
|
||||||
|
supplierId?: Prisma.IntFilter<"PurchaseReceipt"> | number
|
||||||
|
inventoryId?: Prisma.IntFilter<"PurchaseReceipt"> | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptCreateWithoutSupplierInput = {
|
||||||
|
code: string
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
|
||||||
|
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUncheckedCreateWithoutSupplierInput = {
|
||||||
|
id?: number
|
||||||
|
code: string
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
inventoryId: number
|
||||||
|
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptCreateOrConnectWithoutSupplierInput = {
|
||||||
|
where: Prisma.PurchaseReceiptWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptCreateManySupplierInputEnvelope = {
|
||||||
|
data: Prisma.PurchaseReceiptCreateManySupplierInput | Prisma.PurchaseReceiptCreateManySupplierInput[]
|
||||||
|
skipDuplicates?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUpsertWithWhereUniqueWithoutSupplierInput = {
|
||||||
|
where: Prisma.PurchaseReceiptWhereUniqueInput
|
||||||
|
update: Prisma.XOR<Prisma.PurchaseReceiptUpdateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedUpdateWithoutSupplierInput>
|
||||||
|
create: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedCreateWithoutSupplierInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUpdateWithWhereUniqueWithoutSupplierInput = {
|
||||||
|
where: Prisma.PurchaseReceiptWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.PurchaseReceiptUpdateWithoutSupplierInput, Prisma.PurchaseReceiptUncheckedUpdateWithoutSupplierInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUpdateManyWithWhereWithoutSupplierInput = {
|
||||||
|
where: Prisma.PurchaseReceiptScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.PurchaseReceiptUpdateManyMutationInput, Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierInput>
|
||||||
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCreateWithoutItemsInput = {
|
export type PurchaseReceiptCreateWithoutItemsInput = {
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
|
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
|
||||||
supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput
|
supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutPurchaseReceiptInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedCreateWithoutItemsInput = {
|
export type PurchaseReceiptUncheckedCreateWithoutItemsInput = {
|
||||||
id?: number
|
id?: number
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
supplierId: number
|
supplierId: number
|
||||||
inventoryId: number
|
inventoryId: number
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutPurchaseReceiptInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCreateOrConnectWithoutItemsInput = {
|
export type PurchaseReceiptCreateOrConnectWithoutItemsInput = {
|
||||||
@@ -709,69 +800,106 @@ export type PurchaseReceiptUpdateToOneWithWhereWithoutItemsInput = {
|
|||||||
export type PurchaseReceiptUpdateWithoutItemsInput = {
|
export type PurchaseReceiptUpdateWithoutItemsInput = {
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
||||||
supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedUpdateWithoutItemsInput = {
|
export type PurchaseReceiptUncheckedUpdateWithoutItemsInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
supplierId?: Prisma.IntFieldUpdateOperationsInput | number
|
supplierId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCreateManySupplierInput = {
|
export type PurchaseReceiptCreateWithoutPurchaseReceiptPaymentsInput = {
|
||||||
id?: number
|
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
inventoryId: number
|
items?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutReceiptInput
|
||||||
|
inventory: Prisma.InventoryCreateNestedOneWithoutPurchaseReceiptsInput
|
||||||
|
supplier: Prisma.SupplierCreateNestedOneWithoutPurchaseReceiptsInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUpdateWithoutSupplierInput = {
|
export type PurchaseReceiptUncheckedCreateWithoutPurchaseReceiptPaymentsInput = {
|
||||||
|
id?: number
|
||||||
|
code: string
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
supplierId: number
|
||||||
|
inventoryId: number
|
||||||
|
items?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutReceiptInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptCreateOrConnectWithoutPurchaseReceiptPaymentsInput = {
|
||||||
|
where: Prisma.PurchaseReceiptWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutPurchaseReceiptPaymentsInput, Prisma.PurchaseReceiptUncheckedCreateWithoutPurchaseReceiptPaymentsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUpsertWithoutPurchaseReceiptPaymentsInput = {
|
||||||
|
update: Prisma.XOR<Prisma.PurchaseReceiptUpdateWithoutPurchaseReceiptPaymentsInput, Prisma.PurchaseReceiptUncheckedUpdateWithoutPurchaseReceiptPaymentsInput>
|
||||||
|
create: Prisma.XOR<Prisma.PurchaseReceiptCreateWithoutPurchaseReceiptPaymentsInput, Prisma.PurchaseReceiptUncheckedCreateWithoutPurchaseReceiptPaymentsInput>
|
||||||
|
where?: Prisma.PurchaseReceiptWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUpdateToOneWithWhereWithoutPurchaseReceiptPaymentsInput = {
|
||||||
|
where?: Prisma.PurchaseReceiptWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.PurchaseReceiptUpdateWithoutPurchaseReceiptPaymentsInput, Prisma.PurchaseReceiptUncheckedUpdateWithoutPurchaseReceiptPaymentsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUpdateWithoutPurchaseReceiptPaymentsInput = {
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
|
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
|
||||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
||||||
|
supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedUpdateWithoutSupplierInput = {
|
export type PurchaseReceiptUncheckedUpdateWithoutPurchaseReceiptPaymentsInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
|
supplierId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
|
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedUpdateManyWithoutSupplierInput = {
|
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type PurchaseReceiptCreateManyInventoryInput = {
|
export type PurchaseReceiptCreateManyInventoryInput = {
|
||||||
id?: number
|
id?: number
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
@@ -781,34 +909,93 @@ export type PurchaseReceiptCreateManyInventoryInput = {
|
|||||||
export type PurchaseReceiptUpdateWithoutInventoryInput = {
|
export type PurchaseReceiptUpdateWithoutInventoryInput = {
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
|
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
|
||||||
supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
supplier?: Prisma.SupplierUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedUpdateWithoutInventoryInput = {
|
export type PurchaseReceiptUncheckedUpdateWithoutInventoryInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
supplierId?: Prisma.IntFieldUpdateOperationsInput | number
|
supplierId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
|
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryInput = {
|
export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
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
|
||||||
supplierId?: Prisma.IntFieldUpdateOperationsInput | number
|
supplierId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptCreateManySupplierInput = {
|
||||||
|
id?: number
|
||||||
|
code: string
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: boolean
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
inventoryId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUpdateWithoutSupplierInput = {
|
||||||
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
items?: Prisma.PurchaseReceiptItemUpdateManyWithoutReceiptNestedInput
|
||||||
|
inventory?: Prisma.InventoryUpdateOneRequiredWithoutPurchaseReceiptsNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutPurchaseReceiptNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUncheckedUpdateWithoutSupplierInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
items?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutPurchaseReceiptNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type PurchaseReceiptUncheckedUpdateManyWithoutSupplierInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
paidAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
isSettled?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Count Type PurchaseReceiptCountOutputType
|
* Count Type PurchaseReceiptCountOutputType
|
||||||
@@ -816,10 +1003,12 @@ export type PurchaseReceiptUncheckedUpdateManyWithoutInventoryInput = {
|
|||||||
|
|
||||||
export type PurchaseReceiptCountOutputType = {
|
export type PurchaseReceiptCountOutputType = {
|
||||||
items: number
|
items: number
|
||||||
|
purchaseReceiptPayments: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type PurchaseReceiptCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
items?: boolean | PurchaseReceiptCountOutputTypeCountItemsArgs
|
items?: boolean | PurchaseReceiptCountOutputTypeCountItemsArgs
|
||||||
|
purchaseReceiptPayments?: boolean | PurchaseReceiptCountOutputTypeCountPurchaseReceiptPaymentsArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -839,11 +1028,20 @@ export type PurchaseReceiptCountOutputTypeCountItemsArgs<ExtArgs extends runtime
|
|||||||
where?: Prisma.PurchaseReceiptItemWhereInput
|
where?: Prisma.PurchaseReceiptItemWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PurchaseReceiptCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type PurchaseReceiptCountOutputTypeCountPurchaseReceiptPaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.PurchaseReceiptPaymentsWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export type PurchaseReceiptSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type PurchaseReceiptSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
code?: boolean
|
code?: boolean
|
||||||
totalAmount?: boolean
|
totalAmount?: boolean
|
||||||
|
paidAmount?: boolean
|
||||||
|
isSettled?: boolean
|
||||||
description?: boolean
|
description?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
@@ -852,6 +1050,7 @@ export type PurchaseReceiptSelect<ExtArgs extends runtime.Types.Extensions.Inter
|
|||||||
items?: boolean | Prisma.PurchaseReceipt$itemsArgs<ExtArgs>
|
items?: boolean | Prisma.PurchaseReceipt$itemsArgs<ExtArgs>
|
||||||
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
||||||
supplier?: boolean | Prisma.SupplierDefaultArgs<ExtArgs>
|
supplier?: boolean | Prisma.SupplierDefaultArgs<ExtArgs>
|
||||||
|
purchaseReceiptPayments?: boolean | Prisma.PurchaseReceipt$purchaseReceiptPaymentsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.PurchaseReceiptCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.PurchaseReceiptCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["purchaseReceipt"]>
|
}, ExtArgs["result"]["purchaseReceipt"]>
|
||||||
|
|
||||||
@@ -861,6 +1060,8 @@ export type PurchaseReceiptSelectScalar = {
|
|||||||
id?: boolean
|
id?: boolean
|
||||||
code?: boolean
|
code?: boolean
|
||||||
totalAmount?: boolean
|
totalAmount?: boolean
|
||||||
|
paidAmount?: boolean
|
||||||
|
isSettled?: boolean
|
||||||
description?: boolean
|
description?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
@@ -868,11 +1069,12 @@ export type PurchaseReceiptSelectScalar = {
|
|||||||
inventoryId?: boolean
|
inventoryId?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "supplierId" | "inventoryId", ExtArgs["result"]["purchaseReceipt"]>
|
export type PurchaseReceiptOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "paidAmount" | "isSettled" | "description" | "createdAt" | "updatedAt" | "supplierId" | "inventoryId", ExtArgs["result"]["purchaseReceipt"]>
|
||||||
export type PurchaseReceiptInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type PurchaseReceiptInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
items?: boolean | Prisma.PurchaseReceipt$itemsArgs<ExtArgs>
|
items?: boolean | Prisma.PurchaseReceipt$itemsArgs<ExtArgs>
|
||||||
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
||||||
supplier?: boolean | Prisma.SupplierDefaultArgs<ExtArgs>
|
supplier?: boolean | Prisma.SupplierDefaultArgs<ExtArgs>
|
||||||
|
purchaseReceiptPayments?: boolean | Prisma.PurchaseReceipt$purchaseReceiptPaymentsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.PurchaseReceiptCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.PurchaseReceiptCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -882,11 +1084,14 @@ export type $PurchaseReceiptPayload<ExtArgs extends runtime.Types.Extensions.Int
|
|||||||
items: Prisma.$PurchaseReceiptItemPayload<ExtArgs>[]
|
items: Prisma.$PurchaseReceiptItemPayload<ExtArgs>[]
|
||||||
inventory: Prisma.$InventoryPayload<ExtArgs>
|
inventory: Prisma.$InventoryPayload<ExtArgs>
|
||||||
supplier: Prisma.$SupplierPayload<ExtArgs>
|
supplier: Prisma.$SupplierPayload<ExtArgs>
|
||||||
|
purchaseReceiptPayments: Prisma.$PurchaseReceiptPaymentsPayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
|
paidAmount: runtime.Decimal
|
||||||
|
isSettled: boolean
|
||||||
description: string | null
|
description: string | null
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
@@ -1235,6 +1440,7 @@ export interface Prisma__PurchaseReceiptClient<T, Null = never, ExtArgs extends
|
|||||||
items<T extends Prisma.PurchaseReceipt$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PurchaseReceipt$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
items<T extends Prisma.PurchaseReceipt$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PurchaseReceipt$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
inventory<T extends Prisma.InventoryDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryDefaultArgs<ExtArgs>>): Prisma.Prisma__InventoryClient<runtime.Types.Result.GetResult<Prisma.$InventoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
inventory<T extends Prisma.InventoryDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryDefaultArgs<ExtArgs>>): Prisma.Prisma__InventoryClient<runtime.Types.Result.GetResult<Prisma.$InventoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||||
supplier<T extends Prisma.SupplierDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SupplierDefaultArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
supplier<T extends Prisma.SupplierDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SupplierDefaultArgs<ExtArgs>>): Prisma.Prisma__SupplierClient<runtime.Types.Result.GetResult<Prisma.$SupplierPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||||
|
purchaseReceiptPayments<T extends Prisma.PurchaseReceipt$purchaseReceiptPaymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PurchaseReceipt$purchaseReceiptPaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPaymentsPayload<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.
|
||||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||||
@@ -1267,6 +1473,8 @@ export interface PurchaseReceiptFieldRefs {
|
|||||||
readonly id: Prisma.FieldRef<"PurchaseReceipt", 'Int'>
|
readonly id: Prisma.FieldRef<"PurchaseReceipt", 'Int'>
|
||||||
readonly code: Prisma.FieldRef<"PurchaseReceipt", 'String'>
|
readonly code: Prisma.FieldRef<"PurchaseReceipt", 'String'>
|
||||||
readonly totalAmount: Prisma.FieldRef<"PurchaseReceipt", 'Decimal'>
|
readonly totalAmount: Prisma.FieldRef<"PurchaseReceipt", 'Decimal'>
|
||||||
|
readonly paidAmount: Prisma.FieldRef<"PurchaseReceipt", 'Decimal'>
|
||||||
|
readonly isSettled: Prisma.FieldRef<"PurchaseReceipt", 'Boolean'>
|
||||||
readonly description: Prisma.FieldRef<"PurchaseReceipt", 'String'>
|
readonly description: Prisma.FieldRef<"PurchaseReceipt", 'String'>
|
||||||
readonly createdAt: Prisma.FieldRef<"PurchaseReceipt", 'DateTime'>
|
readonly createdAt: Prisma.FieldRef<"PurchaseReceipt", 'DateTime'>
|
||||||
readonly updatedAt: Prisma.FieldRef<"PurchaseReceipt", 'DateTime'>
|
readonly updatedAt: Prisma.FieldRef<"PurchaseReceipt", 'DateTime'>
|
||||||
@@ -1638,6 +1846,30 @@ export type PurchaseReceipt$itemsArgs<ExtArgs extends runtime.Types.Extensions.I
|
|||||||
distinct?: Prisma.PurchaseReceiptItemScalarFieldEnum | Prisma.PurchaseReceiptItemScalarFieldEnum[]
|
distinct?: Prisma.PurchaseReceiptItemScalarFieldEnum | Prisma.PurchaseReceiptItemScalarFieldEnum[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* PurchaseReceipt.purchaseReceiptPayments
|
||||||
|
*/
|
||||||
|
export type PurchaseReceipt$purchaseReceiptPaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the PurchaseReceiptPayments
|
||||||
|
*/
|
||||||
|
select?: Prisma.PurchaseReceiptPaymentsSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the PurchaseReceiptPayments
|
||||||
|
*/
|
||||||
|
omit?: Prisma.PurchaseReceiptPaymentsOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.PurchaseReceiptPaymentsInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.PurchaseReceiptPaymentsWhereInput
|
||||||
|
orderBy?: Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput | Prisma.PurchaseReceiptPaymentsOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.PurchaseReceiptPaymentsWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[]
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PurchaseReceipt without action
|
* PurchaseReceipt without action
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -260,8 +260,8 @@ export type PurchaseReceiptItemWhereInput = {
|
|||||||
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
|
||||||
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
|
|
||||||
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
||||||
|
receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptItemOrderByWithRelationInput = {
|
export type PurchaseReceiptItemOrderByWithRelationInput = {
|
||||||
@@ -273,8 +273,8 @@ export type PurchaseReceiptItemOrderByWithRelationInput = {
|
|||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
receiptId?: Prisma.SortOrder
|
receiptId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput
|
|
||||||
product?: Prisma.ProductOrderByWithRelationInput
|
product?: Prisma.ProductOrderByWithRelationInput
|
||||||
|
receipt?: Prisma.PurchaseReceiptOrderByWithRelationInput
|
||||||
_relevance?: Prisma.PurchaseReceiptItemOrderByRelevanceInput
|
_relevance?: Prisma.PurchaseReceiptItemOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,8 +290,8 @@ export type PurchaseReceiptItemWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"PurchaseReceiptItem"> | Date | string
|
||||||
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
|
|
||||||
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
||||||
|
receipt?: Prisma.XOR<Prisma.PurchaseReceiptScalarRelationFilter, Prisma.PurchaseReceiptWhereInput>
|
||||||
}, "id">
|
}, "id">
|
||||||
|
|
||||||
export type PurchaseReceiptItemOrderByWithAggregationInput = {
|
export type PurchaseReceiptItemOrderByWithAggregationInput = {
|
||||||
@@ -330,8 +330,8 @@ export type PurchaseReceiptItemCreateInput = {
|
|||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutItemsInput
|
|
||||||
product: Prisma.ProductCreateNestedOneWithoutPurchaseReceiptItemsInput
|
product: Prisma.ProductCreateNestedOneWithoutPurchaseReceiptItemsInput
|
||||||
|
receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutItemsInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptItemUncheckedCreateInput = {
|
export type PurchaseReceiptItemUncheckedCreateInput = {
|
||||||
@@ -351,8 +351,8 @@ export type PurchaseReceiptItemUpdateInput = {
|
|||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput
|
|
||||||
product?: Prisma.ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput
|
product?: Prisma.ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput
|
||||||
|
receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptItemUncheckedUpdateInput = {
|
export type PurchaseReceiptItemUncheckedUpdateInput = {
|
||||||
@@ -740,8 +740,8 @@ export type PurchaseReceiptItemSelect<ExtArgs extends runtime.Types.Extensions.I
|
|||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
receiptId?: boolean
|
receiptId?: boolean
|
||||||
productId?: boolean
|
productId?: boolean
|
||||||
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
|
|
||||||
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
||||||
|
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["purchaseReceiptItem"]>
|
}, ExtArgs["result"]["purchaseReceiptItem"]>
|
||||||
|
|
||||||
|
|
||||||
@@ -759,15 +759,15 @@ export type PurchaseReceiptItemSelectScalar = {
|
|||||||
|
|
||||||
export type PurchaseReceiptItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "fee" | "total" | "description" | "createdAt" | "receiptId" | "productId", ExtArgs["result"]["purchaseReceiptItem"]>
|
export type PurchaseReceiptItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "fee" | "total" | "description" | "createdAt" | "receiptId" | "productId", ExtArgs["result"]["purchaseReceiptItem"]>
|
||||||
export type PurchaseReceiptItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type PurchaseReceiptItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
|
|
||||||
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
||||||
|
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type $PurchaseReceiptItemPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $PurchaseReceiptItemPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "PurchaseReceiptItem"
|
name: "PurchaseReceiptItem"
|
||||||
objects: {
|
objects: {
|
||||||
receipt: Prisma.$PurchaseReceiptPayload<ExtArgs>
|
|
||||||
product: Prisma.$ProductPayload<ExtArgs>
|
product: Prisma.$ProductPayload<ExtArgs>
|
||||||
|
receipt: Prisma.$PurchaseReceiptPayload<ExtArgs>
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
@@ -1118,8 +1118,8 @@ readonly fields: PurchaseReceiptItemFieldRefs;
|
|||||||
*/
|
*/
|
||||||
export interface Prisma__PurchaseReceiptItemClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__PurchaseReceiptItemClient<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"
|
||||||
receipt<T extends Prisma.PurchaseReceiptDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PurchaseReceiptDefaultArgs<ExtArgs>>): Prisma.Prisma__PurchaseReceiptClient<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPayload<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>
|
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>
|
||||||
|
receipt<T extends Prisma.PurchaseReceiptDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PurchaseReceiptDefaultArgs<ExtArgs>>): Prisma.Prisma__PurchaseReceiptClient<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPayload<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.
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -463,48 +463,6 @@ export type SalesInvoiceScalarRelationFilter = {
|
|||||||
isNot?: Prisma.SalesInvoiceWhereInput
|
isNot?: Prisma.SalesInvoiceWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateNestedManyWithoutCustomerInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope
|
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope
|
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpdateManyWithoutCustomerNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
|
||||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope
|
|
||||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput[]
|
|
||||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput[]
|
|
||||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
|
||||||
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope
|
|
||||||
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
|
||||||
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput[]
|
|
||||||
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput[]
|
|
||||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateNestedManyWithoutInventoryInput = {
|
export type SalesInvoiceCreateNestedManyWithoutInventoryInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutInventoryInput, Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput> | Prisma.SalesInvoiceCreateWithoutInventoryInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutInventoryInput[]
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[]
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput | Prisma.SalesInvoiceCreateOrConnectWithoutInventoryInput[]
|
||||||
@@ -547,6 +505,48 @@ export type SalesInvoiceUncheckedUpdateManyWithoutInventoryNestedInput = {
|
|||||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceCreateNestedManyWithoutCustomerInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope
|
||||||
|
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope
|
||||||
|
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUpdateManyWithoutCustomerNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
||||||
|
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope
|
||||||
|
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput[]
|
||||||
|
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput[]
|
||||||
|
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput> | Prisma.SalesInvoiceCreateWithoutCustomerInput[] | Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput[]
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput | Prisma.SalesInvoiceCreateOrConnectWithoutCustomerInput[]
|
||||||
|
upsert?: Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceCreateManyCustomerInputEnvelope
|
||||||
|
set?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
delete?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
connect?: Prisma.SalesInvoiceWhereUniqueInput | Prisma.SalesInvoiceWhereUniqueInput[]
|
||||||
|
update?: Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput | Prisma.SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput[]
|
||||||
|
updateMany?: Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput | Prisma.SalesInvoiceUpdateManyWithWhereWithoutCustomerInput[]
|
||||||
|
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateNestedOneWithoutItemsInput = {
|
export type SalesInvoiceCreateNestedOneWithoutItemsInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutItemsInput, Prisma.SalesInvoiceUncheckedCreateWithoutItemsInput>
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutItemsInput, Prisma.SalesInvoiceUncheckedCreateWithoutItemsInput>
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutItemsInput
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutItemsInput
|
||||||
@@ -561,67 +561,6 @@ export type SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutItemsInput, Prisma.SalesInvoiceUpdateWithoutItemsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutItemsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutItemsInput, Prisma.SalesInvoiceUpdateWithoutItemsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutItemsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateWithoutCustomerInput = {
|
|
||||||
code: string
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: string | null
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
|
||||||
inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
|
||||||
id?: number
|
|
||||||
code: string
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: string | null
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
inventoryId: number
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutCustomerInput = {
|
|
||||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyCustomerInputEnvelope = {
|
|
||||||
data: Prisma.SalesInvoiceCreateManyCustomerInput | Prisma.SalesInvoiceCreateManyCustomerInput[]
|
|
||||||
skipDuplicates?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput = {
|
|
||||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
|
||||||
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedUpdateWithoutCustomerInput>
|
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput = {
|
|
||||||
where: Prisma.SalesInvoiceWhereUniqueInput
|
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedUpdateWithoutCustomerInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpdateManyWithWhereWithoutCustomerInput = {
|
|
||||||
where: Prisma.SalesInvoiceScalarWhereInput
|
|
||||||
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
|
|
||||||
inventoryId?: Prisma.IntFilter<"SalesInvoice"> | number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateWithoutInventoryInput = {
|
export type SalesInvoiceCreateWithoutInventoryInput = {
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
@@ -669,6 +608,67 @@ export type SalesInvoiceUpdateManyWithWhereWithoutInventoryInput = {
|
|||||||
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryInput>
|
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutInventoryInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceScalarWhereInput = {
|
||||||
|
AND?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
|
OR?: Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
|
NOT?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
|
id?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||||
|
code?: Prisma.StringFilter<"SalesInvoice"> | string
|
||||||
|
totalAmount?: Prisma.DecimalFilter<"SalesInvoice"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.StringNullableFilter<"SalesInvoice"> | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
|
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
||||||
|
inventoryId?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceCreateWithoutCustomerInput = {
|
||||||
|
code: string
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
|
inventory: Prisma.InventoryCreateNestedOneWithoutSalesInvoicesInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
||||||
|
id?: number
|
||||||
|
code: string
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
inventoryId: number
|
||||||
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceCreateOrConnectWithoutCustomerInput = {
|
||||||
|
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceCreateManyCustomerInputEnvelope = {
|
||||||
|
data: Prisma.SalesInvoiceCreateManyCustomerInput | Prisma.SalesInvoiceCreateManyCustomerInput[]
|
||||||
|
skipDuplicates?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUpsertWithWhereUniqueWithoutCustomerInput = {
|
||||||
|
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||||
|
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedUpdateWithoutCustomerInput>
|
||||||
|
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedCreateWithoutCustomerInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUpdateWithWhereUniqueWithoutCustomerInput = {
|
||||||
|
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutCustomerInput, Prisma.SalesInvoiceUncheckedUpdateWithoutCustomerInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUpdateManyWithWhereWithoutCustomerInput = {
|
||||||
|
where: Prisma.SalesInvoiceScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.SalesInvoiceUpdateManyMutationInput, Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerInput>
|
||||||
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateWithoutItemsInput = {
|
export type SalesInvoiceCreateWithoutItemsInput = {
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
@@ -727,47 +727,6 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
|||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyCustomerInput = {
|
|
||||||
id?: number
|
|
||||||
code: string
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: string | null
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
inventoryId: number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUpdateWithoutCustomerInput = {
|
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
|
||||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
code?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyInventoryInput = {
|
export type SalesInvoiceCreateManyInventoryInput = {
|
||||||
id?: number
|
id?: number
|
||||||
code: string
|
code: string
|
||||||
@@ -809,6 +768,47 @@ export type SalesInvoiceUncheckedUpdateManyWithoutInventoryInput = {
|
|||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceCreateManyCustomerInput = {
|
||||||
|
id?: number
|
||||||
|
code: string
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
inventoryId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUpdateWithoutCustomerInput = {
|
||||||
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
|
inventory?: Prisma.InventoryUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Count Type SalesInvoiceCountOutputType
|
* Count Type SalesInvoiceCountOutputType
|
||||||
|
|||||||
@@ -434,48 +434,6 @@ export type SalesInvoiceItemSumOrderByAggregateInput = {
|
|||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateNestedManyWithoutProductInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateManyWithoutProductNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
|
||||||
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
|
||||||
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput[]
|
|
||||||
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput[]
|
|
||||||
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
|
||||||
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
|
||||||
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput[]
|
|
||||||
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput[]
|
|
||||||
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateNestedManyWithoutInvoiceInput = {
|
export type SalesInvoiceItemCreateNestedManyWithoutInvoiceInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
||||||
@@ -518,60 +476,46 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput = {
|
|||||||
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateWithoutProductInput = {
|
export type SalesInvoiceItemCreateNestedManyWithoutProductInput = {
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
||||||
createdAt?: Date | string
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedCreateWithoutProductInput = {
|
export type SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput = {
|
||||||
id?: number
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
createdAt?: Date | string
|
|
||||||
invoiceId: number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateOrConnectWithoutProductInput = {
|
export type SalesInvoiceItemUpdateManyWithoutProductNestedInput = {
|
||||||
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput>
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
||||||
|
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
||||||
|
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput[]
|
||||||
|
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput[]
|
||||||
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyProductInputEnvelope = {
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput = {
|
||||||
data: Prisma.SalesInvoiceItemCreateManyProductInput | Prisma.SalesInvoiceItemCreateManyProductInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
||||||
skipDuplicates?: boolean
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
||||||
}
|
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceItemCreateManyProductInputEnvelope
|
||||||
export type SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput = {
|
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
update: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutProductInput>
|
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput>
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
}
|
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput[]
|
||||||
|
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutProductInput[]
|
||||||
export type SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput = {
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutProductInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateManyWithWhereWithoutProductInput = {
|
|
||||||
where: Prisma.SalesInvoiceItemScalarWhereInput
|
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemScalarWhereInput = {
|
|
||||||
AND?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
|
||||||
OR?: Prisma.SalesInvoiceItemScalarWhereInput[]
|
|
||||||
NOT?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
|
||||||
id?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
|
||||||
count?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
fee?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
total?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
|
||||||
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
|
||||||
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
||||||
@@ -617,7 +561,28 @@ export type SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput = {
|
|||||||
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput>
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyProductInput = {
|
export type SalesInvoiceItemScalarWhereInput = {
|
||||||
|
AND?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
|
OR?: Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
|
NOT?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
|
id?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
|
count?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
fee?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
total?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
|
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
|
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemCreateWithoutProductInput = {
|
||||||
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedCreateWithoutProductInput = {
|
||||||
id?: number
|
id?: number
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
@@ -626,30 +591,30 @@ export type SalesInvoiceItemCreateManyProductInput = {
|
|||||||
invoiceId: number
|
invoiceId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateWithoutProductInput = {
|
export type SalesInvoiceItemCreateOrConnectWithoutProductInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput>
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateWithoutProductInput = {
|
export type SalesInvoiceItemCreateManyProductInputEnvelope = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
data: Prisma.SalesInvoiceItemCreateManyProductInput | Prisma.SalesInvoiceItemCreateManyProductInput[]
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
skipDuplicates?: boolean
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutProductInput = {
|
export type SalesInvoiceItemUpsertWithWhereUniqueWithoutProductInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
update: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutProductInput>
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput>
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
}
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
export type SalesInvoiceItemUpdateWithWhereUniqueWithoutProductInput = {
|
||||||
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutProductInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpdateManyWithWhereWithoutProductInput = {
|
||||||
|
where: Prisma.SalesInvoiceItemScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyInvoiceInput = {
|
export type SalesInvoiceItemCreateManyInvoiceInput = {
|
||||||
@@ -687,6 +652,41 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
|||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemCreateManyProductInput = {
|
||||||
|
id?: number
|
||||||
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
invoiceId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpdateWithoutProductInput = {
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedUpdateWithoutProductInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutProductInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type SalesInvoiceItemSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type SalesInvoiceItemSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
|
|||||||
@@ -378,48 +378,6 @@ export type StockAdjustmentSumOrderByAggregateInput = {
|
|||||||
inventoryId?: Prisma.SortOrder
|
inventoryId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentCreateNestedManyWithoutProductInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput> | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[]
|
|
||||||
createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope
|
|
||||||
connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAdjustmentUncheckedCreateNestedManyWithoutProductInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput> | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[]
|
|
||||||
createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope
|
|
||||||
connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAdjustmentUpdateManyWithoutProductNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput> | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[]
|
|
||||||
upsert?: Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput[]
|
|
||||||
createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope
|
|
||||||
set?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
delete?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
update?: Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput[]
|
|
||||||
updateMany?: Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput | Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput[]
|
|
||||||
deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput> | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[]
|
|
||||||
upsert?: Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput[]
|
|
||||||
createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope
|
|
||||||
set?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
delete?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
|
||||||
update?: Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput[]
|
|
||||||
updateMany?: Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput | Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput[]
|
|
||||||
deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAdjustmentCreateNestedManyWithoutInventoryInput = {
|
export type StockAdjustmentCreateNestedManyWithoutInventoryInput = {
|
||||||
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutInventoryInput, Prisma.StockAdjustmentUncheckedCreateWithoutInventoryInput> | Prisma.StockAdjustmentCreateWithoutInventoryInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutInventoryInput[]
|
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutInventoryInput, Prisma.StockAdjustmentUncheckedCreateWithoutInventoryInput> | Prisma.StockAdjustmentCreateWithoutInventoryInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutInventoryInput[]
|
||||||
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput | Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput[]
|
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput | Prisma.StockAdjustmentCreateOrConnectWithoutInventoryInput[]
|
||||||
@@ -462,54 +420,46 @@ export type StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput = {
|
|||||||
deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentCreateWithoutProductInput = {
|
export type StockAdjustmentCreateNestedManyWithoutProductInput = {
|
||||||
adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput> | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[]
|
||||||
createdAt?: Date | string
|
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[]
|
||||||
inventory: Prisma.InventoryCreateNestedOneWithoutStockAdjustmentsInput
|
createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope
|
||||||
|
connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentUncheckedCreateWithoutProductInput = {
|
export type StockAdjustmentUncheckedCreateNestedManyWithoutProductInput = {
|
||||||
id?: number
|
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput> | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[]
|
||||||
adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[]
|
||||||
createdAt?: Date | string
|
createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope
|
||||||
inventoryId: number
|
connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentCreateOrConnectWithoutProductInput = {
|
export type StockAdjustmentUpdateManyWithoutProductNestedInput = {
|
||||||
where: Prisma.StockAdjustmentWhereUniqueInput
|
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput> | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[]
|
||||||
create: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput>
|
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[]
|
||||||
|
upsert?: Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput[]
|
||||||
|
createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope
|
||||||
|
set?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
|
delete?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
|
connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
|
update?: Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput[]
|
||||||
|
updateMany?: Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput | Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput[]
|
||||||
|
deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentCreateManyProductInputEnvelope = {
|
export type StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput = {
|
||||||
data: Prisma.StockAdjustmentCreateManyProductInput | Prisma.StockAdjustmentCreateManyProductInput[]
|
create?: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput> | Prisma.StockAdjustmentCreateWithoutProductInput[] | Prisma.StockAdjustmentUncheckedCreateWithoutProductInput[]
|
||||||
skipDuplicates?: boolean
|
connectOrCreate?: Prisma.StockAdjustmentCreateOrConnectWithoutProductInput | Prisma.StockAdjustmentCreateOrConnectWithoutProductInput[]
|
||||||
}
|
upsert?: Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpsertWithWhereUniqueWithoutProductInput[]
|
||||||
|
createMany?: Prisma.StockAdjustmentCreateManyProductInputEnvelope
|
||||||
export type StockAdjustmentUpsertWithWhereUniqueWithoutProductInput = {
|
set?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
where: Prisma.StockAdjustmentWhereUniqueInput
|
disconnect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
update: Prisma.XOR<Prisma.StockAdjustmentUpdateWithoutProductInput, Prisma.StockAdjustmentUncheckedUpdateWithoutProductInput>
|
delete?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
create: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput>
|
connect?: Prisma.StockAdjustmentWhereUniqueInput | Prisma.StockAdjustmentWhereUniqueInput[]
|
||||||
}
|
update?: Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput | Prisma.StockAdjustmentUpdateWithWhereUniqueWithoutProductInput[]
|
||||||
|
updateMany?: Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput | Prisma.StockAdjustmentUpdateManyWithWhereWithoutProductInput[]
|
||||||
export type StockAdjustmentUpdateWithWhereUniqueWithoutProductInput = {
|
deleteMany?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
||||||
where: Prisma.StockAdjustmentWhereUniqueInput
|
|
||||||
data: Prisma.XOR<Prisma.StockAdjustmentUpdateWithoutProductInput, Prisma.StockAdjustmentUncheckedUpdateWithoutProductInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAdjustmentUpdateManyWithWhereWithoutProductInput = {
|
|
||||||
where: Prisma.StockAdjustmentScalarWhereInput
|
|
||||||
data: Prisma.XOR<Prisma.StockAdjustmentUpdateManyMutationInput, Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockAdjustmentScalarWhereInput = {
|
|
||||||
AND?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
|
||||||
OR?: Prisma.StockAdjustmentScalarWhereInput[]
|
|
||||||
NOT?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
|
||||||
id?: Prisma.IntFilter<"StockAdjustment"> | number
|
|
||||||
adjustedQuantity?: Prisma.DecimalFilter<"StockAdjustment"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
createdAt?: Prisma.DateTimeFilter<"StockAdjustment"> | Date | string
|
|
||||||
productId?: Prisma.IntFilter<"StockAdjustment"> | number
|
|
||||||
inventoryId?: Prisma.IntFilter<"StockAdjustment"> | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentCreateWithoutInventoryInput = {
|
export type StockAdjustmentCreateWithoutInventoryInput = {
|
||||||
@@ -551,31 +501,54 @@ export type StockAdjustmentUpdateManyWithWhereWithoutInventoryInput = {
|
|||||||
data: Prisma.XOR<Prisma.StockAdjustmentUpdateManyMutationInput, Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryInput>
|
data: Prisma.XOR<Prisma.StockAdjustmentUpdateManyMutationInput, Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentCreateManyProductInput = {
|
export type StockAdjustmentScalarWhereInput = {
|
||||||
|
AND?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
||||||
|
OR?: Prisma.StockAdjustmentScalarWhereInput[]
|
||||||
|
NOT?: Prisma.StockAdjustmentScalarWhereInput | Prisma.StockAdjustmentScalarWhereInput[]
|
||||||
|
id?: Prisma.IntFilter<"StockAdjustment"> | number
|
||||||
|
adjustedQuantity?: Prisma.DecimalFilter<"StockAdjustment"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFilter<"StockAdjustment"> | Date | string
|
||||||
|
productId?: Prisma.IntFilter<"StockAdjustment"> | number
|
||||||
|
inventoryId?: Prisma.IntFilter<"StockAdjustment"> | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockAdjustmentCreateWithoutProductInput = {
|
||||||
|
adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
inventory: Prisma.InventoryCreateNestedOneWithoutStockAdjustmentsInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockAdjustmentUncheckedCreateWithoutProductInput = {
|
||||||
id?: number
|
id?: number
|
||||||
adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
inventoryId: number
|
inventoryId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentUpdateWithoutProductInput = {
|
export type StockAdjustmentCreateOrConnectWithoutProductInput = {
|
||||||
adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
where: Prisma.StockAdjustmentWhereUniqueInput
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
create: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput>
|
||||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockAdjustmentsNestedInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentUncheckedUpdateWithoutProductInput = {
|
export type StockAdjustmentCreateManyProductInputEnvelope = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
data: Prisma.StockAdjustmentCreateManyProductInput | Prisma.StockAdjustmentCreateManyProductInput[]
|
||||||
adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
skipDuplicates?: boolean
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentUncheckedUpdateManyWithoutProductInput = {
|
export type StockAdjustmentUpsertWithWhereUniqueWithoutProductInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
where: Prisma.StockAdjustmentWhereUniqueInput
|
||||||
adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
update: Prisma.XOR<Prisma.StockAdjustmentUpdateWithoutProductInput, Prisma.StockAdjustmentUncheckedUpdateWithoutProductInput>
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
create: Prisma.XOR<Prisma.StockAdjustmentCreateWithoutProductInput, Prisma.StockAdjustmentUncheckedCreateWithoutProductInput>
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
}
|
||||||
|
|
||||||
|
export type StockAdjustmentUpdateWithWhereUniqueWithoutProductInput = {
|
||||||
|
where: Prisma.StockAdjustmentWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.StockAdjustmentUpdateWithoutProductInput, Prisma.StockAdjustmentUncheckedUpdateWithoutProductInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockAdjustmentUpdateManyWithWhereWithoutProductInput = {
|
||||||
|
where: Prisma.StockAdjustmentScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.StockAdjustmentUpdateManyMutationInput, Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockAdjustmentCreateManyInventoryInput = {
|
export type StockAdjustmentCreateManyInventoryInput = {
|
||||||
@@ -605,6 +578,33 @@ export type StockAdjustmentUncheckedUpdateManyWithoutInventoryInput = {
|
|||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type StockAdjustmentCreateManyProductInput = {
|
||||||
|
id?: number
|
||||||
|
adjustedQuantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
inventoryId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockAdjustmentUpdateWithoutProductInput = {
|
||||||
|
adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockAdjustmentsNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockAdjustmentUncheckedUpdateWithoutProductInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockAdjustmentUncheckedUpdateManyWithoutProductInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
adjustedQuantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type StockAdjustmentSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type StockAdjustmentSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
|
|||||||
@@ -27,107 +27,107 @@ export type AggregateStockBalance = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceAvgAggregateOutputType = {
|
export type StockBalanceAvgAggregateOutputType = {
|
||||||
id: number | null
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
quantity: runtime.Decimal | null
|
quantity: runtime.Decimal | null
|
||||||
avgCost: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
totalCost: runtime.Decimal | null
|
||||||
|
avgCost: runtime.Decimal | null
|
||||||
|
inventoryId: number | null
|
||||||
|
productId: number | null
|
||||||
|
id: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceSumAggregateOutputType = {
|
export type StockBalanceSumAggregateOutputType = {
|
||||||
id: number | null
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
quantity: runtime.Decimal | null
|
quantity: runtime.Decimal | null
|
||||||
avgCost: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
totalCost: runtime.Decimal | null
|
||||||
|
avgCost: runtime.Decimal | null
|
||||||
|
inventoryId: number | null
|
||||||
|
productId: number | null
|
||||||
|
id: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceMinAggregateOutputType = {
|
export type StockBalanceMinAggregateOutputType = {
|
||||||
id: number | null
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
quantity: runtime.Decimal | null
|
quantity: runtime.Decimal | null
|
||||||
avgCost: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
totalCost: runtime.Decimal | null
|
||||||
createdAt: Date | null
|
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
|
avgCost: runtime.Decimal | null
|
||||||
|
inventoryId: number | null
|
||||||
|
productId: number | null
|
||||||
|
createdAt: Date | null
|
||||||
|
id: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceMaxAggregateOutputType = {
|
export type StockBalanceMaxAggregateOutputType = {
|
||||||
id: number | null
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
quantity: runtime.Decimal | null
|
quantity: runtime.Decimal | null
|
||||||
avgCost: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
totalCost: runtime.Decimal | null
|
||||||
createdAt: Date | null
|
|
||||||
updatedAt: Date | null
|
updatedAt: Date | null
|
||||||
|
avgCost: runtime.Decimal | null
|
||||||
|
inventoryId: number | null
|
||||||
|
productId: number | null
|
||||||
|
createdAt: Date | null
|
||||||
|
id: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCountAggregateOutputType = {
|
export type StockBalanceCountAggregateOutputType = {
|
||||||
id: number
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
quantity: number
|
quantity: number
|
||||||
avgCost: number
|
|
||||||
totalCost: number
|
totalCost: number
|
||||||
createdAt: number
|
|
||||||
updatedAt: number
|
updatedAt: number
|
||||||
|
avgCost: number
|
||||||
|
inventoryId: number
|
||||||
|
productId: number
|
||||||
|
createdAt: number
|
||||||
|
id: number
|
||||||
_all: number
|
_all: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export type StockBalanceAvgAggregateInputType = {
|
export type StockBalanceAvgAggregateInputType = {
|
||||||
id?: true
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
quantity?: true
|
quantity?: true
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
|
avgCost?: true
|
||||||
|
inventoryId?: true
|
||||||
|
productId?: true
|
||||||
|
id?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceSumAggregateInputType = {
|
export type StockBalanceSumAggregateInputType = {
|
||||||
id?: true
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
quantity?: true
|
quantity?: true
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
|
avgCost?: true
|
||||||
|
inventoryId?: true
|
||||||
|
productId?: true
|
||||||
|
id?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceMinAggregateInputType = {
|
export type StockBalanceMinAggregateInputType = {
|
||||||
id?: true
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
quantity?: true
|
quantity?: true
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
createdAt?: true
|
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
|
avgCost?: true
|
||||||
|
inventoryId?: true
|
||||||
|
productId?: true
|
||||||
|
createdAt?: true
|
||||||
|
id?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceMaxAggregateInputType = {
|
export type StockBalanceMaxAggregateInputType = {
|
||||||
id?: true
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
quantity?: true
|
quantity?: true
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
createdAt?: true
|
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
|
avgCost?: true
|
||||||
|
inventoryId?: true
|
||||||
|
productId?: true
|
||||||
|
createdAt?: true
|
||||||
|
id?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCountAggregateInputType = {
|
export type StockBalanceCountAggregateInputType = {
|
||||||
id?: true
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
quantity?: true
|
quantity?: true
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
createdAt?: true
|
|
||||||
updatedAt?: true
|
updatedAt?: true
|
||||||
|
avgCost?: true
|
||||||
|
inventoryId?: true
|
||||||
|
productId?: true
|
||||||
|
createdAt?: true
|
||||||
|
id?: true
|
||||||
_all?: true
|
_all?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -218,14 +218,14 @@ export type StockBalanceGroupByArgs<ExtArgs extends runtime.Types.Extensions.Int
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceGroupByOutputType = {
|
export type StockBalanceGroupByOutputType = {
|
||||||
id: number
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
quantity: runtime.Decimal
|
quantity: runtime.Decimal
|
||||||
avgCost: runtime.Decimal
|
|
||||||
totalCost: runtime.Decimal
|
totalCost: runtime.Decimal
|
||||||
createdAt: Date
|
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
|
avgCost: runtime.Decimal
|
||||||
|
inventoryId: number
|
||||||
|
productId: number
|
||||||
|
createdAt: Date
|
||||||
|
id: number
|
||||||
_count: StockBalanceCountAggregateOutputType | null
|
_count: StockBalanceCountAggregateOutputType | null
|
||||||
_avg: StockBalanceAvgAggregateOutputType | null
|
_avg: StockBalanceAvgAggregateOutputType | null
|
||||||
_sum: StockBalanceSumAggregateOutputType | null
|
_sum: StockBalanceSumAggregateOutputType | null
|
||||||
@@ -252,29 +252,29 @@ export type StockBalanceWhereInput = {
|
|||||||
AND?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
|
AND?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
|
||||||
OR?: Prisma.StockBalanceWhereInput[]
|
OR?: Prisma.StockBalanceWhereInput[]
|
||||||
NOT?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
|
NOT?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
|
||||||
id?: Prisma.IntFilter<"StockBalance"> | number
|
|
||||||
productId?: Prisma.IntFilter<"StockBalance"> | number
|
|
||||||
inventoryId?: Prisma.IntFilter<"StockBalance"> | number
|
|
||||||
quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
||||||
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId?: Prisma.IntFilter<"StockBalance"> | number
|
||||||
|
productId?: Prisma.IntFilter<"StockBalance"> | number
|
||||||
|
createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
||||||
|
id?: Prisma.IntFilter<"StockBalance"> | number
|
||||||
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
||||||
|
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceOrderByWithRelationInput = {
|
export type StockBalanceOrderByWithRelationInput = {
|
||||||
id?: Prisma.SortOrder
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
product?: Prisma.ProductOrderByWithRelationInput
|
avgCost?: Prisma.SortOrder
|
||||||
|
inventoryId?: Prisma.SortOrder
|
||||||
|
productId?: Prisma.SortOrder
|
||||||
|
createdAt?: Prisma.SortOrder
|
||||||
|
id?: Prisma.SortOrder
|
||||||
inventory?: Prisma.InventoryOrderByWithRelationInput
|
inventory?: Prisma.InventoryOrderByWithRelationInput
|
||||||
|
product?: Prisma.ProductOrderByWithRelationInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceWhereUniqueInput = Prisma.AtLeast<{
|
export type StockBalanceWhereUniqueInput = Prisma.AtLeast<{
|
||||||
@@ -283,26 +283,26 @@ export type StockBalanceWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
AND?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
|
AND?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
|
||||||
OR?: Prisma.StockBalanceWhereInput[]
|
OR?: Prisma.StockBalanceWhereInput[]
|
||||||
NOT?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
|
NOT?: Prisma.StockBalanceWhereInput | Prisma.StockBalanceWhereInput[]
|
||||||
productId?: Prisma.IntFilter<"StockBalance"> | number
|
|
||||||
inventoryId?: Prisma.IntFilter<"StockBalance"> | number
|
|
||||||
quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
||||||
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId?: Prisma.IntFilter<"StockBalance"> | number
|
||||||
|
productId?: Prisma.IntFilter<"StockBalance"> | number
|
||||||
|
createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
||||||
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
inventory?: Prisma.XOR<Prisma.InventoryScalarRelationFilter, Prisma.InventoryWhereInput>
|
||||||
|
product?: Prisma.XOR<Prisma.ProductScalarRelationFilter, Prisma.ProductWhereInput>
|
||||||
}, "id" | "productId_inventoryId">
|
}, "id" | "productId_inventoryId">
|
||||||
|
|
||||||
export type StockBalanceOrderByWithAggregationInput = {
|
export type StockBalanceOrderByWithAggregationInput = {
|
||||||
id?: Prisma.SortOrder
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
|
avgCost?: Prisma.SortOrder
|
||||||
|
inventoryId?: Prisma.SortOrder
|
||||||
|
productId?: Prisma.SortOrder
|
||||||
|
createdAt?: Prisma.SortOrder
|
||||||
|
id?: Prisma.SortOrder
|
||||||
_count?: Prisma.StockBalanceCountOrderByAggregateInput
|
_count?: Prisma.StockBalanceCountOrderByAggregateInput
|
||||||
_avg?: Prisma.StockBalanceAvgOrderByAggregateInput
|
_avg?: Prisma.StockBalanceAvgOrderByAggregateInput
|
||||||
_max?: Prisma.StockBalanceMaxOrderByAggregateInput
|
_max?: Prisma.StockBalanceMaxOrderByAggregateInput
|
||||||
@@ -314,86 +314,86 @@ export type StockBalanceScalarWhereWithAggregatesInput = {
|
|||||||
AND?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[]
|
AND?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[]
|
||||||
OR?: Prisma.StockBalanceScalarWhereWithAggregatesInput[]
|
OR?: Prisma.StockBalanceScalarWhereWithAggregatesInput[]
|
||||||
NOT?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[]
|
NOT?: Prisma.StockBalanceScalarWhereWithAggregatesInput | Prisma.StockBalanceScalarWhereWithAggregatesInput[]
|
||||||
id?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number
|
|
||||||
productId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number
|
|
||||||
inventoryId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number
|
|
||||||
quantity?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"StockBalance"> | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"StockBalance"> | Date | string
|
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"StockBalance"> | Date | string
|
||||||
|
avgCost?: Prisma.DecimalWithAggregatesFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number
|
||||||
|
productId?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number
|
||||||
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"StockBalance"> | Date | string
|
||||||
|
id?: Prisma.IntWithAggregatesFilter<"StockBalance"> | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateInput = {
|
export type StockBalanceCreateInput = {
|
||||||
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput
|
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput
|
inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput
|
||||||
|
product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUncheckedCreateInput = {
|
export type StockBalanceUncheckedCreateInput = {
|
||||||
id?: number
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
|
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId: number
|
||||||
|
productId: number
|
||||||
|
createdAt?: Date | string
|
||||||
|
id?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUpdateInput = {
|
export type StockBalanceUpdateInput = {
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput
|
inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput
|
||||||
|
product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUncheckedUpdateInput = {
|
export type StockBalanceUncheckedUpdateInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateManyInput = {
|
export type StockBalanceCreateManyInput = {
|
||||||
id?: number
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
|
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId: number
|
||||||
|
productId: number
|
||||||
|
createdAt?: Date | string
|
||||||
|
id?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUpdateManyMutationInput = {
|
export type StockBalanceUpdateManyMutationInput = {
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUncheckedUpdateManyInput = {
|
export type StockBalanceUncheckedUpdateManyInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceListRelationFilter = {
|
export type StockBalanceListRelationFilter = {
|
||||||
@@ -412,96 +412,54 @@ export type StockBalanceProductIdInventoryIdCompoundUniqueInput = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCountOrderByAggregateInput = {
|
export type StockBalanceCountOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
|
avgCost?: Prisma.SortOrder
|
||||||
|
inventoryId?: Prisma.SortOrder
|
||||||
|
productId?: Prisma.SortOrder
|
||||||
|
createdAt?: Prisma.SortOrder
|
||||||
|
id?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceAvgOrderByAggregateInput = {
|
export type StockBalanceAvgOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
|
avgCost?: Prisma.SortOrder
|
||||||
|
inventoryId?: Prisma.SortOrder
|
||||||
|
productId?: Prisma.SortOrder
|
||||||
|
id?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceMaxOrderByAggregateInput = {
|
export type StockBalanceMaxOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
|
avgCost?: Prisma.SortOrder
|
||||||
|
inventoryId?: Prisma.SortOrder
|
||||||
|
productId?: Prisma.SortOrder
|
||||||
|
createdAt?: Prisma.SortOrder
|
||||||
|
id?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceMinOrderByAggregateInput = {
|
export type StockBalanceMinOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
|
avgCost?: Prisma.SortOrder
|
||||||
|
inventoryId?: Prisma.SortOrder
|
||||||
|
productId?: Prisma.SortOrder
|
||||||
|
createdAt?: Prisma.SortOrder
|
||||||
|
id?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceSumOrderByAggregateInput = {
|
export type StockBalanceSumOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
}
|
avgCost?: Prisma.SortOrder
|
||||||
|
inventoryId?: Prisma.SortOrder
|
||||||
export type StockBalanceCreateNestedManyWithoutProductInput = {
|
productId?: Prisma.SortOrder
|
||||||
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
|
id?: Prisma.SortOrder
|
||||||
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
|
|
||||||
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
|
|
||||||
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockBalanceUncheckedCreateNestedManyWithoutProductInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
|
|
||||||
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
|
|
||||||
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockBalanceUpdateManyWithoutProductNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
|
|
||||||
upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput[]
|
|
||||||
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
|
|
||||||
set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput[]
|
|
||||||
updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput | Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput[]
|
|
||||||
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockBalanceUncheckedUpdateManyWithoutProductNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
|
|
||||||
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
|
|
||||||
upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput[]
|
|
||||||
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
|
|
||||||
set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
|
||||||
update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput[]
|
|
||||||
updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput | Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput[]
|
|
||||||
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateNestedManyWithoutInventoryInput = {
|
export type StockBalanceCreateNestedManyWithoutInventoryInput = {
|
||||||
@@ -546,82 +504,65 @@ export type StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput = {
|
|||||||
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateWithoutProductInput = {
|
export type StockBalanceCreateNestedManyWithoutProductInput = {
|
||||||
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
|
||||||
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
|
||||||
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
|
||||||
createdAt?: Date | string
|
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
updatedAt?: Date | string
|
|
||||||
inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUncheckedCreateWithoutProductInput = {
|
export type StockBalanceUncheckedCreateNestedManyWithoutProductInput = {
|
||||||
id?: number
|
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
|
||||||
inventoryId: number
|
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
|
||||||
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
|
||||||
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateOrConnectWithoutProductInput = {
|
export type StockBalanceUpdateManyWithoutProductNestedInput = {
|
||||||
where: Prisma.StockBalanceWhereUniqueInput
|
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
|
||||||
create: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput>
|
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
|
||||||
|
upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput[]
|
||||||
|
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
|
||||||
|
set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
|
delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
|
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
|
update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput[]
|
||||||
|
updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput | Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput[]
|
||||||
|
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateManyProductInputEnvelope = {
|
export type StockBalanceUncheckedUpdateManyWithoutProductNestedInput = {
|
||||||
data: Prisma.StockBalanceCreateManyProductInput | Prisma.StockBalanceCreateManyProductInput[]
|
create?: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput> | Prisma.StockBalanceCreateWithoutProductInput[] | Prisma.StockBalanceUncheckedCreateWithoutProductInput[]
|
||||||
skipDuplicates?: boolean
|
connectOrCreate?: Prisma.StockBalanceCreateOrConnectWithoutProductInput | Prisma.StockBalanceCreateOrConnectWithoutProductInput[]
|
||||||
}
|
upsert?: Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpsertWithWhereUniqueWithoutProductInput[]
|
||||||
|
createMany?: Prisma.StockBalanceCreateManyProductInputEnvelope
|
||||||
export type StockBalanceUpsertWithWhereUniqueWithoutProductInput = {
|
set?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
where: Prisma.StockBalanceWhereUniqueInput
|
disconnect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
update: Prisma.XOR<Prisma.StockBalanceUpdateWithoutProductInput, Prisma.StockBalanceUncheckedUpdateWithoutProductInput>
|
delete?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
create: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput>
|
connect?: Prisma.StockBalanceWhereUniqueInput | Prisma.StockBalanceWhereUniqueInput[]
|
||||||
}
|
update?: Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput | Prisma.StockBalanceUpdateWithWhereUniqueWithoutProductInput[]
|
||||||
|
updateMany?: Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput | Prisma.StockBalanceUpdateManyWithWhereWithoutProductInput[]
|
||||||
export type StockBalanceUpdateWithWhereUniqueWithoutProductInput = {
|
deleteMany?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
||||||
where: Prisma.StockBalanceWhereUniqueInput
|
|
||||||
data: Prisma.XOR<Prisma.StockBalanceUpdateWithoutProductInput, Prisma.StockBalanceUncheckedUpdateWithoutProductInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockBalanceUpdateManyWithWhereWithoutProductInput = {
|
|
||||||
where: Prisma.StockBalanceScalarWhereInput
|
|
||||||
data: Prisma.XOR<Prisma.StockBalanceUpdateManyMutationInput, Prisma.StockBalanceUncheckedUpdateManyWithoutProductInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StockBalanceScalarWhereInput = {
|
|
||||||
AND?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
|
||||||
OR?: Prisma.StockBalanceScalarWhereInput[]
|
|
||||||
NOT?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
|
||||||
id?: Prisma.IntFilter<"StockBalance"> | number
|
|
||||||
productId?: Prisma.IntFilter<"StockBalance"> | number
|
|
||||||
inventoryId?: Prisma.IntFilter<"StockBalance"> | number
|
|
||||||
quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateWithoutInventoryInput = {
|
export type StockBalanceCreateWithoutInventoryInput = {
|
||||||
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
|
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput
|
product: Prisma.ProductCreateNestedOneWithoutStockBalancesInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUncheckedCreateWithoutInventoryInput = {
|
export type StockBalanceUncheckedCreateWithoutInventoryInput = {
|
||||||
id?: number
|
|
||||||
productId: number
|
|
||||||
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
|
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
productId: number
|
||||||
|
createdAt?: Date | string
|
||||||
|
id?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateOrConnectWithoutInventoryInput = {
|
export type StockBalanceCreateOrConnectWithoutInventoryInput = {
|
||||||
@@ -650,133 +591,192 @@ export type StockBalanceUpdateManyWithWhereWithoutInventoryInput = {
|
|||||||
data: Prisma.XOR<Prisma.StockBalanceUpdateManyMutationInput, Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryInput>
|
data: Prisma.XOR<Prisma.StockBalanceUpdateManyMutationInput, Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateManyProductInput = {
|
export type StockBalanceScalarWhereInput = {
|
||||||
id?: number
|
AND?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
||||||
inventoryId: number
|
OR?: Prisma.StockBalanceScalarWhereInput[]
|
||||||
|
NOT?: Prisma.StockBalanceScalarWhereInput | Prisma.StockBalanceScalarWhereInput[]
|
||||||
|
quantity?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
updatedAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFilter<"StockBalance"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId?: Prisma.IntFilter<"StockBalance"> | number
|
||||||
|
productId?: Prisma.IntFilter<"StockBalance"> | number
|
||||||
|
createdAt?: Prisma.DateTimeFilter<"StockBalance"> | Date | string
|
||||||
|
id?: Prisma.IntFilter<"StockBalance"> | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockBalanceCreateWithoutProductInput = {
|
||||||
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
|
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
inventory: Prisma.InventoryCreateNestedOneWithoutStockBalancesInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUpdateWithoutProductInput = {
|
export type StockBalanceUncheckedCreateWithoutProductInput = {
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
updatedAt?: Date | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
inventoryId: number
|
||||||
inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput
|
createdAt?: Date | string
|
||||||
|
id?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUncheckedUpdateWithoutProductInput = {
|
export type StockBalanceCreateOrConnectWithoutProductInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
where: Prisma.StockBalanceWhereUniqueInput
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
create: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput>
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUncheckedUpdateManyWithoutProductInput = {
|
export type StockBalanceCreateManyProductInputEnvelope = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
data: Prisma.StockBalanceCreateManyProductInput | Prisma.StockBalanceCreateManyProductInput[]
|
||||||
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
skipDuplicates?: boolean
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
}
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
export type StockBalanceUpsertWithWhereUniqueWithoutProductInput = {
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
where: Prisma.StockBalanceWhereUniqueInput
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
update: Prisma.XOR<Prisma.StockBalanceUpdateWithoutProductInput, Prisma.StockBalanceUncheckedUpdateWithoutProductInput>
|
||||||
|
create: Prisma.XOR<Prisma.StockBalanceCreateWithoutProductInput, Prisma.StockBalanceUncheckedCreateWithoutProductInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockBalanceUpdateWithWhereUniqueWithoutProductInput = {
|
||||||
|
where: Prisma.StockBalanceWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.StockBalanceUpdateWithoutProductInput, Prisma.StockBalanceUncheckedUpdateWithoutProductInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockBalanceUpdateManyWithWhereWithoutProductInput = {
|
||||||
|
where: Prisma.StockBalanceScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.StockBalanceUpdateManyMutationInput, Prisma.StockBalanceUncheckedUpdateManyWithoutProductInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceCreateManyInventoryInput = {
|
export type StockBalanceCreateManyInventoryInput = {
|
||||||
id?: number
|
|
||||||
productId: number
|
|
||||||
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
|
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
productId: number
|
||||||
|
createdAt?: Date | string
|
||||||
|
id?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUpdateWithoutInventoryInput = {
|
export type StockBalanceUpdateWithoutInventoryInput = {
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput
|
product?: Prisma.ProductUpdateOneRequiredWithoutStockBalancesNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUncheckedUpdateWithoutInventoryInput = {
|
export type StockBalanceUncheckedUpdateWithoutInventoryInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceUncheckedUpdateManyWithoutInventoryInput = {
|
export type StockBalanceUncheckedUpdateManyWithoutInventoryInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockBalanceCreateManyProductInput = {
|
||||||
|
quantity?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
avgCost?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId: number
|
||||||
|
createdAt?: Date | string
|
||||||
|
id?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockBalanceUpdateWithoutProductInput = {
|
||||||
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
inventory?: Prisma.InventoryUpdateOneRequiredWithoutStockBalancesNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockBalanceUncheckedUpdateWithoutProductInput = {
|
||||||
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StockBalanceUncheckedUpdateManyWithoutProductInput = {
|
||||||
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
avgCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type StockBalanceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type StockBalanceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
|
||||||
productId?: boolean
|
|
||||||
inventoryId?: boolean
|
|
||||||
quantity?: boolean
|
quantity?: boolean
|
||||||
avgCost?: boolean
|
|
||||||
totalCost?: boolean
|
totalCost?: boolean
|
||||||
createdAt?: boolean
|
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
avgCost?: boolean
|
||||||
|
inventoryId?: boolean
|
||||||
|
productId?: boolean
|
||||||
|
createdAt?: boolean
|
||||||
|
id?: boolean
|
||||||
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
||||||
|
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["stockBalance"]>
|
}, ExtArgs["result"]["stockBalance"]>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type StockBalanceSelectScalar = {
|
export type StockBalanceSelectScalar = {
|
||||||
id?: boolean
|
|
||||||
productId?: boolean
|
|
||||||
inventoryId?: boolean
|
|
||||||
quantity?: boolean
|
quantity?: boolean
|
||||||
avgCost?: boolean
|
|
||||||
totalCost?: boolean
|
totalCost?: boolean
|
||||||
createdAt?: boolean
|
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
|
avgCost?: boolean
|
||||||
|
inventoryId?: boolean
|
||||||
|
productId?: boolean
|
||||||
|
createdAt?: boolean
|
||||||
|
id?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockBalanceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "productId" | "inventoryId" | "quantity" | "avgCost" | "totalCost" | "createdAt" | "updatedAt", ExtArgs["result"]["stockBalance"]>
|
export type StockBalanceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"quantity" | "totalCost" | "updatedAt" | "avgCost" | "inventoryId" | "productId" | "createdAt" | "id", ExtArgs["result"]["stockBalance"]>
|
||||||
export type StockBalanceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type StockBalanceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
|
||||||
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
inventory?: boolean | Prisma.InventoryDefaultArgs<ExtArgs>
|
||||||
|
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type $StockBalancePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $StockBalancePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "StockBalance"
|
name: "StockBalance"
|
||||||
objects: {
|
objects: {
|
||||||
product: Prisma.$ProductPayload<ExtArgs>
|
|
||||||
inventory: Prisma.$InventoryPayload<ExtArgs>
|
inventory: Prisma.$InventoryPayload<ExtArgs>
|
||||||
|
product: Prisma.$ProductPayload<ExtArgs>
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
quantity: runtime.Decimal
|
quantity: runtime.Decimal
|
||||||
avgCost: runtime.Decimal
|
|
||||||
totalCost: runtime.Decimal
|
totalCost: runtime.Decimal
|
||||||
createdAt: Date
|
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
|
avgCost: runtime.Decimal
|
||||||
|
inventoryId: number
|
||||||
|
productId: number
|
||||||
|
createdAt: Date
|
||||||
|
id: number
|
||||||
}, ExtArgs["result"]["stockBalance"]>
|
}, ExtArgs["result"]["stockBalance"]>
|
||||||
composites: {}
|
composites: {}
|
||||||
}
|
}
|
||||||
@@ -860,8 +860,8 @@ export interface StockBalanceDelegate<ExtArgs extends runtime.Types.Extensions.I
|
|||||||
* // Get first 10 StockBalances
|
* // Get first 10 StockBalances
|
||||||
* const stockBalances = await prisma.stockBalance.findMany({ take: 10 })
|
* const stockBalances = await prisma.stockBalance.findMany({ take: 10 })
|
||||||
*
|
*
|
||||||
* // Only select the `id`
|
* // Only select the `quantity`
|
||||||
* const stockBalanceWithIdOnly = await prisma.stockBalance.findMany({ select: { id: true } })
|
* const stockBalanceWithQuantityOnly = await prisma.stockBalance.findMany({ select: { quantity: true } })
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
findMany<T extends StockBalanceFindManyArgs>(args?: Prisma.SelectSubset<T, StockBalanceFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
findMany<T extends StockBalanceFindManyArgs>(args?: Prisma.SelectSubset<T, StockBalanceFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
||||||
@@ -1117,8 +1117,8 @@ readonly fields: StockBalanceFieldRefs;
|
|||||||
*/
|
*/
|
||||||
export interface Prisma__StockBalanceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__StockBalanceClient<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"
|
||||||
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>
|
|
||||||
inventory<T extends Prisma.InventoryDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryDefaultArgs<ExtArgs>>): Prisma.Prisma__InventoryClient<runtime.Types.Result.GetResult<Prisma.$InventoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
inventory<T extends Prisma.InventoryDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.InventoryDefaultArgs<ExtArgs>>): Prisma.Prisma__InventoryClient<runtime.Types.Result.GetResult<Prisma.$InventoryPayload<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>
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -1148,14 +1148,14 @@ export interface Prisma__StockBalanceClient<T, Null = never, ExtArgs extends run
|
|||||||
* Fields of the StockBalance model
|
* Fields of the StockBalance model
|
||||||
*/
|
*/
|
||||||
export interface StockBalanceFieldRefs {
|
export interface StockBalanceFieldRefs {
|
||||||
readonly id: Prisma.FieldRef<"StockBalance", 'Int'>
|
|
||||||
readonly productId: Prisma.FieldRef<"StockBalance", 'Int'>
|
|
||||||
readonly inventoryId: Prisma.FieldRef<"StockBalance", 'Int'>
|
|
||||||
readonly quantity: Prisma.FieldRef<"StockBalance", 'Decimal'>
|
readonly quantity: Prisma.FieldRef<"StockBalance", 'Decimal'>
|
||||||
readonly avgCost: Prisma.FieldRef<"StockBalance", 'Decimal'>
|
|
||||||
readonly totalCost: Prisma.FieldRef<"StockBalance", 'Decimal'>
|
readonly totalCost: Prisma.FieldRef<"StockBalance", 'Decimal'>
|
||||||
readonly createdAt: Prisma.FieldRef<"StockBalance", 'DateTime'>
|
|
||||||
readonly updatedAt: Prisma.FieldRef<"StockBalance", 'DateTime'>
|
readonly updatedAt: Prisma.FieldRef<"StockBalance", 'DateTime'>
|
||||||
|
readonly avgCost: Prisma.FieldRef<"StockBalance", 'Decimal'>
|
||||||
|
readonly inventoryId: Prisma.FieldRef<"StockBalance", 'Int'>
|
||||||
|
readonly productId: Prisma.FieldRef<"StockBalance", 'Int'>
|
||||||
|
readonly createdAt: Prisma.FieldRef<"StockBalance", 'DateTime'>
|
||||||
|
readonly id: Prisma.FieldRef<"StockBalance", 'Int'>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -280,9 +280,9 @@ export type SupplierWhereInput = {
|
|||||||
createdAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
||||||
productCharges?: Prisma.ProductChargeListRelationFilter
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter
|
purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter
|
||||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerListRelationFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierOrderByWithRelationInput = {
|
export type SupplierOrderByWithRelationInput = {
|
||||||
@@ -299,9 +299,9 @@ export type SupplierOrderByWithRelationInput = {
|
|||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
productCharges?: Prisma.ProductChargeOrderByRelationAggregateInput
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptOrderByRelationAggregateInput
|
purchaseReceipts?: Prisma.PurchaseReceiptOrderByRelationAggregateInput
|
||||||
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.SupplierOrderByRelevanceInput
|
_relevance?: Prisma.SupplierOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -322,9 +322,9 @@ export type SupplierWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
createdAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"Supplier"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"Supplier"> | Date | string | null
|
||||||
productCharges?: Prisma.ProductChargeListRelationFilter
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter
|
purchaseReceipts?: Prisma.PurchaseReceiptListRelationFilter
|
||||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerListRelationFilter
|
||||||
}, "id" | "mobileNumber">
|
}, "id" | "mobileNumber">
|
||||||
|
|
||||||
export type SupplierOrderByWithAggregationInput = {
|
export type SupplierOrderByWithAggregationInput = {
|
||||||
@@ -380,9 +380,9 @@ export type SupplierCreateInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
productCharges?: Prisma.ProductChargeCreateNestedManyWithoutSupplierInput
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutSupplierInput
|
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutSupplierInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerCreateNestedManyWithoutSupplierInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUncheckedCreateInput = {
|
export type SupplierUncheckedCreateInput = {
|
||||||
@@ -399,9 +399,9 @@ export type SupplierUncheckedCreateInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutSupplierInput
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput
|
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUpdateInput = {
|
export type SupplierUpdateInput = {
|
||||||
@@ -417,9 +417,9 @@ export type SupplierUpdateInput = {
|
|||||||
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
|
||||||
productCharges?: Prisma.ProductChargeUpdateManyWithoutSupplierNestedInput
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutSupplierNestedInput
|
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutSupplierNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerUpdateManyWithoutSupplierNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUncheckedUpdateInput = {
|
export type SupplierUncheckedUpdateInput = {
|
||||||
@@ -436,9 +436,9 @@ export type SupplierUncheckedUpdateInput = {
|
|||||||
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
|
||||||
productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutSupplierNestedInput
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput
|
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutSupplierNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutSupplierNestedInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierCreateManyInput = {
|
export type SupplierCreateManyInput = {
|
||||||
@@ -560,18 +560,18 @@ export type SupplierNullableScalarRelationFilter = {
|
|||||||
isNot?: Prisma.SupplierWhereInput | null
|
isNot?: Prisma.SupplierWhereInput | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierCreateNestedOneWithoutProductChargesInput = {
|
export type SupplierCreateNestedOneWithoutSupplierLedgersInput = {
|
||||||
create?: Prisma.XOR<Prisma.SupplierCreateWithoutProductChargesInput, Prisma.SupplierUncheckedCreateWithoutProductChargesInput>
|
create?: Prisma.XOR<Prisma.SupplierCreateWithoutSupplierLedgersInput, Prisma.SupplierUncheckedCreateWithoutSupplierLedgersInput>
|
||||||
connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutProductChargesInput
|
connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutSupplierLedgersInput
|
||||||
connect?: Prisma.SupplierWhereUniqueInput
|
connect?: Prisma.SupplierWhereUniqueInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUpdateOneRequiredWithoutProductChargesNestedInput = {
|
export type SupplierUpdateOneRequiredWithoutSupplierLedgersNestedInput = {
|
||||||
create?: Prisma.XOR<Prisma.SupplierCreateWithoutProductChargesInput, Prisma.SupplierUncheckedCreateWithoutProductChargesInput>
|
create?: Prisma.XOR<Prisma.SupplierCreateWithoutSupplierLedgersInput, Prisma.SupplierUncheckedCreateWithoutSupplierLedgersInput>
|
||||||
connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutProductChargesInput
|
connectOrCreate?: Prisma.SupplierCreateOrConnectWithoutSupplierLedgersInput
|
||||||
upsert?: Prisma.SupplierUpsertWithoutProductChargesInput
|
upsert?: Prisma.SupplierUpsertWithoutSupplierLedgersInput
|
||||||
connect?: Prisma.SupplierWhereUniqueInput
|
connect?: Prisma.SupplierWhereUniqueInput
|
||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SupplierUpdateToOneWithWhereWithoutProductChargesInput, Prisma.SupplierUpdateWithoutProductChargesInput>, Prisma.SupplierUncheckedUpdateWithoutProductChargesInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.SupplierUpdateToOneWithWhereWithoutSupplierLedgersInput, Prisma.SupplierUpdateWithoutSupplierLedgersInput>, Prisma.SupplierUncheckedUpdateWithoutSupplierLedgersInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierCreateNestedOneWithoutPurchaseReceiptsInput = {
|
export type SupplierCreateNestedOneWithoutPurchaseReceiptsInput = {
|
||||||
@@ -604,7 +604,7 @@ export type SupplierUpdateOneWithoutStockMovementsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.SupplierUpdateToOneWithWhereWithoutStockMovementsInput, Prisma.SupplierUpdateWithoutStockMovementsInput>, Prisma.SupplierUncheckedUpdateWithoutStockMovementsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.SupplierUpdateToOneWithWhereWithoutStockMovementsInput, Prisma.SupplierUpdateWithoutStockMovementsInput>, Prisma.SupplierUncheckedUpdateWithoutStockMovementsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierCreateWithoutProductChargesInput = {
|
export type SupplierCreateWithoutSupplierLedgersInput = {
|
||||||
firstName: string
|
firstName: string
|
||||||
lastName: string
|
lastName: string
|
||||||
email?: string | null
|
email?: string | null
|
||||||
@@ -621,7 +621,7 @@ export type SupplierCreateWithoutProductChargesInput = {
|
|||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUncheckedCreateWithoutProductChargesInput = {
|
export type SupplierUncheckedCreateWithoutSupplierLedgersInput = {
|
||||||
id?: number
|
id?: number
|
||||||
firstName: string
|
firstName: string
|
||||||
lastName: string
|
lastName: string
|
||||||
@@ -639,23 +639,23 @@ export type SupplierUncheckedCreateWithoutProductChargesInput = {
|
|||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierCreateOrConnectWithoutProductChargesInput = {
|
export type SupplierCreateOrConnectWithoutSupplierLedgersInput = {
|
||||||
where: Prisma.SupplierWhereUniqueInput
|
where: Prisma.SupplierWhereUniqueInput
|
||||||
create: Prisma.XOR<Prisma.SupplierCreateWithoutProductChargesInput, Prisma.SupplierUncheckedCreateWithoutProductChargesInput>
|
create: Prisma.XOR<Prisma.SupplierCreateWithoutSupplierLedgersInput, Prisma.SupplierUncheckedCreateWithoutSupplierLedgersInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUpsertWithoutProductChargesInput = {
|
export type SupplierUpsertWithoutSupplierLedgersInput = {
|
||||||
update: Prisma.XOR<Prisma.SupplierUpdateWithoutProductChargesInput, Prisma.SupplierUncheckedUpdateWithoutProductChargesInput>
|
update: Prisma.XOR<Prisma.SupplierUpdateWithoutSupplierLedgersInput, Prisma.SupplierUncheckedUpdateWithoutSupplierLedgersInput>
|
||||||
create: Prisma.XOR<Prisma.SupplierCreateWithoutProductChargesInput, Prisma.SupplierUncheckedCreateWithoutProductChargesInput>
|
create: Prisma.XOR<Prisma.SupplierCreateWithoutSupplierLedgersInput, Prisma.SupplierUncheckedCreateWithoutSupplierLedgersInput>
|
||||||
where?: Prisma.SupplierWhereInput
|
where?: Prisma.SupplierWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUpdateToOneWithWhereWithoutProductChargesInput = {
|
export type SupplierUpdateToOneWithWhereWithoutSupplierLedgersInput = {
|
||||||
where?: Prisma.SupplierWhereInput
|
where?: Prisma.SupplierWhereInput
|
||||||
data: Prisma.XOR<Prisma.SupplierUpdateWithoutProductChargesInput, Prisma.SupplierUncheckedUpdateWithoutProductChargesInput>
|
data: Prisma.XOR<Prisma.SupplierUpdateWithoutSupplierLedgersInput, Prisma.SupplierUncheckedUpdateWithoutSupplierLedgersInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUpdateWithoutProductChargesInput = {
|
export type SupplierUpdateWithoutSupplierLedgersInput = {
|
||||||
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
email?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
@@ -672,7 +672,7 @@ export type SupplierUpdateWithoutProductChargesInput = {
|
|||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUncheckedUpdateWithoutProductChargesInput = {
|
export type SupplierUncheckedUpdateWithoutSupplierLedgersInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
firstName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
lastName?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -703,8 +703,8 @@ export type SupplierCreateWithoutPurchaseReceiptsInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
productCharges?: Prisma.ProductChargeCreateNestedManyWithoutSupplierInput
|
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutSupplierInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerCreateNestedManyWithoutSupplierInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUncheckedCreateWithoutPurchaseReceiptsInput = {
|
export type SupplierUncheckedCreateWithoutPurchaseReceiptsInput = {
|
||||||
@@ -721,8 +721,8 @@ export type SupplierUncheckedCreateWithoutPurchaseReceiptsInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutSupplierInput
|
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutSupplierInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierCreateOrConnectWithoutPurchaseReceiptsInput = {
|
export type SupplierCreateOrConnectWithoutPurchaseReceiptsInput = {
|
||||||
@@ -754,8 +754,8 @@ export type SupplierUpdateWithoutPurchaseReceiptsInput = {
|
|||||||
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
|
||||||
productCharges?: Prisma.ProductChargeUpdateManyWithoutSupplierNestedInput
|
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutSupplierNestedInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerUpdateManyWithoutSupplierNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUncheckedUpdateWithoutPurchaseReceiptsInput = {
|
export type SupplierUncheckedUpdateWithoutPurchaseReceiptsInput = {
|
||||||
@@ -772,8 +772,8 @@ export type SupplierUncheckedUpdateWithoutPurchaseReceiptsInput = {
|
|||||||
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
|
||||||
productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutSupplierNestedInput
|
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutSupplierNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutSupplierNestedInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierCreateWithoutStockMovementsInput = {
|
export type SupplierCreateWithoutStockMovementsInput = {
|
||||||
@@ -789,8 +789,8 @@ export type SupplierCreateWithoutStockMovementsInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
productCharges?: Prisma.ProductChargeCreateNestedManyWithoutSupplierInput
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutSupplierInput
|
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutSupplierInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerCreateNestedManyWithoutSupplierInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUncheckedCreateWithoutStockMovementsInput = {
|
export type SupplierUncheckedCreateWithoutStockMovementsInput = {
|
||||||
@@ -807,8 +807,8 @@ export type SupplierUncheckedCreateWithoutStockMovementsInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
productCharges?: Prisma.ProductChargeUncheckedCreateNestedManyWithoutSupplierInput
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput
|
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutSupplierInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerUncheckedCreateNestedManyWithoutSupplierInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierCreateOrConnectWithoutStockMovementsInput = {
|
export type SupplierCreateOrConnectWithoutStockMovementsInput = {
|
||||||
@@ -840,8 +840,8 @@ export type SupplierUpdateWithoutStockMovementsInput = {
|
|||||||
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
|
||||||
productCharges?: Prisma.ProductChargeUpdateManyWithoutSupplierNestedInput
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutSupplierNestedInput
|
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutSupplierNestedInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerUpdateManyWithoutSupplierNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierUncheckedUpdateWithoutStockMovementsInput = {
|
export type SupplierUncheckedUpdateWithoutStockMovementsInput = {
|
||||||
@@ -858,8 +858,8 @@ export type SupplierUncheckedUpdateWithoutStockMovementsInput = {
|
|||||||
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
|
||||||
productCharges?: Prisma.ProductChargeUncheckedUpdateManyWithoutSupplierNestedInput
|
|
||||||
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput
|
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutSupplierNestedInput
|
||||||
|
supplierLedgers?: Prisma.SupplierLedgerUncheckedUpdateManyWithoutSupplierNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -868,15 +868,15 @@ export type SupplierUncheckedUpdateWithoutStockMovementsInput = {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
export type SupplierCountOutputType = {
|
export type SupplierCountOutputType = {
|
||||||
productCharges: number
|
|
||||||
purchaseReceipts: number
|
purchaseReceipts: number
|
||||||
stockMovements: number
|
stockMovements: number
|
||||||
|
supplierLedgers: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SupplierCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SupplierCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
productCharges?: boolean | SupplierCountOutputTypeCountProductChargesArgs
|
|
||||||
purchaseReceipts?: boolean | SupplierCountOutputTypeCountPurchaseReceiptsArgs
|
purchaseReceipts?: boolean | SupplierCountOutputTypeCountPurchaseReceiptsArgs
|
||||||
stockMovements?: boolean | SupplierCountOutputTypeCountStockMovementsArgs
|
stockMovements?: boolean | SupplierCountOutputTypeCountStockMovementsArgs
|
||||||
|
supplierLedgers?: boolean | SupplierCountOutputTypeCountSupplierLedgersArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -889,13 +889,6 @@ export type SupplierCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Ext
|
|||||||
select?: Prisma.SupplierCountOutputTypeSelect<ExtArgs> | null
|
select?: Prisma.SupplierCountOutputTypeSelect<ExtArgs> | null
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* SupplierCountOutputType without action
|
|
||||||
*/
|
|
||||||
export type SupplierCountOutputTypeCountProductChargesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
where?: Prisma.ProductChargeWhereInput
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SupplierCountOutputType without action
|
* SupplierCountOutputType without action
|
||||||
*/
|
*/
|
||||||
@@ -910,6 +903,13 @@ export type SupplierCountOutputTypeCountStockMovementsArgs<ExtArgs extends runti
|
|||||||
where?: Prisma.StockMovementWhereInput
|
where?: Prisma.StockMovementWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SupplierCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type SupplierCountOutputTypeCountSupplierLedgersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.SupplierLedgerWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export type SupplierSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type SupplierSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
@@ -925,9 +925,9 @@ export type SupplierSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
|||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
deletedAt?: boolean
|
deletedAt?: boolean
|
||||||
productCharges?: boolean | Prisma.Supplier$productChargesArgs<ExtArgs>
|
|
||||||
purchaseReceipts?: boolean | Prisma.Supplier$purchaseReceiptsArgs<ExtArgs>
|
purchaseReceipts?: boolean | Prisma.Supplier$purchaseReceiptsArgs<ExtArgs>
|
||||||
stockMovements?: boolean | Prisma.Supplier$stockMovementsArgs<ExtArgs>
|
stockMovements?: boolean | Prisma.Supplier$stockMovementsArgs<ExtArgs>
|
||||||
|
supplierLedgers?: boolean | Prisma.Supplier$supplierLedgersArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["supplier"]>
|
}, ExtArgs["result"]["supplier"]>
|
||||||
|
|
||||||
@@ -951,18 +951,18 @@ export type SupplierSelectScalar = {
|
|||||||
|
|
||||||
export type SupplierOmit<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"]["supplier"]>
|
export type SupplierOmit<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"]["supplier"]>
|
||||||
export type SupplierInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SupplierInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
productCharges?: boolean | Prisma.Supplier$productChargesArgs<ExtArgs>
|
|
||||||
purchaseReceipts?: boolean | Prisma.Supplier$purchaseReceiptsArgs<ExtArgs>
|
purchaseReceipts?: boolean | Prisma.Supplier$purchaseReceiptsArgs<ExtArgs>
|
||||||
stockMovements?: boolean | Prisma.Supplier$stockMovementsArgs<ExtArgs>
|
stockMovements?: boolean | Prisma.Supplier$stockMovementsArgs<ExtArgs>
|
||||||
|
supplierLedgers?: boolean | Prisma.Supplier$supplierLedgersArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.SupplierCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type $SupplierPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $SupplierPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "Supplier"
|
name: "Supplier"
|
||||||
objects: {
|
objects: {
|
||||||
productCharges: Prisma.$ProductChargePayload<ExtArgs>[]
|
|
||||||
purchaseReceipts: Prisma.$PurchaseReceiptPayload<ExtArgs>[]
|
purchaseReceipts: Prisma.$PurchaseReceiptPayload<ExtArgs>[]
|
||||||
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
||||||
|
supplierLedgers: Prisma.$SupplierLedgerPayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
@@ -1318,9 +1318,9 @@ readonly fields: SupplierFieldRefs;
|
|||||||
*/
|
*/
|
||||||
export interface Prisma__SupplierClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__SupplierClient<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"
|
||||||
productCharges<T extends Prisma.Supplier$productChargesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Supplier$productChargesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ProductChargePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
|
||||||
purchaseReceipts<T extends Prisma.Supplier$purchaseReceiptsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Supplier$purchaseReceiptsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
purchaseReceipts<T extends Prisma.Supplier$purchaseReceiptsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Supplier$purchaseReceiptsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
stockMovements<T extends Prisma.Supplier$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Supplier$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
stockMovements<T extends Prisma.Supplier$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Supplier$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
supplierLedgers<T extends Prisma.Supplier$supplierLedgersArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Supplier$supplierLedgersArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SupplierLedgerPayload<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.
|
||||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||||
@@ -1705,30 +1705,6 @@ export type SupplierDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Inte
|
|||||||
limit?: number
|
limit?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Supplier.productCharges
|
|
||||||
*/
|
|
||||||
export type Supplier$productChargesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the ProductCharge
|
|
||||||
*/
|
|
||||||
select?: Prisma.ProductChargeSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the ProductCharge
|
|
||||||
*/
|
|
||||||
omit?: Prisma.ProductChargeOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Choose, which related nodes to fetch as well
|
|
||||||
*/
|
|
||||||
include?: Prisma.ProductChargeInclude<ExtArgs> | null
|
|
||||||
where?: Prisma.ProductChargeWhereInput
|
|
||||||
orderBy?: Prisma.ProductChargeOrderByWithRelationInput | Prisma.ProductChargeOrderByWithRelationInput[]
|
|
||||||
cursor?: Prisma.ProductChargeWhereUniqueInput
|
|
||||||
take?: number
|
|
||||||
skip?: number
|
|
||||||
distinct?: Prisma.ProductChargeScalarFieldEnum | Prisma.ProductChargeScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Supplier.purchaseReceipts
|
* Supplier.purchaseReceipts
|
||||||
*/
|
*/
|
||||||
@@ -1777,6 +1753,30 @@ export type Supplier$stockMovementsArgs<ExtArgs extends runtime.Types.Extensions
|
|||||||
distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[]
|
distinct?: Prisma.StockMovementScalarFieldEnum | Prisma.StockMovementScalarFieldEnum[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Supplier.supplierLedgers
|
||||||
|
*/
|
||||||
|
export type Supplier$supplierLedgersArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the SupplierLedger
|
||||||
|
*/
|
||||||
|
select?: Prisma.SupplierLedgerSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the SupplierLedger
|
||||||
|
*/
|
||||||
|
omit?: Prisma.SupplierLedgerOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.SupplierLedgerInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.SupplierLedgerWhereInput
|
||||||
|
orderBy?: Prisma.SupplierLedgerOrderByWithRelationInput | Prisma.SupplierLedgerOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.SupplierLedgerWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.SupplierLedgerScalarFieldEnum | Prisma.SupplierLedgerScalarFieldEnum[]
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Supplier without action
|
* Supplier without action
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -36,23 +36,23 @@ export type TriggerLogSumAggregateOutputType = {
|
|||||||
|
|
||||||
export type TriggerLogMinAggregateOutputType = {
|
export type TriggerLogMinAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
name: string | null
|
|
||||||
message: string | null
|
message: string | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
|
name: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogMaxAggregateOutputType = {
|
export type TriggerLogMaxAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
name: string | null
|
|
||||||
message: string | null
|
message: string | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
|
name: string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogCountAggregateOutputType = {
|
export type TriggerLogCountAggregateOutputType = {
|
||||||
id: number
|
id: number
|
||||||
name: number
|
|
||||||
message: number
|
message: number
|
||||||
createdAt: number
|
createdAt: number
|
||||||
|
name: number
|
||||||
_all: number
|
_all: number
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,23 +67,23 @@ export type TriggerLogSumAggregateInputType = {
|
|||||||
|
|
||||||
export type TriggerLogMinAggregateInputType = {
|
export type TriggerLogMinAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
name?: true
|
|
||||||
message?: true
|
message?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
|
name?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogMaxAggregateInputType = {
|
export type TriggerLogMaxAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
name?: true
|
|
||||||
message?: true
|
message?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
|
name?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogCountAggregateInputType = {
|
export type TriggerLogCountAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
name?: true
|
|
||||||
message?: true
|
message?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
|
name?: true
|
||||||
_all?: true
|
_all?: true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -175,9 +175,9 @@ export type TriggerLogGroupByArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
|||||||
|
|
||||||
export type TriggerLogGroupByOutputType = {
|
export type TriggerLogGroupByOutputType = {
|
||||||
id: number
|
id: number
|
||||||
name: string
|
|
||||||
message: string
|
message: string
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
|
name: string
|
||||||
_count: TriggerLogCountAggregateOutputType | null
|
_count: TriggerLogCountAggregateOutputType | null
|
||||||
_avg: TriggerLogAvgAggregateOutputType | null
|
_avg: TriggerLogAvgAggregateOutputType | null
|
||||||
_sum: TriggerLogSumAggregateOutputType | null
|
_sum: TriggerLogSumAggregateOutputType | null
|
||||||
@@ -205,16 +205,16 @@ export type TriggerLogWhereInput = {
|
|||||||
OR?: Prisma.TriggerLogWhereInput[]
|
OR?: Prisma.TriggerLogWhereInput[]
|
||||||
NOT?: Prisma.TriggerLogWhereInput | Prisma.TriggerLogWhereInput[]
|
NOT?: Prisma.TriggerLogWhereInput | Prisma.TriggerLogWhereInput[]
|
||||||
id?: Prisma.IntFilter<"TriggerLog"> | number
|
id?: Prisma.IntFilter<"TriggerLog"> | number
|
||||||
name?: Prisma.StringFilter<"TriggerLog"> | string
|
|
||||||
message?: Prisma.StringFilter<"TriggerLog"> | string
|
message?: Prisma.StringFilter<"TriggerLog"> | string
|
||||||
createdAt?: Prisma.DateTimeFilter<"TriggerLog"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"TriggerLog"> | Date | string
|
||||||
|
name?: Prisma.StringFilter<"TriggerLog"> | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogOrderByWithRelationInput = {
|
export type TriggerLogOrderByWithRelationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
|
||||||
message?: Prisma.SortOrder
|
message?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
|
name?: Prisma.SortOrder
|
||||||
_relevance?: Prisma.TriggerLogOrderByRelevanceInput
|
_relevance?: Prisma.TriggerLogOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -223,16 +223,16 @@ export type TriggerLogWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
AND?: Prisma.TriggerLogWhereInput | Prisma.TriggerLogWhereInput[]
|
AND?: Prisma.TriggerLogWhereInput | Prisma.TriggerLogWhereInput[]
|
||||||
OR?: Prisma.TriggerLogWhereInput[]
|
OR?: Prisma.TriggerLogWhereInput[]
|
||||||
NOT?: Prisma.TriggerLogWhereInput | Prisma.TriggerLogWhereInput[]
|
NOT?: Prisma.TriggerLogWhereInput | Prisma.TriggerLogWhereInput[]
|
||||||
name?: Prisma.StringFilter<"TriggerLog"> | string
|
|
||||||
message?: Prisma.StringFilter<"TriggerLog"> | string
|
message?: Prisma.StringFilter<"TriggerLog"> | string
|
||||||
createdAt?: Prisma.DateTimeFilter<"TriggerLog"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"TriggerLog"> | Date | string
|
||||||
|
name?: Prisma.StringFilter<"TriggerLog"> | string
|
||||||
}, "id">
|
}, "id">
|
||||||
|
|
||||||
export type TriggerLogOrderByWithAggregationInput = {
|
export type TriggerLogOrderByWithAggregationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
|
||||||
message?: Prisma.SortOrder
|
message?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
|
name?: Prisma.SortOrder
|
||||||
_count?: Prisma.TriggerLogCountOrderByAggregateInput
|
_count?: Prisma.TriggerLogCountOrderByAggregateInput
|
||||||
_avg?: Prisma.TriggerLogAvgOrderByAggregateInput
|
_avg?: Prisma.TriggerLogAvgOrderByAggregateInput
|
||||||
_max?: Prisma.TriggerLogMaxOrderByAggregateInput
|
_max?: Prisma.TriggerLogMaxOrderByAggregateInput
|
||||||
@@ -245,55 +245,55 @@ export type TriggerLogScalarWhereWithAggregatesInput = {
|
|||||||
OR?: Prisma.TriggerLogScalarWhereWithAggregatesInput[]
|
OR?: Prisma.TriggerLogScalarWhereWithAggregatesInput[]
|
||||||
NOT?: Prisma.TriggerLogScalarWhereWithAggregatesInput | Prisma.TriggerLogScalarWhereWithAggregatesInput[]
|
NOT?: Prisma.TriggerLogScalarWhereWithAggregatesInput | Prisma.TriggerLogScalarWhereWithAggregatesInput[]
|
||||||
id?: Prisma.IntWithAggregatesFilter<"TriggerLog"> | number
|
id?: Prisma.IntWithAggregatesFilter<"TriggerLog"> | number
|
||||||
name?: Prisma.StringWithAggregatesFilter<"TriggerLog"> | string
|
|
||||||
message?: Prisma.StringWithAggregatesFilter<"TriggerLog"> | string
|
message?: Prisma.StringWithAggregatesFilter<"TriggerLog"> | string
|
||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"TriggerLog"> | Date | string
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"TriggerLog"> | Date | string
|
||||||
|
name?: Prisma.StringWithAggregatesFilter<"TriggerLog"> | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogCreateInput = {
|
export type TriggerLogCreateInput = {
|
||||||
name: string
|
|
||||||
message: string
|
message: string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
|
name: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogUncheckedCreateInput = {
|
export type TriggerLogUncheckedCreateInput = {
|
||||||
id?: number
|
id?: number
|
||||||
name: string
|
|
||||||
message: string
|
message: string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
|
name: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogUpdateInput = {
|
export type TriggerLogUpdateInput = {
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogUncheckedUpdateInput = {
|
export type TriggerLogUncheckedUpdateInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogCreateManyInput = {
|
export type TriggerLogCreateManyInput = {
|
||||||
id?: number
|
id?: number
|
||||||
name: string
|
|
||||||
message: string
|
message: string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
|
name: string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogUpdateManyMutationInput = {
|
export type TriggerLogUpdateManyMutationInput = {
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogUncheckedUpdateManyInput = {
|
export type TriggerLogUncheckedUpdateManyInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogOrderByRelevanceInput = {
|
export type TriggerLogOrderByRelevanceInput = {
|
||||||
@@ -304,9 +304,9 @@ export type TriggerLogOrderByRelevanceInput = {
|
|||||||
|
|
||||||
export type TriggerLogCountOrderByAggregateInput = {
|
export type TriggerLogCountOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
|
||||||
message?: Prisma.SortOrder
|
message?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
|
name?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogAvgOrderByAggregateInput = {
|
export type TriggerLogAvgOrderByAggregateInput = {
|
||||||
@@ -315,16 +315,16 @@ export type TriggerLogAvgOrderByAggregateInput = {
|
|||||||
|
|
||||||
export type TriggerLogMaxOrderByAggregateInput = {
|
export type TriggerLogMaxOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
|
||||||
message?: Prisma.SortOrder
|
message?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
|
name?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogMinOrderByAggregateInput = {
|
export type TriggerLogMinOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
name?: Prisma.SortOrder
|
|
||||||
message?: Prisma.SortOrder
|
message?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
|
name?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogSumOrderByAggregateInput = {
|
export type TriggerLogSumOrderByAggregateInput = {
|
||||||
@@ -335,30 +335,30 @@ export type TriggerLogSumOrderByAggregateInput = {
|
|||||||
|
|
||||||
export type TriggerLogSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type TriggerLogSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
name?: boolean
|
|
||||||
message?: boolean
|
message?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
|
name?: boolean
|
||||||
}, ExtArgs["result"]["triggerLog"]>
|
}, ExtArgs["result"]["triggerLog"]>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type TriggerLogSelectScalar = {
|
export type TriggerLogSelectScalar = {
|
||||||
id?: boolean
|
id?: boolean
|
||||||
name?: boolean
|
|
||||||
message?: boolean
|
message?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
|
name?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type TriggerLogOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "message" | "createdAt", ExtArgs["result"]["triggerLog"]>
|
export type TriggerLogOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "message" | "createdAt" | "name", ExtArgs["result"]["triggerLog"]>
|
||||||
|
|
||||||
export type $TriggerLogPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $TriggerLogPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "TriggerLog"
|
name: "TriggerLog"
|
||||||
objects: {}
|
objects: {}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
name: string
|
|
||||||
message: string
|
message: string
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
|
name: string
|
||||||
}, ExtArgs["result"]["triggerLog"]>
|
}, ExtArgs["result"]["triggerLog"]>
|
||||||
composites: {}
|
composites: {}
|
||||||
}
|
}
|
||||||
@@ -729,9 +729,9 @@ export interface Prisma__TriggerLogClient<T, Null = never, ExtArgs extends runti
|
|||||||
*/
|
*/
|
||||||
export interface TriggerLogFieldRefs {
|
export interface TriggerLogFieldRefs {
|
||||||
readonly id: Prisma.FieldRef<"TriggerLog", 'Int'>
|
readonly id: Prisma.FieldRef<"TriggerLog", 'Int'>
|
||||||
readonly name: Prisma.FieldRef<"TriggerLog", 'String'>
|
|
||||||
readonly message: Prisma.FieldRef<"TriggerLog", 'String'>
|
readonly message: Prisma.FieldRef<"TriggerLog", 'String'>
|
||||||
readonly createdAt: Prisma.FieldRef<"TriggerLog", 'DateTime'>
|
readonly createdAt: Prisma.FieldRef<"TriggerLog", 'DateTime'>
|
||||||
|
readonly name: Prisma.FieldRef<"TriggerLog", 'String'>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -252,8 +252,8 @@ export type UserWhereInput = {
|
|||||||
createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null
|
||||||
updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||||
role?: Prisma.XOR<Prisma.RoleScalarRelationFilter, Prisma.RoleWhereInput>
|
|
||||||
refreshTokens?: Prisma.RefreshTokenListRelationFilter
|
refreshTokens?: Prisma.RefreshTokenListRelationFilter
|
||||||
|
role?: Prisma.XOR<Prisma.RoleScalarRelationFilter, Prisma.RoleWhereInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UserOrderByWithRelationInput = {
|
export type UserOrderByWithRelationInput = {
|
||||||
@@ -266,8 +266,8 @@ export type UserOrderByWithRelationInput = {
|
|||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
deletedAt?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
role?: Prisma.RoleOrderByWithRelationInput
|
|
||||||
refreshTokens?: Prisma.RefreshTokenOrderByRelationAggregateInput
|
refreshTokens?: Prisma.RefreshTokenOrderByRelationAggregateInput
|
||||||
|
role?: Prisma.RoleOrderByWithRelationInput
|
||||||
_relevance?: Prisma.UserOrderByRelevanceInput
|
_relevance?: Prisma.UserOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,8 +284,8 @@ export type UserWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||||
deletedAt?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"User"> | Date | string | null
|
||||||
updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"User"> | Date | string
|
||||||
role?: Prisma.XOR<Prisma.RoleScalarRelationFilter, Prisma.RoleWhereInput>
|
|
||||||
refreshTokens?: Prisma.RefreshTokenListRelationFilter
|
refreshTokens?: Prisma.RefreshTokenListRelationFilter
|
||||||
|
role?: Prisma.XOR<Prisma.RoleScalarRelationFilter, Prisma.RoleWhereInput>
|
||||||
}, "id" | "mobileNumber">
|
}, "id" | "mobileNumber">
|
||||||
|
|
||||||
export type UserOrderByWithAggregationInput = {
|
export type UserOrderByWithAggregationInput = {
|
||||||
@@ -328,8 +328,8 @@ export type UserCreateInput = {
|
|||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
role: Prisma.RoleCreateNestedOneWithoutUsersInput
|
|
||||||
refreshTokens?: Prisma.RefreshTokenCreateNestedManyWithoutUserInput
|
refreshTokens?: Prisma.RefreshTokenCreateNestedManyWithoutUserInput
|
||||||
|
role: Prisma.RoleCreateNestedOneWithoutUsersInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UserUncheckedCreateInput = {
|
export type UserUncheckedCreateInput = {
|
||||||
@@ -353,8 +353,8 @@ export type UserUpdateInput = {
|
|||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
role?: Prisma.RoleUpdateOneRequiredWithoutUsersNestedInput
|
|
||||||
refreshTokens?: Prisma.RefreshTokenUpdateManyWithoutUserNestedInput
|
refreshTokens?: Prisma.RefreshTokenUpdateManyWithoutUserNestedInput
|
||||||
|
role?: Prisma.RoleUpdateOneRequiredWithoutUsersNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type UserUncheckedUpdateInput = {
|
export type UserUncheckedUpdateInput = {
|
||||||
@@ -759,8 +759,8 @@ export type UserSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
|||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
deletedAt?: boolean
|
deletedAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
role?: boolean | Prisma.RoleDefaultArgs<ExtArgs>
|
|
||||||
refreshTokens?: boolean | Prisma.User$refreshTokensArgs<ExtArgs>
|
refreshTokens?: boolean | Prisma.User$refreshTokensArgs<ExtArgs>
|
||||||
|
role?: boolean | Prisma.RoleDefaultArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["user"]>
|
}, ExtArgs["result"]["user"]>
|
||||||
|
|
||||||
@@ -780,16 +780,16 @@ export type UserSelectScalar = {
|
|||||||
|
|
||||||
export type UserOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "mobileNumber" | "password" | "firstName" | "lastName" | "roleId" | "createdAt" | "deletedAt" | "updatedAt", ExtArgs["result"]["user"]>
|
export type UserOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "mobileNumber" | "password" | "firstName" | "lastName" | "roleId" | "createdAt" | "deletedAt" | "updatedAt", ExtArgs["result"]["user"]>
|
||||||
export type UserInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type UserInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
role?: boolean | Prisma.RoleDefaultArgs<ExtArgs>
|
|
||||||
refreshTokens?: boolean | Prisma.User$refreshTokensArgs<ExtArgs>
|
refreshTokens?: boolean | Prisma.User$refreshTokensArgs<ExtArgs>
|
||||||
|
role?: boolean | Prisma.RoleDefaultArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.UserCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type $UserPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $UserPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "User"
|
name: "User"
|
||||||
objects: {
|
objects: {
|
||||||
role: Prisma.$RolePayload<ExtArgs>
|
|
||||||
refreshTokens: Prisma.$RefreshTokenPayload<ExtArgs>[]
|
refreshTokens: Prisma.$RefreshTokenPayload<ExtArgs>[]
|
||||||
|
role: Prisma.$RolePayload<ExtArgs>
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
@@ -1141,8 +1141,8 @@ readonly fields: UserFieldRefs;
|
|||||||
*/
|
*/
|
||||||
export interface Prisma__UserClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__UserClient<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"
|
||||||
role<T extends Prisma.RoleDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.RoleDefaultArgs<ExtArgs>>): Prisma.Prisma__RoleClient<runtime.Types.Result.GetResult<Prisma.$RolePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
|
||||||
refreshTokens<T extends Prisma.User$refreshTokensArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$refreshTokensArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RefreshTokenPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
refreshTokens<T extends Prisma.User$refreshTokensArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.User$refreshTokensArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$RefreshTokenPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
role<T extends Prisma.RoleDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.RoleDefaultArgs<ExtArgs>>): Prisma.Prisma__RoleClient<runtime.Types.Result.GetResult<Prisma.$RolePayload<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.
|
||||||
|
|||||||
@@ -1,713 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* This file exports the `inventory_overview` model and its related types.
|
|
||||||
*
|
|
||||||
* 🟢 You can import this file directly.
|
|
||||||
*/
|
|
||||||
import type * as runtime from "@prisma/client/runtime/client"
|
|
||||||
import type * as $Enums from "../enums.js"
|
|
||||||
import type * as Prisma from "../internal/prismaNamespace.js"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model inventory_overview
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type inventory_overviewModel = runtime.Types.Result.DefaultSelection<Prisma.$inventory_overviewPayload>
|
|
||||||
|
|
||||||
export type AggregateInventory_overview = {
|
|
||||||
_count: Inventory_overviewCountAggregateOutputType | null
|
|
||||||
_avg: Inventory_overviewAvgAggregateOutputType | null
|
|
||||||
_sum: Inventory_overviewSumAggregateOutputType | null
|
|
||||||
_min: Inventory_overviewMinAggregateOutputType | null
|
|
||||||
_max: Inventory_overviewMaxAggregateOutputType | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewAvgAggregateOutputType = {
|
|
||||||
ProductId: number | null
|
|
||||||
stock_quantity: runtime.Decimal | null
|
|
||||||
avgCost: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewSumAggregateOutputType = {
|
|
||||||
ProductId: number | null
|
|
||||||
stock_quantity: runtime.Decimal | null
|
|
||||||
avgCost: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewMinAggregateOutputType = {
|
|
||||||
ProductId: number | null
|
|
||||||
stock_quantity: runtime.Decimal | null
|
|
||||||
avgCost: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
|
||||||
updatedAt: Date | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewMaxAggregateOutputType = {
|
|
||||||
ProductId: number | null
|
|
||||||
stock_quantity: runtime.Decimal | null
|
|
||||||
avgCost: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
|
||||||
updatedAt: Date | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewCountAggregateOutputType = {
|
|
||||||
ProductId: number
|
|
||||||
stock_quantity: number
|
|
||||||
avgCost: number
|
|
||||||
totalCost: number
|
|
||||||
updatedAt: number
|
|
||||||
_all: number
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export type Inventory_overviewAvgAggregateInputType = {
|
|
||||||
ProductId?: true
|
|
||||||
stock_quantity?: true
|
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewSumAggregateInputType = {
|
|
||||||
ProductId?: true
|
|
||||||
stock_quantity?: true
|
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewMinAggregateInputType = {
|
|
||||||
ProductId?: true
|
|
||||||
stock_quantity?: true
|
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
|
||||||
updatedAt?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewMaxAggregateInputType = {
|
|
||||||
ProductId?: true
|
|
||||||
stock_quantity?: true
|
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
|
||||||
updatedAt?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewCountAggregateInputType = {
|
|
||||||
ProductId?: true
|
|
||||||
stock_quantity?: true
|
|
||||||
avgCost?: true
|
|
||||||
totalCost?: true
|
|
||||||
updatedAt?: true
|
|
||||||
_all?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Filter which inventory_overview to aggregate.
|
|
||||||
*/
|
|
||||||
where?: Prisma.inventory_overviewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of inventory_overviews to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.inventory_overviewOrderByWithRelationInput | Prisma.inventory_overviewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` inventory_overviews from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` inventory_overviews.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Count returned inventory_overviews
|
|
||||||
**/
|
|
||||||
_count?: true | Inventory_overviewCountAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to average
|
|
||||||
**/
|
|
||||||
_avg?: Inventory_overviewAvgAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to sum
|
|
||||||
**/
|
|
||||||
_sum?: Inventory_overviewSumAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to find the minimum value
|
|
||||||
**/
|
|
||||||
_min?: Inventory_overviewMinAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to find the maximum value
|
|
||||||
**/
|
|
||||||
_max?: Inventory_overviewMaxAggregateInputType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type GetInventory_overviewAggregateType<T extends Inventory_overviewAggregateArgs> = {
|
|
||||||
[P in keyof T & keyof AggregateInventory_overview]: P extends '_count' | 'count'
|
|
||||||
? T[P] extends true
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T[P], AggregateInventory_overview[P]>
|
|
||||||
: Prisma.GetScalarType<T[P], AggregateInventory_overview[P]>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type inventory_overviewGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
where?: Prisma.inventory_overviewWhereInput
|
|
||||||
orderBy?: Prisma.inventory_overviewOrderByWithAggregationInput | Prisma.inventory_overviewOrderByWithAggregationInput[]
|
|
||||||
by: Prisma.Inventory_overviewScalarFieldEnum[] | Prisma.Inventory_overviewScalarFieldEnum
|
|
||||||
having?: Prisma.inventory_overviewScalarWhereWithAggregatesInput
|
|
||||||
take?: number
|
|
||||||
skip?: number
|
|
||||||
_count?: Inventory_overviewCountAggregateInputType | true
|
|
||||||
_avg?: Inventory_overviewAvgAggregateInputType
|
|
||||||
_sum?: Inventory_overviewSumAggregateInputType
|
|
||||||
_min?: Inventory_overviewMinAggregateInputType
|
|
||||||
_max?: Inventory_overviewMaxAggregateInputType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Inventory_overviewGroupByOutputType = {
|
|
||||||
ProductId: number
|
|
||||||
stock_quantity: runtime.Decimal
|
|
||||||
avgCost: runtime.Decimal
|
|
||||||
totalCost: runtime.Decimal
|
|
||||||
updatedAt: Date
|
|
||||||
_count: Inventory_overviewCountAggregateOutputType | null
|
|
||||||
_avg: Inventory_overviewAvgAggregateOutputType | null
|
|
||||||
_sum: Inventory_overviewSumAggregateOutputType | null
|
|
||||||
_min: Inventory_overviewMinAggregateOutputType | null
|
|
||||||
_max: Inventory_overviewMaxAggregateOutputType | null
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetInventory_overviewGroupByPayload<T extends inventory_overviewGroupByArgs> = Prisma.PrismaPromise<
|
|
||||||
Array<
|
|
||||||
Prisma.PickEnumerable<Inventory_overviewGroupByOutputType, T['by']> &
|
|
||||||
{
|
|
||||||
[P in ((keyof T) & (keyof Inventory_overviewGroupByOutputType))]: P extends '_count'
|
|
||||||
? T[P] extends boolean
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T[P], Inventory_overviewGroupByOutputType[P]>
|
|
||||||
: Prisma.GetScalarType<T[P], Inventory_overviewGroupByOutputType[P]>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type inventory_overviewWhereInput = {
|
|
||||||
AND?: Prisma.inventory_overviewWhereInput | Prisma.inventory_overviewWhereInput[]
|
|
||||||
OR?: Prisma.inventory_overviewWhereInput[]
|
|
||||||
NOT?: Prisma.inventory_overviewWhereInput | Prisma.inventory_overviewWhereInput[]
|
|
||||||
ProductId?: Prisma.IntFilter<"inventory_overview"> | number
|
|
||||||
stock_quantity?: Prisma.DecimalFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
avgCost?: Prisma.DecimalFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
updatedAt?: Prisma.DateTimeFilter<"inventory_overview"> | Date | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewOrderByWithRelationInput = {
|
|
||||||
ProductId?: Prisma.SortOrder
|
|
||||||
stock_quantity?: Prisma.SortOrder
|
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewOrderByWithAggregationInput = {
|
|
||||||
ProductId?: Prisma.SortOrder
|
|
||||||
stock_quantity?: Prisma.SortOrder
|
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
|
||||||
_count?: Prisma.inventory_overviewCountOrderByAggregateInput
|
|
||||||
_avg?: Prisma.inventory_overviewAvgOrderByAggregateInput
|
|
||||||
_max?: Prisma.inventory_overviewMaxOrderByAggregateInput
|
|
||||||
_min?: Prisma.inventory_overviewMinOrderByAggregateInput
|
|
||||||
_sum?: Prisma.inventory_overviewSumOrderByAggregateInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewScalarWhereWithAggregatesInput = {
|
|
||||||
AND?: Prisma.inventory_overviewScalarWhereWithAggregatesInput | Prisma.inventory_overviewScalarWhereWithAggregatesInput[]
|
|
||||||
OR?: Prisma.inventory_overviewScalarWhereWithAggregatesInput[]
|
|
||||||
NOT?: Prisma.inventory_overviewScalarWhereWithAggregatesInput | Prisma.inventory_overviewScalarWhereWithAggregatesInput[]
|
|
||||||
ProductId?: Prisma.IntWithAggregatesFilter<"inventory_overview"> | number
|
|
||||||
stock_quantity?: Prisma.DecimalWithAggregatesFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
avgCost?: Prisma.DecimalWithAggregatesFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalWithAggregatesFilter<"inventory_overview"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
updatedAt?: Prisma.DateTimeWithAggregatesFilter<"inventory_overview"> | Date | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewCountOrderByAggregateInput = {
|
|
||||||
ProductId?: Prisma.SortOrder
|
|
||||||
stock_quantity?: Prisma.SortOrder
|
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewAvgOrderByAggregateInput = {
|
|
||||||
ProductId?: Prisma.SortOrder
|
|
||||||
stock_quantity?: Prisma.SortOrder
|
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewMaxOrderByAggregateInput = {
|
|
||||||
ProductId?: Prisma.SortOrder
|
|
||||||
stock_quantity?: Prisma.SortOrder
|
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewMinOrderByAggregateInput = {
|
|
||||||
ProductId?: Prisma.SortOrder
|
|
||||||
stock_quantity?: Prisma.SortOrder
|
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
updatedAt?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewSumOrderByAggregateInput = {
|
|
||||||
ProductId?: Prisma.SortOrder
|
|
||||||
stock_quantity?: Prisma.SortOrder
|
|
||||||
avgCost?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type inventory_overviewSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
||||||
ProductId?: boolean
|
|
||||||
stock_quantity?: boolean
|
|
||||||
avgCost?: boolean
|
|
||||||
totalCost?: boolean
|
|
||||||
updatedAt?: boolean
|
|
||||||
}, ExtArgs["result"]["inventory_overview"]>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type inventory_overviewSelectScalar = {
|
|
||||||
ProductId?: boolean
|
|
||||||
stock_quantity?: boolean
|
|
||||||
avgCost?: boolean
|
|
||||||
totalCost?: boolean
|
|
||||||
updatedAt?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"ProductId" | "stock_quantity" | "avgCost" | "totalCost" | "updatedAt", ExtArgs["result"]["inventory_overview"]>
|
|
||||||
|
|
||||||
export type $inventory_overviewPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
name: "inventory_overview"
|
|
||||||
objects: {}
|
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
|
||||||
ProductId: number
|
|
||||||
stock_quantity: runtime.Decimal
|
|
||||||
avgCost: runtime.Decimal
|
|
||||||
totalCost: runtime.Decimal
|
|
||||||
updatedAt: Date
|
|
||||||
}, ExtArgs["result"]["inventory_overview"]>
|
|
||||||
composites: {}
|
|
||||||
}
|
|
||||||
|
|
||||||
export type inventory_overviewGetPayload<S extends boolean | null | undefined | inventory_overviewDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$inventory_overviewPayload, S>
|
|
||||||
|
|
||||||
export type inventory_overviewCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
|
|
||||||
Omit<inventory_overviewFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
|
||||||
select?: Inventory_overviewCountAggregateInputType | true
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface inventory_overviewDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
||||||
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['inventory_overview'], meta: { name: 'inventory_overview' } }
|
|
||||||
/**
|
|
||||||
* Find the first Inventory_overview that matches the filter.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {inventory_overviewFindFirstArgs} args - Arguments to find a Inventory_overview
|
|
||||||
* @example
|
|
||||||
* // Get one Inventory_overview
|
|
||||||
* const inventory_overview = await prisma.inventory_overview.findFirst({
|
|
||||||
* where: {
|
|
||||||
* // ... provide filter here
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
findFirst<T extends inventory_overviewFindFirstArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, inventory_overviewFindFirstArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__inventory_overviewClient<runtime.Types.Result.GetResult<Prisma.$inventory_overviewPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the first Inventory_overview that matches the filter or
|
|
||||||
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {inventory_overviewFindFirstOrThrowArgs} args - Arguments to find a Inventory_overview
|
|
||||||
* @example
|
|
||||||
* // Get one Inventory_overview
|
|
||||||
* const inventory_overview = await prisma.inventory_overview.findFirstOrThrow({
|
|
||||||
* where: {
|
|
||||||
* // ... provide filter here
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
findFirstOrThrow<T extends inventory_overviewFindFirstOrThrowArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, inventory_overviewFindFirstOrThrowArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__inventory_overviewClient<runtime.Types.Result.GetResult<Prisma.$inventory_overviewPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find zero or more Inventory_overviews that matches the filter.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {inventory_overviewFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
||||||
* @example
|
|
||||||
* // Get all Inventory_overviews
|
|
||||||
* const inventory_overviews = await prisma.inventory_overview.findMany()
|
|
||||||
*
|
|
||||||
* // Get first 10 Inventory_overviews
|
|
||||||
* const inventory_overviews = await prisma.inventory_overview.findMany({ take: 10 })
|
|
||||||
*
|
|
||||||
* // Only select the `ProductId`
|
|
||||||
* const inventory_overviewWithProductIdOnly = await prisma.inventory_overview.findMany({ select: { ProductId: true } })
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
findMany<T extends inventory_overviewFindManyArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, inventory_overviewFindManyArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$inventory_overviewPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Count the number of Inventory_overviews.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {inventory_overviewCountArgs} args - Arguments to filter Inventory_overviews to count.
|
|
||||||
* @example
|
|
||||||
* // Count the number of Inventory_overviews
|
|
||||||
* const count = await prisma.inventory_overview.count({
|
|
||||||
* where: {
|
|
||||||
* // ... the filter for the Inventory_overviews we want to count
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
**/
|
|
||||||
count<T extends inventory_overviewCountArgs>(
|
|
||||||
args?: Prisma.Subset<T, inventory_overviewCountArgs>,
|
|
||||||
): Prisma.PrismaPromise<
|
|
||||||
T extends runtime.Types.Utils.Record<'select', any>
|
|
||||||
? T['select'] extends true
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T['select'], Inventory_overviewCountAggregateOutputType>
|
|
||||||
: number
|
|
||||||
>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allows you to perform aggregations operations on a Inventory_overview.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {Inventory_overviewAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
|
|
||||||
* @example
|
|
||||||
* // Ordered by age ascending
|
|
||||||
* // Where email contains prisma.io
|
|
||||||
* // Limited to the 10 users
|
|
||||||
* const aggregations = await prisma.user.aggregate({
|
|
||||||
* _avg: {
|
|
||||||
* age: true,
|
|
||||||
* },
|
|
||||||
* where: {
|
|
||||||
* email: {
|
|
||||||
* contains: "prisma.io",
|
|
||||||
* },
|
|
||||||
* },
|
|
||||||
* orderBy: {
|
|
||||||
* age: "asc",
|
|
||||||
* },
|
|
||||||
* take: 10,
|
|
||||||
* })
|
|
||||||
**/
|
|
||||||
aggregate<T extends Inventory_overviewAggregateArgs>(args: Prisma.Subset<T, Inventory_overviewAggregateArgs>): Prisma.PrismaPromise<GetInventory_overviewAggregateType<T>>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Group by Inventory_overview.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {inventory_overviewGroupByArgs} args - Group by arguments.
|
|
||||||
* @example
|
|
||||||
* // Group by city, order by createdAt, get count
|
|
||||||
* const result = await prisma.user.groupBy({
|
|
||||||
* by: ['city', 'createdAt'],
|
|
||||||
* orderBy: {
|
|
||||||
* createdAt: true
|
|
||||||
* },
|
|
||||||
* _count: {
|
|
||||||
* _all: true
|
|
||||||
* },
|
|
||||||
* })
|
|
||||||
*
|
|
||||||
**/
|
|
||||||
groupBy<
|
|
||||||
T extends inventory_overviewGroupByArgs,
|
|
||||||
HasSelectOrTake extends Prisma.Or<
|
|
||||||
Prisma.Extends<'skip', Prisma.Keys<T>>,
|
|
||||||
Prisma.Extends<'take', Prisma.Keys<T>>
|
|
||||||
>,
|
|
||||||
OrderByArg extends Prisma.True extends HasSelectOrTake
|
|
||||||
? { orderBy: inventory_overviewGroupByArgs['orderBy'] }
|
|
||||||
: { orderBy?: inventory_overviewGroupByArgs['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, inventory_overviewGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetInventory_overviewGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
||||||
/**
|
|
||||||
* Fields of the inventory_overview model
|
|
||||||
*/
|
|
||||||
readonly fields: inventory_overviewFieldRefs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The delegate class that acts as a "Promise-like" for inventory_overview.
|
|
||||||
* Why is this prefixed with `Prisma__`?
|
|
||||||
* Because we want to prevent naming conflicts as mentioned in
|
|
||||||
* https://github.com/prisma/prisma-client-js/issues/707
|
|
||||||
*/
|
|
||||||
export interface Prisma__inventory_overviewClient<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 inventory_overview model
|
|
||||||
*/
|
|
||||||
export interface inventory_overviewFieldRefs {
|
|
||||||
readonly ProductId: Prisma.FieldRef<"inventory_overview", 'Int'>
|
|
||||||
readonly stock_quantity: Prisma.FieldRef<"inventory_overview", 'Decimal'>
|
|
||||||
readonly avgCost: Prisma.FieldRef<"inventory_overview", 'Decimal'>
|
|
||||||
readonly totalCost: Prisma.FieldRef<"inventory_overview", 'Decimal'>
|
|
||||||
readonly updatedAt: Prisma.FieldRef<"inventory_overview", 'DateTime'>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Custom InputTypes
|
|
||||||
/**
|
|
||||||
* inventory_overview findFirst
|
|
||||||
*/
|
|
||||||
export type inventory_overviewFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the inventory_overview
|
|
||||||
*/
|
|
||||||
select?: Prisma.inventory_overviewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the inventory_overview
|
|
||||||
*/
|
|
||||||
omit?: Prisma.inventory_overviewOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which inventory_overview to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.inventory_overviewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of inventory_overviews to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.inventory_overviewOrderByWithRelationInput | Prisma.inventory_overviewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` inventory_overviews from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` inventory_overviews.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
||||||
*
|
|
||||||
* Filter by unique combinations of inventory_overviews.
|
|
||||||
*/
|
|
||||||
distinct?: Prisma.Inventory_overviewScalarFieldEnum | Prisma.Inventory_overviewScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* inventory_overview findFirstOrThrow
|
|
||||||
*/
|
|
||||||
export type inventory_overviewFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the inventory_overview
|
|
||||||
*/
|
|
||||||
select?: Prisma.inventory_overviewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the inventory_overview
|
|
||||||
*/
|
|
||||||
omit?: Prisma.inventory_overviewOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which inventory_overview to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.inventory_overviewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of inventory_overviews to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.inventory_overviewOrderByWithRelationInput | Prisma.inventory_overviewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` inventory_overviews from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` inventory_overviews.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
||||||
*
|
|
||||||
* Filter by unique combinations of inventory_overviews.
|
|
||||||
*/
|
|
||||||
distinct?: Prisma.Inventory_overviewScalarFieldEnum | Prisma.Inventory_overviewScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* inventory_overview findMany
|
|
||||||
*/
|
|
||||||
export type inventory_overviewFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the inventory_overview
|
|
||||||
*/
|
|
||||||
select?: Prisma.inventory_overviewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the inventory_overview
|
|
||||||
*/
|
|
||||||
omit?: Prisma.inventory_overviewOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which inventory_overviews to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.inventory_overviewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of inventory_overviews to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.inventory_overviewOrderByWithRelationInput | Prisma.inventory_overviewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` inventory_overviews from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` inventory_overviews.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
distinct?: Prisma.Inventory_overviewScalarFieldEnum | Prisma.Inventory_overviewScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* inventory_overview without action
|
|
||||||
*/
|
|
||||||
export type inventory_overviewDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the inventory_overview
|
|
||||||
*/
|
|
||||||
select?: Prisma.inventory_overviewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the inventory_overview
|
|
||||||
*/
|
|
||||||
omit?: Prisma.inventory_overviewOmit<ExtArgs> | null
|
|
||||||
}
|
|
||||||
@@ -1,803 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* This file exports the `stock_cardex` model and its related types.
|
|
||||||
*
|
|
||||||
* 🟢 You can import this file directly.
|
|
||||||
*/
|
|
||||||
import type * as runtime from "@prisma/client/runtime/client"
|
|
||||||
import type * as $Enums from "../enums.js"
|
|
||||||
import type * as Prisma from "../internal/prismaNamespace.js"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model stock_cardex
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type stock_cardexModel = runtime.Types.Result.DefaultSelection<Prisma.$stock_cardexPayload>
|
|
||||||
|
|
||||||
export type AggregateStock_cardex = {
|
|
||||||
_count: Stock_cardexCountAggregateOutputType | null
|
|
||||||
_avg: Stock_cardexAvgAggregateOutputType | null
|
|
||||||
_sum: Stock_cardexSumAggregateOutputType | null
|
|
||||||
_min: Stock_cardexMinAggregateOutputType | null
|
|
||||||
_max: Stock_cardexMaxAggregateOutputType | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexAvgAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
movement_id: number | null
|
|
||||||
quantity: runtime.Decimal | null
|
|
||||||
fee: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
|
||||||
balance_quantity: runtime.Decimal | null
|
|
||||||
balance_avg_cost: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexSumAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
movement_id: number | null
|
|
||||||
quantity: runtime.Decimal | null
|
|
||||||
fee: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
|
||||||
balance_quantity: runtime.Decimal | null
|
|
||||||
balance_avg_cost: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexMinAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
movement_id: number | null
|
|
||||||
type: $Enums.stock_cardex_type | null
|
|
||||||
quantity: runtime.Decimal | null
|
|
||||||
fee: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
|
||||||
balance_quantity: runtime.Decimal | null
|
|
||||||
balance_avg_cost: runtime.Decimal | null
|
|
||||||
createdAt: Date | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexMaxAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
movement_id: number | null
|
|
||||||
type: $Enums.stock_cardex_type | null
|
|
||||||
quantity: runtime.Decimal | null
|
|
||||||
fee: runtime.Decimal | null
|
|
||||||
totalCost: runtime.Decimal | null
|
|
||||||
balance_quantity: runtime.Decimal | null
|
|
||||||
balance_avg_cost: runtime.Decimal | null
|
|
||||||
createdAt: Date | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexCountAggregateOutputType = {
|
|
||||||
productId: number
|
|
||||||
movement_id: number
|
|
||||||
type: number
|
|
||||||
quantity: number
|
|
||||||
fee: number
|
|
||||||
totalCost: number
|
|
||||||
balance_quantity: number
|
|
||||||
balance_avg_cost: number
|
|
||||||
createdAt: number
|
|
||||||
_all: number
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export type Stock_cardexAvgAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
movement_id?: true
|
|
||||||
quantity?: true
|
|
||||||
fee?: true
|
|
||||||
totalCost?: true
|
|
||||||
balance_quantity?: true
|
|
||||||
balance_avg_cost?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexSumAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
movement_id?: true
|
|
||||||
quantity?: true
|
|
||||||
fee?: true
|
|
||||||
totalCost?: true
|
|
||||||
balance_quantity?: true
|
|
||||||
balance_avg_cost?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexMinAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
movement_id?: true
|
|
||||||
type?: true
|
|
||||||
quantity?: true
|
|
||||||
fee?: true
|
|
||||||
totalCost?: true
|
|
||||||
balance_quantity?: true
|
|
||||||
balance_avg_cost?: true
|
|
||||||
createdAt?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexMaxAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
movement_id?: true
|
|
||||||
type?: true
|
|
||||||
quantity?: true
|
|
||||||
fee?: true
|
|
||||||
totalCost?: true
|
|
||||||
balance_quantity?: true
|
|
||||||
balance_avg_cost?: true
|
|
||||||
createdAt?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexCountAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
movement_id?: true
|
|
||||||
type?: true
|
|
||||||
quantity?: true
|
|
||||||
fee?: true
|
|
||||||
totalCost?: true
|
|
||||||
balance_quantity?: true
|
|
||||||
balance_avg_cost?: true
|
|
||||||
createdAt?: true
|
|
||||||
_all?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Filter which stock_cardex to aggregate.
|
|
||||||
*/
|
|
||||||
where?: Prisma.stock_cardexWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of stock_cardexes to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` stock_cardexes from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` stock_cardexes.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Count returned stock_cardexes
|
|
||||||
**/
|
|
||||||
_count?: true | Stock_cardexCountAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to average
|
|
||||||
**/
|
|
||||||
_avg?: Stock_cardexAvgAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to sum
|
|
||||||
**/
|
|
||||||
_sum?: Stock_cardexSumAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to find the minimum value
|
|
||||||
**/
|
|
||||||
_min?: Stock_cardexMinAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to find the maximum value
|
|
||||||
**/
|
|
||||||
_max?: Stock_cardexMaxAggregateInputType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type GetStock_cardexAggregateType<T extends Stock_cardexAggregateArgs> = {
|
|
||||||
[P in keyof T & keyof AggregateStock_cardex]: P extends '_count' | 'count'
|
|
||||||
? T[P] extends true
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T[P], AggregateStock_cardex[P]>
|
|
||||||
: Prisma.GetScalarType<T[P], AggregateStock_cardex[P]>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type stock_cardexGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
where?: Prisma.stock_cardexWhereInput
|
|
||||||
orderBy?: Prisma.stock_cardexOrderByWithAggregationInput | Prisma.stock_cardexOrderByWithAggregationInput[]
|
|
||||||
by: Prisma.Stock_cardexScalarFieldEnum[] | Prisma.Stock_cardexScalarFieldEnum
|
|
||||||
having?: Prisma.stock_cardexScalarWhereWithAggregatesInput
|
|
||||||
take?: number
|
|
||||||
skip?: number
|
|
||||||
_count?: Stock_cardexCountAggregateInputType | true
|
|
||||||
_avg?: Stock_cardexAvgAggregateInputType
|
|
||||||
_sum?: Stock_cardexSumAggregateInputType
|
|
||||||
_min?: Stock_cardexMinAggregateInputType
|
|
||||||
_max?: Stock_cardexMaxAggregateInputType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_cardexGroupByOutputType = {
|
|
||||||
productId: number
|
|
||||||
movement_id: number
|
|
||||||
type: $Enums.stock_cardex_type
|
|
||||||
quantity: runtime.Decimal
|
|
||||||
fee: runtime.Decimal
|
|
||||||
totalCost: runtime.Decimal
|
|
||||||
balance_quantity: runtime.Decimal | null
|
|
||||||
balance_avg_cost: runtime.Decimal | null
|
|
||||||
createdAt: Date
|
|
||||||
_count: Stock_cardexCountAggregateOutputType | null
|
|
||||||
_avg: Stock_cardexAvgAggregateOutputType | null
|
|
||||||
_sum: Stock_cardexSumAggregateOutputType | null
|
|
||||||
_min: Stock_cardexMinAggregateOutputType | null
|
|
||||||
_max: Stock_cardexMaxAggregateOutputType | null
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetStock_cardexGroupByPayload<T extends stock_cardexGroupByArgs> = Prisma.PrismaPromise<
|
|
||||||
Array<
|
|
||||||
Prisma.PickEnumerable<Stock_cardexGroupByOutputType, T['by']> &
|
|
||||||
{
|
|
||||||
[P in ((keyof T) & (keyof Stock_cardexGroupByOutputType))]: P extends '_count'
|
|
||||||
? T[P] extends boolean
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T[P], Stock_cardexGroupByOutputType[P]>
|
|
||||||
: Prisma.GetScalarType<T[P], Stock_cardexGroupByOutputType[P]>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type stock_cardexWhereInput = {
|
|
||||||
AND?: Prisma.stock_cardexWhereInput | Prisma.stock_cardexWhereInput[]
|
|
||||||
OR?: Prisma.stock_cardexWhereInput[]
|
|
||||||
NOT?: Prisma.stock_cardexWhereInput | Prisma.stock_cardexWhereInput[]
|
|
||||||
productId?: Prisma.IntFilter<"stock_cardex"> | number
|
|
||||||
movement_id?: Prisma.IntFilter<"stock_cardex"> | number
|
|
||||||
type?: Prisma.Enumstock_cardex_typeFilter<"stock_cardex"> | $Enums.stock_cardex_type
|
|
||||||
quantity?: Prisma.DecimalFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
fee?: Prisma.DecimalFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
balance_quantity?: Prisma.DecimalNullableFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
balance_avg_cost?: Prisma.DecimalNullableFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
createdAt?: Prisma.DateTimeFilter<"stock_cardex"> | Date | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexOrderByWithRelationInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
movement_id?: Prisma.SortOrder
|
|
||||||
type?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
|
||||||
fee?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
balance_quantity?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
balance_avg_cost?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexOrderByWithAggregationInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
movement_id?: Prisma.SortOrder
|
|
||||||
type?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
|
||||||
fee?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
balance_quantity?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
balance_avg_cost?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
_count?: Prisma.stock_cardexCountOrderByAggregateInput
|
|
||||||
_avg?: Prisma.stock_cardexAvgOrderByAggregateInput
|
|
||||||
_max?: Prisma.stock_cardexMaxOrderByAggregateInput
|
|
||||||
_min?: Prisma.stock_cardexMinOrderByAggregateInput
|
|
||||||
_sum?: Prisma.stock_cardexSumOrderByAggregateInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexScalarWhereWithAggregatesInput = {
|
|
||||||
AND?: Prisma.stock_cardexScalarWhereWithAggregatesInput | Prisma.stock_cardexScalarWhereWithAggregatesInput[]
|
|
||||||
OR?: Prisma.stock_cardexScalarWhereWithAggregatesInput[]
|
|
||||||
NOT?: Prisma.stock_cardexScalarWhereWithAggregatesInput | Prisma.stock_cardexScalarWhereWithAggregatesInput[]
|
|
||||||
productId?: Prisma.IntWithAggregatesFilter<"stock_cardex"> | number
|
|
||||||
movement_id?: Prisma.IntWithAggregatesFilter<"stock_cardex"> | number
|
|
||||||
type?: Prisma.Enumstock_cardex_typeWithAggregatesFilter<"stock_cardex"> | $Enums.stock_cardex_type
|
|
||||||
quantity?: Prisma.DecimalWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
fee?: Prisma.DecimalWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
totalCost?: Prisma.DecimalWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
balance_quantity?: Prisma.DecimalNullableWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
balance_avg_cost?: Prisma.DecimalNullableWithAggregatesFilter<"stock_cardex"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"stock_cardex"> | Date | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexCountOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
movement_id?: Prisma.SortOrder
|
|
||||||
type?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
|
||||||
fee?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
balance_quantity?: Prisma.SortOrder
|
|
||||||
balance_avg_cost?: Prisma.SortOrder
|
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexAvgOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
movement_id?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
|
||||||
fee?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
balance_quantity?: Prisma.SortOrder
|
|
||||||
balance_avg_cost?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexMaxOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
movement_id?: Prisma.SortOrder
|
|
||||||
type?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
|
||||||
fee?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
balance_quantity?: Prisma.SortOrder
|
|
||||||
balance_avg_cost?: Prisma.SortOrder
|
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexMinOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
movement_id?: Prisma.SortOrder
|
|
||||||
type?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
|
||||||
fee?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
balance_quantity?: Prisma.SortOrder
|
|
||||||
balance_avg_cost?: Prisma.SortOrder
|
|
||||||
createdAt?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexSumOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
movement_id?: Prisma.SortOrder
|
|
||||||
quantity?: Prisma.SortOrder
|
|
||||||
fee?: Prisma.SortOrder
|
|
||||||
totalCost?: Prisma.SortOrder
|
|
||||||
balance_quantity?: Prisma.SortOrder
|
|
||||||
balance_avg_cost?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type stock_cardexSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
||||||
productId?: boolean
|
|
||||||
movement_id?: boolean
|
|
||||||
type?: boolean
|
|
||||||
quantity?: boolean
|
|
||||||
fee?: boolean
|
|
||||||
totalCost?: boolean
|
|
||||||
balance_quantity?: boolean
|
|
||||||
balance_avg_cost?: boolean
|
|
||||||
createdAt?: boolean
|
|
||||||
}, ExtArgs["result"]["stock_cardex"]>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type stock_cardexSelectScalar = {
|
|
||||||
productId?: boolean
|
|
||||||
movement_id?: boolean
|
|
||||||
type?: boolean
|
|
||||||
quantity?: boolean
|
|
||||||
fee?: boolean
|
|
||||||
totalCost?: boolean
|
|
||||||
balance_quantity?: boolean
|
|
||||||
balance_avg_cost?: boolean
|
|
||||||
createdAt?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"productId" | "movement_id" | "type" | "quantity" | "fee" | "totalCost" | "balance_quantity" | "balance_avg_cost" | "createdAt", ExtArgs["result"]["stock_cardex"]>
|
|
||||||
|
|
||||||
export type $stock_cardexPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
name: "stock_cardex"
|
|
||||||
objects: {}
|
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
|
||||||
productId: number
|
|
||||||
movement_id: number
|
|
||||||
type: $Enums.stock_cardex_type
|
|
||||||
quantity: runtime.Decimal
|
|
||||||
fee: runtime.Decimal
|
|
||||||
totalCost: runtime.Decimal
|
|
||||||
balance_quantity: runtime.Decimal | null
|
|
||||||
balance_avg_cost: runtime.Decimal | null
|
|
||||||
createdAt: Date
|
|
||||||
}, ExtArgs["result"]["stock_cardex"]>
|
|
||||||
composites: {}
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_cardexGetPayload<S extends boolean | null | undefined | stock_cardexDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$stock_cardexPayload, S>
|
|
||||||
|
|
||||||
export type stock_cardexCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
|
|
||||||
Omit<stock_cardexFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
|
||||||
select?: Stock_cardexCountAggregateInputType | true
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface stock_cardexDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
||||||
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['stock_cardex'], meta: { name: 'stock_cardex' } }
|
|
||||||
/**
|
|
||||||
* Find the first Stock_cardex that matches the filter.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_cardexFindFirstArgs} args - Arguments to find a Stock_cardex
|
|
||||||
* @example
|
|
||||||
* // Get one Stock_cardex
|
|
||||||
* const stock_cardex = await prisma.stock_cardex.findFirst({
|
|
||||||
* where: {
|
|
||||||
* // ... provide filter here
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
findFirst<T extends stock_cardexFindFirstArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, stock_cardexFindFirstArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_cardexClient<runtime.Types.Result.GetResult<Prisma.$stock_cardexPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the first Stock_cardex that matches the filter or
|
|
||||||
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_cardexFindFirstOrThrowArgs} args - Arguments to find a Stock_cardex
|
|
||||||
* @example
|
|
||||||
* // Get one Stock_cardex
|
|
||||||
* const stock_cardex = await prisma.stock_cardex.findFirstOrThrow({
|
|
||||||
* where: {
|
|
||||||
* // ... provide filter here
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
findFirstOrThrow<T extends stock_cardexFindFirstOrThrowArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, stock_cardexFindFirstOrThrowArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_cardexClient<runtime.Types.Result.GetResult<Prisma.$stock_cardexPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find zero or more Stock_cardexes that matches the filter.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_cardexFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
||||||
* @example
|
|
||||||
* // Get all Stock_cardexes
|
|
||||||
* const stock_cardexes = await prisma.stock_cardex.findMany()
|
|
||||||
*
|
|
||||||
* // Get first 10 Stock_cardexes
|
|
||||||
* const stock_cardexes = await prisma.stock_cardex.findMany({ take: 10 })
|
|
||||||
*
|
|
||||||
* // Only select the `productId`
|
|
||||||
* const stock_cardexWithProductIdOnly = await prisma.stock_cardex.findMany({ select: { productId: true } })
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
findMany<T extends stock_cardexFindManyArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, stock_cardexFindManyArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$stock_cardexPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Count the number of Stock_cardexes.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_cardexCountArgs} args - Arguments to filter Stock_cardexes to count.
|
|
||||||
* @example
|
|
||||||
* // Count the number of Stock_cardexes
|
|
||||||
* const count = await prisma.stock_cardex.count({
|
|
||||||
* where: {
|
|
||||||
* // ... the filter for the Stock_cardexes we want to count
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
**/
|
|
||||||
count<T extends stock_cardexCountArgs>(
|
|
||||||
args?: Prisma.Subset<T, stock_cardexCountArgs>,
|
|
||||||
): Prisma.PrismaPromise<
|
|
||||||
T extends runtime.Types.Utils.Record<'select', any>
|
|
||||||
? T['select'] extends true
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T['select'], Stock_cardexCountAggregateOutputType>
|
|
||||||
: number
|
|
||||||
>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allows you to perform aggregations operations on a Stock_cardex.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {Stock_cardexAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
|
|
||||||
* @example
|
|
||||||
* // Ordered by age ascending
|
|
||||||
* // Where email contains prisma.io
|
|
||||||
* // Limited to the 10 users
|
|
||||||
* const aggregations = await prisma.user.aggregate({
|
|
||||||
* _avg: {
|
|
||||||
* age: true,
|
|
||||||
* },
|
|
||||||
* where: {
|
|
||||||
* email: {
|
|
||||||
* contains: "prisma.io",
|
|
||||||
* },
|
|
||||||
* },
|
|
||||||
* orderBy: {
|
|
||||||
* age: "asc",
|
|
||||||
* },
|
|
||||||
* take: 10,
|
|
||||||
* })
|
|
||||||
**/
|
|
||||||
aggregate<T extends Stock_cardexAggregateArgs>(args: Prisma.Subset<T, Stock_cardexAggregateArgs>): Prisma.PrismaPromise<GetStock_cardexAggregateType<T>>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Group by Stock_cardex.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_cardexGroupByArgs} args - Group by arguments.
|
|
||||||
* @example
|
|
||||||
* // Group by city, order by createdAt, get count
|
|
||||||
* const result = await prisma.user.groupBy({
|
|
||||||
* by: ['city', 'createdAt'],
|
|
||||||
* orderBy: {
|
|
||||||
* createdAt: true
|
|
||||||
* },
|
|
||||||
* _count: {
|
|
||||||
* _all: true
|
|
||||||
* },
|
|
||||||
* })
|
|
||||||
*
|
|
||||||
**/
|
|
||||||
groupBy<
|
|
||||||
T extends stock_cardexGroupByArgs,
|
|
||||||
HasSelectOrTake extends Prisma.Or<
|
|
||||||
Prisma.Extends<'skip', Prisma.Keys<T>>,
|
|
||||||
Prisma.Extends<'take', Prisma.Keys<T>>
|
|
||||||
>,
|
|
||||||
OrderByArg extends Prisma.True extends HasSelectOrTake
|
|
||||||
? { orderBy: stock_cardexGroupByArgs['orderBy'] }
|
|
||||||
: { orderBy?: stock_cardexGroupByArgs['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, stock_cardexGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetStock_cardexGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
||||||
/**
|
|
||||||
* Fields of the stock_cardex model
|
|
||||||
*/
|
|
||||||
readonly fields: stock_cardexFieldRefs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The delegate class that acts as a "Promise-like" for stock_cardex.
|
|
||||||
* Why is this prefixed with `Prisma__`?
|
|
||||||
* Because we want to prevent naming conflicts as mentioned in
|
|
||||||
* https://github.com/prisma/prisma-client-js/issues/707
|
|
||||||
*/
|
|
||||||
export interface Prisma__stock_cardexClient<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 stock_cardex model
|
|
||||||
*/
|
|
||||||
export interface stock_cardexFieldRefs {
|
|
||||||
readonly productId: Prisma.FieldRef<"stock_cardex", 'Int'>
|
|
||||||
readonly movement_id: Prisma.FieldRef<"stock_cardex", 'Int'>
|
|
||||||
readonly type: Prisma.FieldRef<"stock_cardex", 'stock_cardex_type'>
|
|
||||||
readonly quantity: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
|
||||||
readonly fee: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
|
||||||
readonly totalCost: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
|
||||||
readonly balance_quantity: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
|
||||||
readonly balance_avg_cost: Prisma.FieldRef<"stock_cardex", 'Decimal'>
|
|
||||||
readonly createdAt: Prisma.FieldRef<"stock_cardex", 'DateTime'>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Custom InputTypes
|
|
||||||
/**
|
|
||||||
* stock_cardex findFirst
|
|
||||||
*/
|
|
||||||
export type stock_cardexFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the stock_cardex
|
|
||||||
*/
|
|
||||||
select?: Prisma.stock_cardexSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the stock_cardex
|
|
||||||
*/
|
|
||||||
omit?: Prisma.stock_cardexOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which stock_cardex to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.stock_cardexWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of stock_cardexes to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` stock_cardexes from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` stock_cardexes.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
||||||
*
|
|
||||||
* Filter by unique combinations of stock_cardexes.
|
|
||||||
*/
|
|
||||||
distinct?: Prisma.Stock_cardexScalarFieldEnum | Prisma.Stock_cardexScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* stock_cardex findFirstOrThrow
|
|
||||||
*/
|
|
||||||
export type stock_cardexFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the stock_cardex
|
|
||||||
*/
|
|
||||||
select?: Prisma.stock_cardexSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the stock_cardex
|
|
||||||
*/
|
|
||||||
omit?: Prisma.stock_cardexOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which stock_cardex to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.stock_cardexWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of stock_cardexes to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` stock_cardexes from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` stock_cardexes.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
||||||
*
|
|
||||||
* Filter by unique combinations of stock_cardexes.
|
|
||||||
*/
|
|
||||||
distinct?: Prisma.Stock_cardexScalarFieldEnum | Prisma.Stock_cardexScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* stock_cardex findMany
|
|
||||||
*/
|
|
||||||
export type stock_cardexFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the stock_cardex
|
|
||||||
*/
|
|
||||||
select?: Prisma.stock_cardexSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the stock_cardex
|
|
||||||
*/
|
|
||||||
omit?: Prisma.stock_cardexOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which stock_cardexes to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.stock_cardexWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of stock_cardexes to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.stock_cardexOrderByWithRelationInput | Prisma.stock_cardexOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` stock_cardexes from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` stock_cardexes.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
distinct?: Prisma.Stock_cardexScalarFieldEnum | Prisma.Stock_cardexScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* stock_cardex without action
|
|
||||||
*/
|
|
||||||
export type stock_cardexDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the stock_cardex
|
|
||||||
*/
|
|
||||||
select?: Prisma.stock_cardexSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the stock_cardex
|
|
||||||
*/
|
|
||||||
omit?: Prisma.stock_cardexOmit<ExtArgs> | null
|
|
||||||
}
|
|
||||||
@@ -1,671 +0,0 @@
|
|||||||
|
|
||||||
/* !!! This is code generated by Prisma. Do not edit directly. !!! */
|
|
||||||
/* eslint-disable */
|
|
||||||
// biome-ignore-all lint: generated file
|
|
||||||
// @ts-nocheck
|
|
||||||
/*
|
|
||||||
* This file exports the `stock_view` model and its related types.
|
|
||||||
*
|
|
||||||
* 🟢 You can import this file directly.
|
|
||||||
*/
|
|
||||||
import type * as runtime from "@prisma/client/runtime/client"
|
|
||||||
import type * as $Enums from "../enums.js"
|
|
||||||
import type * as Prisma from "../internal/prismaNamespace.js"
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Model stock_view
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type stock_viewModel = runtime.Types.Result.DefaultSelection<Prisma.$stock_viewPayload>
|
|
||||||
|
|
||||||
export type AggregateStock_view = {
|
|
||||||
_count: Stock_viewCountAggregateOutputType | null
|
|
||||||
_avg: Stock_viewAvgAggregateOutputType | null
|
|
||||||
_sum: Stock_viewSumAggregateOutputType | null
|
|
||||||
_min: Stock_viewMinAggregateOutputType | null
|
|
||||||
_max: Stock_viewMaxAggregateOutputType | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewAvgAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
stock: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewSumAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
stock: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewMinAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
stock: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewMaxAggregateOutputType = {
|
|
||||||
productId: number | null
|
|
||||||
inventoryId: number | null
|
|
||||||
stock: runtime.Decimal | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewCountAggregateOutputType = {
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
stock: number
|
|
||||||
_all: number
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
export type Stock_viewAvgAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
stock?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewSumAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
stock?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewMinAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
stock?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewMaxAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
stock?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewCountAggregateInputType = {
|
|
||||||
productId?: true
|
|
||||||
inventoryId?: true
|
|
||||||
stock?: true
|
|
||||||
_all?: true
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewAggregateArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Filter which stock_view to aggregate.
|
|
||||||
*/
|
|
||||||
where?: Prisma.stock_viewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of stock_views to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.stock_viewOrderByWithRelationInput | Prisma.stock_viewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` stock_views from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` stock_views.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Count returned stock_views
|
|
||||||
**/
|
|
||||||
_count?: true | Stock_viewCountAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to average
|
|
||||||
**/
|
|
||||||
_avg?: Stock_viewAvgAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to sum
|
|
||||||
**/
|
|
||||||
_sum?: Stock_viewSumAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to find the minimum value
|
|
||||||
**/
|
|
||||||
_min?: Stock_viewMinAggregateInputType
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/aggregations Aggregation Docs}
|
|
||||||
*
|
|
||||||
* Select which fields to find the maximum value
|
|
||||||
**/
|
|
||||||
_max?: Stock_viewMaxAggregateInputType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type GetStock_viewAggregateType<T extends Stock_viewAggregateArgs> = {
|
|
||||||
[P in keyof T & keyof AggregateStock_view]: P extends '_count' | 'count'
|
|
||||||
? T[P] extends true
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T[P], AggregateStock_view[P]>
|
|
||||||
: Prisma.GetScalarType<T[P], AggregateStock_view[P]>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type stock_viewGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
where?: Prisma.stock_viewWhereInput
|
|
||||||
orderBy?: Prisma.stock_viewOrderByWithAggregationInput | Prisma.stock_viewOrderByWithAggregationInput[]
|
|
||||||
by: Prisma.Stock_viewScalarFieldEnum[] | Prisma.Stock_viewScalarFieldEnum
|
|
||||||
having?: Prisma.stock_viewScalarWhereWithAggregatesInput
|
|
||||||
take?: number
|
|
||||||
skip?: number
|
|
||||||
_count?: Stock_viewCountAggregateInputType | true
|
|
||||||
_avg?: Stock_viewAvgAggregateInputType
|
|
||||||
_sum?: Stock_viewSumAggregateInputType
|
|
||||||
_min?: Stock_viewMinAggregateInputType
|
|
||||||
_max?: Stock_viewMaxAggregateInputType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type Stock_viewGroupByOutputType = {
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
stock: runtime.Decimal | null
|
|
||||||
_count: Stock_viewCountAggregateOutputType | null
|
|
||||||
_avg: Stock_viewAvgAggregateOutputType | null
|
|
||||||
_sum: Stock_viewSumAggregateOutputType | null
|
|
||||||
_min: Stock_viewMinAggregateOutputType | null
|
|
||||||
_max: Stock_viewMaxAggregateOutputType | null
|
|
||||||
}
|
|
||||||
|
|
||||||
type GetStock_viewGroupByPayload<T extends stock_viewGroupByArgs> = Prisma.PrismaPromise<
|
|
||||||
Array<
|
|
||||||
Prisma.PickEnumerable<Stock_viewGroupByOutputType, T['by']> &
|
|
||||||
{
|
|
||||||
[P in ((keyof T) & (keyof Stock_viewGroupByOutputType))]: P extends '_count'
|
|
||||||
? T[P] extends boolean
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T[P], Stock_viewGroupByOutputType[P]>
|
|
||||||
: Prisma.GetScalarType<T[P], Stock_viewGroupByOutputType[P]>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type stock_viewWhereInput = {
|
|
||||||
AND?: Prisma.stock_viewWhereInput | Prisma.stock_viewWhereInput[]
|
|
||||||
OR?: Prisma.stock_viewWhereInput[]
|
|
||||||
NOT?: Prisma.stock_viewWhereInput | Prisma.stock_viewWhereInput[]
|
|
||||||
productId?: Prisma.IntFilter<"stock_view"> | number
|
|
||||||
inventoryId?: Prisma.IntFilter<"stock_view"> | number
|
|
||||||
stock?: Prisma.DecimalNullableFilter<"stock_view"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewOrderByWithRelationInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
stock?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewOrderByWithAggregationInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
stock?: Prisma.SortOrderInput | Prisma.SortOrder
|
|
||||||
_count?: Prisma.stock_viewCountOrderByAggregateInput
|
|
||||||
_avg?: Prisma.stock_viewAvgOrderByAggregateInput
|
|
||||||
_max?: Prisma.stock_viewMaxOrderByAggregateInput
|
|
||||||
_min?: Prisma.stock_viewMinOrderByAggregateInput
|
|
||||||
_sum?: Prisma.stock_viewSumOrderByAggregateInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewScalarWhereWithAggregatesInput = {
|
|
||||||
AND?: Prisma.stock_viewScalarWhereWithAggregatesInput | Prisma.stock_viewScalarWhereWithAggregatesInput[]
|
|
||||||
OR?: Prisma.stock_viewScalarWhereWithAggregatesInput[]
|
|
||||||
NOT?: Prisma.stock_viewScalarWhereWithAggregatesInput | Prisma.stock_viewScalarWhereWithAggregatesInput[]
|
|
||||||
productId?: Prisma.IntWithAggregatesFilter<"stock_view"> | number
|
|
||||||
inventoryId?: Prisma.IntWithAggregatesFilter<"stock_view"> | number
|
|
||||||
stock?: Prisma.DecimalNullableWithAggregatesFilter<"stock_view"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewCountOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
stock?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewAvgOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
stock?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewMaxOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
stock?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewMinOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
stock?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewSumOrderByAggregateInput = {
|
|
||||||
productId?: Prisma.SortOrder
|
|
||||||
inventoryId?: Prisma.SortOrder
|
|
||||||
stock?: Prisma.SortOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type stock_viewSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
|
||||||
productId?: boolean
|
|
||||||
inventoryId?: boolean
|
|
||||||
stock?: boolean
|
|
||||||
}, ExtArgs["result"]["stock_view"]>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export type stock_viewSelectScalar = {
|
|
||||||
productId?: boolean
|
|
||||||
inventoryId?: boolean
|
|
||||||
stock?: boolean
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"productId" | "inventoryId" | "stock", ExtArgs["result"]["stock_view"]>
|
|
||||||
|
|
||||||
export type $stock_viewPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
name: "stock_view"
|
|
||||||
objects: {}
|
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
|
||||||
productId: number
|
|
||||||
inventoryId: number
|
|
||||||
stock: runtime.Decimal | null
|
|
||||||
}, ExtArgs["result"]["stock_view"]>
|
|
||||||
composites: {}
|
|
||||||
}
|
|
||||||
|
|
||||||
export type stock_viewGetPayload<S extends boolean | null | undefined | stock_viewDefaultArgs> = runtime.Types.Result.GetResult<Prisma.$stock_viewPayload, S>
|
|
||||||
|
|
||||||
export type stock_viewCountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> =
|
|
||||||
Omit<stock_viewFindManyArgs, 'select' | 'include' | 'distinct' | 'omit'> & {
|
|
||||||
select?: Stock_viewCountAggregateInputType | true
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface stock_viewDelegate<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> {
|
|
||||||
[K: symbol]: { types: Prisma.TypeMap<ExtArgs>['model']['stock_view'], meta: { name: 'stock_view' } }
|
|
||||||
/**
|
|
||||||
* Find the first Stock_view that matches the filter.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_viewFindFirstArgs} args - Arguments to find a Stock_view
|
|
||||||
* @example
|
|
||||||
* // Get one Stock_view
|
|
||||||
* const stock_view = await prisma.stock_view.findFirst({
|
|
||||||
* where: {
|
|
||||||
* // ... provide filter here
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
findFirst<T extends stock_viewFindFirstArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, stock_viewFindFirstArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_viewClient<runtime.Types.Result.GetResult<Prisma.$stock_viewPayload<ExtArgs>, T, "findFirst", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find the first Stock_view that matches the filter or
|
|
||||||
* throw `PrismaKnownClientError` with `P2025` code if no matches were found.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_viewFindFirstOrThrowArgs} args - Arguments to find a Stock_view
|
|
||||||
* @example
|
|
||||||
* // Get one Stock_view
|
|
||||||
* const stock_view = await prisma.stock_view.findFirstOrThrow({
|
|
||||||
* where: {
|
|
||||||
* // ... provide filter here
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
*/
|
|
||||||
findFirstOrThrow<T extends stock_viewFindFirstOrThrowArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, stock_viewFindFirstOrThrowArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.Prisma__stock_viewClient<runtime.Types.Result.GetResult<Prisma.$stock_viewPayload<ExtArgs>, T, "findFirstOrThrow", GlobalOmitOptions>, never, ExtArgs, GlobalOmitOptions>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Find zero or more Stock_views that matches the filter.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_viewFindManyArgs} args - Arguments to filter and select certain fields only.
|
|
||||||
* @example
|
|
||||||
* // Get all Stock_views
|
|
||||||
* const stock_views = await prisma.stock_view.findMany()
|
|
||||||
*
|
|
||||||
* // Get first 10 Stock_views
|
|
||||||
* const stock_views = await prisma.stock_view.findMany({ take: 10 })
|
|
||||||
*
|
|
||||||
* // Only select the `productId`
|
|
||||||
* const stock_viewWithProductIdOnly = await prisma.stock_view.findMany({ select: { productId: true } })
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
findMany<T extends stock_viewFindManyArgs, TakeDependenciesValidator extends "take" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}, SkipDependenciesValidator extends "skip" extends Prisma.Keys<T> ? {
|
|
||||||
orderBy: {}
|
|
||||||
} : {}>(args?: Prisma.SelectSubset<T, stock_viewFindManyArgs<ExtArgs>> & TakeDependenciesValidator & SkipDependenciesValidator): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$stock_viewPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Count the number of Stock_views.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_viewCountArgs} args - Arguments to filter Stock_views to count.
|
|
||||||
* @example
|
|
||||||
* // Count the number of Stock_views
|
|
||||||
* const count = await prisma.stock_view.count({
|
|
||||||
* where: {
|
|
||||||
* // ... the filter for the Stock_views we want to count
|
|
||||||
* }
|
|
||||||
* })
|
|
||||||
**/
|
|
||||||
count<T extends stock_viewCountArgs>(
|
|
||||||
args?: Prisma.Subset<T, stock_viewCountArgs>,
|
|
||||||
): Prisma.PrismaPromise<
|
|
||||||
T extends runtime.Types.Utils.Record<'select', any>
|
|
||||||
? T['select'] extends true
|
|
||||||
? number
|
|
||||||
: Prisma.GetScalarType<T['select'], Stock_viewCountAggregateOutputType>
|
|
||||||
: number
|
|
||||||
>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Allows you to perform aggregations operations on a Stock_view.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {Stock_viewAggregateArgs} args - Select which aggregations you would like to apply and on what fields.
|
|
||||||
* @example
|
|
||||||
* // Ordered by age ascending
|
|
||||||
* // Where email contains prisma.io
|
|
||||||
* // Limited to the 10 users
|
|
||||||
* const aggregations = await prisma.user.aggregate({
|
|
||||||
* _avg: {
|
|
||||||
* age: true,
|
|
||||||
* },
|
|
||||||
* where: {
|
|
||||||
* email: {
|
|
||||||
* contains: "prisma.io",
|
|
||||||
* },
|
|
||||||
* },
|
|
||||||
* orderBy: {
|
|
||||||
* age: "asc",
|
|
||||||
* },
|
|
||||||
* take: 10,
|
|
||||||
* })
|
|
||||||
**/
|
|
||||||
aggregate<T extends Stock_viewAggregateArgs>(args: Prisma.Subset<T, Stock_viewAggregateArgs>): Prisma.PrismaPromise<GetStock_viewAggregateType<T>>
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Group by Stock_view.
|
|
||||||
* Note, that providing `undefined` is treated as the value not being there.
|
|
||||||
* Read more here: https://pris.ly/d/null-undefined
|
|
||||||
* @param {stock_viewGroupByArgs} args - Group by arguments.
|
|
||||||
* @example
|
|
||||||
* // Group by city, order by createdAt, get count
|
|
||||||
* const result = await prisma.user.groupBy({
|
|
||||||
* by: ['city', 'createdAt'],
|
|
||||||
* orderBy: {
|
|
||||||
* createdAt: true
|
|
||||||
* },
|
|
||||||
* _count: {
|
|
||||||
* _all: true
|
|
||||||
* },
|
|
||||||
* })
|
|
||||||
*
|
|
||||||
**/
|
|
||||||
groupBy<
|
|
||||||
T extends stock_viewGroupByArgs,
|
|
||||||
HasSelectOrTake extends Prisma.Or<
|
|
||||||
Prisma.Extends<'skip', Prisma.Keys<T>>,
|
|
||||||
Prisma.Extends<'take', Prisma.Keys<T>>
|
|
||||||
>,
|
|
||||||
OrderByArg extends Prisma.True extends HasSelectOrTake
|
|
||||||
? { orderBy: stock_viewGroupByArgs['orderBy'] }
|
|
||||||
: { orderBy?: stock_viewGroupByArgs['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, stock_viewGroupByArgs, OrderByArg> & InputErrors): {} extends InputErrors ? GetStock_viewGroupByPayload<T> : Prisma.PrismaPromise<InputErrors>
|
|
||||||
/**
|
|
||||||
* Fields of the stock_view model
|
|
||||||
*/
|
|
||||||
readonly fields: stock_viewFieldRefs;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* The delegate class that acts as a "Promise-like" for stock_view.
|
|
||||||
* Why is this prefixed with `Prisma__`?
|
|
||||||
* Because we want to prevent naming conflicts as mentioned in
|
|
||||||
* https://github.com/prisma/prisma-client-js/issues/707
|
|
||||||
*/
|
|
||||||
export interface Prisma__stock_viewClient<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 stock_view model
|
|
||||||
*/
|
|
||||||
export interface stock_viewFieldRefs {
|
|
||||||
readonly productId: Prisma.FieldRef<"stock_view", 'Int'>
|
|
||||||
readonly inventoryId: Prisma.FieldRef<"stock_view", 'Int'>
|
|
||||||
readonly stock: Prisma.FieldRef<"stock_view", 'Decimal'>
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Custom InputTypes
|
|
||||||
/**
|
|
||||||
* stock_view findFirst
|
|
||||||
*/
|
|
||||||
export type stock_viewFindFirstArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the stock_view
|
|
||||||
*/
|
|
||||||
select?: Prisma.stock_viewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the stock_view
|
|
||||||
*/
|
|
||||||
omit?: Prisma.stock_viewOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which stock_view to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.stock_viewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of stock_views to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.stock_viewOrderByWithRelationInput | Prisma.stock_viewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` stock_views from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` stock_views.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
||||||
*
|
|
||||||
* Filter by unique combinations of stock_views.
|
|
||||||
*/
|
|
||||||
distinct?: Prisma.Stock_viewScalarFieldEnum | Prisma.Stock_viewScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* stock_view findFirstOrThrow
|
|
||||||
*/
|
|
||||||
export type stock_viewFindFirstOrThrowArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the stock_view
|
|
||||||
*/
|
|
||||||
select?: Prisma.stock_viewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the stock_view
|
|
||||||
*/
|
|
||||||
omit?: Prisma.stock_viewOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which stock_view to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.stock_viewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of stock_views to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.stock_viewOrderByWithRelationInput | Prisma.stock_viewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` stock_views from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` stock_views.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/distinct Distinct Docs}
|
|
||||||
*
|
|
||||||
* Filter by unique combinations of stock_views.
|
|
||||||
*/
|
|
||||||
distinct?: Prisma.Stock_viewScalarFieldEnum | Prisma.Stock_viewScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* stock_view findMany
|
|
||||||
*/
|
|
||||||
export type stock_viewFindManyArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the stock_view
|
|
||||||
*/
|
|
||||||
select?: Prisma.stock_viewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the stock_view
|
|
||||||
*/
|
|
||||||
omit?: Prisma.stock_viewOmit<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Filter, which stock_views to fetch.
|
|
||||||
*/
|
|
||||||
where?: Prisma.stock_viewWhereInput
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/sorting Sorting Docs}
|
|
||||||
*
|
|
||||||
* Determine the order of stock_views to fetch.
|
|
||||||
*/
|
|
||||||
orderBy?: Prisma.stock_viewOrderByWithRelationInput | Prisma.stock_viewOrderByWithRelationInput[]
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Take `±n` stock_views from the position of the cursor.
|
|
||||||
*/
|
|
||||||
take?: number
|
|
||||||
/**
|
|
||||||
* {@link https://www.prisma.io/docs/concepts/components/prisma-client/pagination Pagination Docs}
|
|
||||||
*
|
|
||||||
* Skip the first `n` stock_views.
|
|
||||||
*/
|
|
||||||
skip?: number
|
|
||||||
distinct?: Prisma.Stock_viewScalarFieldEnum | Prisma.Stock_viewScalarFieldEnum[]
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* stock_view without action
|
|
||||||
*/
|
|
||||||
export type stock_viewDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
|
||||||
/**
|
|
||||||
* Select specific fields to fetch from the stock_view
|
|
||||||
*/
|
|
||||||
select?: Prisma.stock_viewSelect<ExtArgs> | null
|
|
||||||
/**
|
|
||||||
* Omit specific fields from the stock_view
|
|
||||||
*/
|
|
||||||
omit?: Prisma.stock_viewOmit<ExtArgs> | null
|
|
||||||
}
|
|
||||||
@@ -179,4 +179,11 @@ export class InventoriesService {
|
|||||||
|
|
||||||
return ResponseMapper.list(mapped)
|
return ResponseMapper.list(mapped)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getInventoryBankAccounts(inventoryId: number) {
|
||||||
|
const items = await this.prisma.bankAccount.findMany({
|
||||||
|
where: { inventoryBankAccounts: { some: { inventoryId } } },
|
||||||
|
})
|
||||||
|
return ResponseMapper.list(items)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
|
||||||
|
import { BankAccountsService } from './bank-accounts.service'
|
||||||
|
import { CreateBankAccountDto } from './dto/create-bank-account.dto'
|
||||||
|
import { UpdateBankAccountDto } from './dto/update-bank-account.dto'
|
||||||
|
|
||||||
|
@Controller('bank-accounts')
|
||||||
|
export class BankAccountsController {
|
||||||
|
constructor(private readonly bankAccountsService: BankAccountsService) {}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
create(@Body() dto: CreateBankAccountDto) {
|
||||||
|
return this.bankAccountsService.create(dto)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
findAll() {
|
||||||
|
return this.bankAccountsService.findAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
findOne(@Param('id') id: string) {
|
||||||
|
return this.bankAccountsService.findOne(Number(id))
|
||||||
|
}
|
||||||
|
|
||||||
|
@Patch(':id')
|
||||||
|
update(@Param('id') id: string, @Body() dto: UpdateBankAccountDto) {
|
||||||
|
return this.bankAccountsService.update(Number(id), dto)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Delete(':id')
|
||||||
|
remove(@Param('id') id: string) {
|
||||||
|
return this.bankAccountsService.remove(Number(id))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { PrismaModule } from '../../prisma/prisma.module'
|
||||||
|
import { BankAccountsController } from './bank-accounts.controller'
|
||||||
|
import { BankAccountsService } from './bank-accounts.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [PrismaModule],
|
||||||
|
controllers: [BankAccountsController],
|
||||||
|
providers: [BankAccountsService],
|
||||||
|
})
|
||||||
|
export class BankAccountsModule {}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { ResponseMapper } from '../../common/response/response-mapper'
|
||||||
|
import { PrismaService } from '../../prisma/prisma.service'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class BankAccountsService {
|
||||||
|
constructor(private prisma: PrismaService) {}
|
||||||
|
async create(data: any) {
|
||||||
|
const item = await this.prisma.bankAccount.create({ data })
|
||||||
|
return ResponseMapper.create(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
async findAll() {
|
||||||
|
const items = await this.prisma.bankAccount.findMany({
|
||||||
|
include: {
|
||||||
|
branch: {
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
name: true,
|
||||||
|
code: true,
|
||||||
|
bank: {
|
||||||
|
select: { id: true, name: true, shortName: true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
omit: {
|
||||||
|
branchId: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return ResponseMapper.list(items)
|
||||||
|
}
|
||||||
|
|
||||||
|
async findOne(id: number) {
|
||||||
|
const item = await this.prisma.bankAccount.findUnique({ where: { id } })
|
||||||
|
if (!item) return null
|
||||||
|
return ResponseMapper.single(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(id: number, data: any) {
|
||||||
|
const item = await this.prisma.bankAccount.update({ where: { id }, data })
|
||||||
|
return ResponseMapper.update(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
async remove(id: number) {
|
||||||
|
const item = await this.prisma.bankAccount.delete({ where: { id } })
|
||||||
|
return ResponseMapper.single(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import { IsInt, IsOptional, IsString } from 'class-validator'
|
||||||
|
|
||||||
|
export class CreateBankAccountDto {
|
||||||
|
@IsString()
|
||||||
|
accountNumber: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
name: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
iban: string
|
||||||
|
|
||||||
|
@IsInt()
|
||||||
|
branchId: number
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
createdAt?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
updatedAt?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
deletedAt?: string
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { PartialType } from '@nestjs/swagger'
|
||||||
|
import { CreateBankAccountDto } from './create-bank-account.dto'
|
||||||
|
|
||||||
|
export class UpdateBankAccountDto extends PartialType(CreateBankAccountDto) {}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
|
||||||
|
import { BankBranchesService } from './bank-branches.service'
|
||||||
|
import { CreateBankBranchDto } from './dto/create-bank-branches.dto'
|
||||||
|
import { UpdateBankBranchDto } from './dto/update-bank-branches.dto'
|
||||||
|
|
||||||
|
@Controller('bank-branches')
|
||||||
|
export class BankBranchesController {
|
||||||
|
constructor(private readonly bankBranchesService: BankBranchesService) {}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
create(@Body() dto: CreateBankBranchDto) {
|
||||||
|
return this.bankBranchesService.create(dto)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
findAll() {
|
||||||
|
return this.bankBranchesService.findAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
findOne(@Param('id') id: string) {
|
||||||
|
return this.bankBranchesService.findOne(Number(id))
|
||||||
|
}
|
||||||
|
|
||||||
|
@Patch(':id')
|
||||||
|
update(@Param('id') id: string, @Body() dto: UpdateBankBranchDto) {
|
||||||
|
return this.bankBranchesService.update(Number(id), dto)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Delete(':id')
|
||||||
|
remove(@Param('id') id: string) {
|
||||||
|
return this.bankBranchesService.remove(Number(id))
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { PrismaModule } from '../../prisma/prisma.module'
|
||||||
|
import { BankBranchesController } from './bank-branches.controller'
|
||||||
|
import { BankBranchesService } from './bank-branches.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [PrismaModule],
|
||||||
|
controllers: [BankBranchesController],
|
||||||
|
providers: [BankBranchesService],
|
||||||
|
})
|
||||||
|
export class BankBranchesModule {}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { ResponseMapper } from '../../common/response/response-mapper'
|
||||||
|
import { PrismaService } from '../../prisma/prisma.service'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class BankBranchesService {
|
||||||
|
constructor(private prisma: PrismaService) {}
|
||||||
|
async create(data: any) {
|
||||||
|
const item = await this.prisma.bankBranch.create({ data })
|
||||||
|
return ResponseMapper.create(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
async findAll() {
|
||||||
|
const items = await this.prisma.bankBranch.findMany({
|
||||||
|
include: {
|
||||||
|
bank: {
|
||||||
|
select: { id: true, name: true, shortName: true },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return ResponseMapper.list(items)
|
||||||
|
}
|
||||||
|
|
||||||
|
async findOne(id: number) {
|
||||||
|
const item = await this.prisma.bankBranch.findUnique({ where: { id } })
|
||||||
|
if (!item) return null
|
||||||
|
return ResponseMapper.single(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(id: number, data: any) {
|
||||||
|
const item = await this.prisma.bankBranch.update({ where: { id }, data })
|
||||||
|
return ResponseMapper.update(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
async remove(id: number) {
|
||||||
|
const item = await this.prisma.bankBranch.delete({ where: { id } })
|
||||||
|
return ResponseMapper.single(item)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { IsInt, IsString } from 'class-validator'
|
||||||
|
|
||||||
|
export class CreateBankBranchDto {
|
||||||
|
@IsString()
|
||||||
|
name: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
code: string
|
||||||
|
|
||||||
|
@IsInt()
|
||||||
|
bankId: number
|
||||||
|
}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import { IsOptional, IsString } from 'class-validator'
|
||||||
|
|
||||||
|
export class UpdateBankBranchDto {
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
name?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
description?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
imageUrl?: string
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { Controller, Get } from '@nestjs/common'
|
||||||
|
import { BanksService } from './banks.service'
|
||||||
|
|
||||||
|
@Controller('banks')
|
||||||
|
export class BanksController {
|
||||||
|
constructor(private readonly banksService: BanksService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
findAll() {
|
||||||
|
return this.banksService.findAll()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { PrismaModule } from '../../prisma/prisma.module'
|
||||||
|
import { BanksController } from './banks.controller'
|
||||||
|
import { BanksService } from './banks.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [PrismaModule],
|
||||||
|
controllers: [BanksController],
|
||||||
|
providers: [BanksService],
|
||||||
|
})
|
||||||
|
export class BanksModule {}
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { ResponseMapper } from '../../common/response/response-mapper'
|
||||||
|
import { PrismaService } from '../../prisma/prisma.service'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class BanksService {
|
||||||
|
constructor(private prisma: PrismaService) {}
|
||||||
|
|
||||||
|
async findAll() {
|
||||||
|
const items = await this.prisma.bank.findMany({
|
||||||
|
select: { id: true, name: true, shortName: true },
|
||||||
|
})
|
||||||
|
return ResponseMapper.list(items)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,7 +3,7 @@ import dayjs from 'dayjs'
|
|||||||
import { ResponseMapper } from '../../common/response/response-mapper'
|
import { ResponseMapper } from '../../common/response/response-mapper'
|
||||||
import { Prisma } from '../../generated/prisma/client'
|
import { Prisma } from '../../generated/prisma/client'
|
||||||
import { PrismaService } from '../../prisma/prisma.service'
|
import { PrismaService } from '../../prisma/prisma.service'
|
||||||
import { ReadCardexDto } from './dto/read-pos.dto'
|
import { ReadCardexDto } from './dto/read-cardex.dto'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class CardexService {
|
export class CardexService {
|
||||||
|
|||||||
@@ -29,47 +29,4 @@ export class PosController {
|
|||||||
|
|
||||||
return this.posService.createOrder(dto, inventoryId!)
|
return this.posService.createOrder(dto, inventoryId!)
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Post()
|
|
||||||
// create(@Body() dto: CreateInventoryDto) {
|
|
||||||
// return this.inventoriesService.create(dto)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Get()
|
|
||||||
// @ApiQuery({ name: 'isPointOfSale', required: false, type: Boolean })
|
|
||||||
// findAll(@Query('isPointOfSale') isPointOfSale?: boolean) {
|
|
||||||
// return this.inventoriesService.findAll(isPointOfSale)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Get(':id')
|
|
||||||
// findOne(@Param('id') id: string) {
|
|
||||||
// return this.inventoriesService.findOne(Number(id))
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Patch(':id')
|
|
||||||
// update(@Param('id') id: string, @Body() dto: UpdateInventoryDto) {
|
|
||||||
// return this.inventoriesService.update(Number(id), dto)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Delete(':id')
|
|
||||||
// remove(@Param('id') id: string) {
|
|
||||||
// return this.inventoriesService.remove(Number(id))
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Get(':id/movements')
|
|
||||||
// @ApiQuery({ name: 'type', required: false, enum: MovementType })
|
|
||||||
// findInventoryMovements(@Param('id') id: string, @Query('type') type?: MovementType) {
|
|
||||||
// return this.inventoriesService.findInventoryMovements(Number(id), type ?? undefined)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Get(':id/stock')
|
|
||||||
// @ApiQuery({ name: 'isAvailable', required: false, type: Boolean })
|
|
||||||
// getStock(@Param('id') id: string, @Query('isAvailable') isAvailable?: boolean) {
|
|
||||||
// return this.inventoriesService.getStock(Number(id), isAvailable ?? undefined)
|
|
||||||
// }
|
|
||||||
|
|
||||||
// @Get(':id/products/:productId/cardex')
|
|
||||||
// getProductCardex(@Param('id') id: string, @Param('productId') productId: string) {
|
|
||||||
// return this.inventoriesService.getProductCardex(Number(id), Number(productId))
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,47 +0,0 @@
|
|||||||
import { Type } from 'class-transformer'
|
|
||||||
import {
|
|
||||||
IsBoolean,
|
|
||||||
IsDateString,
|
|
||||||
IsInt,
|
|
||||||
IsNumber,
|
|
||||||
IsOptional,
|
|
||||||
IsString,
|
|
||||||
} from 'class-validator'
|
|
||||||
|
|
||||||
export class CreateProductChargeDto {
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber()
|
|
||||||
count: number
|
|
||||||
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber()
|
|
||||||
fee: number
|
|
||||||
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber()
|
|
||||||
totalAmount: number
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsBoolean()
|
|
||||||
@Type(() => Boolean)
|
|
||||||
isSettled?: boolean
|
|
||||||
|
|
||||||
@IsDateString()
|
|
||||||
buyAt: string
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
description?: string
|
|
||||||
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
productId: number
|
|
||||||
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
inventoryId: number
|
|
||||||
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
supplierId: number
|
|
||||||
}
|
|
||||||
@@ -1,54 +0,0 @@
|
|||||||
import { Type } from 'class-transformer'
|
|
||||||
import {
|
|
||||||
IsBoolean,
|
|
||||||
IsDateString,
|
|
||||||
IsInt,
|
|
||||||
IsNumber,
|
|
||||||
IsOptional,
|
|
||||||
IsString,
|
|
||||||
} from 'class-validator'
|
|
||||||
|
|
||||||
export class UpdateProductChargeDto {
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber()
|
|
||||||
count?: number
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber()
|
|
||||||
fee?: number
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsNumber()
|
|
||||||
totalAmount?: number
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Boolean)
|
|
||||||
@IsBoolean()
|
|
||||||
isSettled?: boolean
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsDateString()
|
|
||||||
buyAt?: string
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@IsString()
|
|
||||||
description?: string
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
productId?: number
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
inventoryId?: number
|
|
||||||
|
|
||||||
@IsOptional()
|
|
||||||
@Type(() => Number)
|
|
||||||
@IsInt()
|
|
||||||
supplierId?: number
|
|
||||||
}
|
|
||||||
@@ -1,34 +0,0 @@
|
|||||||
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
|
|
||||||
import { CreateProductChargeDto } from './dto/create-product-charge.dto'
|
|
||||||
import { UpdateProductChargeDto } from './dto/update-product-charge.dto'
|
|
||||||
import { ProductChargesService } from './product-charges.service'
|
|
||||||
|
|
||||||
@Controller('product-charges')
|
|
||||||
export class ProductChargesController {
|
|
||||||
constructor(private readonly service: ProductChargesService) {}
|
|
||||||
|
|
||||||
@Post()
|
|
||||||
create(@Body() dto: CreateProductChargeDto) {
|
|
||||||
return this.service.create(dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get()
|
|
||||||
findAll() {
|
|
||||||
return this.service.findAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
@Get(':id')
|
|
||||||
findOne(@Param('id') id: string) {
|
|
||||||
return this.service.findOne(Number(id))
|
|
||||||
}
|
|
||||||
|
|
||||||
@Patch(':id')
|
|
||||||
update(@Param('id') id: string, @Body() dto: UpdateProductChargeDto) {
|
|
||||||
return this.service.update(Number(id), dto)
|
|
||||||
}
|
|
||||||
|
|
||||||
@Delete(':id')
|
|
||||||
remove(@Param('id') id: string) {
|
|
||||||
return this.service.remove(Number(id))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
import { Module } from '@nestjs/common'
|
|
||||||
import { PrismaModule } from '../prisma/prisma.module'
|
|
||||||
import { ProductChargesController } from './product-charges.controller'
|
|
||||||
import { ProductChargesService } from './product-charges.service'
|
|
||||||
|
|
||||||
@Module({
|
|
||||||
imports: [PrismaModule],
|
|
||||||
controllers: [ProductChargesController],
|
|
||||||
providers: [ProductChargesService],
|
|
||||||
})
|
|
||||||
export class ProductChargesModule {}
|
|
||||||
@@ -1,104 +0,0 @@
|
|||||||
import { Injectable } from '@nestjs/common'
|
|
||||||
import { ResponseMapper } from '../common/response/response-mapper'
|
|
||||||
import { PrismaService } from '../prisma/prisma.service'
|
|
||||||
import { CreateProductChargeDto } from './dto/create-product-charge.dto'
|
|
||||||
|
|
||||||
@Injectable()
|
|
||||||
export class ProductChargesService {
|
|
||||||
constructor(private prisma: PrismaService) {}
|
|
||||||
|
|
||||||
async create(data: CreateProductChargeDto) {
|
|
||||||
const payload: any = { ...data }
|
|
||||||
|
|
||||||
// transform relation id scalars into nested connect objects
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'productId')) {
|
|
||||||
if (payload.productId !== undefined && payload.productId !== null) {
|
|
||||||
payload.product = { connect: { id: Number(payload.productId) } }
|
|
||||||
}
|
|
||||||
delete payload.productId
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'inventoryId')) {
|
|
||||||
if (payload.inventoryId !== undefined && payload.inventoryId !== null) {
|
|
||||||
payload.inventory = { connect: { id: Number(payload.inventoryId) } }
|
|
||||||
}
|
|
||||||
delete payload.inventoryId
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'supplierId')) {
|
|
||||||
if (payload.supplierId !== undefined && payload.supplierId !== null) {
|
|
||||||
payload.supplier = { connect: { id: Number(payload.supplierId) } }
|
|
||||||
}
|
|
||||||
delete payload.supplierId
|
|
||||||
}
|
|
||||||
|
|
||||||
// Convert buyAt to Date if it's a string
|
|
||||||
if (typeof payload.buyAt === 'string') {
|
|
||||||
payload.buyAt = new Date(payload.buyAt)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Remove explicit nulls for optional fields to avoid Prisma complaining
|
|
||||||
Object.keys(payload).forEach(k => {
|
|
||||||
if (payload[k] === null) delete payload[k]
|
|
||||||
})
|
|
||||||
|
|
||||||
const item = await this.prisma.productCharge.create({ data: payload })
|
|
||||||
return ResponseMapper.create(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findAll() {
|
|
||||||
const items = await this.prisma.productCharge.findMany()
|
|
||||||
return ResponseMapper.list(items)
|
|
||||||
}
|
|
||||||
|
|
||||||
async findOne(id: number) {
|
|
||||||
const item = await this.prisma.productCharge.findUnique({ where: { id } })
|
|
||||||
if (!item) return null
|
|
||||||
return ResponseMapper.single(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async update(id: number, data: any) {
|
|
||||||
const payload: any = { ...data }
|
|
||||||
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'productId')) {
|
|
||||||
if (payload.productId === null) {
|
|
||||||
payload.product = { disconnect: true }
|
|
||||||
} else {
|
|
||||||
payload.product = { connect: { id: Number(payload.productId) } }
|
|
||||||
}
|
|
||||||
delete payload.productId
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'inventoryId')) {
|
|
||||||
if (payload.inventoryId === null) {
|
|
||||||
payload.inventory = { disconnect: true }
|
|
||||||
} else {
|
|
||||||
payload.inventory = { connect: { id: Number(payload.inventoryId) } }
|
|
||||||
}
|
|
||||||
delete payload.inventoryId
|
|
||||||
}
|
|
||||||
|
|
||||||
if (Object.prototype.hasOwnProperty.call(payload, 'supplierId')) {
|
|
||||||
if (payload.supplierId === null) {
|
|
||||||
payload.supplier = { disconnect: true }
|
|
||||||
} else {
|
|
||||||
payload.supplier = { connect: { id: Number(payload.supplierId) } }
|
|
||||||
}
|
|
||||||
delete payload.supplierId
|
|
||||||
}
|
|
||||||
|
|
||||||
if (typeof payload.buyAt === 'string') payload.buyAt = new Date(payload.buyAt)
|
|
||||||
|
|
||||||
Object.keys(payload).forEach(k => {
|
|
||||||
if (payload[k] === null) delete payload[k]
|
|
||||||
})
|
|
||||||
|
|
||||||
const item = await this.prisma.productCharge.update({ where: { id }, data: payload })
|
|
||||||
return ResponseMapper.update(item)
|
|
||||||
}
|
|
||||||
|
|
||||||
async remove(id: number) {
|
|
||||||
const item = await this.prisma.productCharge.delete({ where: { id } })
|
|
||||||
return ResponseMapper.single(item)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,5 +1,12 @@
|
|||||||
import { Type } from 'class-transformer'
|
import { Type } from 'class-transformer'
|
||||||
import { ArrayMinSize, IsInt, IsNumber, IsOptional, IsString } from 'class-validator'
|
import {
|
||||||
|
ArrayMinSize,
|
||||||
|
IsBoolean,
|
||||||
|
IsInt,
|
||||||
|
IsNumber,
|
||||||
|
IsOptional,
|
||||||
|
IsString,
|
||||||
|
} from 'class-validator'
|
||||||
import { CreatePurchaseReceiptItemDto } from '../../purchase-receipt-items/dto/create-purchase-receipt-item.dto'
|
import { CreatePurchaseReceiptItemDto } from '../../purchase-receipt-items/dto/create-purchase-receipt-item.dto'
|
||||||
|
|
||||||
export class CreatePurchaseReceiptDto {
|
export class CreatePurchaseReceiptDto {
|
||||||
@@ -10,6 +17,14 @@ export class CreatePurchaseReceiptDto {
|
|||||||
@IsNumber()
|
@IsNumber()
|
||||||
totalAmount: number
|
totalAmount: number
|
||||||
|
|
||||||
|
@IsBoolean()
|
||||||
|
@IsOptional()
|
||||||
|
isSettled?: boolean
|
||||||
|
|
||||||
|
@Type(() => Number)
|
||||||
|
@IsNumber()
|
||||||
|
paidAmount: number
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@IsString()
|
@IsString()
|
||||||
description?: string
|
description?: string
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export class PurchaseReceiptsService {
|
|||||||
description: dto.description ?? null,
|
description: dto.description ?? null,
|
||||||
supplier: { connect: { id: dto.supplierId } },
|
supplier: { connect: { id: dto.supplierId } },
|
||||||
inventory: { connect: { id: dto.inventoryId } },
|
inventory: { connect: { id: dto.inventoryId } },
|
||||||
|
|
||||||
items: dto.items?.length
|
items: dto.items?.length
|
||||||
? {
|
? {
|
||||||
create: dto.items.map((item, idx) => {
|
create: dto.items.map((item, idx) => {
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user