feat(statistics): implement top alert stocks, top last sales, top supplier debts, and top selling products endpoints with SQL queries
This commit is contained in:
@@ -1,91 +0,0 @@
|
|||||||
-- Corrected triggers for sales invoice items
|
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin
|
|
||||||
DECLARE current_stock DECIMAL(10,2);
|
|
||||||
DECLARE inventory_id INT;
|
|
||||||
|
|
||||||
SELECT pa.inventoryId INTO inventory_id
|
|
||||||
FROM Pos_Accounts pa
|
|
||||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
|
||||||
WHERE si.id = NEW.invoiceId;
|
|
||||||
|
|
||||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
IF NEW.count > current_stock THEN
|
|
||||||
SIGNAL SQLSTATE '45000'
|
|
||||||
SET MESSAGE_TEXT = 'Not enough stock to complete sale.';
|
|
||||||
END IF;
|
|
||||||
end;
|
|
||||||
|
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
|
||||||
|
|
||||||
DECLARE inventory_id INT;
|
|
||||||
DECLARE customer_id INT;
|
|
||||||
DECLARE pos_id INT;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO Trigger_Logs (name , message) VALUES ('pos_id', 'init');
|
|
||||||
|
|
||||||
SELECT posAccountId, customerId INTO pos_id, customer_id
|
|
||||||
FROM Sales_Invoices si
|
|
||||||
WHERE si.id = NEW.invoiceId
|
|
||||||
LIMIT 1;
|
|
||||||
INSERT INTO Trigger_Logs (name , message) VALUES ('pos_id', pos_id);
|
|
||||||
INSERT INTO Trigger_Logs (name , message) VALUES ('customer_id', customer_id);
|
|
||||||
|
|
||||||
|
|
||||||
SELECT pa.inventoryId INTO inventory_id
|
|
||||||
FROM Pos_Accounts pa
|
|
||||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
|
||||||
WHERE si.id = NEW.invoiceId;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
INSERT INTO Trigger_Logs (name , message) VALUES ('invId', inventory_id);
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO Stock_Movements (
|
|
||||||
type,
|
|
||||||
quantity,
|
|
||||||
fee,
|
|
||||||
totalCost,
|
|
||||||
referenceType,
|
|
||||||
referenceId,
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
avgCost,
|
|
||||||
remainedInStock,
|
|
||||||
customerId,
|
|
||||||
createdAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
'OUT',
|
|
||||||
NEW.count,
|
|
||||||
NEW.fee,
|
|
||||||
NEW.total,
|
|
||||||
'SALES',
|
|
||||||
NEW.invoiceId,
|
|
||||||
NEW.productId,
|
|
||||||
inventory_id,
|
|
||||||
|
|
||||||
CASE
|
|
||||||
WHEN NEW.count = 0 THEN 0
|
|
||||||
ELSE NEW.total / NEW.count
|
|
||||||
END,
|
|
||||||
current_stock - NEW.count,
|
|
||||||
customer_id,
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
END
|
|
||||||
+3
-1
@@ -3,6 +3,8 @@
|
|||||||
"collection": "@nestjs/schematics",
|
"collection": "@nestjs/schematics",
|
||||||
"sourceRoot": "src",
|
"sourceRoot": "src",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"deleteOutDir": true
|
"deleteOutDir": true,
|
||||||
|
"assets": ["**/*.sql"],
|
||||||
|
"watchAssets": true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
-- This is an empty migration.
|
|
||||||
@@ -1,347 +0,0 @@
|
|||||||
-- AUTO-GENERATED MYSQL TRIGGER DUMP
|
|
||||||
-- Generated at: 2025-12-22T15:32:20.184Z
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_transfer_item_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Inventory_Transfer_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin
|
|
||||||
|
|
||||||
DECLARE fromInv INT;
|
|
||||||
DECLARE toInv INT;
|
|
||||||
DECLARE _avgCost DECIMAL(10,2);
|
|
||||||
DECLARE latestQuantityInOrigin DECIMAL(10,2);
|
|
||||||
DECLARE latestQuantityInDestination DECIMAL(10,2);
|
|
||||||
|
|
||||||
SELECT fromInventoryId, toInventoryId INTO fromInv, toInv
|
|
||||||
FROM Inventory_Transfers WHERE id = NEW.transferId;
|
|
||||||
|
|
||||||
SELECT COALESCE(avgCost, 0), COALESCE(quantity, 0) INTO _avgCost, latestQuantityInOrigin FROM Stock_Balance
|
|
||||||
WHERE ProductId = NEW.productId AND inventoryId = fromInv LIMIT 1;
|
|
||||||
|
|
||||||
SELECT COALESCE(quantity, 0) INTO latestQuantityInDestination FROM Stock_Balance
|
|
||||||
WHERE ProductId = NEW.productId AND inventoryId = toInv LIMIT 1;
|
|
||||||
|
|
||||||
|
|
||||||
-- OUT from source
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(type, quantity, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
|
||||||
VALUES
|
|
||||||
('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, toInv, NOW(), latestQuantityInOrigin-NEW.count);
|
|
||||||
|
|
||||||
-- IN to destination
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(type, quantity, fee, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
|
||||||
VALUES
|
|
||||||
('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, fromInv, NOW(), latestQuantityInOrigin-NEW.count);
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_purchase_receipt_item_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Purchase_Receipt_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_purchase_receipt_item_after_insert` AFTER INSERT ON `Purchase_Receipt_Items` FOR EACH ROW BEGIN DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0;
|
|
||||||
|
|
||||||
DECLARE invId INT;
|
|
||||||
DECLARE suppId INT;
|
|
||||||
|
|
||||||
-- Get inventory & supplier from receipt
|
|
||||||
SELECT inventoryId, supplierId
|
|
||||||
INTO invId, suppId
|
|
||||||
FROM Purchase_Receipts
|
|
||||||
WHERE id = NEW.receiptId;
|
|
||||||
|
|
||||||
-- Get current stock quantity (if exists)
|
|
||||||
SELECT COALESCE(quantity, 0)
|
|
||||||
INTO latestQuantity
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE sb.inventoryId = invId
|
|
||||||
AND sb.productId = NEW.productId
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
-- Insert stock movement
|
|
||||||
INSERT INTO Stock_Movements (
|
|
||||||
type,
|
|
||||||
quantity,
|
|
||||||
fee,
|
|
||||||
totalCost,
|
|
||||||
referenceType,
|
|
||||||
referenceId,
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
avgCost,
|
|
||||||
supplierId,
|
|
||||||
remainedInStock,
|
|
||||||
createdAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
'IN',
|
|
||||||
NEW.count,
|
|
||||||
NEW.fee,
|
|
||||||
NEW.total,
|
|
||||||
'PURCHASE',
|
|
||||||
NEW.receiptId,
|
|
||||||
NEW.productId,
|
|
||||||
invId,
|
|
||||||
CASE
|
|
||||||
WHEN NEW.count = 0 THEN 0
|
|
||||||
ELSE NEW.total / NEW.count
|
|
||||||
END
|
|
||||||
|
|
||||||
,
|
|
||||||
suppId,
|
|
||||||
latestQuantity + NEW.count,
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_sales_invoice_items_before_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Sales_Invoice_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
|
||||||
|
|
||||||
DECLARE inventory_id INT;
|
|
||||||
|
|
||||||
|
|
||||||
SELECT inventoryId INTO inventory_id
|
|
||||||
FROM Sales_Invoices si
|
|
||||||
WHERE si.id = NEW.invoiceId
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
IF NEW.count > current_stock THEN
|
|
||||||
SIGNAL SQLSTATE '45000'
|
|
||||||
SET MESSAGE_TEXT = 'موجودی کالا در انبار کافی نیست.';
|
|
||||||
END IF;
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_sales_invoice_items_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Sales_Invoice_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
|
||||||
|
|
||||||
DECLARE inventory_id INT;
|
|
||||||
DECLARE customer_id INT;
|
|
||||||
|
|
||||||
|
|
||||||
SELECT inventoryId , customerId INTO inventory_id, customer_id
|
|
||||||
FROM Sales_Invoices si
|
|
||||||
WHERE si.id = NEW.invoiceId
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
INSERT INTO Stock_Movements (
|
|
||||||
type,
|
|
||||||
quantity,
|
|
||||||
fee,
|
|
||||||
totalCost,
|
|
||||||
referenceType,
|
|
||||||
referenceId,
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
avgCost,
|
|
||||||
remainedInStock,
|
|
||||||
customerId,
|
|
||||||
createdAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
'OUT',
|
|
||||||
NEW.count,
|
|
||||||
NEW.fee,
|
|
||||||
NEW.total,
|
|
||||||
'SALES',
|
|
||||||
NEW.invoiceId,
|
|
||||||
NEW.productId,
|
|
||||||
inventory_id,
|
|
||||||
|
|
||||||
CASE
|
|
||||||
WHEN NEW.count = 0 THEN 0
|
|
||||||
ELSE NEW.total / NEW.count
|
|
||||||
END,
|
|
||||||
current_stock + NEW.count,
|
|
||||||
customer_id,
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
|
|
||||||
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_transfer
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_transfer`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_stock_transfer` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'INVENTORY_TRANSFER' THEN IF NEW.type = 'IN' THEN
|
|
||||||
INSERT INTO
|
|
||||||
Stock_Balance (
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
quantity,
|
|
||||||
totalCost,
|
|
||||||
avgCost,
|
|
||||||
updatedAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.inventoryId,
|
|
||||||
NEW.quantity,
|
|
||||||
NEW.totalCost,
|
|
||||||
CASE
|
|
||||||
WHEN NEW.quantity = 0 THEN 0
|
|
||||||
ELSE NEW.totalCost / NEW.quantity
|
|
||||||
END,
|
|
||||||
NOW()
|
|
||||||
)
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
quantity = quantity + NEW.quantity,
|
|
||||||
totalCost = totalCost + NEW.totalCost,
|
|
||||||
avgCost = CASE
|
|
||||||
WHEN (quantity + NEW.quantity) = 0 THEN 0
|
|
||||||
ELSE (totalCost + NEW.totalCost) / (quantity + NEW.quantity)
|
|
||||||
END,
|
|
||||||
updatedAt = NOW();
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NEW.type = 'OUT' THEN IF EXISTS (
|
|
||||||
SELECT 1
|
|
||||||
FROM Stock_Balance sb
|
|
||||||
WHERE
|
|
||||||
sb.productId = NEW.productId
|
|
||||||
AND sb.inventoryId = NEW.inventoryId
|
|
||||||
) THEN
|
|
||||||
|
|
||||||
UPDATE Stock_Balance sb
|
|
||||||
SET
|
|
||||||
sb.quantity = sb.quantity - NEW.quantity,
|
|
||||||
sb.totalCost = sb.totalCost - (sb.avgCost * NEW.quantity),
|
|
||||||
sb.updatedAt = NOW()
|
|
||||||
WHERE
|
|
||||||
sb.productId = NEW.productId
|
|
||||||
AND sb.inventoryId = NEW.inventoryId;
|
|
||||||
|
|
||||||
ELSE
|
|
||||||
INSERT INTO
|
|
||||||
Stock_Balance (
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
quantity,
|
|
||||||
totalCost,
|
|
||||||
avgCost,
|
|
||||||
updatedAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.inventoryId,
|
|
||||||
- NEW.quantity,
|
|
||||||
- COALESCE(NEW.fee, 0) * NEW.quantity,
|
|
||||||
COALESCE(NEW.fee, 0),
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_purchase_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN
|
|
||||||
|
|
||||||
INSERT INTO
|
|
||||||
Stock_Balance (
|
|
||||||
productId,
|
|
||||||
quantity,
|
|
||||||
avgCost,
|
|
||||||
totalCost,
|
|
||||||
inventoryId,
|
|
||||||
updatedAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.quantity,
|
|
||||||
NEW.fee,
|
|
||||||
NEW.totalCost,
|
|
||||||
NEW.inventoryId,
|
|
||||||
NOW()
|
|
||||||
)
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
quantity = quantity + NEW.quantity,
|
|
||||||
totalCost = totalCost + NEW.totalCost,
|
|
||||||
avgCost = totalCost / quantity;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_sale_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_sale_insert`;
|
|
||||||
|
|
||||||
CREATE TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN
|
|
||||||
|
|
||||||
INSERT INTO
|
|
||||||
Stock_Balance (
|
|
||||||
productId,
|
|
||||||
quantity,
|
|
||||||
avgCost,
|
|
||||||
totalCost,
|
|
||||||
inventoryId,
|
|
||||||
updatedAt
|
|
||||||
)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.quantity,
|
|
||||||
NEW.fee,
|
|
||||||
NEW.totalCost,
|
|
||||||
NEW.inventoryId,
|
|
||||||
NOW()
|
|
||||||
)
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
quantity = quantity - NEW.quantity,
|
|
||||||
totalCost = totalCost - NEW.totalCost,
|
|
||||||
avgCost = totalCost / quantity;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
END;
|
|
||||||
@@ -1,18 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to drop the column `bankAccountId` on the `Inventories` table. All the data in the column will be lost.
|
|
||||||
- You are about to drop the `_Bank_Accounts_inventoryId_fkey` table. If the table is not empty, all the data it contains will be lost.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `_Bank_Accounts_inventoryId_fkey` DROP FOREIGN KEY `_Bank_Accounts_inventoryId_fkey_A_fkey`;
|
|
||||||
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `_Bank_Accounts_inventoryId_fkey` DROP FOREIGN KEY `_Bank_Accounts_inventoryId_fkey_B_fkey`;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Inventories` DROP COLUMN `bankAccountId`;
|
|
||||||
|
|
||||||
-- DropTable
|
|
||||||
DROP TABLE `_Bank_Accounts_inventoryId_fkey`;
|
|
||||||
@@ -1,158 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to alter the column `count` on the `Inventory_Transfer_Items` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(10,0)`.
|
|
||||||
- You are about to alter the column `totalAmount` on the `Orders` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `basePrice` on the `Product_Variants` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `salePrice` on the `Product_Variants` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `quantity` on the `Product_Variants` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(10,0)`.
|
|
||||||
- You are about to alter the column `alertQuantity` on the `Product_Variants` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(10,0)`.
|
|
||||||
- You are about to alter the column `salePrice` on the `Products` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,0)`.
|
|
||||||
- You are about to alter the column `count` on the `Purchase_Receipt_Items` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(10,0)`.
|
|
||||||
- You are about to alter the column `fee` on the `Purchase_Receipt_Items` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `total` on the `Purchase_Receipt_Items` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `amount` on the `Purchase_Receipt_Payments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to drop the column `isSettled` on the `Purchase_Receipts` table. All the data in the column will be lost.
|
|
||||||
- You are about to alter the column `totalAmount` on the `Purchase_Receipts` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `paidAmount` on the `Purchase_Receipts` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `count` on the `Sales_Invoice_Items` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(10,0)`.
|
|
||||||
- You are about to alter the column `fee` on the `Sales_Invoice_Items` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `total` on the `Sales_Invoice_Items` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `totalAmount` on the `Sales_Invoices` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `adjustedQuantity` on the `Stock_Adjustments` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(10,0)`.
|
|
||||||
- You are about to alter the column `quantity` on the `Stock_Movements` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(10,0)`.
|
|
||||||
- You are about to alter the column `fee` on the `Stock_Movements` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `totalCost` on the `Stock_Movements` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `avgCost` on the `Stock_Movements` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `remainedInStock` on the `Stock_Movements` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(10,0)`.
|
|
||||||
- You are about to alter the column `debit` on the `Supplier_Ledger` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `credit` on the `Supplier_Ledger` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- You are about to alter the column `balance` on the `Supplier_Ledger` table. The data in that column could be lost. The data in that column will be cast from `Decimal(10,2)` to `Decimal(15,2)`.
|
|
||||||
- A unique constraint covering the columns `[iban]` on the table `Bank_Accounts` will be added. If there are existing duplicate values, this will fail.
|
|
||||||
- Made the column `bankAccountId` on table `Pos_Accounts` required. This step will fail if there are existing NULL values in that column.
|
|
||||||
- Added the required column `inventoryId` to the `Purchase_Receipt_Payments` table without a default value. This is not possible if the table is not empty.
|
|
||||||
- Added the required column `type` to the `Purchase_Receipt_Payments` table without a default value. This is not possible if the table is not empty.
|
|
||||||
- Made the column `bankAccountId` on table `Purchase_Receipt_Payments` required. This step will fail if there are existing NULL values in that column.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `Pos_Accounts`
|
|
||||||
DROP FOREIGN KEY `Pos_Accounts_bankAccountId_fkey`;
|
|
||||||
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `Pos_Accounts`
|
|
||||||
DROP FOREIGN KEY `Pos_Accounts_bankAccountId_inventoryId_fkey`;
|
|
||||||
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `Pos_Accounts`
|
|
||||||
DROP FOREIGN KEY `Pos_Accounts_inventoryId_fkey`;
|
|
||||||
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments`
|
|
||||||
DROP FOREIGN KEY `Purchase_Receipt_Payments_bankAccountId_fkey`;
|
|
||||||
|
|
||||||
-- DropIndex
|
|
||||||
DROP INDEX `Pos_Accounts_bankAccountId_inventoryId_fkey` ON `Pos_Accounts`;
|
|
||||||
|
|
||||||
-- DropIndex
|
|
||||||
DROP INDEX `Purchase_Receipt_Payments_bankAccountId_fkey` ON `Purchase_Receipt_Payments`;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Inventory_Transfer_Items`
|
|
||||||
MODIFY `count` DECIMAL(10, 0) NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Orders` MODIFY `totalAmount` DECIMAL(15, 2) NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Pos_Accounts` MODIFY `bankAccountId` INTEGER NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Product_Variants`
|
|
||||||
MODIFY `basePrice` DECIMAL(15, 2) NOT NULL,
|
|
||||||
MODIFY `salePrice` DECIMAL(15, 2) NOT NULL,
|
|
||||||
MODIFY `quantity` DECIMAL(10, 0) NULL DEFAULT 0.00,
|
|
||||||
MODIFY `alertQuantity` DECIMAL(10, 0) NULL DEFAULT 5.00;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Products`
|
|
||||||
MODIFY `salePrice` DECIMAL(15, 0) NOT NULL DEFAULT 0.00;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Purchase_Receipt_Items`
|
|
||||||
MODIFY `count` DECIMAL(10, 0) NOT NULL,
|
|
||||||
MODIFY `fee` DECIMAL(15, 2) NOT NULL,
|
|
||||||
MODIFY `total` DECIMAL(15, 2) NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments`
|
|
||||||
ADD COLUMN `inventoryId` INTEGER NOT NULL,
|
|
||||||
ADD COLUMN `type` ENUM('PAYMENT', 'REFUND') NOT NULL,
|
|
||||||
MODIFY `amount` DECIMAL(15, 2) NOT NULL,
|
|
||||||
MODIFY `bankAccountId` INTEGER NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Purchase_Receipts`
|
|
||||||
DROP COLUMN `isSettled`,
|
|
||||||
ADD COLUMN `status` ENUM(
|
|
||||||
'UNPAID',
|
|
||||||
'PARTIALLY_PAID',
|
|
||||||
'PAID'
|
|
||||||
) NOT NULL DEFAULT 'UNPAID',
|
|
||||||
MODIFY `totalAmount` DECIMAL(15, 2) NOT NULL,
|
|
||||||
MODIFY `paidAmount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Sales_Invoice_Items`
|
|
||||||
MODIFY `count` DECIMAL(10, 0) NOT NULL,
|
|
||||||
MODIFY `fee` DECIMAL(15, 2) NOT NULL,
|
|
||||||
MODIFY `total` DECIMAL(15, 2) NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Sales_Invoices`
|
|
||||||
MODIFY `totalAmount` DECIMAL(15, 2) NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Adjustments`
|
|
||||||
MODIFY `adjustedQuantity` DECIMAL(10, 0) NOT NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Stock_Movements`
|
|
||||||
MODIFY `quantity` DECIMAL(10, 0) NOT NULL,
|
|
||||||
MODIFY `fee` DECIMAL(15, 2) NOT NULL,
|
|
||||||
MODIFY `totalCost` DECIMAL(15, 2) NOT NULL,
|
|
||||||
MODIFY `avgCost` DECIMAL(15, 2) NOT NULL,
|
|
||||||
MODIFY `remainedInStock` DECIMAL(10, 0) NOT NULL DEFAULT 0.00;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Supplier_Ledger`
|
|
||||||
MODIFY `debit` DECIMAL(15, 2) NOT NULL DEFAULT 0,
|
|
||||||
MODIFY `credit` DECIMAL(15, 2) NOT NULL DEFAULT 0,
|
|
||||||
MODIFY `balance` DECIMAL(15, 2) NOT NULL;
|
|
||||||
|
|
||||||
-- CreateIndex
|
|
||||||
CREATE UNIQUE INDEX `Bank_Accounts_iban_key` ON `Bank_Accounts` (`iban`);
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Pos_Accounts`
|
|
||||||
ADD CONSTRAINT `Pos_Accounts_inventoryId_bankAccountId_fkey` FOREIGN KEY (
|
|
||||||
`inventoryId`,
|
|
||||||
`bankAccountId`
|
|
||||||
) REFERENCES `Inventory_Bank_Accounts` (
|
|
||||||
`inventoryId`,
|
|
||||||
`bankAccountId`
|
|
||||||
) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments`
|
|
||||||
ADD CONSTRAINT `Purchase_Receipt_Payments_inventoryId_bankAccountId_fkey` FOREIGN KEY (
|
|
||||||
`inventoryId`,
|
|
||||||
`bankAccountId`
|
|
||||||
) REFERENCES `Inventory_Bank_Accounts` (
|
|
||||||
`inventoryId`,
|
|
||||||
`bankAccountId`
|
|
||||||
) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- RenameIndex
|
|
||||||
ALTER TABLE `Supplier_Ledger`
|
|
||||||
RENAME INDEX `Supplier_Ledger_supplierId_fkey` TO `Supplier_Ledger_supplierId_idx`;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- CreateIndex
|
|
||||||
CREATE INDEX `Pos_Accounts_inventoryId_idx` ON `Pos_Accounts`(`inventoryId`);
|
|
||||||
@@ -1,14 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to drop the column `inventoryId` on the `Purchase_Receipt_Payments` table. All the data in the column will be lost.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments` DROP FOREIGN KEY `Purchase_Receipt_Payments_inventoryId_bankAccountId_fkey`;
|
|
||||||
|
|
||||||
-- DropIndex
|
|
||||||
DROP INDEX `Purchase_Receipt_Payments_inventoryId_bankAccountId_fkey` ON `Purchase_Receipt_Payments`;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments` DROP COLUMN `inventoryId`;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
/*
|
|
||||||
Warnings:
|
|
||||||
|
|
||||||
- You are about to drop the column `inventoryId` on the `Sales_Invoices` table. All the data in the column will be lost.
|
|
||||||
- Added the required column `posAccountId` to the `Sales_Invoices` table without a default value. This is not possible if the table is not empty.
|
|
||||||
|
|
||||||
*/
|
|
||||||
-- DropForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoices` DROP FOREIGN KEY `Sales_Invoices_inventoryId_fkey`;
|
|
||||||
|
|
||||||
-- DropIndex
|
|
||||||
DROP INDEX `Sales_Invoices_inventoryId_fkey` ON `Sales_Invoices`;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments` ADD COLUMN `inventoryBankAccountBankAccountId` INTEGER NULL,
|
|
||||||
ADD COLUMN `inventoryBankAccountInventoryId` INTEGER NULL;
|
|
||||||
|
|
||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Sales_Invoices` DROP COLUMN `inventoryId`,
|
|
||||||
ADD COLUMN `posAccountId` INTEGER NOT NULL;
|
|
||||||
|
|
||||||
-- CreateIndex
|
|
||||||
CREATE INDEX `Sales_Invoices_posAccountId_idx` ON `Sales_Invoices`(`posAccountId`);
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_posAccountId_fkey` FOREIGN KEY (`posAccountId`) REFERENCES `Pos_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_inventoryBankAccountInventoryId_i_fkey` FOREIGN KEY (`inventoryBankAccountInventoryId`, `inventoryBankAccountBankAccountId`) REFERENCES `Inventory_Bank_Accounts`(`inventoryId`, `bankAccountId`) ON DELETE SET NULL ON UPDATE CASCADE;
|
|
||||||
|
|
||||||
-- RenameIndex
|
|
||||||
ALTER TABLE `Orders` RENAME INDEX `Orders_customerId_fkey` TO `Orders_customerId_idx`;
|
|
||||||
|
|
||||||
-- RenameIndex
|
|
||||||
ALTER TABLE `Product_Variants` RENAME INDEX `products_barcode_unique` TO `Product_Variants_barcode_key`;
|
|
||||||
|
|
||||||
-- RenameIndex
|
|
||||||
ALTER TABLE `Products` RENAME INDEX `products_barcode_unique` TO `Products_barcode_key`;
|
|
||||||
|
|
||||||
-- RenameIndex
|
|
||||||
ALTER TABLE `Products` RENAME INDEX `products_sku_unique` TO `Products_sku_key`;
|
|
||||||
|
|
||||||
-- RenameIndex
|
|
||||||
ALTER TABLE `Sales_Invoice_Items` RENAME INDEX `Sales_Invoice_Items_invoiceId_fkey` TO `Sales_Invoice_Items_invoiceId_idx`;
|
|
||||||
|
|
||||||
-- RenameIndex
|
|
||||||
ALTER TABLE `Sales_Invoice_Items` RENAME INDEX `Sales_Invoice_Items_productId_fkey` TO `Sales_Invoice_Items_productId_idx`;
|
|
||||||
|
|
||||||
-- RenameIndex
|
|
||||||
ALTER TABLE `Sales_Invoices` RENAME INDEX `Sales_Invoices_customerId_fkey` TO `Sales_Invoices_customerId_idx`;
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
-- AlterTable
|
|
||||||
ALTER TABLE `Products` ADD COLUMN `minimumStockAlertLevel` DECIMAL(10, 0) NOT NULL DEFAULT 1.00;
|
|
||||||
+233
-159
@@ -84,9 +84,35 @@ CREATE TABLE `Bank_Accounts` (
|
|||||||
|
|
||||||
UNIQUE INDEX `Bank_Accounts_accountNumber_key`(`accountNumber`),
|
UNIQUE INDEX `Bank_Accounts_accountNumber_key`(`accountNumber`),
|
||||||
UNIQUE INDEX `Bank_Accounts_cardNumber_key`(`cardNumber`),
|
UNIQUE INDEX `Bank_Accounts_cardNumber_key`(`cardNumber`),
|
||||||
|
UNIQUE INDEX `Bank_Accounts_iban_key`(`iban`),
|
||||||
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_Account_Transactions` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`bankAccountId` INTEGER NOT NULL,
|
||||||
|
`type` ENUM('DEPOSIT', 'WITHDRAWAL') NOT NULL,
|
||||||
|
`amount` DECIMAL(15, 2) NOT NULL,
|
||||||
|
`balanceAfter` DECIMAL(15, 2) NOT NULL,
|
||||||
|
`referenceId` INTEGER NOT NULL,
|
||||||
|
`referenceType` ENUM('PURCHASE_PAYMENT', 'PURCHASE_REFUND', 'POS_SALE', 'POS_REFUND', 'BANK_TRANSFER', 'MANUAL_ADJUSTMENT') NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
|
||||||
|
INDEX `Bank_Account_Transactions_bankAccountId_idx`(`bankAccountId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Bank_Account_Balance` (
|
||||||
|
`bankAccountId` INTEGER NOT NULL,
|
||||||
|
`balance` DECIMAL(15, 2) NOT NULL,
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Bank_Account_Balance_bankAccountId_key`(`bankAccountId`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Inventories` (
|
CREATE TABLE `Inventories` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
@@ -97,11 +123,36 @@ CREATE TABLE `Inventories` (
|
|||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
`isPointOfSale` BOOLEAN NOT NULL DEFAULT false,
|
`isPointOfSale` BOOLEAN NOT NULL DEFAULT false,
|
||||||
`bankAccountId` INTEGER NULL,
|
|
||||||
|
|
||||||
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 `Inventory_Bank_Accounts` (
|
||||||
|
`inventoryId` INTEGER NOT NULL,
|
||||||
|
`bankAccountId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
INDEX `Inventory_Bank_Accounts_bankAccountId_idx`(`bankAccountId`),
|
||||||
|
PRIMARY KEY (`inventoryId`, `bankAccountId`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Pos_Accounts` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`name` VARCHAR(255) NOT NULL,
|
||||||
|
`code` VARCHAR(10) NOT NULL,
|
||||||
|
`description` VARCHAR(500) NULL,
|
||||||
|
`bankAccountId` INTEGER NOT NULL,
|
||||||
|
`inventoryId` INTEGER NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Pos_Accounts_code_key`(`code`),
|
||||||
|
INDEX `Pos_Accounts_inventoryId_idx`(`inventoryId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Inventory_Transfers` (
|
CREATE TABLE `Inventory_Transfers` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
@@ -120,7 +171,7 @@ CREATE TABLE `Inventory_Transfers` (
|
|||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Inventory_Transfer_Items` (
|
CREATE TABLE `Inventory_Transfer_Items` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`count` DECIMAL(10, 2) NOT NULL,
|
`count` DECIMAL(10, 0) NOT NULL,
|
||||||
`productId` INTEGER NOT NULL,
|
`productId` INTEGER NOT NULL,
|
||||||
`transferId` INTEGER NOT NULL,
|
`transferId` INTEGER NOT NULL,
|
||||||
|
|
||||||
@@ -129,31 +180,6 @@ CREATE TABLE `Inventory_Transfer_Items` (
|
|||||||
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 `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
|
-- CreateTable
|
||||||
CREATE TABLE `Banks` (
|
CREATE TABLE `Banks` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
@@ -168,38 +194,34 @@ CREATE TABLE `Banks` (
|
|||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Suppliers` (
|
CREATE TABLE `Orders` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`firstName` VARCHAR(255) NOT NULL,
|
`orderNumber` VARCHAR(100) NOT NULL,
|
||||||
`lastName` VARCHAR(255) NOT NULL,
|
`status` ENUM('PENDING', 'REJECT', 'DONE') NOT NULL DEFAULT 'PENDING',
|
||||||
`email` VARCHAR(255) NULL,
|
`totalAmount` DECIMAL(15, 2) NOT NULL,
|
||||||
`mobileNumber` CHAR(11) NOT NULL,
|
`description` TEXT 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),
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
`updatedAt` TIMESTAMP(0) NOT NULL,
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
`deletedAt` TIMESTAMP(0) NULL,
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
`customerId` INTEGER NULL,
|
||||||
|
|
||||||
UNIQUE INDEX `Suppliers_mobileNumber_key`(`mobileNumber`),
|
UNIQUE INDEX `Orders_orderNumber_key`(`orderNumber`),
|
||||||
|
INDEX `Orders_customerId_idx`(`customerId`),
|
||||||
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 `Supplier_Ledger` (
|
CREATE TABLE `Order_Items` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`description` TEXT NULL,
|
`quantity` DECIMAL(10, 0) NOT NULL,
|
||||||
`debit` DECIMAL(10, 2) NOT NULL,
|
`unitPrice` DECIMAL(15, 2) NOT NULL,
|
||||||
`credit` DECIMAL(10, 2) NOT NULL,
|
`totalPrice` DECIMAL(15, 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),
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
`supplierId` INTEGER NOT NULL,
|
`orderId` INTEGER NOT NULL,
|
||||||
|
`productId` INTEGER NOT NULL,
|
||||||
|
|
||||||
INDEX `Supplier_Ledger_supplierId_fkey`(`supplierId`),
|
INDEX `Order_Items_orderId_idx`(`orderId`),
|
||||||
|
INDEX `Order_Items_productId_idx`(`productId`),
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
@@ -223,56 +245,6 @@ CREATE TABLE `Customers` (
|
|||||||
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 `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
|
-- CreateTable
|
||||||
CREATE TABLE `Trigger_Logs` (
|
CREATE TABLE `Trigger_Logs` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
@@ -287,14 +259,14 @@ CREATE TABLE `Trigger_Logs` (
|
|||||||
CREATE TABLE `Product_Variants` (
|
CREATE TABLE `Product_Variants` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`name` VARCHAR(255) NOT NULL,
|
`name` VARCHAR(255) NOT NULL,
|
||||||
`basePrice` DECIMAL(10, 2) NOT NULL,
|
`basePrice` DECIMAL(15, 2) NOT NULL,
|
||||||
`salePrice` DECIMAL(10, 2) NOT NULL,
|
`salePrice` DECIMAL(15, 2) NOT NULL,
|
||||||
`description` TEXT NULL,
|
`description` TEXT NULL,
|
||||||
`barcode` VARCHAR(100) NULL,
|
`barcode` VARCHAR(100) NULL,
|
||||||
`imageUrl` VARCHAR(255) NULL,
|
`imageUrl` VARCHAR(255) NULL,
|
||||||
`unit` VARCHAR(10) NULL,
|
`unit` VARCHAR(10) NULL,
|
||||||
`quantity` DECIMAL(10, 2) NULL DEFAULT 0.00,
|
`quantity` DECIMAL(10, 0) NULL DEFAULT 0.00,
|
||||||
`alertQuantity` DECIMAL(10, 2) NULL DEFAULT 5.00,
|
`alertQuantity` DECIMAL(10, 0) NULL DEFAULT 5.00,
|
||||||
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
||||||
`isFeatured` BOOLEAN NOT NULL DEFAULT false,
|
`isFeatured` BOOLEAN NOT NULL DEFAULT false,
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
@@ -302,7 +274,7 @@ CREATE TABLE `Product_Variants` (
|
|||||||
`deletedAt` TIMESTAMP(0) NULL,
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
`productId` INTEGER NOT NULL,
|
`productId` INTEGER NOT NULL,
|
||||||
|
|
||||||
UNIQUE INDEX `products_barcode_unique`(`barcode`),
|
UNIQUE INDEX `Product_Variants_barcode_key`(`barcode`),
|
||||||
INDEX `Product_Variants_productId_fkey`(`productId`),
|
INDEX `Product_Variants_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;
|
||||||
@@ -319,10 +291,11 @@ 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,
|
`salePrice` DECIMAL(15, 0) NOT NULL DEFAULT 0.00,
|
||||||
|
`minimumStockAlertLevel` DECIMAL(10, 0) NOT NULL DEFAULT 1.00,
|
||||||
|
|
||||||
UNIQUE INDEX `products_sku_unique`(`sku`),
|
UNIQUE INDEX `Products_sku_key`(`sku`),
|
||||||
UNIQUE INDEX `products_barcode_unique`(`barcode`),
|
UNIQUE INDEX `Products_barcode_key`(`barcode`),
|
||||||
INDEX `Products_brandId_fkey`(`brandId`),
|
INDEX `Products_brandId_fkey`(`brandId`),
|
||||||
INDEX `Products_categoryId_fkey`(`categoryId`),
|
INDEX `Products_categoryId_fkey`(`categoryId`),
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
@@ -358,12 +331,12 @@ CREATE TABLE `Product_categories` (
|
|||||||
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(15, 2) NOT NULL,
|
||||||
`paidAmount` DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
|
`paidAmount` DECIMAL(15, 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,
|
||||||
|
`status` ENUM('UNPAID', 'PARTIALLY_PAID', 'PAID') NOT NULL DEFAULT 'UNPAID',
|
||||||
`supplierId` INTEGER NOT NULL,
|
`supplierId` INTEGER NOT NULL,
|
||||||
`inventoryId` INTEGER NOT NULL,
|
`inventoryId` INTEGER NOT NULL,
|
||||||
|
|
||||||
@@ -376,13 +349,13 @@ CREATE TABLE `Purchase_Receipts` (
|
|||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Purchase_Receipt_Items` (
|
CREATE TABLE `Purchase_Receipt_Items` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`count` DECIMAL(10, 2) NOT NULL,
|
`count` DECIMAL(10, 0) NOT NULL,
|
||||||
`fee` DECIMAL(10, 2) NOT NULL,
|
`unitPrice` DECIMAL(15, 2) NOT NULL,
|
||||||
`total` DECIMAL(10, 2) NOT NULL,
|
`totalPrice` DECIMAL(15, 2) NOT NULL,
|
||||||
`description` TEXT NULL,
|
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
|
||||||
`receiptId` INTEGER NOT NULL,
|
`receiptId` INTEGER NOT NULL,
|
||||||
`productId` INTEGER NOT NULL,
|
`productId` INTEGER NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
|
||||||
INDEX `Purchase_Receipt_Items_productId_fkey`(`productId`),
|
INDEX `Purchase_Receipt_Items_productId_fkey`(`productId`),
|
||||||
INDEX `Purchase_Receipt_Items_receiptId_fkey`(`receiptId`),
|
INDEX `Purchase_Receipt_Items_receiptId_fkey`(`receiptId`),
|
||||||
@@ -392,16 +365,63 @@ CREATE TABLE `Purchase_Receipt_Items` (
|
|||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Purchase_Receipt_Payments` (
|
CREATE TABLE `Purchase_Receipt_Payments` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`amount` DECIMAL(10, 2) NOT NULL,
|
`amount` DECIMAL(15, 2) NOT NULL,
|
||||||
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
||||||
`bankAccountId` INTEGER NULL,
|
`type` ENUM('PAYMENT', 'REFUND') NOT NULL,
|
||||||
`description` TEXT NULL,
|
`bankAccountId` INTEGER NOT NULL,
|
||||||
`payedAt` TIMESTAMP(0) NOT NULL,
|
|
||||||
`receiptId` INTEGER NOT NULL,
|
`receiptId` INTEGER NOT NULL,
|
||||||
|
`payedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`inventoryBankAccountInventoryId` INTEGER NULL,
|
||||||
|
`inventoryBankAccountBankAccountId` INTEGER NULL,
|
||||||
|
|
||||||
INDEX `Purchase_Receipt_Payments_receiptId_fkey`(`receiptId`),
|
INDEX `Purchase_Receipt_Payments_receiptId_fkey`(`receiptId`),
|
||||||
INDEX `Purchase_Receipt_Payments_bankAccountId_fkey`(`bankAccountId`),
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Sales_Invoices` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`code` VARCHAR(100) NOT NULL,
|
||||||
|
`totalAmount` DECIMAL(15, 2) NOT NULL,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`customerId` INTEGER NULL,
|
||||||
|
`posAccountId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Sales_Invoices_code_key`(`code`),
|
||||||
|
INDEX `Sales_Invoices_customerId_idx`(`customerId`),
|
||||||
|
INDEX `Sales_Invoices_posAccountId_idx`(`posAccountId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Sales_Invoice_Items` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`count` DECIMAL(10, 0) NOT NULL,
|
||||||
|
`unitPrice` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
||||||
|
`totalPrice` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`invoiceId` INTEGER NOT NULL,
|
||||||
|
`productId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
INDEX `Sales_Invoice_Items_invoiceId_idx`(`invoiceId`),
|
||||||
|
INDEX `Sales_Invoice_Items_productId_idx`(`productId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `SalesInvoicePayment` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`invoiceId` INTEGER NOT NULL,
|
||||||
|
`amount` DECIMAL(15, 2) NOT NULL,
|
||||||
|
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
||||||
|
`paidAt` DATETIME(3) NOT NULL,
|
||||||
|
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
|
||||||
|
INDEX `SalesInvoicePayment_invoiceId_idx`(`invoiceId`),
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
@@ -409,17 +429,17 @@ CREATE TABLE `Purchase_Receipt_Payments` (
|
|||||||
CREATE TABLE `Stock_Movements` (
|
CREATE TABLE `Stock_Movements` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`type` ENUM('IN', 'OUT', 'ADJUST') NOT NULL,
|
`type` ENUM('IN', 'OUT', 'ADJUST') NOT NULL,
|
||||||
`quantity` DECIMAL(10, 2) NOT NULL,
|
`quantity` DECIMAL(10, 0) NOT NULL,
|
||||||
`fee` DECIMAL(10, 2) NOT NULL,
|
`unitPrice` DECIMAL(15, 2) NOT NULL,
|
||||||
`totalCost` DECIMAL(10, 2) NOT NULL,
|
`totalCost` DECIMAL(15, 2) NOT NULL,
|
||||||
`referenceType` ENUM('PURCHASE', 'SALES', 'ADJUSTMENT', 'INVENTORY_TRANSFER') 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(15, 2) NOT NULL,
|
||||||
`supplierId` INTEGER NULL,
|
`supplierId` INTEGER NULL,
|
||||||
`remainedInStock` DECIMAL(10, 2) NOT NULL DEFAULT 0.00,
|
`remainedInStock` DECIMAL(10, 0) NOT NULL DEFAULT 0.00,
|
||||||
`counterInventoryId` INTEGER NULL,
|
`counterInventoryId` INTEGER NULL,
|
||||||
`customerId` INTEGER NULL,
|
`customerId` INTEGER NULL,
|
||||||
|
|
||||||
@@ -451,7 +471,7 @@ CREATE TABLE `Stock_Balance` (
|
|||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `Stock_Adjustments` (
|
CREATE TABLE `Stock_Adjustments` (
|
||||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`adjustedQuantity` DECIMAL(10, 2) NOT NULL,
|
`adjustedQuantity` DECIMAL(10, 0) 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,
|
||||||
@@ -462,12 +482,54 @@ CREATE TABLE `Stock_Adjustments` (
|
|||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- CreateTable
|
-- CreateTable
|
||||||
CREATE TABLE `_Bank_Accounts_inventoryId_fkey` (
|
CREATE TABLE `Stock_Reservations` (
|
||||||
`A` INTEGER NOT NULL,
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
`B` INTEGER NOT NULL,
|
`quantity` DECIMAL(10, 0) NOT NULL,
|
||||||
|
`expiresAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`productId` INTEGER NOT NULL,
|
||||||
|
`inventoryId` INTEGER NOT NULL,
|
||||||
|
`orderId` INTEGER NOT NULL,
|
||||||
|
|
||||||
UNIQUE INDEX `_Bank_Accounts_inventoryId_fkey_AB_unique`(`A`, `B`),
|
INDEX `Stock_Reservations_inventoryId_idx`(`inventoryId`),
|
||||||
INDEX `_Bank_Accounts_inventoryId_fkey_B_index`(`B`)
|
INDEX `Stock_Reservations_productId_idx`(`productId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Suppliers` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`firstName` VARCHAR(255) NOT NULL,
|
||||||
|
`lastName` VARCHAR(255) NOT NULL,
|
||||||
|
`email` VARCHAR(255) NULL,
|
||||||
|
`mobileNumber` CHAR(11) NOT NULL,
|
||||||
|
`address` TEXT NULL,
|
||||||
|
`city` VARCHAR(100) NULL,
|
||||||
|
`state` VARCHAR(100) NULL,
|
||||||
|
`country` VARCHAR(100) NULL,
|
||||||
|
`isActive` BOOLEAN NOT NULL DEFAULT true,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`updatedAt` TIMESTAMP(0) NOT NULL,
|
||||||
|
`deletedAt` TIMESTAMP(0) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `Suppliers_mobileNumber_key`(`mobileNumber`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Supplier_Ledger` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`description` TEXT NULL,
|
||||||
|
`debit` DECIMAL(15, 2) NOT NULL DEFAULT 0,
|
||||||
|
`credit` DECIMAL(15, 2) NOT NULL DEFAULT 0,
|
||||||
|
`balance` DECIMAL(15, 2) NOT NULL,
|
||||||
|
`sourceType` ENUM('PURCHASE', 'PAYMENT', 'ADJUSTMENT', 'REFUND') NOT NULL,
|
||||||
|
`sourceId` INTEGER NOT NULL,
|
||||||
|
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||||
|
`supplierId` INTEGER NOT NULL,
|
||||||
|
|
||||||
|
INDEX `Supplier_Ledger_supplierId_idx`(`supplierId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
@@ -482,6 +544,21 @@ ALTER TABLE `Bank_Branches` ADD CONSTRAINT `Bank_Branches_bankId_fkey` FOREIGN K
|
|||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Bank_Accounts` ADD CONSTRAINT `Bank_Accounts_branchId_fkey` FOREIGN KEY (`branchId`) REFERENCES `Bank_Branches`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
ALTER TABLE `Bank_Accounts` ADD CONSTRAINT `Bank_Accounts_branchId_fkey` FOREIGN KEY (`branchId`) REFERENCES `Bank_Branches`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Bank_Account_Transactions` ADD CONSTRAINT `Bank_Account_Transactions_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Bank_Account_Balance` ADD CONSTRAINT `Bank_Account_Balance_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Inventory_Bank_Accounts` ADD CONSTRAINT `Inventory_Bank_Accounts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Inventory_Bank_Accounts` ADD CONSTRAINT `Inventory_Bank_Accounts_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Pos_Accounts` ADD CONSTRAINT `Pos_Accounts_inventoryId_bankAccountId_fkey` FOREIGN KEY (`inventoryId`, `bankAccountId`) REFERENCES `Inventory_Bank_Accounts`(`inventoryId`, `bankAccountId`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- 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;
|
||||||
|
|
||||||
@@ -495,37 +572,13 @@ ALTER TABLE `Inventory_Transfer_Items` ADD CONSTRAINT `Inventory_Transfer_Items_
|
|||||||
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
|
-- 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;
|
ALTER TABLE `Orders` ADD CONSTRAINT `Orders_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE NO ACTION;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- 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;
|
ALTER TABLE `Order_Items` ADD CONSTRAINT `Order_Items_orderId_fkey` FOREIGN KEY (`orderId`) REFERENCES `Orders`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Pos_Accounts` ADD CONSTRAINT `Pos_Accounts_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
ALTER TABLE `Order_Items` ADD CONSTRAINT `Order_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
||||||
|
|
||||||
-- AddForeignKey
|
|
||||||
ALTER TABLE `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
|
-- 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 `Product_Variants` ADD CONSTRAINT `Product_Variants_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;
|
||||||
@@ -552,7 +605,25 @@ ALTER TABLE `Purchase_Receipt_Items` ADD CONSTRAINT `Purchase_Receipt_Items_rece
|
|||||||
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;
|
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
|
-- 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;
|
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_bankAccountId_fkey` FOREIGN KEY (`bankAccountId`) REFERENCES `Bank_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Purchase_Receipt_Payments` ADD CONSTRAINT `Purchase_Receipt_Payments_inventoryBankAccountInventoryId_i_fkey` FOREIGN KEY (`inventoryBankAccountInventoryId`, `inventoryBankAccountBankAccountId`) REFERENCES `Inventory_Bank_Accounts`(`inventoryId`, `bankAccountId`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_customerId_fkey` FOREIGN KEY (`customerId`) REFERENCES `Customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoices` ADD CONSTRAINT `Sales_Invoices_posAccountId_fkey` FOREIGN KEY (`posAccountId`) REFERENCES `Pos_Accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoice_Items` ADD CONSTRAINT `Sales_Invoice_Items_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `SalesInvoicePayment` ADD CONSTRAINT `SalesInvoicePayment_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- AddForeignKey
|
||||||
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_counterInventoryId_fkey` FOREIGN KEY (`counterInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
ALTER TABLE `Stock_Movements` ADD CONSTRAINT `Stock_Movements_counterInventoryId_fkey` FOREIGN KEY (`counterInventoryId`) REFERENCES `Inventories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
@@ -582,7 +653,10 @@ ALTER TABLE `Stock_Adjustments` ADD CONSTRAINT `Stock_Adjustments_inventoryId_fk
|
|||||||
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
|
-- 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;
|
ALTER TABLE `Stock_Reservations` ADD CONSTRAINT `Stock_Reservations_inventoryId_fkey` FOREIGN KEY (`inventoryId`) REFERENCES `Inventories`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
-- AddForeignKey
|
-- 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;
|
ALTER TABLE `Stock_Reservations` ADD CONSTRAINT `Stock_Reservations_productId_fkey` FOREIGN KEY (`productId`) REFERENCES `Products`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Supplier_Ledger` ADD CONSTRAINT `Supplier_Ledger_supplierId_fkey` FOREIGN KEY (`supplierId`) REFERENCES `Suppliers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `totalPrice` on the `Order_Items` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `totalPrice` on the `Purchase_Receipt_Items` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `totalPrice` on the `Sales_Invoice_Items` table. All the data in the column will be lost.
|
||||||
|
- Added the required column `totalAmount` to the `Order_Items` table without a default value. This is not possible if the table is not empty.
|
||||||
|
- Added the required column `totalAmount` to the `Purchase_Receipt_Items` table without a default value. This is not possible if the table is not empty.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `Order_Items` DROP COLUMN `totalPrice`,
|
||||||
|
ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `Purchase_Receipt_Items` DROP COLUMN `totalPrice`,
|
||||||
|
ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `Sales_Invoice_Items` DROP COLUMN `totalPrice`,
|
||||||
|
ADD COLUMN `totalAmount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00;
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the `SalesInvoicePayment` table. If the table is not empty, all the data it contains will be lost.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- DropForeignKey
|
||||||
|
ALTER TABLE `SalesInvoicePayment` DROP FOREIGN KEY `SalesInvoicePayment_invoiceId_fkey`;
|
||||||
|
|
||||||
|
-- DropTable
|
||||||
|
DROP TABLE `SalesInvoicePayment`;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `Sales_Invoice_Payments` (
|
||||||
|
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||||
|
`invoiceId` INTEGER NOT NULL,
|
||||||
|
`amount` DECIMAL(15, 2) NOT NULL,
|
||||||
|
`paymentMethod` ENUM('CASH', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
||||||
|
`paidAt` DATETIME(3) NOT NULL,
|
||||||
|
`createdAt` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
|
||||||
|
INDEX `Sales_Invoice_Payments_invoiceId_idx`(`invoiceId`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `Sales_Invoice_Payments` ADD CONSTRAINT `Sales_Invoice_Payments_invoiceId_fkey` FOREIGN KEY (`invoiceId`) REFERENCES `Sales_Invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
@@ -0,0 +1,8 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- The values [REJECT] on the enum `Orders_status` will be removed. If these variants are still used in the database, this will fail.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `Orders` MODIFY `status` ENUM('PENDING', 'REJECTED', 'CANCELED', 'DONE') NOT NULL DEFAULT 'PENDING';
|
||||||
@@ -25,13 +25,13 @@ 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, counterInventoryId, createdAt, remainedInStock)
|
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||||
VALUES
|
VALUES
|
||||||
('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, toInv, 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, counterInventoryId, createdAt, remainedInStock)
|
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||||
VALUES
|
VALUES
|
||||||
('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, fromInv, 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;
|
||||||
@@ -66,7 +66,7 @@ DECLARE invId INT;
|
|||||||
INSERT INTO Stock_Movements (
|
INSERT INTO Stock_Movements (
|
||||||
type,
|
type,
|
||||||
quantity,
|
quantity,
|
||||||
fee,
|
unitPrice,
|
||||||
totalCost,
|
totalCost,
|
||||||
referenceType,
|
referenceType,
|
||||||
referenceId,
|
referenceId,
|
||||||
@@ -80,7 +80,7 @@ DECLARE invId INT;
|
|||||||
VALUES (
|
VALUES (
|
||||||
'IN',
|
'IN',
|
||||||
NEW.count,
|
NEW.count,
|
||||||
NEW.fee,
|
NEW.unitPrice,
|
||||||
NEW.total,
|
NEW.total,
|
||||||
'PURCHASE',
|
'PURCHASE',
|
||||||
NEW.receiptId,
|
NEW.receiptId,
|
||||||
@@ -157,7 +157,7 @@ DECLARE customer_id INT;
|
|||||||
INSERT INTO Stock_Movements (
|
INSERT INTO Stock_Movements (
|
||||||
type,
|
type,
|
||||||
quantity,
|
quantity,
|
||||||
fee,
|
unitPrice,
|
||||||
totalCost,
|
totalCost,
|
||||||
referenceType,
|
referenceType,
|
||||||
referenceId,
|
referenceId,
|
||||||
@@ -171,7 +171,7 @@ DECLARE customer_id INT;
|
|||||||
VALUES (
|
VALUES (
|
||||||
'OUT',
|
'OUT',
|
||||||
NEW.count,
|
NEW.count,
|
||||||
NEW.fee,
|
NEW.unitPrice,
|
||||||
NEW.total,
|
NEW.total,
|
||||||
'SALES',
|
'SALES',
|
||||||
NEW.invoiceId,
|
NEW.invoiceId,
|
||||||
@@ -260,8 +260,8 @@ VALUES (
|
|||||||
NEW.productId,
|
NEW.productId,
|
||||||
NEW.inventoryId,
|
NEW.inventoryId,
|
||||||
- NEW.quantity,
|
- NEW.quantity,
|
||||||
- COALESCE(NEW.fee, 0) * NEW.quantity,
|
- COALESCE(NEW.unitPrice, 0) * NEW.quantity,
|
||||||
COALESCE(NEW.fee, 0),
|
COALESCE(NEW.unitPrice, 0),
|
||||||
NOW()
|
NOW()
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -294,7 +294,7 @@ INSERT INTO
|
|||||||
VALUES (
|
VALUES (
|
||||||
NEW.productId,
|
NEW.productId,
|
||||||
NEW.quantity,
|
NEW.quantity,
|
||||||
NEW.fee,
|
NEW.unitPrice,
|
||||||
NEW.totalCost,
|
NEW.totalCost,
|
||||||
NEW.inventoryId,
|
NEW.inventoryId,
|
||||||
NOW()
|
NOW()
|
||||||
@@ -329,7 +329,7 @@ INSERT INTO
|
|||||||
VALUES (
|
VALUES (
|
||||||
NEW.productId,
|
NEW.productId,
|
||||||
NEW.quantity,
|
NEW.quantity,
|
||||||
NEW.fee,
|
NEW.unitPrice,
|
||||||
NEW.totalCost,
|
NEW.totalCost,
|
||||||
NEW.inventoryId,
|
NEW.inventoryId,
|
||||||
NOW()
|
NOW()
|
||||||
|
|||||||
@@ -28,6 +28,35 @@ model BankAccount {
|
|||||||
branch BankBranch @relation("Bank_Accounts_branchId_fkey", fields: [branchId], references: [id])
|
branch BankBranch @relation("Bank_Accounts_branchId_fkey", fields: [branchId], references: [id])
|
||||||
inventoryBankAccounts InventoryBankAccount[]
|
inventoryBankAccounts InventoryBankAccount[]
|
||||||
purchaseReceiptPayments PurchaseReceiptPayments[]
|
purchaseReceiptPayments PurchaseReceiptPayments[]
|
||||||
|
bankAccountTransactions BankAccountTransaction[]
|
||||||
|
bankAccountBalances BankAccountBalance[]
|
||||||
|
|
||||||
@@map("Bank_Accounts")
|
@@map("Bank_Accounts")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model BankAccountTransaction {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
bankAccountId Int
|
||||||
|
type BankAccountTransactionType
|
||||||
|
amount Decimal @db.Decimal(15, 2)
|
||||||
|
balanceAfter Decimal @db.Decimal(15, 2)
|
||||||
|
referenceId Int
|
||||||
|
referenceType BankTransactionRefType
|
||||||
|
description String? @db.Text
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
|
||||||
|
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
|
||||||
|
|
||||||
|
@@index([bankAccountId])
|
||||||
|
@@map("Bank_Account_Transactions")
|
||||||
|
}
|
||||||
|
|
||||||
|
model BankAccountBalance {
|
||||||
|
bankAccountId Int @unique
|
||||||
|
balance Decimal @db.Decimal(15, 2)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
|
||||||
|
bankAccount BankAccount @relation(fields: [bankAccountId], references: [id])
|
||||||
|
|
||||||
|
@@map("Bank_Account_Balance")
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
enum OrderStatus {
|
enum OrderStatus {
|
||||||
PENDING
|
PENDING
|
||||||
REJECT
|
REJECTED
|
||||||
|
CANCELED
|
||||||
DONE
|
DONE
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -42,3 +43,17 @@ enum PurchaseReceiptStatus {
|
|||||||
PARTIALLY_PAID
|
PARTIALLY_PAID
|
||||||
PAID
|
PAID
|
||||||
}
|
}
|
||||||
|
|
||||||
|
enum BankAccountTransactionType {
|
||||||
|
DEPOSIT
|
||||||
|
WITHDRAWAL
|
||||||
|
}
|
||||||
|
|
||||||
|
enum BankTransactionRefType {
|
||||||
|
PURCHASE_PAYMENT
|
||||||
|
PURCHASE_REFUND
|
||||||
|
POS_SALE
|
||||||
|
POS_REFUND
|
||||||
|
BANK_TRANSFER
|
||||||
|
MANUAL_ADJUSTMENT
|
||||||
|
}
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ model Inventory {
|
|||||||
counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory")
|
counterStockMovements StockMovement[] @relation("StockMovement_CounterInventory")
|
||||||
stockMovements StockMovement[] @relation("StockMovement_Inventory")
|
stockMovements StockMovement[] @relation("StockMovement_Inventory")
|
||||||
inventoryBankAccounts InventoryBankAccount[]
|
inventoryBankAccounts InventoryBankAccount[]
|
||||||
|
stockReservations StockReservation[]
|
||||||
|
|
||||||
@@map("Inventories")
|
@@map("Inventories")
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
model Order {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
orderNumber String @unique @db.VarChar(100)
|
||||||
|
status OrderStatus @default(PENDING)
|
||||||
|
totalAmount Decimal @db.Decimal(15, 2)
|
||||||
|
description String? @db.Text
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deletedAt DateTime? @db.Timestamp(0)
|
||||||
|
customerId Int?
|
||||||
|
customer Customer? @relation(fields: [customerId], references: [id], onUpdate: NoAction)
|
||||||
|
orderItems OrderItem[]
|
||||||
|
|
||||||
|
@@index([customerId])
|
||||||
|
@@map("Orders")
|
||||||
|
}
|
||||||
|
|
||||||
|
model OrderItem {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
quantity Decimal @db.Decimal(10, 0)
|
||||||
|
unitPrice Decimal @db.Decimal(15, 2)
|
||||||
|
totalAmount Decimal @db.Decimal(15, 2)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
orderId Int
|
||||||
|
productId Int
|
||||||
|
|
||||||
|
order Order @relation(fields: [orderId], references: [id], onUpdate: NoAction)
|
||||||
|
product Product @relation(fields: [productId], references: [id], onUpdate: NoAction)
|
||||||
|
|
||||||
|
@@index([orderId])
|
||||||
|
@@index([productId])
|
||||||
|
@@map("Order_Items")
|
||||||
|
}
|
||||||
@@ -19,57 +19,6 @@ model Customer {
|
|||||||
@@map("Customers")
|
@@map("Customers")
|
||||||
}
|
}
|
||||||
|
|
||||||
model Order {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
orderNumber String @unique @db.VarChar(100)
|
|
||||||
status OrderStatus @default(PENDING)
|
|
||||||
paymentMethod PaymentMethodType @default(CARD)
|
|
||||||
totalAmount Decimal @db.Decimal(15, 2)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deletedAt DateTime? @db.Timestamp(0)
|
|
||||||
customerId Int
|
|
||||||
customer Customer @relation(fields: [customerId], references: [id], onUpdate: NoAction)
|
|
||||||
|
|
||||||
@@index([customerId])
|
|
||||||
@@map("Orders")
|
|
||||||
}
|
|
||||||
|
|
||||||
model SalesInvoice {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
code String @unique @db.VarChar(100)
|
|
||||||
totalAmount Decimal @db.Decimal(15, 2)
|
|
||||||
description String? @db.Text
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
customerId Int?
|
|
||||||
posAccountId Int
|
|
||||||
items SalesInvoiceItem[]
|
|
||||||
customer Customer? @relation(fields: [customerId], references: [id])
|
|
||||||
posAccount PosAccount @relation(fields: [posAccountId], references: [id])
|
|
||||||
|
|
||||||
@@index([customerId])
|
|
||||||
@@index([posAccountId])
|
|
||||||
@@map("Sales_Invoices")
|
|
||||||
}
|
|
||||||
|
|
||||||
model SalesInvoiceItem {
|
|
||||||
id Int @id @default(autoincrement())
|
|
||||||
count Decimal @db.Decimal(10, 0)
|
|
||||||
fee Decimal @db.Decimal(15, 2)
|
|
||||||
total Decimal @db.Decimal(15, 2)
|
|
||||||
createdAt DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
invoiceId Int
|
|
||||||
productId Int
|
|
||||||
invoice SalesInvoice @relation(fields: [invoiceId], references: [id])
|
|
||||||
product Product @relation(fields: [productId], references: [id])
|
|
||||||
|
|
||||||
@@index([invoiceId])
|
|
||||||
@@index([productId])
|
|
||||||
@@map("Sales_Invoice_Items")
|
|
||||||
}
|
|
||||||
|
|
||||||
model TriggerLog {
|
model TriggerLog {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
message String @db.Text
|
message String @db.Text
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ model Product {
|
|||||||
stockBalances StockBalance[] @relation("StockBalance_Product")
|
stockBalances StockBalance[] @relation("StockBalance_Product")
|
||||||
stockMovements StockMovement[] @relation("StockMovement_Product")
|
stockMovements StockMovement[] @relation("StockMovement_Product")
|
||||||
salesInvoiceItems SalesInvoiceItem[]
|
salesInvoiceItems SalesInvoiceItem[]
|
||||||
|
stockReservations StockReservation[]
|
||||||
|
orderItems OrderItem[]
|
||||||
|
|
||||||
@@index([brandId], map: "Products_brandId_fkey")
|
@@index([brandId], map: "Products_brandId_fkey")
|
||||||
@@index([categoryId], map: "Products_categoryId_fkey")
|
@@index([categoryId], map: "Products_categoryId_fkey")
|
||||||
|
|||||||
@@ -22,8 +22,8 @@ model PurchaseReceipt {
|
|||||||
model PurchaseReceiptItem {
|
model PurchaseReceiptItem {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
count Decimal @db.Decimal(10, 0)
|
count Decimal @db.Decimal(10, 0)
|
||||||
fee Decimal @db.Decimal(15, 2)
|
unitPrice Decimal @db.Decimal(15, 2)
|
||||||
total Decimal @db.Decimal(15, 2)
|
totalAmount Decimal @db.Decimal(15, 2)
|
||||||
receiptId Int
|
receiptId Int
|
||||||
productId Int
|
productId Int
|
||||||
description String? @db.Text
|
description String? @db.Text
|
||||||
|
|||||||
@@ -0,0 +1,48 @@
|
|||||||
|
model SalesInvoice {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
code String @unique @db.VarChar(100)
|
||||||
|
totalAmount Decimal @db.Decimal(15, 2)
|
||||||
|
description String? @db.Text
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updatedAt DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
customerId Int?
|
||||||
|
posAccountId Int
|
||||||
|
customer Customer? @relation(fields: [customerId], references: [id])
|
||||||
|
posAccount PosAccount @relation(fields: [posAccountId], references: [id])
|
||||||
|
items SalesInvoiceItem[]
|
||||||
|
salesInvoicePayments SalesInvoicePayment[]
|
||||||
|
|
||||||
|
@@index([customerId])
|
||||||
|
@@index([posAccountId])
|
||||||
|
@@map("Sales_Invoices")
|
||||||
|
}
|
||||||
|
|
||||||
|
model SalesInvoiceItem {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
count Decimal @db.Decimal(10, 0)
|
||||||
|
unitPrice Decimal @default(0.00) @db.Decimal(15, 2)
|
||||||
|
totalAmount Decimal @default(0.00) @db.Decimal(15, 2)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
invoiceId Int
|
||||||
|
productId Int
|
||||||
|
invoice SalesInvoice @relation(fields: [invoiceId], references: [id])
|
||||||
|
product Product @relation(fields: [productId], references: [id])
|
||||||
|
|
||||||
|
@@index([invoiceId])
|
||||||
|
@@index([productId])
|
||||||
|
@@map("Sales_Invoice_Items")
|
||||||
|
}
|
||||||
|
|
||||||
|
model SalesInvoicePayment {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
invoiceId Int
|
||||||
|
amount Decimal @db.Decimal(15, 2)
|
||||||
|
paymentMethod PaymentMethodType
|
||||||
|
paidAt DateTime
|
||||||
|
createdAt DateTime @default(now())
|
||||||
|
|
||||||
|
invoice SalesInvoice @relation(fields: [invoiceId], references: [id])
|
||||||
|
|
||||||
|
@@index([invoiceId])
|
||||||
|
@@map("Sales_Invoice_Payments")
|
||||||
|
}
|
||||||
@@ -2,7 +2,7 @@ model StockMovement {
|
|||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
type MovementType
|
type MovementType
|
||||||
quantity Decimal @db.Decimal(10, 0)
|
quantity Decimal @db.Decimal(10, 0)
|
||||||
fee Decimal @db.Decimal(15, 2)
|
unitPrice Decimal @db.Decimal(15, 2)
|
||||||
totalCost Decimal @db.Decimal(15, 2)
|
totalCost Decimal @db.Decimal(15, 2)
|
||||||
referenceType MovementReferenceType
|
referenceType MovementReferenceType
|
||||||
referenceId String
|
referenceId String
|
||||||
@@ -59,3 +59,19 @@ model StockAdjustment {
|
|||||||
@@index([productId], map: "Stock_Adjustments_productId_fkey")
|
@@index([productId], map: "Stock_Adjustments_productId_fkey")
|
||||||
@@map("Stock_Adjustments")
|
@@map("Stock_Adjustments")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
model StockReservation {
|
||||||
|
id Int @id @default(autoincrement())
|
||||||
|
quantity Decimal @db.Decimal(10, 0)
|
||||||
|
expiresAt DateTime @db.Timestamp(0)
|
||||||
|
createdAt DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
productId Int
|
||||||
|
inventoryId Int
|
||||||
|
orderId Int
|
||||||
|
inventory Inventory @relation(fields: [inventoryId], references: [id])
|
||||||
|
product Product @relation(fields: [productId], references: [id])
|
||||||
|
|
||||||
|
@@index([inventoryId])
|
||||||
|
@@index([productId])
|
||||||
|
@@map("Stock_Reservations")
|
||||||
|
}
|
||||||
|
|||||||
+49
-61
@@ -10,7 +10,6 @@ async function main() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.user.count()) === 0) {
|
if ((await prisma.user.count()) === 0) {
|
||||||
const adminRole = await prisma.role.findUnique({ where: { name: 'Admin' } })
|
const adminRole = await prisma.role.findUnique({ where: { name: 'Admin' } })
|
||||||
if (!adminRole) {
|
if (!adminRole) {
|
||||||
@@ -28,7 +27,6 @@ async function main() {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.inventory.count()) === 0) {
|
if ((await prisma.inventory.count()) === 0) {
|
||||||
await prisma.inventory.createMany({
|
await prisma.inventory.createMany({
|
||||||
data: [
|
data: [
|
||||||
@@ -48,19 +46,16 @@ async function main() {
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.productCategory.count()) === 0) {
|
if ((await prisma.productCategory.count()) === 0) {
|
||||||
await prisma.productCategory.createMany({
|
await prisma.productCategory.createMany({
|
||||||
data: Array.from({ length: 10 }, (_, i) => ({ name: `دستهی ${i + 1}` })),
|
data: Array.from({ length: 10 }, (_, i) => ({ name: `دستهی ${i + 1}` })),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.productBrand.count()) === 0) {
|
if ((await prisma.productBrand.count()) === 0) {
|
||||||
await prisma.productBrand.createMany({
|
await prisma.productBrand.createMany({
|
||||||
data: Array.from({ length: 10 }, (_, i) => ({ name: `برند ${i + 1}` })),
|
data: Array.from({ length: 10 }, (_, i) => ({ name: `برند ${i + 1}` })),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.supplier.count()) === 0) {
|
if ((await prisma.supplier.count()) === 0) {
|
||||||
await prisma.supplier.createMany({
|
await prisma.supplier.createMany({
|
||||||
data: Array.from({ length: 9 }, (_, i) => ({
|
data: Array.from({ length: 9 }, (_, i) => ({
|
||||||
@@ -71,7 +66,6 @@ async function main() {
|
|||||||
})),
|
})),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.customer.count()) === 0) {
|
if ((await prisma.customer.count()) === 0) {
|
||||||
await prisma.customer.createMany({
|
await prisma.customer.createMany({
|
||||||
data: Array.from({ length: 5 }, (_, i) => ({
|
data: Array.from({ length: 5 }, (_, i) => ({
|
||||||
@@ -82,12 +76,11 @@ async function main() {
|
|||||||
})),
|
})),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.product.count()) === 0) {
|
if ((await prisma.product.count()) === 0) {
|
||||||
const categories = await prisma.productCategory.findMany()
|
const categories = await prisma.productCategory.findMany()
|
||||||
const brands = await prisma.productBrand.findMany()
|
const brands = await prisma.productBrand.findMany()
|
||||||
await prisma.product.createMany({
|
await prisma.product.createMany({
|
||||||
data: Array.from({ length: 100 }, (_, i) => ({
|
data: Array.from({ length: 20 }, (_, i) => ({
|
||||||
name: `کالای ${i + 1}`,
|
name: `کالای ${i + 1}`,
|
||||||
sku: `SKU-${1000 + i + 1}`,
|
sku: `SKU-${1000 + i + 1}`,
|
||||||
salePrice: parseInt((Math.random() * (100 - 10) + 10).toString()) * 10000,
|
salePrice: parseInt((Math.random() * (100 - 10) + 10).toString()) * 10000,
|
||||||
@@ -96,7 +89,6 @@ async function main() {
|
|||||||
})),
|
})),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.bank.count()) === 0) {
|
if ((await prisma.bank.count()) === 0) {
|
||||||
await prisma.bank.createMany({
|
await prisma.bank.createMany({
|
||||||
data: [
|
data: [
|
||||||
@@ -231,7 +223,6 @@ async function main() {
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.bankBranch.count()) === 0) {
|
if ((await prisma.bankBranch.count()) === 0) {
|
||||||
await prisma.bankBranch.createMany({
|
await prisma.bankBranch.createMany({
|
||||||
data: [
|
data: [
|
||||||
@@ -253,7 +244,6 @@ async function main() {
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((await prisma.bankAccount.count()) === 0) {
|
if ((await prisma.bankAccount.count()) === 0) {
|
||||||
await prisma.bankAccount.createMany({
|
await prisma.bankAccount.createMany({
|
||||||
data: [
|
data: [
|
||||||
@@ -278,56 +268,54 @@ async function main() {
|
|||||||
],
|
],
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
if ((await prisma.inventoryBankAccount.count()) === 0) {
|
||||||
|
const inventories = await prisma.inventory.findMany()
|
||||||
|
const bankAccounts = await prisma.bankAccount.findMany()
|
||||||
|
if (inventories.length || bankAccounts.length) {
|
||||||
|
// Assign bank accounts to inventories
|
||||||
|
const inventoryBankAccounts = []
|
||||||
|
for (let i = 0; i < inventories.length; i++) {
|
||||||
|
const inventory = inventories[i]
|
||||||
|
const bankAccount = bankAccounts[i % bankAccounts.length] // Cycle through bank accounts
|
||||||
|
// @ts-ignore
|
||||||
|
inventoryBankAccounts.push({
|
||||||
|
inventoryId: inventory.id,
|
||||||
|
bankAccountId: bankAccount.id,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
await prisma.inventoryBankAccount.createMany({
|
||||||
|
data: inventoryBankAccounts,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ((await prisma.posAccount.count()) === 0) {
|
||||||
|
const inventories = await prisma.inventory.findMany({
|
||||||
|
where: { isPointOfSale: true },
|
||||||
|
})
|
||||||
|
const inventoryBankAccounts = await prisma.inventoryBankAccount.findMany()
|
||||||
|
const posAccounts = []
|
||||||
|
for (let i = 0; i < inventories.length; i++) {
|
||||||
|
const inventory = inventories[i]
|
||||||
|
// Find a bank account assigned to this inventory
|
||||||
|
const inventoryBankAccount = inventoryBankAccounts.find(
|
||||||
|
iba => iba.inventoryId === inventory.id,
|
||||||
|
)
|
||||||
|
if (inventoryBankAccount) {
|
||||||
|
// @ts-ignore
|
||||||
|
|
||||||
// if ((await prisma.inventoryBankAccount.count()) === 0) {
|
posAccounts.push({
|
||||||
// const inventories = await prisma.inventory.findMany()
|
name: `پوز ${inventory.name}`,
|
||||||
// const bankAccounts = await prisma.bankAccount.findMany()
|
code: `POS${(i + 1).toString().padStart(3, '0')}`,
|
||||||
|
description: `پوز فروشگاه ${inventory.name}`,
|
||||||
// // Assign bank accounts to inventories
|
inventoryId: inventory.id,
|
||||||
// const inventoryBankAccounts = []
|
bankAccountId: inventoryBankAccount.bankAccountId,
|
||||||
// for (let i = 0; i < inventories.length; i++) {
|
})
|
||||||
// const inventory = inventories[i]
|
}
|
||||||
// const bankAccount = bankAccounts[i % bankAccounts.length] // Cycle through bank accounts
|
}
|
||||||
// inventoryBankAccounts.push({
|
await prisma.posAccount.createMany({
|
||||||
// inventoryId: inventory.id,
|
data: posAccounts,
|
||||||
// bankAccountId: bankAccount.id,
|
})
|
||||||
// })
|
}
|
||||||
// }
|
|
||||||
|
|
||||||
// await prisma.inventoryBankAccount.createMany({
|
|
||||||
// data: inventoryBankAccounts,
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
// if ((await prisma.posAccount.count()) === 0) {
|
|
||||||
// const inventories = await prisma.inventory.findMany({
|
|
||||||
// where: { isPointOfSale: true },
|
|
||||||
// })
|
|
||||||
// const inventoryBankAccounts = await prisma.inventoryBankAccount.findMany()
|
|
||||||
|
|
||||||
// const posAccounts = []
|
|
||||||
// for (let i = 0; i < inventories.length; i++) {
|
|
||||||
// const inventory = inventories[i]
|
|
||||||
// // Find a bank account assigned to this inventory
|
|
||||||
// const inventoryBankAccount = inventoryBankAccounts.find(
|
|
||||||
// iba => iba.inventoryId === inventory.id,
|
|
||||||
// )
|
|
||||||
// if (inventoryBankAccount) {
|
|
||||||
// posAccounts.push({
|
|
||||||
// name: `پوز ${inventory.name}`,
|
|
||||||
// code: `POS${(i + 1).toString().padStart(3, '0')}`,
|
|
||||||
// description: `پوز فروشگاه ${inventory.name}`,
|
|
||||||
// inventoryId: inventory.id,
|
|
||||||
// bankAccountId: inventoryBankAccount.bankAccountId,
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
// await prisma.posAccount.createMany({
|
|
||||||
// data: posAccounts,
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Seed purchase, transfer, and sales transactions
|
// Seed purchase, transfer, and sales transactions
|
||||||
// const inventories = await prisma.inventory.findMany()
|
// const inventories = await prisma.inventory.findMany()
|
||||||
// const products = await prisma.product.findMany({ take: 5 }) // select 5 products for demo
|
// const products = await prisma.product.findMany({ take: 5 }) // select 5 products for demo
|
||||||
@@ -343,7 +331,7 @@ async function main() {
|
|||||||
// items: products.map(product => ({
|
// items: products.map(product => ({
|
||||||
// productId: product.id,
|
// productId: product.id,
|
||||||
// count: 10,
|
// count: 10,
|
||||||
// fee: Number(product.salePrice),
|
// unitPrice: Number(product.salePrice),
|
||||||
// total: 10 * Number(product.salePrice),
|
// total: 10 * Number(product.salePrice),
|
||||||
// })),
|
// })),
|
||||||
// })
|
// })
|
||||||
|
|||||||
@@ -1,332 +0,0 @@
|
|||||||
-- AUTO-GENERATED MYSQL TRIGGER DUMP
|
|
||||||
-- Generated at: 2025-12-10T10:03:36.966Z
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_transfer_item_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Inventory_Transfer_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin
|
|
||||||
|
|
||||||
DECLARE fromInv INT;
|
|
||||||
DECLARE toInv INT;
|
|
||||||
|
|
||||||
SELECT fromInventoryId, toInventoryId INTO fromInv, toInv
|
|
||||||
FROM Inventory_Transfers WHERE id = NEW.transferId;
|
|
||||||
|
|
||||||
-- OUT from source
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(type, quantity, referenceType, referenceId, productId, inventoryId, createdAt)
|
|
||||||
VALUES
|
|
||||||
('OUT', NEW.count, 'InventoryTransfer', NEW.transferId, NEW.productId, fromInv, NOW());
|
|
||||||
|
|
||||||
-- IN to destination
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(type, quantity, referenceType, referenceId, productId, inventoryId, createdAt)
|
|
||||||
VALUES
|
|
||||||
('IN', NEW.count, 'InventoryTransfer', NEW.transferId, NEW.productId, toInv, NOW());
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_purchase_receipt_item_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Purchase_Receipt_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_item_after_insert` AFTER INSERT ON `Purchase_Receipt_Items` FOR EACH ROW begin
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(
|
|
||||||
type,
|
|
||||||
quantity,
|
|
||||||
fee,
|
|
||||||
totalCost,
|
|
||||||
referenceType,
|
|
||||||
referenceId,
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
avgCost,
|
|
||||||
createdAt
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
(
|
|
||||||
'IN',
|
|
||||||
NEW.count,
|
|
||||||
NEW.fee,
|
|
||||||
NEW.total,
|
|
||||||
'PURCHASE',
|
|
||||||
NEW.receiptId,
|
|
||||||
NEW.productId,
|
|
||||||
(SELECT inventoryId FROM Purchase_Receipts WHERE id = NEW.receiptId),
|
|
||||||
NEW.total / NEW.count,
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_purchase_receipt_item_after_update
|
|
||||||
-- Event: UPDATE
|
|
||||||
-- Table: Purchase_Receipt_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_update`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_item_after_update` AFTER UPDATE ON `Purchase_Receipt_Items` FOR EACH ROW begin
|
|
||||||
DELETE FROM Stock_Movements
|
|
||||||
WHERE referenceType = 'PURCHASE'
|
|
||||||
AND referenceId = NEW.receiptId
|
|
||||||
AND productId = NEW.productId;
|
|
||||||
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(
|
|
||||||
type,
|
|
||||||
quantity,
|
|
||||||
referenceType,
|
|
||||||
referenceId,
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
createdAt
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
(
|
|
||||||
'IN',
|
|
||||||
NEW.count,
|
|
||||||
'SALES',
|
|
||||||
NEW.id,
|
|
||||||
NEW.productId,
|
|
||||||
(SELECT inventoryId FROM Stores LIMIT 1),
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_purchase_receipt_item_after_delete
|
|
||||||
-- Event: DELETE
|
|
||||||
-- Table: Purchase_Receipt_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_delete`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_item_after_delete` AFTER DELETE ON `Purchase_Receipt_Items` FOR EACH ROW begin
|
|
||||||
DELETE FROM Stock_Movements
|
|
||||||
WHERE referenceType = 'PURCHASE'
|
|
||||||
AND referenceId = OLD.receiptId
|
|
||||||
AND productId = OLD.productId;
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_sales_invoice_items_before_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Sales_Invoice_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin
|
|
||||||
DECLARE current_stock DECIMAL(10,2);
|
|
||||||
|
|
||||||
SELECT stock INTO current_stock
|
|
||||||
FROM stock_view
|
|
||||||
WHERE productId = NEW.productId
|
|
||||||
LIMIT 1;
|
|
||||||
|
|
||||||
IF current_stock IS NULL THEN
|
|
||||||
SET current_stock = 0;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NEW.count > current_stock THEN
|
|
||||||
SIGNAL SQLSTATE '45000'
|
|
||||||
SET MESSAGE_TEXT = 'Not enough stock to complete sale.';
|
|
||||||
END IF;
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_sales_invoice_items_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Sales_Invoice_Items
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(
|
|
||||||
type,
|
|
||||||
quantity,
|
|
||||||
referenceType,
|
|
||||||
referenceId,
|
|
||||||
productId,
|
|
||||||
inventoryId,
|
|
||||||
createdAt
|
|
||||||
)
|
|
||||||
VALUES
|
|
||||||
(
|
|
||||||
'IN',
|
|
||||||
NEW.count,
|
|
||||||
'PURCHASE',
|
|
||||||
NEW.id,
|
|
||||||
NEW.productId,
|
|
||||||
(SELECT inventoryId FROM Sales_Invoices WHERE id = NEW.id),
|
|
||||||
NOW()
|
|
||||||
);
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_adjustment_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Adjustments
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_adjustment_after_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_adjustment_after_insert` AFTER INSERT ON `Stock_Adjustments` FOR EACH ROW begin
|
|
||||||
INSERT INTO Stock_Movements
|
|
||||||
(type, quantity, referenceType, referenceId, productId, inventoryId, createdAt)
|
|
||||||
VALUES
|
|
||||||
('ADJUST', NEW.adjustedQuantity, 'ADJUSTMENT', NEW.id, NEW.productId, NEW.inventoryId, NOW());
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_sale_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_sale_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN
|
|
||||||
IF NEW.referenceType = 'SALES' THEN
|
|
||||||
|
|
||||||
UPDATE stock_balance
|
|
||||||
SET
|
|
||||||
quantity = quantity - NEW.quantity,
|
|
||||||
totalCost = quantity * avgCost
|
|
||||||
WHERE productId = NEW.productId ;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_purchase_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN
|
|
||||||
IF NEW.referenceType = 'PURCHASE' THEN
|
|
||||||
|
|
||||||
INSERT INTO stock_balance (productId, quantity, avgCost, totalCost)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.quantity,
|
|
||||||
NEW.fee,
|
|
||||||
NEW.totalCost
|
|
||||||
)
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
quantity = quantity + NEW.quantity,
|
|
||||||
totalCost = totalCost + NEW.totalCost,
|
|
||||||
avgCost = totalCost / quantity;
|
|
||||||
|
|
||||||
END IF;
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_movement_after_insert
|
|
||||||
-- Event: INSERT
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_movement_after_insert`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_movement_after_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW begin
|
|
||||||
UPDATE Products pv
|
|
||||||
SET pv.quantity = (
|
|
||||||
SELECT COALESCE(SUM(
|
|
||||||
CASE
|
|
||||||
WHEN type = 'IN' THEN quantity
|
|
||||||
WHEN type = 'OUT' THEN -quantity
|
|
||||||
WHEN type = 'ADJUST' THEN quantity
|
|
||||||
END
|
|
||||||
), 0)
|
|
||||||
FROM Stock_Movements
|
|
||||||
WHERE productId = NEW.productId
|
|
||||||
)
|
|
||||||
WHERE pv.id = NEW.productId;
|
|
||||||
end;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_sale_update
|
|
||||||
-- Event: UPDATE
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_sale_update`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_sale_update` AFTER UPDATE ON `Stock_Movements` FOR EACH ROW BEGIN
|
|
||||||
IF OLD.referenceType = 'SALES' THEN
|
|
||||||
UPDATE stock_balance
|
|
||||||
SET
|
|
||||||
quantity = quantity + OLD.quantity,
|
|
||||||
totalCost = (quantity + OLD.quantity) * avgCost
|
|
||||||
WHERE productId = OLD.productId;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NEW.referenceType = 'SALES' THEN
|
|
||||||
UPDATE stock_balance
|
|
||||||
SET
|
|
||||||
quantity = quantity - NEW.quantity,
|
|
||||||
totalCost = (quantity - NEW.quantity) * avgCost
|
|
||||||
WHERE productId = NEW.productId;
|
|
||||||
END IF;
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_purchase_update
|
|
||||||
-- Event: UPDATE
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_purchase_update`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_purchase_update` AFTER UPDATE ON `Stock_Movements` FOR EACH ROW BEGIN
|
|
||||||
IF OLD.referenceType = 'PURCHASE' THEN
|
|
||||||
UPDATE stock_balance
|
|
||||||
SET
|
|
||||||
quantity = quantity - OLD.quantity,
|
|
||||||
totalCost = totalCost - (OLD.quantity * OLD.fee)
|
|
||||||
WHERE productId = OLD.productId;
|
|
||||||
END IF;
|
|
||||||
|
|
||||||
IF NEW.referenceType = 'PURCHASE' THEN
|
|
||||||
INSERT INTO stock_balance (productId, quantity, avgCost, totalCost)
|
|
||||||
VALUES (
|
|
||||||
NEW.productId,
|
|
||||||
NEW.quantity,
|
|
||||||
NEW.fee,
|
|
||||||
NEW.totalCost
|
|
||||||
)
|
|
||||||
ON DUPLICATE KEY UPDATE
|
|
||||||
quantity = quantity + NEW.quantity,
|
|
||||||
totalCost = totalCost + NEW.totalCost,
|
|
||||||
avgCost = totalCost / quantity;
|
|
||||||
END IF;
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_sale_delete
|
|
||||||
-- Event: DELETE
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_sale_delete`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_sale_delete` AFTER DELETE ON `Stock_Movements` FOR EACH ROW BEGIN
|
|
||||||
IF OLD.ReferenceType = 'SALES' THEN
|
|
||||||
UPDATE stock_balance
|
|
||||||
SET
|
|
||||||
quantity = quantity + OLD.quantity,
|
|
||||||
totalCost = (quantity + OLD.quantity) * avgCost
|
|
||||||
WHERE productId = OLD.productId;
|
|
||||||
END IF;
|
|
||||||
END;
|
|
||||||
|
|
||||||
-- ------------------------------------------
|
|
||||||
-- Trigger: trg_stock_purchase_delete
|
|
||||||
-- Event: DELETE
|
|
||||||
-- Table: Stock_Movements
|
|
||||||
-- ------------------------------------------
|
|
||||||
DROP TRIGGER IF EXISTS `trg_stock_purchase_delete`;
|
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_purchase_delete` AFTER DELETE ON `Stock_Movements` FOR EACH ROW BEGIN
|
|
||||||
IF OLD.referenceType = 'PURCHASE' THEN
|
|
||||||
UPDATE stock_balance
|
|
||||||
SET
|
|
||||||
quantity = quantity - OLD.quantity,
|
|
||||||
totalCost = totalCost - (OLD.quantity * OLD.fee),
|
|
||||||
avgCost = CASE
|
|
||||||
WHEN quantity - OLD.quantity = 0 THEN 0
|
|
||||||
ELSE (totalCost - (OLD.quantity * OLD.fee)) / (quantity - OLD.quantity)
|
|
||||||
END
|
|
||||||
WHERE productId = OLD.productId;
|
|
||||||
END IF;
|
|
||||||
END;
|
|
||||||
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
-- Auto-generated trigger dump
|
|
||||||
DELIMITER 8488
|
|
||||||
-- Trigger: 1
|
|
||||||
8488
|
|
||||||
DELIMITER ;
|
|
||||||
@@ -1,7 +1,34 @@
|
|||||||
-- AUTO-GENERATED MYSQL TRIGGER DUMP
|
-- AUTO-GENERATED MYSQL TRIGGER DUMP
|
||||||
-- Generated at: 2025-12-30T15:42:45.224Z
|
-- Generated at: 2026-01-04T09:46:30.365Z
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 1
|
||||||
|
-- Trigger: trg_bank_account_transaction_after_insert
|
||||||
|
-- Event: INSERT
|
||||||
|
-- Table: Bank_Account_Transactions
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_bank_account_transaction_after_insert`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_bank_account_transaction_after_insert` AFTER INSERT ON `Bank_Account_Transactions` FOR EACH ROW BEGIN
|
||||||
|
IF NEW.type = 'DEPOSIT' THEN
|
||||||
|
UPDATE Bank_Account_Balance SET balance = balance + NEW.amount WHERE bankAccountId = NEW.bankAccountId;
|
||||||
|
ELSEIF NEW.type = 'WITHDRAWAL' THEN
|
||||||
|
UPDATE Bank_Account_Balance SET balance = balance - NEW.amount WHERE bankAccountId = NEW.bankAccountId;
|
||||||
|
END IF;
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 2
|
||||||
|
-- Trigger: trg_bank_account_transaction_after_delete
|
||||||
|
-- Event: DELETE
|
||||||
|
-- Table: Bank_Account_Transactions
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_bank_account_transaction_after_delete`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_bank_account_transaction_after_delete` AFTER DELETE ON `Bank_Account_Transactions` FOR EACH ROW BEGIN
|
||||||
|
UPDATE Bank_Accounts SET balance = balance - OLD.amount;
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 3
|
||||||
-- Trigger: trg_transfer_item_after_insert
|
-- Trigger: trg_transfer_item_after_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Inventory_Transfer_Items
|
-- Table: Inventory_Transfer_Items
|
||||||
@@ -27,18 +54,71 @@ 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, counterInventoryId, createdAt, remainedInStock)
|
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||||
VALUES
|
VALUES
|
||||||
('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, toInv, 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, counterInventoryId, createdAt, remainedInStock)
|
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||||
VALUES
|
VALUES
|
||||||
('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, fromInv, 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;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 4
|
||||||
|
-- Trigger: trg_order_item_after_insert
|
||||||
|
-- Event: INSERT
|
||||||
|
-- Table: Order_Items
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_order_item_after_insert`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_item_after_insert` AFTER INSERT ON `Order_Items` FOR EACH ROW BEGIN
|
||||||
|
UPDATE Stock_Reservations SET quantity = quantity + NEW.quantity
|
||||||
|
WHERE orderId = NEW.orderId AND productId = NEW.productId;
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 5
|
||||||
|
-- Trigger: trg_order_item_after_update
|
||||||
|
-- Event: UPDATE
|
||||||
|
-- Table: Order_Items
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_order_item_after_update`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_item_after_update` AFTER UPDATE ON `Order_Items` FOR EACH ROW BEGIN
|
||||||
|
UPDATE Stock_Reservations
|
||||||
|
SET quantity = quantity - OLD.quantity + NEW.quantity
|
||||||
|
WHERE orderId = NEW.orderId AND productId = NEW.productId;
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 6
|
||||||
|
-- Trigger: trg_order_item_after_delete
|
||||||
|
-- Event: DELETE
|
||||||
|
-- Table: Order_Items
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_order_item_after_delete`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_item_after_delete` AFTER DELETE ON `Order_Items` FOR EACH ROW BEGIN
|
||||||
|
UPDATE Stock_Reservations SET quantity = quantity - OLD.quantity
|
||||||
|
WHERE orderId = OLD.orderId AND productId = OLD.productId;
|
||||||
|
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 7
|
||||||
|
-- Trigger: trg_order_after_cancel
|
||||||
|
-- Event: UPDATE
|
||||||
|
-- Table: Orders
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_order_after_cancel`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_after_cancel` AFTER UPDATE ON `Orders` FOR EACH ROW BEGIN
|
||||||
|
IF NEW.status = 'CANCELED' OR NEW.status = 'REJECTED' OR NEW.status = 'DONE' THEN
|
||||||
|
UPDATE Stock_Reservations sr SET quantity = 0
|
||||||
|
WHERE sr.orderId = NEW.id;
|
||||||
|
END IF;
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 8
|
||||||
-- Trigger: trg_purchase_receipt_item_after_insert
|
-- Trigger: trg_purchase_receipt_item_after_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Purchase_Receipt_Items
|
-- Table: Purchase_Receipt_Items
|
||||||
@@ -67,7 +147,7 @@ DECLARE invId INT;
|
|||||||
INSERT INTO Stock_Movements (
|
INSERT INTO Stock_Movements (
|
||||||
type,
|
type,
|
||||||
quantity,
|
quantity,
|
||||||
fee,
|
unitPrice,
|
||||||
totalCost,
|
totalCost,
|
||||||
referenceType,
|
referenceType,
|
||||||
referenceId,
|
referenceId,
|
||||||
@@ -81,15 +161,15 @@ DECLARE invId INT;
|
|||||||
VALUES (
|
VALUES (
|
||||||
'IN',
|
'IN',
|
||||||
NEW.count,
|
NEW.count,
|
||||||
NEW.fee,
|
NEW.unitPrice,
|
||||||
NEW.total,
|
NEW.totalAmount,
|
||||||
'PURCHASE',
|
'PURCHASE',
|
||||||
NEW.receiptId,
|
NEW.receiptId,
|
||||||
NEW.productId,
|
NEW.productId,
|
||||||
invId,
|
invId,
|
||||||
CASE
|
CASE
|
||||||
WHEN NEW.count = 0 THEN 0
|
WHEN NEW.count = 0 THEN 0
|
||||||
ELSE NEW.total / NEW.count
|
ELSE NEW.totalAmount / NEW.count
|
||||||
END
|
END
|
||||||
|
|
||||||
,
|
,
|
||||||
@@ -101,16 +181,18 @@ DECLARE invId INT;
|
|||||||
END;
|
END;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 9
|
||||||
-- Trigger: trg_pr_payment_before_insert
|
-- Trigger: trg_pr_payment_before_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Purchase_Receipt_Payments
|
-- Table: Purchase_Receipt_Payments
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
DROP TRIGGER IF EXISTS `trg_pr_payment_before_insert`;
|
DROP TRIGGER IF EXISTS `trg_pr_payment_before_insert`;
|
||||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_before_insert` BEFORE INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_before_insert` BEFORE INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
||||||
|
|
||||||
|
|
||||||
DECLARE receiptTotal DECIMAL(14,2);
|
DECLARE receiptTotal DECIMAL(14,2);
|
||||||
DECLARE paid DECIMAL(14,2);
|
DECLARE paid DECIMAL(14,2);
|
||||||
|
|
||||||
INSERT INTO Trigger_Logs (name , message) VALUES ('trigger' , 'started');
|
|
||||||
|
|
||||||
SELECT totalAmount, paidAmount
|
SELECT totalAmount, paidAmount
|
||||||
INTO receiptTotal, paid
|
INTO receiptTotal, paid
|
||||||
@@ -125,6 +207,121 @@ CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_before_insert` BEFORE INSERT ON
|
|||||||
END;
|
END;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 10
|
||||||
|
-- Trigger: trg_purchase_payment_update_receipt
|
||||||
|
-- Event: INSERT
|
||||||
|
-- Table: Purchase_Receipt_Payments
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_purchase_payment_update_receipt`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_payment_update_receipt` AFTER INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
||||||
|
DECLARE paid DECIMAL(15,2);
|
||||||
|
DECLARE total DECIMAL(15,2);
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
COALESCE(SUM(
|
||||||
|
CASE WHEN type = 'PAYMENT' THEN amount ELSE -amount END
|
||||||
|
),0)
|
||||||
|
INTO paid
|
||||||
|
FROM Purchase_Receipt_Payments
|
||||||
|
WHERE receiptId = NEW.receiptId;
|
||||||
|
|
||||||
|
SELECT totalAmount INTO total
|
||||||
|
FROM Purchase_Receipts
|
||||||
|
WHERE id = NEW.receiptId;
|
||||||
|
|
||||||
|
UPDATE Purchase_Receipts
|
||||||
|
SET
|
||||||
|
paidAmount = paid,
|
||||||
|
status = CASE
|
||||||
|
WHEN paid = 0 THEN 'UNPAID'
|
||||||
|
WHEN paid < total THEN 'PARTIALLY_PAID'
|
||||||
|
ELSE 'PAID'
|
||||||
|
END
|
||||||
|
WHERE id = NEW.receiptId;
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 11
|
||||||
|
-- Trigger: trg_purchase_payment_after_insert
|
||||||
|
-- Event: INSERT
|
||||||
|
-- Table: Purchase_Receipt_Payments
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_purchase_payment_after_insert`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_payment_after_insert` AFTER INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
||||||
|
|
||||||
|
DECLARE currentBalance DECIMAL(15, 2);
|
||||||
|
|
||||||
|
|
||||||
|
SELECT balance INTO currentBalance
|
||||||
|
FROM Bank_Account_Balance
|
||||||
|
WHERE
|
||||||
|
bankAccountId = NEW.bankAccountId FOR
|
||||||
|
UPDATE;
|
||||||
|
|
||||||
|
|
||||||
|
IF currentBalance IS NULL THEN SET currentBalance = 0;
|
||||||
|
|
||||||
|
|
||||||
|
INSERT INTO
|
||||||
|
Bank_Account_Balance (bankAccountId, balance, updatedAt)
|
||||||
|
VALUES (NEW.bankAccountId, 0, NOW());
|
||||||
|
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
IF NEW.type = 'PAYMENT' THEN
|
||||||
|
SET
|
||||||
|
currentBalance = currentBalance - NEW.amount;
|
||||||
|
|
||||||
|
INSERT INTO
|
||||||
|
Bank_Account_Transactions (
|
||||||
|
bankAccountId,
|
||||||
|
type,
|
||||||
|
amount,
|
||||||
|
balanceAfter,
|
||||||
|
referenceType,
|
||||||
|
referenceId
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
NEW.bankAccountId,
|
||||||
|
'WITHDRAWAL',
|
||||||
|
NEW.amount,
|
||||||
|
currentBalance,
|
||||||
|
'PURCHASE_PAYMENT',
|
||||||
|
NEW.id
|
||||||
|
);
|
||||||
|
|
||||||
|
ELSE SET currentBalance = currentBalance + NEW.amount;
|
||||||
|
|
||||||
|
INSERT INTO
|
||||||
|
Bank_Account_Transactions (
|
||||||
|
bankAccountId,
|
||||||
|
type,
|
||||||
|
amount,
|
||||||
|
balanceAfter,
|
||||||
|
referenceType,
|
||||||
|
referenceId
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
NEW.bankAccountId,
|
||||||
|
'DEPOSIT',
|
||||||
|
NEW.amount,
|
||||||
|
currentBalance,
|
||||||
|
'PURCHASE_REFUND',
|
||||||
|
NEW.id
|
||||||
|
);
|
||||||
|
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
UPDATE Bank_Account_Balance
|
||||||
|
SET
|
||||||
|
balance = currentBalance
|
||||||
|
WHERE
|
||||||
|
bankAccountId = NEW.bankAccountId;
|
||||||
|
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 12
|
||||||
-- Trigger: trg_pr_payment_after_insert
|
-- Trigger: trg_pr_payment_after_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Purchase_Receipt_Payments
|
-- Table: Purchase_Receipt_Payments
|
||||||
@@ -134,7 +331,8 @@ CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_insert` AFTER INSERT ON `
|
|||||||
DECLARE receiptTotal DECIMAL(14,2) Default 0;
|
DECLARE receiptTotal DECIMAL(14,2) Default 0;
|
||||||
DECLARE newPaid DECIMAL(14,2) Default 0;
|
DECLARE newPaid DECIMAL(14,2) Default 0;
|
||||||
DECLARE _supplierId INT;
|
DECLARE _supplierId INT;
|
||||||
DECLARE lastBalance DECIMAL(14,2)Default 0;
|
DECLARE lastBalance DECIMAL(14,2) Default 0;
|
||||||
|
|
||||||
|
|
||||||
-- Lock receipt row
|
-- Lock receipt row
|
||||||
SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
||||||
@@ -143,8 +341,6 @@ SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
|||||||
WHERE id = NEW.receiptId
|
WHERE id = NEW.receiptId
|
||||||
FOR UPDATE;
|
FOR UPDATE;
|
||||||
|
|
||||||
INSERT INTO Trigger_Logs (name, message) VALUES ('supplierId', _supplierId);
|
|
||||||
|
|
||||||
-- Apply payment or refund
|
-- Apply payment or refund
|
||||||
IF NEW.type = 'PAYMENT' THEN
|
IF NEW.type = 'PAYMENT' THEN
|
||||||
SET newPaid = newPaid + NEW.amount;
|
SET newPaid = newPaid + NEW.amount;
|
||||||
@@ -172,6 +368,8 @@ SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
|||||||
ORDER BY id DESC
|
ORDER BY id DESC
|
||||||
LIMIT 1;
|
LIMIT 1;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
-- Insert supplier ledger
|
-- Insert supplier ledger
|
||||||
INSERT INTO Supplier_Ledger
|
INSERT INTO Supplier_Ledger
|
||||||
(
|
(
|
||||||
@@ -198,6 +396,7 @@ SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
|||||||
END;
|
END;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 13
|
||||||
-- Trigger: trg_pr_payment_after_delete
|
-- Trigger: trg_pr_payment_after_delete
|
||||||
-- Event: DELETE
|
-- Event: DELETE
|
||||||
-- Table: Purchase_Receipt_Payments
|
-- Table: Purchase_Receipt_Payments
|
||||||
@@ -232,6 +431,7 @@ CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_delete` AFTER DELETE ON `
|
|||||||
END;
|
END;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 14
|
||||||
-- Trigger: trg_purchase_receipt_after_insert
|
-- Trigger: trg_purchase_receipt_after_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Purchase_Receipts
|
-- Table: Purchase_Receipts
|
||||||
@@ -270,6 +470,7 @@ CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_after_insert` AFTER INSER
|
|||||||
END;
|
END;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 15
|
||||||
-- Trigger: trg_sales_invoice_items_before_insert
|
-- Trigger: trg_sales_invoice_items_before_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Sales_Invoice_Items
|
-- Table: Sales_Invoice_Items
|
||||||
@@ -302,6 +503,7 @@ CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_before_insert` BEFORE
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 16
|
||||||
-- Trigger: trg_sales_invoice_items_after_insert
|
-- Trigger: trg_sales_invoice_items_after_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Sales_Invoice_Items
|
-- Table: Sales_Invoice_Items
|
||||||
@@ -340,7 +542,7 @@ DECLARE pos_id INT;
|
|||||||
INSERT INTO Stock_Movements (
|
INSERT INTO Stock_Movements (
|
||||||
type,
|
type,
|
||||||
quantity,
|
quantity,
|
||||||
fee,
|
unitPrice,
|
||||||
totalCost,
|
totalCost,
|
||||||
referenceType,
|
referenceType,
|
||||||
referenceId,
|
referenceId,
|
||||||
@@ -354,8 +556,8 @@ DECLARE pos_id INT;
|
|||||||
VALUES (
|
VALUES (
|
||||||
'OUT',
|
'OUT',
|
||||||
NEW.count,
|
NEW.count,
|
||||||
NEW.fee,
|
NEW.unitPrice,
|
||||||
NEW.total,
|
NEW.totalAmount,
|
||||||
'SALES',
|
'SALES',
|
||||||
NEW.invoiceId,
|
NEW.invoiceId,
|
||||||
NEW.productId,
|
NEW.productId,
|
||||||
@@ -363,7 +565,7 @@ DECLARE pos_id INT;
|
|||||||
|
|
||||||
CASE
|
CASE
|
||||||
WHEN NEW.count = 0 THEN 0
|
WHEN NEW.count = 0 THEN 0
|
||||||
ELSE NEW.total / NEW.count
|
ELSE NEW.totalAmount / NEW.count
|
||||||
END,
|
END,
|
||||||
current_stock - NEW.count,
|
current_stock - NEW.count,
|
||||||
customer_id,
|
customer_id,
|
||||||
@@ -374,6 +576,82 @@ DECLARE pos_id INT;
|
|||||||
END;
|
END;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 17
|
||||||
|
-- Trigger: trg_sales_invoice_payment_after_insert
|
||||||
|
-- Event: INSERT
|
||||||
|
-- Table: Sales_Invoice_Payments
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_sales_invoice_payment_after_insert`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_payment_after_insert` AFTER INSERT ON `Sales_Invoice_Payments` FOR EACH ROW BEGIN
|
||||||
|
DECLARE currentBalance DECIMAL(15,2);
|
||||||
|
DECLARE bankAccountId INT;
|
||||||
|
|
||||||
|
SELECT pa.bankAccountId INTO bankAccountId
|
||||||
|
FROM Pos_Accounts pa
|
||||||
|
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||||
|
WHERE si.id = NEW.invoiceId;
|
||||||
|
|
||||||
|
SELECT balance INTO currentBalance
|
||||||
|
FROM Bank_Account_Balance
|
||||||
|
WHERE bankAccountId = bankAccountId
|
||||||
|
FOR UPDATE;
|
||||||
|
|
||||||
|
IF currentBalance IS NULL THEN
|
||||||
|
SET currentBalance = 0;
|
||||||
|
INSERT INTO Bank_Account_Balance (bankAccountId, balance)
|
||||||
|
VALUES (bankAccountId, 0);
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SET currentBalance = currentBalance + NEW.amount;
|
||||||
|
|
||||||
|
INSERT INTO Bank_Account_Transactions
|
||||||
|
(bankAccountId, type, amount, balanceAfter, referenceType, referenceId)
|
||||||
|
VALUES
|
||||||
|
(bankAccountId, 'DEPOSIT', NEW.amount, currentBalance, 'POS_SALE', NEW.id);
|
||||||
|
|
||||||
|
UPDATE Bank_Account_Balance
|
||||||
|
SET balance = currentBalance
|
||||||
|
WHERE bankAccountId = bankAccountId;
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 18
|
||||||
|
-- Trigger: trg_pos_account_payment_after_insert
|
||||||
|
-- Event: INSERT
|
||||||
|
-- Table: Sales_Invoice_Payments
|
||||||
|
-- ------------------------------------------
|
||||||
|
DROP TRIGGER IF EXISTS `trg_pos_account_payment_after_insert`;
|
||||||
|
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pos_account_payment_after_insert` AFTER INSERT ON `Sales_Invoice_Payments` FOR EACH ROW BEGIN
|
||||||
|
|
||||||
|
DECLARE _bankAccountId INT;
|
||||||
|
|
||||||
|
IF(NEW.paymentMethod != 'CASH') THEN
|
||||||
|
SELECT cashBankAccountId INTO _bankAccountId
|
||||||
|
FROM Pos_Accounts pa
|
||||||
|
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||||
|
WHERE si.id = NEW.invoiceId;
|
||||||
|
End IF;
|
||||||
|
|
||||||
|
INSERT INTO Bank_Account_Transactions (
|
||||||
|
bankAccountId,
|
||||||
|
type,
|
||||||
|
amount,
|
||||||
|
balanceAfter,
|
||||||
|
referenceType,
|
||||||
|
referenceId
|
||||||
|
)
|
||||||
|
VALUES(
|
||||||
|
_bankAccountId,
|
||||||
|
'DEPOSIT',
|
||||||
|
NEW.amount,
|
||||||
|
0,
|
||||||
|
'POS_SALE',
|
||||||
|
NEW.id
|
||||||
|
);
|
||||||
|
END;
|
||||||
|
|
||||||
|
-- ------------------------------------------
|
||||||
|
-- index: 19
|
||||||
-- Trigger: trg_stock_transfer
|
-- Trigger: trg_stock_transfer
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Stock_Movements
|
-- Table: Stock_Movements
|
||||||
@@ -442,8 +720,8 @@ VALUES (
|
|||||||
NEW.productId,
|
NEW.productId,
|
||||||
NEW.inventoryId,
|
NEW.inventoryId,
|
||||||
- NEW.quantity,
|
- NEW.quantity,
|
||||||
- COALESCE(NEW.fee, 0) * NEW.quantity,
|
- COALESCE(NEW.unitPrice, 0) * NEW.quantity,
|
||||||
COALESCE(NEW.fee, 0),
|
COALESCE(NEW.unitPrice, 0),
|
||||||
NOW()
|
NOW()
|
||||||
);
|
);
|
||||||
|
|
||||||
@@ -456,6 +734,7 @@ END IF;
|
|||||||
END;
|
END;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 20
|
||||||
-- Trigger: trg_stock_purchase_insert
|
-- Trigger: trg_stock_purchase_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Stock_Movements
|
-- Table: Stock_Movements
|
||||||
@@ -475,7 +754,7 @@ INSERT INTO
|
|||||||
VALUES (
|
VALUES (
|
||||||
NEW.productId,
|
NEW.productId,
|
||||||
NEW.quantity,
|
NEW.quantity,
|
||||||
NEW.fee,
|
NEW.unitPrice,
|
||||||
NEW.totalCost,
|
NEW.totalCost,
|
||||||
NEW.inventoryId,
|
NEW.inventoryId,
|
||||||
NOW()
|
NOW()
|
||||||
@@ -490,6 +769,7 @@ END IF;
|
|||||||
END;
|
END;
|
||||||
|
|
||||||
-- ------------------------------------------
|
-- ------------------------------------------
|
||||||
|
-- index: 21
|
||||||
-- Trigger: trg_stock_sale_insert
|
-- Trigger: trg_stock_sale_insert
|
||||||
-- Event: INSERT
|
-- Event: INSERT
|
||||||
-- Table: Stock_Movements
|
-- Table: Stock_Movements
|
||||||
@@ -509,7 +789,7 @@ INSERT INTO
|
|||||||
VALUES (
|
VALUES (
|
||||||
NEW.productId,
|
NEW.productId,
|
||||||
NEW.quantity,
|
NEW.quantity,
|
||||||
NEW.fee,
|
NEW.unitPrice,
|
||||||
NEW.totalCost,
|
NEW.totalCost,
|
||||||
NEW.inventoryId,
|
NEW.inventoryId,
|
||||||
NOW()
|
NOW()
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,633 @@
|
|||||||
|
-- Stored Procedures equivalent to triggers
|
||||||
|
|
||||||
|
DELIMITER //
|
||||||
|
|
||||||
|
-- Procedure for trg_bank_account_transaction_after_insert
|
||||||
|
CREATE PROCEDURE update_bank_balance(IN p_bankAccountId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2))
|
||||||
|
BEGIN
|
||||||
|
IF p_type = 'DEPOSIT' THEN
|
||||||
|
UPDATE Bank_Account_Balance SET balance = balance + p_amount WHERE bankAccountId = p_bankAccountId;
|
||||||
|
ELSEIF p_type = 'WITHDRAWAL' THEN
|
||||||
|
UPDATE Bank_Account_Balance SET balance = balance - p_amount WHERE bankAccountId = p_bankAccountId;
|
||||||
|
END IF;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_bank_account_transaction_after_delete
|
||||||
|
CREATE PROCEDURE update_bank_balance_on_delete(IN p_bankAccountId INT, IN p_amount DECIMAL(15,2))
|
||||||
|
BEGIN
|
||||||
|
UPDATE Bank_Accounts SET balance = balance - p_amount WHERE id = p_bankAccountId;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_transfer_item_after_insert
|
||||||
|
CREATE PROCEDURE process_transfer_item(IN p_transferId INT, IN p_productId INT, IN p_count DECIMAL(10,2))
|
||||||
|
BEGIN
|
||||||
|
DECLARE fromInv INT;
|
||||||
|
DECLARE toInv INT;
|
||||||
|
DECLARE _avgCost DECIMAL(10,2);
|
||||||
|
DECLARE latestQuantityInOrigin DECIMAL(10,2);
|
||||||
|
DECLARE latestQuantityInDestination DECIMAL(10,2);
|
||||||
|
|
||||||
|
SELECT fromInventoryId, toInventoryId INTO fromInv, toInv
|
||||||
|
FROM Inventory_Transfers WHERE id = p_transferId;
|
||||||
|
|
||||||
|
SELECT COALESCE(avgCost, 0), COALESCE(quantity, 0) INTO _avgCost, latestQuantityInOrigin FROM Stock_Balance
|
||||||
|
WHERE ProductId = p_productId AND inventoryId = fromInv LIMIT 1;
|
||||||
|
|
||||||
|
SELECT COALESCE(quantity, 0) INTO latestQuantityInDestination FROM Stock_Balance
|
||||||
|
WHERE ProductId = p_productId AND inventoryId = toInv LIMIT 1;
|
||||||
|
|
||||||
|
-- OUT from source
|
||||||
|
INSERT INTO Stock_Movements
|
||||||
|
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||||
|
VALUES
|
||||||
|
('OUT', p_count, _avgCost, _avgCost*p_count, _avgCost, 'INVENTORY_TRANSFER', p_transferId, p_productId, fromInv, toInv, NOW(), latestQuantityInOrigin-p_count);
|
||||||
|
|
||||||
|
-- IN to destination
|
||||||
|
INSERT INTO Stock_Movements
|
||||||
|
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||||
|
VALUES
|
||||||
|
('IN', p_count, _avgCost, _avgCost*p_count, _avgCost, 'INVENTORY_TRANSFER', p_transferId, p_productId, toInv, fromInv, NOW(), latestQuantityInOrigin-p_count);
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_order_item_after_insert
|
||||||
|
CREATE PROCEDURE update_stock_reservation_insert(IN p_orderId INT, IN p_productId INT, IN p_quantity DECIMAL(10,2))
|
||||||
|
BEGIN
|
||||||
|
UPDATE Stock_Reservations SET quantity = quantity + p_quantity
|
||||||
|
WHERE orderId = p_orderId AND productId = p_productId;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_order_item_after_update
|
||||||
|
CREATE PROCEDURE update_stock_reservation_update(IN p_orderId INT, IN p_productId INT, IN p_old_quantity DECIMAL(10,2), IN p_new_quantity DECIMAL(10,2))
|
||||||
|
BEGIN
|
||||||
|
UPDATE Stock_Reservations
|
||||||
|
SET quantity = quantity - p_old_quantity + p_new_quantity
|
||||||
|
WHERE orderId = p_orderId AND productId = p_productId;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_order_item_after_delete
|
||||||
|
CREATE PROCEDURE update_stock_reservation_delete(IN p_orderId INT, IN p_productId INT, IN p_quantity DECIMAL(10,2))
|
||||||
|
BEGIN
|
||||||
|
UPDATE Stock_Reservations SET quantity = quantity - p_quantity
|
||||||
|
WHERE orderId = p_orderId AND productId = p_productId;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_order_after_cancel
|
||||||
|
CREATE PROCEDURE cancel_order_stock(IN p_orderId INT, IN p_status VARCHAR(20))
|
||||||
|
BEGIN
|
||||||
|
IF p_status = 'CANCELED' OR p_status = 'REJECTED' OR p_status = 'DONE' THEN
|
||||||
|
UPDATE Stock_Reservations sr SET quantity = 0
|
||||||
|
WHERE sr.orderId = p_orderId;
|
||||||
|
END IF;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_purchase_receipt_item_after_insert
|
||||||
|
CREATE PROCEDURE process_purchase_item(IN p_receiptId INT, IN p_productId INT, IN p_count DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalAmount DECIMAL(15,2))
|
||||||
|
BEGIN
|
||||||
|
DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0;
|
||||||
|
DECLARE invId INT;
|
||||||
|
DECLARE suppId INT;
|
||||||
|
|
||||||
|
-- Get inventory & supplier from
|
||||||
|
SELECT inventoryId, supplierId
|
||||||
|
INTO invId, suppId
|
||||||
|
FROM Purchase_Receipts
|
||||||
|
WHERE id = p_receiptId;
|
||||||
|
|
||||||
|
-- Get current stock quantity (if exists)
|
||||||
|
SELECT COALESCE(quantity, 0)
|
||||||
|
INTO latestQuantity
|
||||||
|
FROM Stock_Balance sb
|
||||||
|
WHERE sb.inventoryId = invId
|
||||||
|
AND sb.productId = p_productId
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
|
-- Insert stock movement
|
||||||
|
INSERT INTO Stock_Movements (
|
||||||
|
type,
|
||||||
|
quantity,
|
||||||
|
unitPrice,
|
||||||
|
totalCost,
|
||||||
|
referenceType,
|
||||||
|
referenceId,
|
||||||
|
productId,
|
||||||
|
inventoryId,
|
||||||
|
avgCost,
|
||||||
|
supplierId,
|
||||||
|
remainedInStock,
|
||||||
|
createdAt
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
'IN',
|
||||||
|
p_count,
|
||||||
|
p_unitPrice,
|
||||||
|
p_totalAmount,
|
||||||
|
'PURCHASE',
|
||||||
|
p_receiptId,
|
||||||
|
p_productId,
|
||||||
|
invId,
|
||||||
|
CASE
|
||||||
|
WHEN p_count = 0 THEN 0
|
||||||
|
ELSE p_totalAmount / p_count
|
||||||
|
END,
|
||||||
|
suppId,
|
||||||
|
latestQuantity + p_count,
|
||||||
|
NOW()
|
||||||
|
);
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_pr_payment_before_insert
|
||||||
|
CREATE PROCEDURE validate_payment_before_insert(IN p_receiptId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2))
|
||||||
|
BEGIN
|
||||||
|
DECLARE receiptTotal DECIMAL(14,2);
|
||||||
|
DECLARE paid DECIMAL(14,2);
|
||||||
|
|
||||||
|
SELECT totalAmount, paidAmount
|
||||||
|
INTO receiptTotal, paid
|
||||||
|
FROM Purchase_Receipts
|
||||||
|
WHERE id = p_receiptId
|
||||||
|
FOR UPDATE;
|
||||||
|
|
||||||
|
IF p_type = 'PAYMENT' AND paid + p_amount > receiptTotal THEN
|
||||||
|
SIGNAL SQLSTATE '45000'
|
||||||
|
SET MESSAGE_TEXT = 'مجموع مبلغ پرداختی بیشتر از مبلغ فاکتور است.';
|
||||||
|
END IF;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_purchase_payment_update_receipt
|
||||||
|
CREATE PROCEDURE update_receipt_payment(IN p_receiptId INT)
|
||||||
|
BEGIN
|
||||||
|
DECLARE paid DECIMAL(15,2);
|
||||||
|
DECLARE total DECIMAL(15,2);
|
||||||
|
|
||||||
|
SELECT
|
||||||
|
COALESCE(SUM(
|
||||||
|
CASE WHEN type = 'PAYMENT' THEN amount ELSE -amount END
|
||||||
|
),0)
|
||||||
|
INTO paid
|
||||||
|
FROM Purchase_Receipt_Payments
|
||||||
|
WHERE receiptId = p_receiptId;
|
||||||
|
|
||||||
|
SELECT totalAmount INTO total
|
||||||
|
FROM Purchase_Receipts
|
||||||
|
WHERE id = p_receiptId;
|
||||||
|
|
||||||
|
UPDATE Purchase_Receipts
|
||||||
|
SET
|
||||||
|
paidAmount = paid,
|
||||||
|
status = CASE
|
||||||
|
WHEN paid = 0 THEN 'UNPAID'
|
||||||
|
WHEN paid < total THEN 'PARTIALLY_PAID'
|
||||||
|
ELSE 'PAID'
|
||||||
|
END
|
||||||
|
WHERE id = p_receiptId;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_purchase_payment_after_insert
|
||||||
|
CREATE PROCEDURE process_purchase_payment(IN p_bankAccountId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2), IN p_id INT)
|
||||||
|
BEGIN
|
||||||
|
DECLARE currentBalance DECIMAL(15, 2);
|
||||||
|
|
||||||
|
SELECT balance INTO currentBalance
|
||||||
|
FROM Bank_Account_Balance
|
||||||
|
WHERE bankAccountId = p_bankAccountId FOR UPDATE;
|
||||||
|
|
||||||
|
IF currentBalance IS NULL THEN SET currentBalance = 0;
|
||||||
|
INSERT INTO Bank_Account_Balance (bankAccountId, balance, updatedAt)
|
||||||
|
VALUES (p_bankAccountId, 0, NOW());
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
IF p_type = 'PAYMENT' THEN
|
||||||
|
SET currentBalance = currentBalance - p_amount;
|
||||||
|
INSERT INTO Bank_Account_Transactions (
|
||||||
|
bankAccountId,
|
||||||
|
type,
|
||||||
|
amount,
|
||||||
|
balanceAfter,
|
||||||
|
referenceType,
|
||||||
|
referenceId
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
p_bankAccountId,
|
||||||
|
'WITHDRAWAL',
|
||||||
|
p_amount,
|
||||||
|
currentBalance,
|
||||||
|
'PURCHASE_PAYMENT',
|
||||||
|
p_id
|
||||||
|
);
|
||||||
|
ELSE
|
||||||
|
SET currentBalance = currentBalance + p_amount;
|
||||||
|
INSERT INTO Bank_Account_Transactions (
|
||||||
|
bankAccountId,
|
||||||
|
type,
|
||||||
|
amount,
|
||||||
|
balanceAfter,
|
||||||
|
referenceType,
|
||||||
|
referenceId
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
p_bankAccountId,
|
||||||
|
'DEPOSIT',
|
||||||
|
p_amount,
|
||||||
|
currentBalance,
|
||||||
|
'PURCHASE_REFUND',
|
||||||
|
p_id
|
||||||
|
);
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
UPDATE Bank_Account_Balance
|
||||||
|
SET balance = currentBalance
|
||||||
|
WHERE bankAccountId = p_bankAccountId;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_pr_payment_after_insert
|
||||||
|
CREATE PROCEDURE update_supplier_ledger(IN p_receiptId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2), IN p_id INT)
|
||||||
|
BEGIN
|
||||||
|
DECLARE receiptTotal DECIMAL(14,2) DEFAULT 0;
|
||||||
|
DECLARE newPaid DECIMAL(14,2) DEFAULT 0;
|
||||||
|
DECLARE _supplierId INT;
|
||||||
|
DECLARE lastBalance DECIMAL(14,2) DEFAULT 0;
|
||||||
|
|
||||||
|
-- Lock receipt row
|
||||||
|
SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
||||||
|
INTO receiptTotal, newPaid, _supplierId
|
||||||
|
FROM Purchase_Receipts
|
||||||
|
WHERE id = p_receiptId
|
||||||
|
FOR UPDATE;
|
||||||
|
|
||||||
|
-- Apply payment or refund
|
||||||
|
IF p_type = 'PAYMENT' THEN
|
||||||
|
SET newPaid = newPaid + p_amount;
|
||||||
|
ELSE
|
||||||
|
SET newPaid = newPaid - p_amount;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
-- Update receipt
|
||||||
|
UPDATE Purchase_Receipts
|
||||||
|
SET
|
||||||
|
paidAmount = newPaid,
|
||||||
|
status =
|
||||||
|
CASE
|
||||||
|
WHEN newPaid = 0 THEN 'UNPAID'
|
||||||
|
WHEN newPaid < receiptTotal THEN 'PARTIALLY_PAID'
|
||||||
|
ELSE 'PAID'
|
||||||
|
END
|
||||||
|
WHERE id = p_receiptId;
|
||||||
|
|
||||||
|
-- Get last supplier balance
|
||||||
|
SELECT IFNULL(balance, 0)
|
||||||
|
INTO lastBalance
|
||||||
|
FROM Supplier_Ledger
|
||||||
|
WHERE supplierId = _supplierId
|
||||||
|
ORDER BY id DESC
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
|
-- Insert supplier ledger
|
||||||
|
INSERT INTO Supplier_Ledger
|
||||||
|
(
|
||||||
|
supplierId,
|
||||||
|
debit,
|
||||||
|
credit,
|
||||||
|
balance,
|
||||||
|
sourceType,
|
||||||
|
sourceId,
|
||||||
|
createdAt
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
_supplierId,
|
||||||
|
IF(p_type = 'REFUND', p_amount, 0),
|
||||||
|
IF(p_type = 'PAYMENT', p_amount, 0),
|
||||||
|
lastBalance
|
||||||
|
+ IF(p_type = 'PAYMENT', p_amount, 0)
|
||||||
|
- IF(p_type = 'REFUND', p_amount, 0),
|
||||||
|
'PAYMENT',
|
||||||
|
p_id,
|
||||||
|
NOW()
|
||||||
|
);
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_pr_payment_after_delete
|
||||||
|
CREATE PROCEDURE update_receipt_on_payment_delete(IN p_receiptId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2))
|
||||||
|
BEGIN
|
||||||
|
DECLARE receiptTotal DECIMAL(14,2);
|
||||||
|
DECLARE newPaid DECIMAL(14,2);
|
||||||
|
|
||||||
|
SELECT totalAmount, paidAmount
|
||||||
|
INTO receiptTotal, newPaid
|
||||||
|
FROM Purchase_Receipts
|
||||||
|
WHERE id = p_receiptId
|
||||||
|
FOR UPDATE;
|
||||||
|
|
||||||
|
IF p_type = 'PAYMENT' THEN
|
||||||
|
SET newPaid = newPaid - p_amount;
|
||||||
|
ELSE
|
||||||
|
SET newPaid = newPaid + p_amount;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
UPDATE Purchase_Receipts
|
||||||
|
SET
|
||||||
|
paidAmount = newPaid,
|
||||||
|
status =
|
||||||
|
CASE
|
||||||
|
WHEN newPaid = 0 THEN 'UNPAID'
|
||||||
|
WHEN newPaid < receiptTotal THEN 'PARTIALLY_PAID'
|
||||||
|
ELSE 'PAID'
|
||||||
|
END
|
||||||
|
WHERE id = p_receiptId;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_purchase_receipt_after_insert
|
||||||
|
CREATE PROCEDURE insert_supplier_ledger_purchase(IN p_supplierId INT, IN p_totalAmount DECIMAL(15,2), IN p_id INT)
|
||||||
|
BEGIN
|
||||||
|
DECLARE lastBalance DECIMAL(14,2) DEFAULT 0;
|
||||||
|
|
||||||
|
SELECT COALESCE(balance, 0)
|
||||||
|
INTO lastBalance
|
||||||
|
FROM Supplier_Ledger
|
||||||
|
WHERE supplierId = p_supplierId
|
||||||
|
ORDER BY id DESC
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
|
INSERT INTO Supplier_Ledger
|
||||||
|
(
|
||||||
|
supplierId,
|
||||||
|
debit,
|
||||||
|
credit,
|
||||||
|
balance,
|
||||||
|
sourceType,
|
||||||
|
sourceId,
|
||||||
|
createdAt
|
||||||
|
)
|
||||||
|
VALUES
|
||||||
|
(
|
||||||
|
p_supplierId,
|
||||||
|
p_totalAmount,
|
||||||
|
0,
|
||||||
|
lastBalance - p_totalAmount,
|
||||||
|
'PURCHASE',
|
||||||
|
p_id,
|
||||||
|
NOW()
|
||||||
|
);
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_sales_invoice_items_before_insert
|
||||||
|
CREATE PROCEDURE validate_stock_before_sale(IN p_invoiceId INT, IN p_productId INT, IN p_count DECIMAL(10,2))
|
||||||
|
BEGIN
|
||||||
|
DECLARE current_stock DECIMAL(10, 2);
|
||||||
|
DECLARE inventory_id INT;
|
||||||
|
|
||||||
|
SELECT pa.inventoryId INTO inventory_id
|
||||||
|
FROM Pos_Accounts pa
|
||||||
|
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||||
|
WHERE si.id = p_invoiceId;
|
||||||
|
|
||||||
|
SELECT COALESCE(quantity, 0) INTO current_stock
|
||||||
|
FROM Stock_Balance sb
|
||||||
|
WHERE productId = p_productId AND sb.inventoryId = inventory_id
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
|
IF p_count > current_stock THEN
|
||||||
|
SIGNAL SQLSTATE '45000'
|
||||||
|
SET MESSAGE_TEXT = 'موجودی کالا در انبار کافی نیست.';
|
||||||
|
END IF;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_sales_invoice_items_after_insert
|
||||||
|
CREATE PROCEDURE process_sale_item(IN p_invoiceId INT, IN p_productId INT, IN p_count DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalAmount DECIMAL(15,2))
|
||||||
|
BEGIN
|
||||||
|
DECLARE current_stock DECIMAL(10, 2);
|
||||||
|
DECLARE inventory_id INT;
|
||||||
|
DECLARE customer_id INT;
|
||||||
|
DECLARE pos_id INT;
|
||||||
|
|
||||||
|
SELECT posAccountId, customerId INTO pos_id, customer_id
|
||||||
|
FROM Sales_Invoices si
|
||||||
|
WHERE si.id = p_invoiceId
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
|
SELECT pa.inventoryId INTO inventory_id
|
||||||
|
FROM Pos_Accounts pa
|
||||||
|
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||||
|
WHERE si.id = p_invoiceId;
|
||||||
|
|
||||||
|
SELECT COALESCE(quantity, 0) INTO current_stock
|
||||||
|
FROM Stock_Balance sb
|
||||||
|
WHERE productId = p_productId AND sb.inventoryId = inventory_id
|
||||||
|
LIMIT 1;
|
||||||
|
|
||||||
|
INSERT INTO Stock_Movements (
|
||||||
|
type,
|
||||||
|
quantity,
|
||||||
|
unitPrice,
|
||||||
|
totalCost,
|
||||||
|
referenceType,
|
||||||
|
referenceId,
|
||||||
|
productId,
|
||||||
|
inventoryId,
|
||||||
|
avgCost,
|
||||||
|
remainedInStock,
|
||||||
|
customerId,
|
||||||
|
createdAt
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
'OUT',
|
||||||
|
p_count,
|
||||||
|
p_unitPrice,
|
||||||
|
p_totalAmount,
|
||||||
|
'SALES',
|
||||||
|
p_invoiceId,
|
||||||
|
p_productId,
|
||||||
|
inventory_id,
|
||||||
|
CASE
|
||||||
|
WHEN p_count = 0 THEN 0
|
||||||
|
ELSE p_totalAmount / p_count
|
||||||
|
END,
|
||||||
|
current_stock - p_count,
|
||||||
|
customer_id,
|
||||||
|
NOW()
|
||||||
|
);
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_sales_invoice_payment_after_insert
|
||||||
|
CREATE PROCEDURE process_sale_payment(IN p_invoiceId INT, IN p_amount DECIMAL(15,2), IN p_id INT)
|
||||||
|
BEGIN
|
||||||
|
DECLARE currentBalance DECIMAL(15,2);
|
||||||
|
DECLARE bankAccountId INT;
|
||||||
|
|
||||||
|
SELECT pa.bankAccountId INTO bankAccountId
|
||||||
|
FROM Pos_Accounts pa
|
||||||
|
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||||
|
WHERE si.id = p_invoiceId;
|
||||||
|
|
||||||
|
SELECT balance INTO currentBalance
|
||||||
|
FROM Bank_Account_Balance
|
||||||
|
WHERE bankAccountId = bankAccountId
|
||||||
|
FOR UPDATE;
|
||||||
|
|
||||||
|
IF currentBalance IS NULL THEN
|
||||||
|
SET currentBalance = 0;
|
||||||
|
INSERT INTO Bank_Account_Balance (bankAccountId, balance, updatedAt)
|
||||||
|
VALUES (bankAccountId, 0, NOW());
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
SET currentBalance = currentBalance + p_amount;
|
||||||
|
|
||||||
|
INSERT INTO Bank_Account_Transactions
|
||||||
|
(bankAccountId, type, amount, balanceAfter, referenceType, referenceId)
|
||||||
|
VALUES
|
||||||
|
(bankAccountId, 'DEPOSIT', p_amount, currentBalance, 'POS_SALE', p_id);
|
||||||
|
|
||||||
|
UPDATE Bank_Account_Balance
|
||||||
|
SET balance = currentBalance
|
||||||
|
WHERE bankAccountId = bankAccountId;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_pos_account_payment_after_insert
|
||||||
|
CREATE PROCEDURE process_pos_payment(IN p_invoiceId INT, IN p_paymentMethod VARCHAR(20), IN p_amount DECIMAL(15,2), IN p_id INT)
|
||||||
|
BEGIN
|
||||||
|
DECLARE _bankAccountId INT;
|
||||||
|
|
||||||
|
IF(p_paymentMethod != 'CASH') THEN
|
||||||
|
SELECT cashBankAccountId INTO _bankAccountId
|
||||||
|
FROM Pos_Accounts pa
|
||||||
|
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||||
|
WHERE si.id = p_invoiceId;
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
INSERT INTO Bank_Account_Transactions (
|
||||||
|
bankAccountId,
|
||||||
|
type,
|
||||||
|
amount,
|
||||||
|
balanceAfter,
|
||||||
|
referenceType,
|
||||||
|
referenceId
|
||||||
|
)
|
||||||
|
VALUES(
|
||||||
|
_bankAccountId,
|
||||||
|
'DEPOSIT',
|
||||||
|
p_amount,
|
||||||
|
0,
|
||||||
|
'POS_SALE',
|
||||||
|
p_id
|
||||||
|
);
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_stock_transfer
|
||||||
|
CREATE PROCEDURE update_stock_balance_transfer(IN p_productId INT, IN p_inventoryId INT, IN p_quantity DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalCost DECIMAL(15,2), IN p_type VARCHAR(10))
|
||||||
|
BEGIN
|
||||||
|
IF p_type = 'IN' THEN
|
||||||
|
INSERT INTO Stock_Balance (
|
||||||
|
productId,
|
||||||
|
inventoryId,
|
||||||
|
quantity,
|
||||||
|
totalCost,
|
||||||
|
avgCost,
|
||||||
|
updatedAt
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
p_productId,
|
||||||
|
p_inventoryId,
|
||||||
|
p_quantity,
|
||||||
|
p_totalCost,
|
||||||
|
CASE
|
||||||
|
WHEN p_quantity = 0 THEN 0
|
||||||
|
ELSE p_totalCost / p_quantity
|
||||||
|
END,
|
||||||
|
NOW()
|
||||||
|
)
|
||||||
|
ON DUPLICATE KEY UPDATE
|
||||||
|
quantity = quantity + p_quantity,
|
||||||
|
totalCost = totalCost + p_totalCost,
|
||||||
|
avgCost = CASE
|
||||||
|
WHEN (quantity + p_quantity) = 0 THEN 0
|
||||||
|
ELSE (totalCost + p_totalCost) / (quantity + p_quantity)
|
||||||
|
END,
|
||||||
|
updatedAt = NOW();
|
||||||
|
END IF;
|
||||||
|
|
||||||
|
IF p_type = 'OUT' THEN
|
||||||
|
IF EXISTS (
|
||||||
|
SELECT 1
|
||||||
|
FROM Stock_Balance sb
|
||||||
|
WHERE sb.productId = p_productId AND sb.inventoryId = p_inventoryId
|
||||||
|
) THEN
|
||||||
|
UPDATE Stock_Balance sb
|
||||||
|
SET
|
||||||
|
sb.quantity = sb.quantity - p_quantity,
|
||||||
|
sb.totalCost = sb.totalCost - (sb.avgCost * p_quantity),
|
||||||
|
sb.updatedAt = NOW()
|
||||||
|
WHERE
|
||||||
|
sb.productId = p_productId
|
||||||
|
AND sb.inventoryId = p_inventoryId;
|
||||||
|
ELSE
|
||||||
|
INSERT INTO Stock_Balance (
|
||||||
|
productId,
|
||||||
|
inventoryId,
|
||||||
|
quantity,
|
||||||
|
totalCost,
|
||||||
|
avgCost,
|
||||||
|
updatedAt
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
p_productId,
|
||||||
|
p_inventoryId,
|
||||||
|
- p_quantity,
|
||||||
|
- COALESCE(p_unitPrice, 0) * p_quantity,
|
||||||
|
COALESCE(p_unitPrice, 0),
|
||||||
|
NOW()
|
||||||
|
);
|
||||||
|
END IF;
|
||||||
|
END IF;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_stock_purchase_insert
|
||||||
|
CREATE PROCEDURE update_stock_balance_purchase(IN p_productId INT, IN p_quantity DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalCost DECIMAL(15,2), IN p_inventoryId INT)
|
||||||
|
BEGIN
|
||||||
|
INSERT INTO Stock_Balance (
|
||||||
|
productId,
|
||||||
|
quantity,
|
||||||
|
avgCost,
|
||||||
|
totalCost,
|
||||||
|
inventoryId,
|
||||||
|
updatedAt
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
p_productId,
|
||||||
|
p_quantity,
|
||||||
|
p_unitPrice,
|
||||||
|
p_totalCost,
|
||||||
|
p_inventoryId,
|
||||||
|
NOW()
|
||||||
|
)
|
||||||
|
ON DUPLICATE KEY UPDATE
|
||||||
|
quantity = quantity + p_quantity,
|
||||||
|
totalCost = totalCost + p_totalCost,
|
||||||
|
avgCost = totalCost / quantity;
|
||||||
|
END //
|
||||||
|
|
||||||
|
-- Procedure for trg_stock_sale_insert
|
||||||
|
CREATE PROCEDURE update_stock_balance_sale(IN p_productId INT, IN p_quantity DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalCost DECIMAL(15,2), IN p_inventoryId INT)
|
||||||
|
BEGIN
|
||||||
|
INSERT INTO Stock_Balance (
|
||||||
|
productId,
|
||||||
|
quantity,
|
||||||
|
avgCost,
|
||||||
|
totalCost,
|
||||||
|
inventoryId,
|
||||||
|
updatedAt
|
||||||
|
)
|
||||||
|
VALUES (
|
||||||
|
p_productId,
|
||||||
|
p_quantity,
|
||||||
|
p_unitPrice,
|
||||||
|
p_totalCost,
|
||||||
|
p_inventoryId,
|
||||||
|
NOW()
|
||||||
|
)
|
||||||
|
ON DUPLICATE KEY UPDATE
|
||||||
|
quantity = quantity - p_quantity,
|
||||||
|
totalCost = totalCost - p_totalCost,
|
||||||
|
avgCost = totalCost / quantity;
|
||||||
|
END //
|
||||||
|
|
||||||
|
DELIMITER ;
|
||||||
@@ -33,7 +33,7 @@ async function main() {
|
|||||||
let sqlOutput = '-- AUTO-GENERATED MYSQL TRIGGER DUMP\n'
|
let sqlOutput = '-- AUTO-GENERATED MYSQL TRIGGER DUMP\n'
|
||||||
sqlOutput += '-- Generated at: ' + new Date().toISOString() + '\n\n'
|
sqlOutput += '-- Generated at: ' + new Date().toISOString() + '\n\n'
|
||||||
|
|
||||||
for (const trg of triggers) {
|
for (const [index, trg] of triggers.entries()) {
|
||||||
const name = trg.Trigger
|
const name = trg.Trigger
|
||||||
console.log(`📥 Extracting trigger: ${name}`)
|
console.log(`📥 Extracting trigger: ${name}`)
|
||||||
|
|
||||||
@@ -42,6 +42,7 @@ async function main() {
|
|||||||
const createStatement = rows[0]['SQL Original Statement']
|
const createStatement = rows[0]['SQL Original Statement']
|
||||||
|
|
||||||
sqlOutput += `-- ------------------------------------------\n`
|
sqlOutput += `-- ------------------------------------------\n`
|
||||||
|
sqlOutput += `-- index: ${index + 1}\n`
|
||||||
sqlOutput += `-- Trigger: ${name}\n`
|
sqlOutput += `-- Trigger: ${name}\n`
|
||||||
sqlOutput += `-- Event: ${trg.Event}\n`
|
sqlOutput += `-- Event: ${trg.Event}\n`
|
||||||
sqlOutput += `-- Table: ${trg.Table}\n`
|
sqlOutput += `-- Table: ${trg.Table}\n`
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ import { CardexModule } from './modules/cardex/cardex.module'
|
|||||||
import { InventoriesModule } from './modules/inventories/inventories.module'
|
import { InventoriesModule } from './modules/inventories/inventories.module'
|
||||||
import { PosModule } from './modules/pos/pos.module'
|
import { PosModule } from './modules/pos/pos.module'
|
||||||
import { PurchaseReceiptPaymentsModule } from './modules/purchase-receipt-payments/purchase-receipt-payments.module'
|
import { PurchaseReceiptPaymentsModule } from './modules/purchase-receipt-payments/purchase-receipt-payments.module'
|
||||||
|
import { StatisticsModule } from './modules/statistics/statistics.module'
|
||||||
import { SuppliersModule } from './modules/suppliers/suppliers.module'
|
import { SuppliersModule } from './modules/suppliers/suppliers.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'
|
||||||
@@ -56,6 +57,7 @@ import { UsersModule } from './users/users.module'
|
|||||||
BanksModule,
|
BanksModule,
|
||||||
BankBranchesModule,
|
BankBranchesModule,
|
||||||
BankAccountsModule,
|
BankAccountsModule,
|
||||||
|
StatisticsModule,
|
||||||
],
|
],
|
||||||
controllers: [AppController],
|
controllers: [AppController],
|
||||||
providers: [AppService],
|
providers: [AppService],
|
||||||
|
|||||||
@@ -47,6 +47,16 @@ export type BankBranch = Prisma.BankBranchModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type BankAccount = Prisma.BankAccountModel
|
export type BankAccount = Prisma.BankAccountModel
|
||||||
|
/**
|
||||||
|
* Model BankAccountTransaction
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BankAccountTransaction = Prisma.BankAccountTransactionModel
|
||||||
|
/**
|
||||||
|
* Model BankAccountBalance
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BankAccountBalance = Prisma.BankAccountBalanceModel
|
||||||
/**
|
/**
|
||||||
* Model Inventory
|
* Model Inventory
|
||||||
*
|
*
|
||||||
@@ -77,26 +87,21 @@ export type InventoryTransferItem = Prisma.InventoryTransferItemModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Bank = Prisma.BankModel
|
export type Bank = Prisma.BankModel
|
||||||
/**
|
|
||||||
* Model Customer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Customer = Prisma.CustomerModel
|
|
||||||
/**
|
/**
|
||||||
* Model Order
|
* Model Order
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Order = Prisma.OrderModel
|
export type Order = Prisma.OrderModel
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoice
|
* Model OrderItem
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SalesInvoice = Prisma.SalesInvoiceModel
|
export type OrderItem = Prisma.OrderItemModel
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoiceItem
|
* Model Customer
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
export type Customer = Prisma.CustomerModel
|
||||||
/**
|
/**
|
||||||
* Model TriggerLog
|
* Model TriggerLog
|
||||||
*
|
*
|
||||||
@@ -137,6 +142,21 @@ export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel
|
export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoice
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoice = Prisma.SalesInvoiceModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoiceItem
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoicePayment
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoicePayment = Prisma.SalesInvoicePaymentModel
|
||||||
/**
|
/**
|
||||||
* Model StockMovement
|
* Model StockMovement
|
||||||
*
|
*
|
||||||
@@ -152,6 +172,11 @@ export type StockBalance = Prisma.StockBalanceModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockAdjustment = Prisma.StockAdjustmentModel
|
export type StockAdjustment = Prisma.StockAdjustmentModel
|
||||||
|
/**
|
||||||
|
* Model StockReservation
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type StockReservation = Prisma.StockReservationModel
|
||||||
/**
|
/**
|
||||||
* Model Supplier
|
* Model Supplier
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -67,6 +67,16 @@ export type BankBranch = Prisma.BankBranchModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type BankAccount = Prisma.BankAccountModel
|
export type BankAccount = Prisma.BankAccountModel
|
||||||
|
/**
|
||||||
|
* Model BankAccountTransaction
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BankAccountTransaction = Prisma.BankAccountTransactionModel
|
||||||
|
/**
|
||||||
|
* Model BankAccountBalance
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BankAccountBalance = Prisma.BankAccountBalanceModel
|
||||||
/**
|
/**
|
||||||
* Model Inventory
|
* Model Inventory
|
||||||
*
|
*
|
||||||
@@ -97,26 +107,21 @@ export type InventoryTransferItem = Prisma.InventoryTransferItemModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Bank = Prisma.BankModel
|
export type Bank = Prisma.BankModel
|
||||||
/**
|
|
||||||
* Model Customer
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Customer = Prisma.CustomerModel
|
|
||||||
/**
|
/**
|
||||||
* Model Order
|
* Model Order
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type Order = Prisma.OrderModel
|
export type Order = Prisma.OrderModel
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoice
|
* Model OrderItem
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SalesInvoice = Prisma.SalesInvoiceModel
|
export type OrderItem = Prisma.OrderItemModel
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoiceItem
|
* Model Customer
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
export type Customer = Prisma.CustomerModel
|
||||||
/**
|
/**
|
||||||
* Model TriggerLog
|
* Model TriggerLog
|
||||||
*
|
*
|
||||||
@@ -157,6 +162,21 @@ export type PurchaseReceiptItem = Prisma.PurchaseReceiptItemModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel
|
export type PurchaseReceiptPayments = Prisma.PurchaseReceiptPaymentsModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoice
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoice = Prisma.SalesInvoiceModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoiceItem
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
||||||
|
/**
|
||||||
|
* Model SalesInvoicePayment
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type SalesInvoicePayment = Prisma.SalesInvoicePaymentModel
|
||||||
/**
|
/**
|
||||||
* Model StockMovement
|
* Model StockMovement
|
||||||
*
|
*
|
||||||
@@ -172,6 +192,11 @@ export type StockBalance = Prisma.StockBalanceModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type StockAdjustment = Prisma.StockAdjustmentModel
|
export type StockAdjustment = Prisma.StockAdjustmentModel
|
||||||
|
/**
|
||||||
|
* Model StockReservation
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type StockReservation = Prisma.StockReservationModel
|
||||||
/**
|
/**
|
||||||
* Model Supplier
|
* Model Supplier
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -226,6 +226,13 @@ export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumBankAccountTransactionTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.BankAccountTransactionType[]
|
||||||
|
notIn?: $Enums.BankAccountTransactionType[]
|
||||||
|
not?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> | $Enums.BankAccountTransactionType
|
||||||
|
}
|
||||||
|
|
||||||
export type DecimalFilter<$PrismaModel = never> = {
|
export type DecimalFilter<$PrismaModel = never> = {
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
@@ -237,6 +244,23 @@ export type DecimalFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumBankTransactionRefTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.BankTransactionRefType[]
|
||||||
|
notIn?: $Enums.BankTransactionRefType[]
|
||||||
|
not?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> | $Enums.BankTransactionRefType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.BankAccountTransactionType[]
|
||||||
|
notIn?: $Enums.BankAccountTransactionType[]
|
||||||
|
not?: Prisma.NestedEnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankAccountTransactionType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
@@ -253,6 +277,16 @@ export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.BankTransactionRefType[]
|
||||||
|
notIn?: $Enums.BankTransactionRefType[]
|
||||||
|
not?: Prisma.NestedEnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankTransactionRefType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumBankTransactionRefTypeFilter<$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[]
|
||||||
@@ -260,33 +294,6 @@ export type EnumOrderStatusFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PaymentMethodType[]
|
|
||||||
notIn?: $Enums.PaymentMethodType[]
|
|
||||||
not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.OrderStatus[]
|
|
||||||
notIn?: $Enums.OrderStatus[]
|
|
||||||
not?: Prisma.NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PaymentMethodType[]
|
|
||||||
notIn?: $Enums.PaymentMethodType[]
|
|
||||||
not?: Prisma.NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentMethodType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type IntNullableFilter<$PrismaModel = never> = {
|
export type IntNullableFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
@@ -298,6 +305,16 @@ export type IntNullableFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.OrderStatus[]
|
||||||
|
notIn?: $Enums.OrderStatus[]
|
||||||
|
not?: Prisma.NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel> | $Enums.OrderStatus
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
@@ -358,6 +375,13 @@ export type EnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel = never>
|
|||||||
_max?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.PaymentMethodType[]
|
||||||
|
notIn?: $Enums.PaymentMethodType[]
|
||||||
|
not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType
|
||||||
|
}
|
||||||
|
|
||||||
export type EnumPaymentTypeFilter<$PrismaModel = never> = {
|
export type EnumPaymentTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PaymentType[]
|
in?: $Enums.PaymentType[]
|
||||||
@@ -365,6 +389,16 @@ export type EnumPaymentTypeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> | $Enums.PaymentType
|
not?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> | $Enums.PaymentType
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.PaymentMethodType[]
|
||||||
|
notIn?: $Enums.PaymentMethodType[]
|
||||||
|
not?: Prisma.NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentMethodType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type EnumPaymentTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type EnumPaymentTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PaymentType[]
|
in?: $Enums.PaymentType[]
|
||||||
@@ -628,6 +662,13 @@ export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedEnumBankAccountTransactionTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.BankAccountTransactionType[]
|
||||||
|
notIn?: $Enums.BankAccountTransactionType[]
|
||||||
|
not?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel> | $Enums.BankAccountTransactionType
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
@@ -639,6 +680,23 @@ export type NestedDecimalFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedEnumBankTransactionRefTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.BankTransactionRefType[]
|
||||||
|
notIn?: $Enums.BankTransactionRefType[]
|
||||||
|
not?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel> | $Enums.BankTransactionRefType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.BankAccountTransactionType | Prisma.EnumBankAccountTransactionTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.BankAccountTransactionType[]
|
||||||
|
notIn?: $Enums.BankAccountTransactionType[]
|
||||||
|
not?: Prisma.NestedEnumBankAccountTransactionTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankAccountTransactionType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumBankAccountTransactionTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
@@ -655,6 +713,16 @@ export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedEnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.BankTransactionRefType | Prisma.EnumBankTransactionRefTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.BankTransactionRefType[]
|
||||||
|
notIn?: $Enums.BankTransactionRefType[]
|
||||||
|
not?: Prisma.NestedEnumBankTransactionRefTypeWithAggregatesFilter<$PrismaModel> | $Enums.BankTransactionRefType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumBankTransactionRefTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedEnumOrderStatusFilter<$PrismaModel = never> = {
|
export type NestedEnumOrderStatusFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.OrderStatus[]
|
in?: $Enums.OrderStatus[]
|
||||||
@@ -662,13 +730,6 @@ export type NestedEnumOrderStatusFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
not?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel> | $Enums.OrderStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PaymentMethodType[]
|
|
||||||
notIn?: $Enums.PaymentMethodType[]
|
|
||||||
not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
equals?: $Enums.OrderStatus | Prisma.EnumOrderStatusFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.OrderStatus[]
|
in?: $Enums.OrderStatus[]
|
||||||
@@ -679,16 +740,6 @@ export type NestedEnumOrderStatusWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumOrderStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.PaymentMethodType[]
|
|
||||||
notIn?: $Enums.PaymentMethodType[]
|
|
||||||
not?: Prisma.NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentMethodType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: number[] | null
|
in?: number[] | null
|
||||||
@@ -760,6 +811,13 @@ export type NestedEnumPurchaseReceiptStatusWithAggregatesFilter<$PrismaModel = n
|
|||||||
_max?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumPurchaseReceiptStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.PaymentMethodType[]
|
||||||
|
notIn?: $Enums.PaymentMethodType[]
|
||||||
|
not?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel> | $Enums.PaymentMethodType
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedEnumPaymentTypeFilter<$PrismaModel = never> = {
|
export type NestedEnumPaymentTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PaymentType[]
|
in?: $Enums.PaymentType[]
|
||||||
@@ -767,6 +825,16 @@ export type NestedEnumPaymentTypeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> | $Enums.PaymentType
|
not?: Prisma.NestedEnumPaymentTypeFilter<$PrismaModel> | $Enums.PaymentType
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.PaymentMethodType[]
|
||||||
|
notIn?: $Enums.PaymentMethodType[]
|
||||||
|
not?: Prisma.NestedEnumPaymentMethodTypeWithAggregatesFilter<$PrismaModel> | $Enums.PaymentMethodType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumPaymentMethodTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedEnumPaymentTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumPaymentTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.PaymentType | Prisma.EnumPaymentTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PaymentType[]
|
in?: $Enums.PaymentType[]
|
||||||
|
|||||||
@@ -11,7 +11,8 @@
|
|||||||
|
|
||||||
export const OrderStatus = {
|
export const OrderStatus = {
|
||||||
PENDING: 'PENDING',
|
PENDING: 'PENDING',
|
||||||
REJECT: 'REJECT',
|
REJECTED: 'REJECTED',
|
||||||
|
CANCELED: 'CANCELED',
|
||||||
DONE: 'DONE'
|
DONE: 'DONE'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
@@ -73,3 +74,23 @@ export const PurchaseReceiptStatus = {
|
|||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type PurchaseReceiptStatus = (typeof PurchaseReceiptStatus)[keyof typeof PurchaseReceiptStatus]
|
export type PurchaseReceiptStatus = (typeof PurchaseReceiptStatus)[keyof typeof PurchaseReceiptStatus]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankAccountTransactionType = {
|
||||||
|
DEPOSIT: 'DEPOSIT',
|
||||||
|
WITHDRAWAL: 'WITHDRAWAL'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankAccountTransactionType = (typeof BankAccountTransactionType)[keyof typeof BankAccountTransactionType]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankTransactionRefType = {
|
||||||
|
PURCHASE_PAYMENT: 'PURCHASE_PAYMENT',
|
||||||
|
PURCHASE_REFUND: 'PURCHASE_REFUND',
|
||||||
|
POS_SALE: 'POS_SALE',
|
||||||
|
POS_REFUND: 'POS_REFUND',
|
||||||
|
BANK_TRANSFER: 'BANK_TRANSFER',
|
||||||
|
MANUAL_ADJUSTMENT: 'MANUAL_ADJUSTMENT'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankTransactionRefType = (typeof BankTransactionRefType)[keyof typeof BankTransactionRefType]
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -57,16 +57,17 @@ export const ModelName = {
|
|||||||
RefreshToken: 'RefreshToken',
|
RefreshToken: 'RefreshToken',
|
||||||
BankBranch: 'BankBranch',
|
BankBranch: 'BankBranch',
|
||||||
BankAccount: 'BankAccount',
|
BankAccount: 'BankAccount',
|
||||||
|
BankAccountTransaction: 'BankAccountTransaction',
|
||||||
|
BankAccountBalance: 'BankAccountBalance',
|
||||||
Inventory: 'Inventory',
|
Inventory: 'Inventory',
|
||||||
InventoryBankAccount: 'InventoryBankAccount',
|
InventoryBankAccount: 'InventoryBankAccount',
|
||||||
PosAccount: 'PosAccount',
|
PosAccount: 'PosAccount',
|
||||||
InventoryTransfer: 'InventoryTransfer',
|
InventoryTransfer: 'InventoryTransfer',
|
||||||
InventoryTransferItem: 'InventoryTransferItem',
|
InventoryTransferItem: 'InventoryTransferItem',
|
||||||
Bank: 'Bank',
|
Bank: 'Bank',
|
||||||
Customer: 'Customer',
|
|
||||||
Order: 'Order',
|
Order: 'Order',
|
||||||
SalesInvoice: 'SalesInvoice',
|
OrderItem: 'OrderItem',
|
||||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
Customer: 'Customer',
|
||||||
TriggerLog: 'TriggerLog',
|
TriggerLog: 'TriggerLog',
|
||||||
ProductVariant: 'ProductVariant',
|
ProductVariant: 'ProductVariant',
|
||||||
Product: 'Product',
|
Product: 'Product',
|
||||||
@@ -75,9 +76,13 @@ export const ModelName = {
|
|||||||
PurchaseReceipt: 'PurchaseReceipt',
|
PurchaseReceipt: 'PurchaseReceipt',
|
||||||
PurchaseReceiptItem: 'PurchaseReceiptItem',
|
PurchaseReceiptItem: 'PurchaseReceiptItem',
|
||||||
PurchaseReceiptPayments: 'PurchaseReceiptPayments',
|
PurchaseReceiptPayments: 'PurchaseReceiptPayments',
|
||||||
|
SalesInvoice: 'SalesInvoice',
|
||||||
|
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||||
|
SalesInvoicePayment: 'SalesInvoicePayment',
|
||||||
StockMovement: 'StockMovement',
|
StockMovement: 'StockMovement',
|
||||||
StockBalance: 'StockBalance',
|
StockBalance: 'StockBalance',
|
||||||
StockAdjustment: 'StockAdjustment',
|
StockAdjustment: 'StockAdjustment',
|
||||||
|
StockReservation: 'StockReservation',
|
||||||
Supplier: 'Supplier',
|
Supplier: 'Supplier',
|
||||||
SupplierLedger: 'SupplierLedger'
|
SupplierLedger: 'SupplierLedger'
|
||||||
} as const
|
} as const
|
||||||
@@ -179,6 +184,30 @@ export const BankAccountScalarFieldEnum = {
|
|||||||
export type BankAccountScalarFieldEnum = (typeof BankAccountScalarFieldEnum)[keyof typeof BankAccountScalarFieldEnum]
|
export type BankAccountScalarFieldEnum = (typeof BankAccountScalarFieldEnum)[keyof typeof BankAccountScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankAccountTransactionScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
bankAccountId: 'bankAccountId',
|
||||||
|
type: 'type',
|
||||||
|
amount: 'amount',
|
||||||
|
balanceAfter: 'balanceAfter',
|
||||||
|
referenceId: 'referenceId',
|
||||||
|
referenceType: 'referenceType',
|
||||||
|
description: 'description',
|
||||||
|
createdAt: 'createdAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankAccountTransactionScalarFieldEnum = (typeof BankAccountTransactionScalarFieldEnum)[keyof typeof BankAccountTransactionScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankAccountBalanceScalarFieldEnum = {
|
||||||
|
bankAccountId: 'bankAccountId',
|
||||||
|
balance: 'balance',
|
||||||
|
updatedAt: 'updatedAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankAccountBalanceScalarFieldEnum = (typeof BankAccountBalanceScalarFieldEnum)[keyof typeof BankAccountBalanceScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const InventoryScalarFieldEnum = {
|
export const InventoryScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
@@ -250,6 +279,34 @@ export const BankScalarFieldEnum = {
|
|||||||
export type BankScalarFieldEnum = (typeof BankScalarFieldEnum)[keyof typeof BankScalarFieldEnum]
|
export type BankScalarFieldEnum = (typeof BankScalarFieldEnum)[keyof typeof BankScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const OrderScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
orderNumber: 'orderNumber',
|
||||||
|
status: 'status',
|
||||||
|
totalAmount: 'totalAmount',
|
||||||
|
description: 'description',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
deletedAt: 'deletedAt',
|
||||||
|
customerId: 'customerId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type OrderScalarFieldEnum = (typeof OrderScalarFieldEnum)[keyof typeof OrderScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const OrderItemScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
quantity: 'quantity',
|
||||||
|
unitPrice: 'unitPrice',
|
||||||
|
totalAmount: 'totalAmount',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
orderId: 'orderId',
|
||||||
|
productId: 'productId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type OrderItemScalarFieldEnum = (typeof OrderItemScalarFieldEnum)[keyof typeof OrderItemScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const CustomerScalarFieldEnum = {
|
export const CustomerScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
firstName: 'firstName',
|
firstName: 'firstName',
|
||||||
@@ -269,49 +326,6 @@ export const CustomerScalarFieldEnum = {
|
|||||||
export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum]
|
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',
|
|
||||||
posAccountId: 'posAccountId'
|
|
||||||
} 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 = {
|
export const TriggerLogScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
message: 'message',
|
message: 'message',
|
||||||
@@ -407,8 +421,8 @@ export type PurchaseReceiptScalarFieldEnum = (typeof PurchaseReceiptScalarFieldE
|
|||||||
export const PurchaseReceiptItemScalarFieldEnum = {
|
export const PurchaseReceiptItemScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
count: 'count',
|
count: 'count',
|
||||||
fee: 'fee',
|
unitPrice: 'unitPrice',
|
||||||
total: 'total',
|
totalAmount: 'totalAmount',
|
||||||
receiptId: 'receiptId',
|
receiptId: 'receiptId',
|
||||||
productId: 'productId',
|
productId: 'productId',
|
||||||
description: 'description',
|
description: 'description',
|
||||||
@@ -435,11 +449,50 @@ export const PurchaseReceiptPaymentsScalarFieldEnum = {
|
|||||||
export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum]
|
export type PurchaseReceiptPaymentsScalarFieldEnum = (typeof PurchaseReceiptPaymentsScalarFieldEnum)[keyof typeof PurchaseReceiptPaymentsScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SalesInvoiceScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
code: 'code',
|
||||||
|
totalAmount: 'totalAmount',
|
||||||
|
description: 'description',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
updatedAt: 'updatedAt',
|
||||||
|
customerId: 'customerId',
|
||||||
|
posAccountId: 'posAccountId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SalesInvoiceItemScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
count: 'count',
|
||||||
|
unitPrice: 'unitPrice',
|
||||||
|
totalAmount: 'totalAmount',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
invoiceId: 'invoiceId',
|
||||||
|
productId: 'productId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SalesInvoicePaymentScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
invoiceId: 'invoiceId',
|
||||||
|
amount: 'amount',
|
||||||
|
paymentMethod: 'paymentMethod',
|
||||||
|
paidAt: 'paidAt',
|
||||||
|
createdAt: 'createdAt'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SalesInvoicePaymentScalarFieldEnum = (typeof SalesInvoicePaymentScalarFieldEnum)[keyof typeof SalesInvoicePaymentScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const StockMovementScalarFieldEnum = {
|
export const StockMovementScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
type: 'type',
|
type: 'type',
|
||||||
quantity: 'quantity',
|
quantity: 'quantity',
|
||||||
fee: 'fee',
|
unitPrice: 'unitPrice',
|
||||||
totalCost: 'totalCost',
|
totalCost: 'totalCost',
|
||||||
referenceType: 'referenceType',
|
referenceType: 'referenceType',
|
||||||
referenceId: 'referenceId',
|
referenceId: 'referenceId',
|
||||||
@@ -481,6 +534,19 @@ export const StockAdjustmentScalarFieldEnum = {
|
|||||||
export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum]
|
export type StockAdjustmentScalarFieldEnum = (typeof StockAdjustmentScalarFieldEnum)[keyof typeof StockAdjustmentScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const StockReservationScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
quantity: 'quantity',
|
||||||
|
expiresAt: 'expiresAt',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
productId: 'productId',
|
||||||
|
inventoryId: 'inventoryId',
|
||||||
|
orderId: 'orderId'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type StockReservationScalarFieldEnum = (typeof StockReservationScalarFieldEnum)[keyof typeof StockReservationScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const SupplierScalarFieldEnum = {
|
export const SupplierScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
firstName: 'firstName',
|
firstName: 'firstName',
|
||||||
@@ -608,6 +674,13 @@ export const BankAccountOrderByRelevanceFieldEnum = {
|
|||||||
export type BankAccountOrderByRelevanceFieldEnum = (typeof BankAccountOrderByRelevanceFieldEnum)[keyof typeof BankAccountOrderByRelevanceFieldEnum]
|
export type BankAccountOrderByRelevanceFieldEnum = (typeof BankAccountOrderByRelevanceFieldEnum)[keyof typeof BankAccountOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BankAccountTransactionOrderByRelevanceFieldEnum = {
|
||||||
|
description: 'description'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BankAccountTransactionOrderByRelevanceFieldEnum = (typeof BankAccountTransactionOrderByRelevanceFieldEnum)[keyof typeof BankAccountTransactionOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const InventoryOrderByRelevanceFieldEnum = {
|
export const InventoryOrderByRelevanceFieldEnum = {
|
||||||
name: 'name',
|
name: 'name',
|
||||||
location: 'location'
|
location: 'location'
|
||||||
@@ -641,6 +714,14 @@ export const BankOrderByRelevanceFieldEnum = {
|
|||||||
export type BankOrderByRelevanceFieldEnum = (typeof BankOrderByRelevanceFieldEnum)[keyof typeof BankOrderByRelevanceFieldEnum]
|
export type BankOrderByRelevanceFieldEnum = (typeof BankOrderByRelevanceFieldEnum)[keyof typeof BankOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const OrderOrderByRelevanceFieldEnum = {
|
||||||
|
orderNumber: 'orderNumber',
|
||||||
|
description: 'description'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type OrderOrderByRelevanceFieldEnum = (typeof OrderOrderByRelevanceFieldEnum)[keyof typeof OrderOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const CustomerOrderByRelevanceFieldEnum = {
|
export const CustomerOrderByRelevanceFieldEnum = {
|
||||||
firstName: 'firstName',
|
firstName: 'firstName',
|
||||||
lastName: 'lastName',
|
lastName: 'lastName',
|
||||||
@@ -655,22 +736,6 @@ export const CustomerOrderByRelevanceFieldEnum = {
|
|||||||
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
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 = {
|
export const TriggerLogOrderByRelevanceFieldEnum = {
|
||||||
message: 'message',
|
message: 'message',
|
||||||
name: 'name'
|
name: 'name'
|
||||||
@@ -740,6 +805,14 @@ export const PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = {
|
|||||||
export type PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = (typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum]
|
export type PurchaseReceiptPaymentsOrderByRelevanceFieldEnum = (typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum)[keyof typeof PurchaseReceiptPaymentsOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||||
|
code: 'code',
|
||||||
|
description: 'description'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const StockMovementOrderByRelevanceFieldEnum = {
|
export const StockMovementOrderByRelevanceFieldEnum = {
|
||||||
referenceId: 'referenceId'
|
referenceId: 'referenceId'
|
||||||
} as const
|
} as const
|
||||||
|
|||||||
@@ -14,16 +14,17 @@ export type * from './models/OtpCode.js'
|
|||||||
export type * from './models/RefreshToken.js'
|
export type * from './models/RefreshToken.js'
|
||||||
export type * from './models/BankBranch.js'
|
export type * from './models/BankBranch.js'
|
||||||
export type * from './models/BankAccount.js'
|
export type * from './models/BankAccount.js'
|
||||||
|
export type * from './models/BankAccountTransaction.js'
|
||||||
|
export type * from './models/BankAccountBalance.js'
|
||||||
export type * from './models/Inventory.js'
|
export type * from './models/Inventory.js'
|
||||||
export type * from './models/InventoryBankAccount.js'
|
export type * from './models/InventoryBankAccount.js'
|
||||||
export type * from './models/PosAccount.js'
|
export type * from './models/PosAccount.js'
|
||||||
export type * from './models/InventoryTransfer.js'
|
export type * from './models/InventoryTransfer.js'
|
||||||
export type * from './models/InventoryTransferItem.js'
|
export type * from './models/InventoryTransferItem.js'
|
||||||
export type * from './models/Bank.js'
|
export type * from './models/Bank.js'
|
||||||
export type * from './models/Customer.js'
|
|
||||||
export type * from './models/Order.js'
|
export type * from './models/Order.js'
|
||||||
export type * from './models/SalesInvoice.js'
|
export type * from './models/OrderItem.js'
|
||||||
export type * from './models/SalesInvoiceItem.js'
|
export type * from './models/Customer.js'
|
||||||
export type * from './models/TriggerLog.js'
|
export type * from './models/TriggerLog.js'
|
||||||
export type * from './models/ProductVariant.js'
|
export type * from './models/ProductVariant.js'
|
||||||
export type * from './models/Product.js'
|
export type * from './models/Product.js'
|
||||||
@@ -32,9 +33,13 @@ export type * from './models/ProductCategory.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/PurchaseReceiptPayments.js'
|
export type * from './models/PurchaseReceiptPayments.js'
|
||||||
|
export type * from './models/SalesInvoice.js'
|
||||||
|
export type * from './models/SalesInvoiceItem.js'
|
||||||
|
export type * from './models/SalesInvoicePayment.js'
|
||||||
export type * from './models/StockMovement.js'
|
export type * from './models/StockMovement.js'
|
||||||
export type * from './models/StockBalance.js'
|
export type * from './models/StockBalance.js'
|
||||||
export type * from './models/StockAdjustment.js'
|
export type * from './models/StockAdjustment.js'
|
||||||
|
export type * from './models/StockReservation.js'
|
||||||
export type * from './models/Supplier.js'
|
export type * from './models/Supplier.js'
|
||||||
export type * from './models/SupplierLedger.js'
|
export type * from './models/SupplierLedger.js'
|
||||||
export type * from './commonInputTypes.js'
|
export type * from './commonInputTypes.js'
|
||||||
@@ -255,6 +255,8 @@ export type BankAccountWhereInput = {
|
|||||||
branch?: Prisma.XOR<Prisma.BankBranchScalarRelationFilter, Prisma.BankBranchWhereInput>
|
branch?: Prisma.XOR<Prisma.BankBranchScalarRelationFilter, Prisma.BankBranchWhereInput>
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter
|
inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionListRelationFilter
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceListRelationFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountOrderByWithRelationInput = {
|
export type BankAccountOrderByWithRelationInput = {
|
||||||
@@ -270,6 +272,8 @@ export type BankAccountOrderByWithRelationInput = {
|
|||||||
branch?: Prisma.BankBranchOrderByWithRelationInput
|
branch?: Prisma.BankBranchOrderByWithRelationInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountOrderByRelationAggregateInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountOrderByRelationAggregateInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsOrderByRelationAggregateInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionOrderByRelationAggregateInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.BankAccountOrderByRelevanceInput
|
_relevance?: Prisma.BankAccountOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,6 +293,8 @@ export type BankAccountWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
branch?: Prisma.XOR<Prisma.BankBranchScalarRelationFilter, Prisma.BankBranchWhereInput>
|
branch?: Prisma.XOR<Prisma.BankBranchScalarRelationFilter, Prisma.BankBranchWhereInput>
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter
|
inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsListRelationFilter
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionListRelationFilter
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceListRelationFilter
|
||||||
}, "id" | "accountNumber" | "cardNumber" | "iban">
|
}, "id" | "accountNumber" | "cardNumber" | "iban">
|
||||||
|
|
||||||
export type BankAccountOrderByWithAggregationInput = {
|
export type BankAccountOrderByWithAggregationInput = {
|
||||||
@@ -334,6 +340,8 @@ export type BankAccountCreateInput = {
|
|||||||
branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput
|
branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceCreateNestedManyWithoutBankAccountInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUncheckedCreateInput = {
|
export type BankAccountUncheckedCreateInput = {
|
||||||
@@ -348,6 +356,8 @@ export type BankAccountUncheckedCreateInput = {
|
|||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUpdateInput = {
|
export type BankAccountUpdateInput = {
|
||||||
@@ -361,6 +371,8 @@ export type BankAccountUpdateInput = {
|
|||||||
branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput
|
branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUpdateManyWithoutBankAccountNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUncheckedUpdateInput = {
|
export type BankAccountUncheckedUpdateInput = {
|
||||||
@@ -375,6 +387,8 @@ export type BankAccountUncheckedUpdateInput = {
|
|||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountCreateManyInput = {
|
export type BankAccountCreateManyInput = {
|
||||||
@@ -520,6 +534,34 @@ export type BankAccountUncheckedUpdateManyWithoutBranchNestedInput = {
|
|||||||
deleteMany?: Prisma.BankAccountScalarWhereInput | Prisma.BankAccountScalarWhereInput[]
|
deleteMany?: Prisma.BankAccountScalarWhereInput | Prisma.BankAccountScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BankAccountCreateNestedOneWithoutBankAccountTransactionsInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.BankAccountCreateWithoutBankAccountTransactionsInput, Prisma.BankAccountUncheckedCreateWithoutBankAccountTransactionsInput>
|
||||||
|
connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBankAccountTransactionsInput
|
||||||
|
connect?: Prisma.BankAccountWhereUniqueInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUpdateOneRequiredWithoutBankAccountTransactionsNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.BankAccountCreateWithoutBankAccountTransactionsInput, Prisma.BankAccountUncheckedCreateWithoutBankAccountTransactionsInput>
|
||||||
|
connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBankAccountTransactionsInput
|
||||||
|
upsert?: Prisma.BankAccountUpsertWithoutBankAccountTransactionsInput
|
||||||
|
connect?: Prisma.BankAccountWhereUniqueInput
|
||||||
|
update?: Prisma.XOR<Prisma.XOR<Prisma.BankAccountUpdateToOneWithWhereWithoutBankAccountTransactionsInput, Prisma.BankAccountUpdateWithoutBankAccountTransactionsInput>, Prisma.BankAccountUncheckedUpdateWithoutBankAccountTransactionsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountCreateNestedOneWithoutBankAccountBalancesInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.BankAccountCreateWithoutBankAccountBalancesInput, Prisma.BankAccountUncheckedCreateWithoutBankAccountBalancesInput>
|
||||||
|
connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBankAccountBalancesInput
|
||||||
|
connect?: Prisma.BankAccountWhereUniqueInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUpdateOneRequiredWithoutBankAccountBalancesNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.BankAccountCreateWithoutBankAccountBalancesInput, Prisma.BankAccountUncheckedCreateWithoutBankAccountBalancesInput>
|
||||||
|
connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutBankAccountBalancesInput
|
||||||
|
upsert?: Prisma.BankAccountUpsertWithoutBankAccountBalancesInput
|
||||||
|
connect?: Prisma.BankAccountWhereUniqueInput
|
||||||
|
update?: Prisma.XOR<Prisma.XOR<Prisma.BankAccountUpdateToOneWithWhereWithoutBankAccountBalancesInput, Prisma.BankAccountUpdateWithoutBankAccountBalancesInput>, Prisma.BankAccountUncheckedUpdateWithoutBankAccountBalancesInput>
|
||||||
|
}
|
||||||
|
|
||||||
export type BankAccountCreateNestedOneWithoutInventoryBankAccountsInput = {
|
export type BankAccountCreateNestedOneWithoutInventoryBankAccountsInput = {
|
||||||
create?: Prisma.XOR<Prisma.BankAccountCreateWithoutInventoryBankAccountsInput, Prisma.BankAccountUncheckedCreateWithoutInventoryBankAccountsInput>
|
create?: Prisma.XOR<Prisma.BankAccountCreateWithoutInventoryBankAccountsInput, Prisma.BankAccountUncheckedCreateWithoutInventoryBankAccountsInput>
|
||||||
connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutInventoryBankAccountsInput
|
connectOrCreate?: Prisma.BankAccountCreateOrConnectWithoutInventoryBankAccountsInput
|
||||||
@@ -558,6 +600,8 @@ export type BankAccountCreateWithoutBranchInput = {
|
|||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceCreateNestedManyWithoutBankAccountInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUncheckedCreateWithoutBranchInput = {
|
export type BankAccountUncheckedCreateWithoutBranchInput = {
|
||||||
@@ -571,6 +615,8 @@ export type BankAccountUncheckedCreateWithoutBranchInput = {
|
|||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountCreateOrConnectWithoutBranchInput = {
|
export type BankAccountCreateOrConnectWithoutBranchInput = {
|
||||||
@@ -614,6 +660,154 @@ export type BankAccountScalarWhereInput = {
|
|||||||
deletedAt?: Prisma.DateTimeNullableFilter<"BankAccount"> | Date | string | null
|
deletedAt?: Prisma.DateTimeNullableFilter<"BankAccount"> | Date | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type BankAccountCreateWithoutBankAccountTransactionsInput = {
|
||||||
|
accountNumber?: string | null
|
||||||
|
cardNumber?: string | null
|
||||||
|
name: string
|
||||||
|
iban?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceCreateNestedManyWithoutBankAccountInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUncheckedCreateWithoutBankAccountTransactionsInput = {
|
||||||
|
id?: number
|
||||||
|
accountNumber?: string | null
|
||||||
|
cardNumber?: string | null
|
||||||
|
name: string
|
||||||
|
iban?: string | null
|
||||||
|
branchId: number
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountCreateOrConnectWithoutBankAccountTransactionsInput = {
|
||||||
|
where: Prisma.BankAccountWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.BankAccountCreateWithoutBankAccountTransactionsInput, Prisma.BankAccountUncheckedCreateWithoutBankAccountTransactionsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUpsertWithoutBankAccountTransactionsInput = {
|
||||||
|
update: Prisma.XOR<Prisma.BankAccountUpdateWithoutBankAccountTransactionsInput, Prisma.BankAccountUncheckedUpdateWithoutBankAccountTransactionsInput>
|
||||||
|
create: Prisma.XOR<Prisma.BankAccountCreateWithoutBankAccountTransactionsInput, Prisma.BankAccountUncheckedCreateWithoutBankAccountTransactionsInput>
|
||||||
|
where?: Prisma.BankAccountWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUpdateToOneWithWhereWithoutBankAccountTransactionsInput = {
|
||||||
|
where?: Prisma.BankAccountWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.BankAccountUpdateWithoutBankAccountTransactionsInput, Prisma.BankAccountUncheckedUpdateWithoutBankAccountTransactionsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUpdateWithoutBankAccountTransactionsInput = {
|
||||||
|
accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUpdateManyWithoutBankAccountNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUncheckedUpdateWithoutBankAccountTransactionsInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
branchId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountCreateWithoutBankAccountBalancesInput = {
|
||||||
|
accountNumber?: string | null
|
||||||
|
cardNumber?: string | null
|
||||||
|
name: string
|
||||||
|
iban?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionCreateNestedManyWithoutBankAccountInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUncheckedCreateWithoutBankAccountBalancesInput = {
|
||||||
|
id?: number
|
||||||
|
accountNumber?: string | null
|
||||||
|
cardNumber?: string | null
|
||||||
|
name: string
|
||||||
|
iban?: string | null
|
||||||
|
branchId: number
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountCreateOrConnectWithoutBankAccountBalancesInput = {
|
||||||
|
where: Prisma.BankAccountWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.BankAccountCreateWithoutBankAccountBalancesInput, Prisma.BankAccountUncheckedCreateWithoutBankAccountBalancesInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUpsertWithoutBankAccountBalancesInput = {
|
||||||
|
update: Prisma.XOR<Prisma.BankAccountUpdateWithoutBankAccountBalancesInput, Prisma.BankAccountUncheckedUpdateWithoutBankAccountBalancesInput>
|
||||||
|
create: Prisma.XOR<Prisma.BankAccountCreateWithoutBankAccountBalancesInput, Prisma.BankAccountUncheckedCreateWithoutBankAccountBalancesInput>
|
||||||
|
where?: Prisma.BankAccountWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUpdateToOneWithWhereWithoutBankAccountBalancesInput = {
|
||||||
|
where?: Prisma.BankAccountWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.BankAccountUpdateWithoutBankAccountBalancesInput, Prisma.BankAccountUncheckedUpdateWithoutBankAccountBalancesInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUpdateWithoutBankAccountBalancesInput = {
|
||||||
|
accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUpdateManyWithoutBankAccountNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BankAccountUncheckedUpdateWithoutBankAccountBalancesInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
accountNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
cardNumber?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
iban?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
branchId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
export type BankAccountCreateWithoutInventoryBankAccountsInput = {
|
export type BankAccountCreateWithoutInventoryBankAccountsInput = {
|
||||||
accountNumber?: string | null
|
accountNumber?: string | null
|
||||||
cardNumber?: string | null
|
cardNumber?: string | null
|
||||||
@@ -624,6 +818,8 @@ export type BankAccountCreateWithoutInventoryBankAccountsInput = {
|
|||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput
|
branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceCreateNestedManyWithoutBankAccountInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUncheckedCreateWithoutInventoryBankAccountsInput = {
|
export type BankAccountUncheckedCreateWithoutInventoryBankAccountsInput = {
|
||||||
@@ -637,6 +833,8 @@ export type BankAccountUncheckedCreateWithoutInventoryBankAccountsInput = {
|
|||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountCreateOrConnectWithoutInventoryBankAccountsInput = {
|
export type BankAccountCreateOrConnectWithoutInventoryBankAccountsInput = {
|
||||||
@@ -665,6 +863,8 @@ export type BankAccountUpdateWithoutInventoryBankAccountsInput = {
|
|||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput
|
branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUpdateManyWithoutBankAccountNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUncheckedUpdateWithoutInventoryBankAccountsInput = {
|
export type BankAccountUncheckedUpdateWithoutInventoryBankAccountsInput = {
|
||||||
@@ -678,6 +878,8 @@ export type BankAccountUncheckedUpdateWithoutInventoryBankAccountsInput = {
|
|||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountCreateWithoutPurchaseReceiptPaymentsInput = {
|
export type BankAccountCreateWithoutPurchaseReceiptPaymentsInput = {
|
||||||
@@ -690,6 +892,8 @@ export type BankAccountCreateWithoutPurchaseReceiptPaymentsInput = {
|
|||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput
|
branch: Prisma.BankBranchCreateNestedOneWithoutBankAccountsInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceCreateNestedManyWithoutBankAccountInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput = {
|
export type BankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput = {
|
||||||
@@ -703,6 +907,8 @@ export type BankAccountUncheckedCreateWithoutPurchaseReceiptPaymentsInput = {
|
|||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedCreateNestedManyWithoutBankAccountInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput = {
|
export type BankAccountCreateOrConnectWithoutPurchaseReceiptPaymentsInput = {
|
||||||
@@ -731,6 +937,8 @@ export type BankAccountUpdateWithoutPurchaseReceiptPaymentsInput = {
|
|||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput
|
branch?: Prisma.BankBranchUpdateOneRequiredWithoutBankAccountsNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUpdateManyWithoutBankAccountNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput = {
|
export type BankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput = {
|
||||||
@@ -744,6 +952,8 @@ export type BankAccountUncheckedUpdateWithoutPurchaseReceiptPaymentsInput = {
|
|||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountCreateManyBranchInput = {
|
export type BankAccountCreateManyBranchInput = {
|
||||||
@@ -767,6 +977,8 @@ export type BankAccountUpdateWithoutBranchInput = {
|
|||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutBankAccountNestedInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUpdateManyWithoutBankAccountNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUncheckedUpdateWithoutBranchInput = {
|
export type BankAccountUncheckedUpdateWithoutBranchInput = {
|
||||||
@@ -780,6 +992,8 @@ export type BankAccountUncheckedUpdateWithoutBranchInput = {
|
|||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput
|
purchaseReceiptPayments?: Prisma.PurchaseReceiptPaymentsUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountTransactions?: Prisma.BankAccountTransactionUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
|
bankAccountBalances?: Prisma.BankAccountBalanceUncheckedUpdateManyWithoutBankAccountNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountUncheckedUpdateManyWithoutBranchInput = {
|
export type BankAccountUncheckedUpdateManyWithoutBranchInput = {
|
||||||
@@ -801,11 +1015,15 @@ export type BankAccountUncheckedUpdateManyWithoutBranchInput = {
|
|||||||
export type BankAccountCountOutputType = {
|
export type BankAccountCountOutputType = {
|
||||||
inventoryBankAccounts: number
|
inventoryBankAccounts: number
|
||||||
purchaseReceiptPayments: number
|
purchaseReceiptPayments: number
|
||||||
|
bankAccountTransactions: number
|
||||||
|
bankAccountBalances: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type BankAccountCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type BankAccountCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
inventoryBankAccounts?: boolean | BankAccountCountOutputTypeCountInventoryBankAccountsArgs
|
inventoryBankAccounts?: boolean | BankAccountCountOutputTypeCountInventoryBankAccountsArgs
|
||||||
purchaseReceiptPayments?: boolean | BankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs
|
purchaseReceiptPayments?: boolean | BankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs
|
||||||
|
bankAccountTransactions?: boolean | BankAccountCountOutputTypeCountBankAccountTransactionsArgs
|
||||||
|
bankAccountBalances?: boolean | BankAccountCountOutputTypeCountBankAccountBalancesArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -832,6 +1050,20 @@ export type BankAccountCountOutputTypeCountPurchaseReceiptPaymentsArgs<ExtArgs e
|
|||||||
where?: Prisma.PurchaseReceiptPaymentsWhereInput
|
where?: Prisma.PurchaseReceiptPaymentsWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BankAccountCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type BankAccountCountOutputTypeCountBankAccountTransactionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.BankAccountTransactionWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BankAccountCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type BankAccountCountOutputTypeCountBankAccountBalancesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.BankAccountBalanceWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export type BankAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type BankAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
@@ -846,6 +1078,8 @@ export type BankAccountSelect<ExtArgs extends runtime.Types.Extensions.InternalA
|
|||||||
branch?: boolean | Prisma.BankBranchDefaultArgs<ExtArgs>
|
branch?: boolean | Prisma.BankBranchDefaultArgs<ExtArgs>
|
||||||
inventoryBankAccounts?: boolean | Prisma.BankAccount$inventoryBankAccountsArgs<ExtArgs>
|
inventoryBankAccounts?: boolean | Prisma.BankAccount$inventoryBankAccountsArgs<ExtArgs>
|
||||||
purchaseReceiptPayments?: boolean | Prisma.BankAccount$purchaseReceiptPaymentsArgs<ExtArgs>
|
purchaseReceiptPayments?: boolean | Prisma.BankAccount$purchaseReceiptPaymentsArgs<ExtArgs>
|
||||||
|
bankAccountTransactions?: boolean | Prisma.BankAccount$bankAccountTransactionsArgs<ExtArgs>
|
||||||
|
bankAccountBalances?: boolean | Prisma.BankAccount$bankAccountBalancesArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.BankAccountCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.BankAccountCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["bankAccount"]>
|
}, ExtArgs["result"]["bankAccount"]>
|
||||||
|
|
||||||
@@ -868,6 +1102,8 @@ export type BankAccountInclude<ExtArgs extends runtime.Types.Extensions.Internal
|
|||||||
branch?: boolean | Prisma.BankBranchDefaultArgs<ExtArgs>
|
branch?: boolean | Prisma.BankBranchDefaultArgs<ExtArgs>
|
||||||
inventoryBankAccounts?: boolean | Prisma.BankAccount$inventoryBankAccountsArgs<ExtArgs>
|
inventoryBankAccounts?: boolean | Prisma.BankAccount$inventoryBankAccountsArgs<ExtArgs>
|
||||||
purchaseReceiptPayments?: boolean | Prisma.BankAccount$purchaseReceiptPaymentsArgs<ExtArgs>
|
purchaseReceiptPayments?: boolean | Prisma.BankAccount$purchaseReceiptPaymentsArgs<ExtArgs>
|
||||||
|
bankAccountTransactions?: boolean | Prisma.BankAccount$bankAccountTransactionsArgs<ExtArgs>
|
||||||
|
bankAccountBalances?: boolean | Prisma.BankAccount$bankAccountBalancesArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.BankAccountCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.BankAccountCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -877,6 +1113,8 @@ export type $BankAccountPayload<ExtArgs extends runtime.Types.Extensions.Interna
|
|||||||
branch: Prisma.$BankBranchPayload<ExtArgs>
|
branch: Prisma.$BankBranchPayload<ExtArgs>
|
||||||
inventoryBankAccounts: Prisma.$InventoryBankAccountPayload<ExtArgs>[]
|
inventoryBankAccounts: Prisma.$InventoryBankAccountPayload<ExtArgs>[]
|
||||||
purchaseReceiptPayments: Prisma.$PurchaseReceiptPaymentsPayload<ExtArgs>[]
|
purchaseReceiptPayments: Prisma.$PurchaseReceiptPaymentsPayload<ExtArgs>[]
|
||||||
|
bankAccountTransactions: Prisma.$BankAccountTransactionPayload<ExtArgs>[]
|
||||||
|
bankAccountBalances: Prisma.$BankAccountBalancePayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
@@ -1231,6 +1469,8 @@ export interface Prisma__BankAccountClient<T, Null = never, ExtArgs extends runt
|
|||||||
branch<T extends Prisma.BankBranchDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankBranchDefaultArgs<ExtArgs>>): Prisma.Prisma__BankBranchClient<runtime.Types.Result.GetResult<Prisma.$BankBranchPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
branch<T extends Prisma.BankBranchDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankBranchDefaultArgs<ExtArgs>>): Prisma.Prisma__BankBranchClient<runtime.Types.Result.GetResult<Prisma.$BankBranchPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||||
inventoryBankAccounts<T extends Prisma.BankAccount$inventoryBankAccountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankAccount$inventoryBankAccountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InventoryBankAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
inventoryBankAccounts<T extends Prisma.BankAccount$inventoryBankAccountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankAccount$inventoryBankAccountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InventoryBankAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
purchaseReceiptPayments<T extends Prisma.BankAccount$purchaseReceiptPaymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankAccount$purchaseReceiptPaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPaymentsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
purchaseReceiptPayments<T extends Prisma.BankAccount$purchaseReceiptPaymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankAccount$purchaseReceiptPaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PurchaseReceiptPaymentsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
bankAccountTransactions<T extends Prisma.BankAccount$bankAccountTransactionsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankAccount$bankAccountTransactionsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BankAccountTransactionPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
bankAccountBalances<T extends Prisma.BankAccount$bankAccountBalancesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BankAccount$bankAccountBalancesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BankAccountBalancePayload<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.
|
||||||
@@ -1659,6 +1899,54 @@ export type BankAccount$purchaseReceiptPaymentsArgs<ExtArgs extends runtime.Type
|
|||||||
distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[]
|
distinct?: Prisma.PurchaseReceiptPaymentsScalarFieldEnum | Prisma.PurchaseReceiptPaymentsScalarFieldEnum[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BankAccount.bankAccountTransactions
|
||||||
|
*/
|
||||||
|
export type BankAccount$bankAccountTransactionsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the BankAccountTransaction
|
||||||
|
*/
|
||||||
|
select?: Prisma.BankAccountTransactionSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the BankAccountTransaction
|
||||||
|
*/
|
||||||
|
omit?: Prisma.BankAccountTransactionOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.BankAccountTransactionInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.BankAccountTransactionWhereInput
|
||||||
|
orderBy?: Prisma.BankAccountTransactionOrderByWithRelationInput | Prisma.BankAccountTransactionOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.BankAccountTransactionWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.BankAccountTransactionScalarFieldEnum | Prisma.BankAccountTransactionScalarFieldEnum[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* BankAccount.bankAccountBalances
|
||||||
|
*/
|
||||||
|
export type BankAccount$bankAccountBalancesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the BankAccountBalance
|
||||||
|
*/
|
||||||
|
select?: Prisma.BankAccountBalanceSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the BankAccountBalance
|
||||||
|
*/
|
||||||
|
omit?: Prisma.BankAccountBalanceOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.BankAccountBalanceInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.BankAccountBalanceWhereInput
|
||||||
|
orderBy?: Prisma.BankAccountBalanceOrderByWithRelationInput | Prisma.BankAccountBalanceOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.BankAccountBalanceWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.BankAccountBalanceScalarFieldEnum | Prisma.BankAccountBalanceScalarFieldEnum[]
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* BankAccount without action
|
* BankAccount without action
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -488,6 +488,11 @@ export type CustomerUncheckedUpdateManyInput = {
|
|||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type CustomerNullableScalarRelationFilter = {
|
||||||
|
is?: Prisma.CustomerWhereInput | null
|
||||||
|
isNot?: Prisma.CustomerWhereInput | null
|
||||||
|
}
|
||||||
|
|
||||||
export type CustomerOrderByRelevanceInput = {
|
export type CustomerOrderByRelevanceInput = {
|
||||||
fields: Prisma.CustomerOrderByRelevanceFieldEnum | Prisma.CustomerOrderByRelevanceFieldEnum[]
|
fields: Prisma.CustomerOrderByRelevanceFieldEnum | Prisma.CustomerOrderByRelevanceFieldEnum[]
|
||||||
sort: Prisma.SortOrder
|
sort: Prisma.SortOrder
|
||||||
@@ -550,26 +555,18 @@ export type CustomerSumOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerScalarRelationFilter = {
|
|
||||||
is?: Prisma.CustomerWhereInput
|
|
||||||
isNot?: Prisma.CustomerWhereInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerNullableScalarRelationFilter = {
|
|
||||||
is?: Prisma.CustomerWhereInput | null
|
|
||||||
isNot?: Prisma.CustomerWhereInput | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerCreateNestedOneWithoutOrdersInput = {
|
export type CustomerCreateNestedOneWithoutOrdersInput = {
|
||||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutOrdersInput, Prisma.CustomerUncheckedCreateWithoutOrdersInput>
|
create?: Prisma.XOR<Prisma.CustomerCreateWithoutOrdersInput, Prisma.CustomerUncheckedCreateWithoutOrdersInput>
|
||||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput
|
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput
|
||||||
connect?: Prisma.CustomerWhereUniqueInput
|
connect?: Prisma.CustomerWhereUniqueInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type CustomerUpdateOneRequiredWithoutOrdersNestedInput = {
|
export type CustomerUpdateOneWithoutOrdersNestedInput = {
|
||||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutOrdersInput, Prisma.CustomerUncheckedCreateWithoutOrdersInput>
|
create?: Prisma.XOR<Prisma.CustomerCreateWithoutOrdersInput, Prisma.CustomerUncheckedCreateWithoutOrdersInput>
|
||||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput
|
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutOrdersInput
|
||||||
upsert?: Prisma.CustomerUpsertWithoutOrdersInput
|
upsert?: Prisma.CustomerUpsertWithoutOrdersInput
|
||||||
|
disconnect?: Prisma.CustomerWhereInput | boolean
|
||||||
|
delete?: Prisma.CustomerWhereInput | boolean
|
||||||
connect?: Prisma.CustomerWhereUniqueInput
|
connect?: Prisma.CustomerWhereUniqueInput
|
||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutOrdersInput, Prisma.CustomerUpdateWithoutOrdersInput>, Prisma.CustomerUncheckedUpdateWithoutOrdersInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutOrdersInput, Prisma.CustomerUpdateWithoutOrdersInput>, Prisma.CustomerUncheckedUpdateWithoutOrdersInput>
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -248,6 +248,7 @@ export type InventoryWhereInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementListRelationFilter
|
counterStockMovements?: Prisma.StockMovementListRelationFilter
|
||||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter
|
inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter
|
||||||
|
stockReservations?: Prisma.StockReservationListRelationFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryOrderByWithRelationInput = {
|
export type InventoryOrderByWithRelationInput = {
|
||||||
@@ -267,6 +268,7 @@ export type InventoryOrderByWithRelationInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
counterStockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
||||||
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountOrderByRelationAggregateInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountOrderByRelationAggregateInput
|
||||||
|
stockReservations?: Prisma.StockReservationOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.InventoryOrderByRelevanceInput
|
_relevance?: Prisma.InventoryOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -290,6 +292,7 @@ export type InventoryWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
counterStockMovements?: Prisma.StockMovementListRelationFilter
|
counterStockMovements?: Prisma.StockMovementListRelationFilter
|
||||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter
|
inventoryBankAccounts?: Prisma.InventoryBankAccountListRelationFilter
|
||||||
|
stockReservations?: Prisma.StockReservationListRelationFilter
|
||||||
}, "id">
|
}, "id">
|
||||||
|
|
||||||
export type InventoryOrderByWithAggregationInput = {
|
export type InventoryOrderByWithAggregationInput = {
|
||||||
@@ -338,6 +341,7 @@ export type InventoryCreateInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedCreateInput = {
|
export type InventoryUncheckedCreateInput = {
|
||||||
@@ -357,6 +361,7 @@ export type InventoryUncheckedCreateInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUpdateInput = {
|
export type InventoryUpdateInput = {
|
||||||
@@ -375,6 +380,7 @@ export type InventoryUpdateInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedUpdateInput = {
|
export type InventoryUncheckedUpdateInput = {
|
||||||
@@ -394,6 +400,7 @@ export type InventoryUncheckedUpdateInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateManyInput = {
|
export type InventoryCreateManyInput = {
|
||||||
@@ -599,6 +606,20 @@ export type InventoryUpdateOneRequiredWithoutStockAdjustmentsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.InventoryUpdateToOneWithWhereWithoutStockAdjustmentsInput, Prisma.InventoryUpdateWithoutStockAdjustmentsInput>, Prisma.InventoryUncheckedUpdateWithoutStockAdjustmentsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.InventoryUpdateToOneWithWhereWithoutStockAdjustmentsInput, Prisma.InventoryUpdateWithoutStockAdjustmentsInput>, Prisma.InventoryUncheckedUpdateWithoutStockAdjustmentsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type InventoryCreateNestedOneWithoutStockReservationsInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.InventoryCreateWithoutStockReservationsInput, Prisma.InventoryUncheckedCreateWithoutStockReservationsInput>
|
||||||
|
connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockReservationsInput
|
||||||
|
connect?: Prisma.InventoryWhereUniqueInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryUpdateOneRequiredWithoutStockReservationsNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.InventoryCreateWithoutStockReservationsInput, Prisma.InventoryUncheckedCreateWithoutStockReservationsInput>
|
||||||
|
connectOrCreate?: Prisma.InventoryCreateOrConnectWithoutStockReservationsInput
|
||||||
|
upsert?: Prisma.InventoryUpsertWithoutStockReservationsInput
|
||||||
|
connect?: Prisma.InventoryWhereUniqueInput
|
||||||
|
update?: Prisma.XOR<Prisma.XOR<Prisma.InventoryUpdateToOneWithWhereWithoutStockReservationsInput, Prisma.InventoryUpdateWithoutStockReservationsInput>, Prisma.InventoryUncheckedUpdateWithoutStockReservationsInput>
|
||||||
|
}
|
||||||
|
|
||||||
export type InventoryCreateWithoutInventoryBankAccountsInput = {
|
export type InventoryCreateWithoutInventoryBankAccountsInput = {
|
||||||
name: string
|
name: string
|
||||||
location?: string | null
|
location?: string | null
|
||||||
@@ -614,6 +635,7 @@ export type InventoryCreateWithoutInventoryBankAccountsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedCreateWithoutInventoryBankAccountsInput = {
|
export type InventoryUncheckedCreateWithoutInventoryBankAccountsInput = {
|
||||||
@@ -632,6 +654,7 @@ export type InventoryUncheckedCreateWithoutInventoryBankAccountsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateOrConnectWithoutInventoryBankAccountsInput = {
|
export type InventoryCreateOrConnectWithoutInventoryBankAccountsInput = {
|
||||||
@@ -665,6 +688,7 @@ export type InventoryUpdateWithoutInventoryBankAccountsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedUpdateWithoutInventoryBankAccountsInput = {
|
export type InventoryUncheckedUpdateWithoutInventoryBankAccountsInput = {
|
||||||
@@ -683,6 +707,7 @@ export type InventoryUncheckedUpdateWithoutInventoryBankAccountsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateWithoutInventoryTransfersFromInput = {
|
export type InventoryCreateWithoutInventoryTransfersFromInput = {
|
||||||
@@ -700,6 +725,7 @@ export type InventoryCreateWithoutInventoryTransfersFromInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedCreateWithoutInventoryTransfersFromInput = {
|
export type InventoryUncheckedCreateWithoutInventoryTransfersFromInput = {
|
||||||
@@ -718,6 +744,7 @@ export type InventoryUncheckedCreateWithoutInventoryTransfersFromInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateOrConnectWithoutInventoryTransfersFromInput = {
|
export type InventoryCreateOrConnectWithoutInventoryTransfersFromInput = {
|
||||||
@@ -740,6 +767,7 @@ export type InventoryCreateWithoutInventoryTransfersToInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedCreateWithoutInventoryTransfersToInput = {
|
export type InventoryUncheckedCreateWithoutInventoryTransfersToInput = {
|
||||||
@@ -758,6 +786,7 @@ export type InventoryUncheckedCreateWithoutInventoryTransfersToInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateOrConnectWithoutInventoryTransfersToInput = {
|
export type InventoryCreateOrConnectWithoutInventoryTransfersToInput = {
|
||||||
@@ -791,6 +820,7 @@ export type InventoryUpdateWithoutInventoryTransfersFromInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedUpdateWithoutInventoryTransfersFromInput = {
|
export type InventoryUncheckedUpdateWithoutInventoryTransfersFromInput = {
|
||||||
@@ -809,6 +839,7 @@ export type InventoryUncheckedUpdateWithoutInventoryTransfersFromInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUpsertWithoutInventoryTransfersToInput = {
|
export type InventoryUpsertWithoutInventoryTransfersToInput = {
|
||||||
@@ -837,6 +868,7 @@ export type InventoryUpdateWithoutInventoryTransfersToInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedUpdateWithoutInventoryTransfersToInput = {
|
export type InventoryUncheckedUpdateWithoutInventoryTransfersToInput = {
|
||||||
@@ -855,6 +887,7 @@ export type InventoryUncheckedUpdateWithoutInventoryTransfersToInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateWithoutPurchaseReceiptsInput = {
|
export type InventoryCreateWithoutPurchaseReceiptsInput = {
|
||||||
@@ -872,6 +905,7 @@ export type InventoryCreateWithoutPurchaseReceiptsInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedCreateWithoutPurchaseReceiptsInput = {
|
export type InventoryUncheckedCreateWithoutPurchaseReceiptsInput = {
|
||||||
@@ -890,6 +924,7 @@ export type InventoryUncheckedCreateWithoutPurchaseReceiptsInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateOrConnectWithoutPurchaseReceiptsInput = {
|
export type InventoryCreateOrConnectWithoutPurchaseReceiptsInput = {
|
||||||
@@ -923,6 +958,7 @@ export type InventoryUpdateWithoutPurchaseReceiptsInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedUpdateWithoutPurchaseReceiptsInput = {
|
export type InventoryUncheckedUpdateWithoutPurchaseReceiptsInput = {
|
||||||
@@ -941,6 +977,7 @@ export type InventoryUncheckedUpdateWithoutPurchaseReceiptsInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateWithoutCounterStockMovementsInput = {
|
export type InventoryCreateWithoutCounterStockMovementsInput = {
|
||||||
@@ -958,6 +995,7 @@ export type InventoryCreateWithoutCounterStockMovementsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedCreateWithoutCounterStockMovementsInput = {
|
export type InventoryUncheckedCreateWithoutCounterStockMovementsInput = {
|
||||||
@@ -976,6 +1014,7 @@ export type InventoryUncheckedCreateWithoutCounterStockMovementsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateOrConnectWithoutCounterStockMovementsInput = {
|
export type InventoryCreateOrConnectWithoutCounterStockMovementsInput = {
|
||||||
@@ -998,6 +1037,7 @@ export type InventoryCreateWithoutStockMovementsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedCreateWithoutStockMovementsInput = {
|
export type InventoryUncheckedCreateWithoutStockMovementsInput = {
|
||||||
@@ -1016,6 +1056,7 @@ export type InventoryUncheckedCreateWithoutStockMovementsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateOrConnectWithoutStockMovementsInput = {
|
export type InventoryCreateOrConnectWithoutStockMovementsInput = {
|
||||||
@@ -1049,6 +1090,7 @@ export type InventoryUpdateWithoutCounterStockMovementsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedUpdateWithoutCounterStockMovementsInput = {
|
export type InventoryUncheckedUpdateWithoutCounterStockMovementsInput = {
|
||||||
@@ -1067,6 +1109,7 @@ export type InventoryUncheckedUpdateWithoutCounterStockMovementsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUpsertWithoutStockMovementsInput = {
|
export type InventoryUpsertWithoutStockMovementsInput = {
|
||||||
@@ -1095,6 +1138,7 @@ export type InventoryUpdateWithoutStockMovementsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedUpdateWithoutStockMovementsInput = {
|
export type InventoryUncheckedUpdateWithoutStockMovementsInput = {
|
||||||
@@ -1113,6 +1157,7 @@ export type InventoryUncheckedUpdateWithoutStockMovementsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateWithoutStockBalancesInput = {
|
export type InventoryCreateWithoutStockBalancesInput = {
|
||||||
@@ -1130,6 +1175,7 @@ export type InventoryCreateWithoutStockBalancesInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedCreateWithoutStockBalancesInput = {
|
export type InventoryUncheckedCreateWithoutStockBalancesInput = {
|
||||||
@@ -1148,6 +1194,7 @@ export type InventoryUncheckedCreateWithoutStockBalancesInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateOrConnectWithoutStockBalancesInput = {
|
export type InventoryCreateOrConnectWithoutStockBalancesInput = {
|
||||||
@@ -1181,6 +1228,7 @@ export type InventoryUpdateWithoutStockBalancesInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedUpdateWithoutStockBalancesInput = {
|
export type InventoryUncheckedUpdateWithoutStockBalancesInput = {
|
||||||
@@ -1199,6 +1247,7 @@ export type InventoryUncheckedUpdateWithoutStockBalancesInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateWithoutStockAdjustmentsInput = {
|
export type InventoryCreateWithoutStockAdjustmentsInput = {
|
||||||
@@ -1216,6 +1265,7 @@ export type InventoryCreateWithoutStockAdjustmentsInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedCreateWithoutStockAdjustmentsInput = {
|
export type InventoryUncheckedCreateWithoutStockAdjustmentsInput = {
|
||||||
@@ -1234,6 +1284,7 @@ export type InventoryUncheckedCreateWithoutStockAdjustmentsInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCreateOrConnectWithoutStockAdjustmentsInput = {
|
export type InventoryCreateOrConnectWithoutStockAdjustmentsInput = {
|
||||||
@@ -1267,6 +1318,7 @@ export type InventoryUpdateWithoutStockAdjustmentsInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryUncheckedUpdateWithoutStockAdjustmentsInput = {
|
export type InventoryUncheckedUpdateWithoutStockAdjustmentsInput = {
|
||||||
@@ -1285,6 +1337,97 @@ export type InventoryUncheckedUpdateWithoutStockAdjustmentsInput = {
|
|||||||
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryCreateWithoutStockReservationsInput = {
|
||||||
|
name: string
|
||||||
|
location?: string | null
|
||||||
|
isActive?: boolean
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
isPointOfSale?: boolean
|
||||||
|
inventoryTransfersFrom?: Prisma.InventoryTransferCreateNestedManyWithoutFromInventoryInput
|
||||||
|
inventoryTransfersTo?: Prisma.InventoryTransferCreateNestedManyWithoutToInventoryInput
|
||||||
|
purchaseReceipts?: Prisma.PurchaseReceiptCreateNestedManyWithoutInventoryInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutInventoryInput
|
||||||
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutInventoryInput
|
||||||
|
counterStockMovements?: Prisma.StockMovementCreateNestedManyWithoutCounterInventoryInput
|
||||||
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutInventoryInput
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountCreateNestedManyWithoutInventoryInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryUncheckedCreateWithoutStockReservationsInput = {
|
||||||
|
id?: number
|
||||||
|
name: string
|
||||||
|
location?: string | null
|
||||||
|
isActive?: boolean
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
isPointOfSale?: boolean
|
||||||
|
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutFromInventoryInput
|
||||||
|
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedCreateNestedManyWithoutToInventoryInput
|
||||||
|
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
counterStockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutCounterInventoryInput
|
||||||
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedCreateNestedManyWithoutInventoryInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryCreateOrConnectWithoutStockReservationsInput = {
|
||||||
|
where: Prisma.InventoryWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.InventoryCreateWithoutStockReservationsInput, Prisma.InventoryUncheckedCreateWithoutStockReservationsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryUpsertWithoutStockReservationsInput = {
|
||||||
|
update: Prisma.XOR<Prisma.InventoryUpdateWithoutStockReservationsInput, Prisma.InventoryUncheckedUpdateWithoutStockReservationsInput>
|
||||||
|
create: Prisma.XOR<Prisma.InventoryCreateWithoutStockReservationsInput, Prisma.InventoryUncheckedCreateWithoutStockReservationsInput>
|
||||||
|
where?: Prisma.InventoryWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryUpdateToOneWithWhereWithoutStockReservationsInput = {
|
||||||
|
where?: Prisma.InventoryWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.InventoryUpdateWithoutStockReservationsInput, Prisma.InventoryUncheckedUpdateWithoutStockReservationsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryUpdateWithoutStockReservationsInput = {
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
inventoryTransfersFrom?: Prisma.InventoryTransferUpdateManyWithoutFromInventoryNestedInput
|
||||||
|
inventoryTransfersTo?: Prisma.InventoryTransferUpdateManyWithoutToInventoryNestedInput
|
||||||
|
purchaseReceipts?: Prisma.PurchaseReceiptUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutInventoryNestedInput
|
||||||
|
counterStockMovements?: Prisma.StockMovementUpdateManyWithoutCounterInventoryNestedInput
|
||||||
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutInventoryNestedInput
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUpdateManyWithoutInventoryNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type InventoryUncheckedUpdateWithoutStockReservationsInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
location?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
isActive?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
isPointOfSale?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
inventoryTransfersFrom?: Prisma.InventoryTransferUncheckedUpdateManyWithoutFromInventoryNestedInput
|
||||||
|
inventoryTransfersTo?: Prisma.InventoryTransferUncheckedUpdateManyWithoutToInventoryNestedInput
|
||||||
|
purchaseReceipts?: Prisma.PurchaseReceiptUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
counterStockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutCounterInventoryNestedInput
|
||||||
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
|
inventoryBankAccounts?: Prisma.InventoryBankAccountUncheckedUpdateManyWithoutInventoryNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1301,6 +1444,7 @@ export type InventoryCountOutputType = {
|
|||||||
counterStockMovements: number
|
counterStockMovements: number
|
||||||
stockMovements: number
|
stockMovements: number
|
||||||
inventoryBankAccounts: number
|
inventoryBankAccounts: number
|
||||||
|
stockReservations: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type InventoryCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type InventoryCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
@@ -1312,6 +1456,7 @@ export type InventoryCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensi
|
|||||||
counterStockMovements?: boolean | InventoryCountOutputTypeCountCounterStockMovementsArgs
|
counterStockMovements?: boolean | InventoryCountOutputTypeCountCounterStockMovementsArgs
|
||||||
stockMovements?: boolean | InventoryCountOutputTypeCountStockMovementsArgs
|
stockMovements?: boolean | InventoryCountOutputTypeCountStockMovementsArgs
|
||||||
inventoryBankAccounts?: boolean | InventoryCountOutputTypeCountInventoryBankAccountsArgs
|
inventoryBankAccounts?: boolean | InventoryCountOutputTypeCountInventoryBankAccountsArgs
|
||||||
|
stockReservations?: boolean | InventoryCountOutputTypeCountStockReservationsArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1380,6 +1525,13 @@ export type InventoryCountOutputTypeCountInventoryBankAccountsArgs<ExtArgs exten
|
|||||||
where?: Prisma.InventoryBankAccountWhereInput
|
where?: Prisma.InventoryBankAccountWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* InventoryCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type InventoryCountOutputTypeCountStockReservationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.StockReservationWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export type InventorySelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type InventorySelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
@@ -1398,6 +1550,7 @@ export type InventorySelect<ExtArgs extends runtime.Types.Extensions.InternalArg
|
|||||||
counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs<ExtArgs>
|
counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs<ExtArgs>
|
||||||
stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs<ExtArgs>
|
stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs<ExtArgs>
|
||||||
inventoryBankAccounts?: boolean | Prisma.Inventory$inventoryBankAccountsArgs<ExtArgs>
|
inventoryBankAccounts?: boolean | Prisma.Inventory$inventoryBankAccountsArgs<ExtArgs>
|
||||||
|
stockReservations?: boolean | Prisma.Inventory$stockReservationsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.InventoryCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.InventoryCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["inventory"]>
|
}, ExtArgs["result"]["inventory"]>
|
||||||
|
|
||||||
@@ -1424,6 +1577,7 @@ export type InventoryInclude<ExtArgs extends runtime.Types.Extensions.InternalAr
|
|||||||
counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs<ExtArgs>
|
counterStockMovements?: boolean | Prisma.Inventory$counterStockMovementsArgs<ExtArgs>
|
||||||
stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs<ExtArgs>
|
stockMovements?: boolean | Prisma.Inventory$stockMovementsArgs<ExtArgs>
|
||||||
inventoryBankAccounts?: boolean | Prisma.Inventory$inventoryBankAccountsArgs<ExtArgs>
|
inventoryBankAccounts?: boolean | Prisma.Inventory$inventoryBankAccountsArgs<ExtArgs>
|
||||||
|
stockReservations?: boolean | Prisma.Inventory$stockReservationsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.InventoryCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.InventoryCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1438,6 +1592,7 @@ export type $InventoryPayload<ExtArgs extends runtime.Types.Extensions.InternalA
|
|||||||
counterStockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
counterStockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
||||||
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
||||||
inventoryBankAccounts: Prisma.$InventoryBankAccountPayload<ExtArgs>[]
|
inventoryBankAccounts: Prisma.$InventoryBankAccountPayload<ExtArgs>[]
|
||||||
|
stockReservations: Prisma.$StockReservationPayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
@@ -1796,6 +1951,7 @@ export interface Prisma__InventoryClient<T, Null = never, ExtArgs extends runtim
|
|||||||
counterStockMovements<T extends Prisma.Inventory$counterStockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$counterStockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
counterStockMovements<T extends Prisma.Inventory$counterStockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$counterStockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
stockMovements<T extends Prisma.Inventory$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
stockMovements<T extends Prisma.Inventory$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
inventoryBankAccounts<T extends Prisma.Inventory$inventoryBankAccountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$inventoryBankAccountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InventoryBankAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
inventoryBankAccounts<T extends Prisma.Inventory$inventoryBankAccountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$inventoryBankAccountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$InventoryBankAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
stockReservations<T extends Prisma.Inventory$stockReservationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Inventory$stockReservationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockReservationPayload<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.
|
||||||
@@ -2367,6 +2523,30 @@ export type Inventory$inventoryBankAccountsArgs<ExtArgs extends runtime.Types.Ex
|
|||||||
distinct?: Prisma.InventoryBankAccountScalarFieldEnum | Prisma.InventoryBankAccountScalarFieldEnum[]
|
distinct?: Prisma.InventoryBankAccountScalarFieldEnum | Prisma.InventoryBankAccountScalarFieldEnum[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Inventory.stockReservations
|
||||||
|
*/
|
||||||
|
export type Inventory$stockReservationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the StockReservation
|
||||||
|
*/
|
||||||
|
select?: Prisma.StockReservationSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the StockReservation
|
||||||
|
*/
|
||||||
|
omit?: Prisma.StockReservationOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.StockReservationInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.StockReservationWhereInput
|
||||||
|
orderBy?: Prisma.StockReservationOrderByWithRelationInput | Prisma.StockReservationOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.StockReservationWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.StockReservationScalarFieldEnum | Prisma.StockReservationScalarFieldEnum[]
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inventory without action
|
* Inventory without action
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -398,14 +398,6 @@ export type InventoryTransferItemUncheckedUpdateManyWithoutTransferNestedInput =
|
|||||||
deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
deleteMany?: Prisma.InventoryTransferItemScalarWhereInput | Prisma.InventoryTransferItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
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 InventoryTransferItemCreateNestedManyWithoutProductInput = {
|
export type InventoryTransferItemCreateNestedManyWithoutProductInput = {
|
||||||
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
create?: Prisma.XOR<Prisma.InventoryTransferItemCreateWithoutProductInput, Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput> | Prisma.InventoryTransferItemCreateWithoutProductInput[] | Prisma.InventoryTransferItemUncheckedCreateWithoutProductInput[]
|
||||||
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
connectOrCreate?: Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput | Prisma.InventoryTransferItemCreateOrConnectWithoutProductInput[]
|
||||||
|
|||||||
@@ -42,7 +42,6 @@ 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.PaymentMethodType | null
|
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
description: string | null
|
description: string | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
@@ -55,7 +54,6 @@ 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.PaymentMethodType | null
|
|
||||||
totalAmount: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
description: string | null
|
description: string | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
@@ -68,7 +66,6 @@ export type OrderCountAggregateOutputType = {
|
|||||||
id: number
|
id: number
|
||||||
orderNumber: number
|
orderNumber: number
|
||||||
status: number
|
status: number
|
||||||
paymentMethod: number
|
|
||||||
totalAmount: number
|
totalAmount: number
|
||||||
description: number
|
description: number
|
||||||
createdAt: number
|
createdAt: number
|
||||||
@@ -95,7 +92,6 @@ export type OrderMinAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
orderNumber?: true
|
orderNumber?: true
|
||||||
status?: true
|
status?: true
|
||||||
paymentMethod?: true
|
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
description?: true
|
description?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
@@ -108,7 +104,6 @@ export type OrderMaxAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
orderNumber?: true
|
orderNumber?: true
|
||||||
status?: true
|
status?: true
|
||||||
paymentMethod?: true
|
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
description?: true
|
description?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
@@ -121,7 +116,6 @@ export type OrderCountAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
orderNumber?: true
|
orderNumber?: true
|
||||||
status?: true
|
status?: true
|
||||||
paymentMethod?: true
|
|
||||||
totalAmount?: true
|
totalAmount?: true
|
||||||
description?: true
|
description?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
@@ -221,13 +215,12 @@ export type OrderGroupByOutputType = {
|
|||||||
id: number
|
id: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status: $Enums.OrderStatus
|
status: $Enums.OrderStatus
|
||||||
paymentMethod: $Enums.PaymentMethodType
|
|
||||||
totalAmount: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
description: string | null
|
description: string | null
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
deletedAt: Date | null
|
deletedAt: Date | null
|
||||||
customerId: number
|
customerId: number | null
|
||||||
_count: OrderCountAggregateOutputType | null
|
_count: OrderCountAggregateOutputType | null
|
||||||
_avg: OrderAvgAggregateOutputType | null
|
_avg: OrderAvgAggregateOutputType | null
|
||||||
_sum: OrderSumAggregateOutputType | null
|
_sum: OrderSumAggregateOutputType | null
|
||||||
@@ -257,28 +250,28 @@ 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.EnumPaymentMethodTypeFilter<"Order"> | $Enums.PaymentMethodType
|
|
||||||
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
|
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
|
||||||
customerId?: Prisma.IntFilter<"Order"> | number
|
customerId?: Prisma.IntNullableFilter<"Order"> | number | null
|
||||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||||
|
orderItems?: Prisma.OrderItemListRelationFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderOrderByWithRelationInput = {
|
export type OrderOrderByWithRelationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
orderNumber?: Prisma.SortOrder
|
orderNumber?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrderInput | 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
|
||||||
customerId?: Prisma.SortOrder
|
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||||
|
orderItems?: Prisma.OrderItemOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.OrderOrderByRelevanceInput
|
_relevance?: Prisma.OrderOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -289,27 +282,26 @@ 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.EnumPaymentMethodTypeFilter<"Order"> | $Enums.PaymentMethodType
|
|
||||||
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
|
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
|
||||||
customerId?: Prisma.IntFilter<"Order"> | number
|
customerId?: Prisma.IntNullableFilter<"Order"> | number | null
|
||||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||||
|
orderItems?: Prisma.OrderItemListRelationFilter
|
||||||
}, "id" | "orderNumber">
|
}, "id" | "orderNumber">
|
||||||
|
|
||||||
export type OrderOrderByWithAggregationInput = {
|
export type OrderOrderByWithAggregationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
orderNumber?: Prisma.SortOrder
|
orderNumber?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrderInput | 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
|
||||||
customerId?: Prisma.SortOrder
|
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
_count?: Prisma.OrderCountOrderByAggregateInput
|
_count?: Prisma.OrderCountOrderByAggregateInput
|
||||||
_avg?: Prisma.OrderAvgOrderByAggregateInput
|
_avg?: Prisma.OrderAvgOrderByAggregateInput
|
||||||
_max?: Prisma.OrderMaxOrderByAggregateInput
|
_max?: Prisma.OrderMaxOrderByAggregateInput
|
||||||
@@ -324,82 +316,79 @@ 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.EnumPaymentMethodTypeWithAggregatesFilter<"Order"> | $Enums.PaymentMethodType
|
|
||||||
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
|
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
|
||||||
customerId?: Prisma.IntWithAggregatesFilter<"Order"> | number
|
customerId?: Prisma.IntNullableWithAggregatesFilter<"Order"> | number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderCreateInput = {
|
export type OrderCreateInput = {
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.PaymentMethodType
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
customer: Prisma.CustomerCreateNestedOneWithoutOrdersInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutOrdersInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutOrderInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderUncheckedCreateInput = {
|
export type OrderUncheckedCreateInput = {
|
||||||
id?: number
|
id?: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.PaymentMethodType
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
customerId: number
|
customerId?: number | null
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutOrderInput
|
||||||
}
|
}
|
||||||
|
|
||||||
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.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutOrdersNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutOrdersNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutOrderNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderUncheckedUpdateInput = {
|
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.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
customerId?: Prisma.IntFieldUpdateOperationsInput | number
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutOrderNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderCreateManyInput = {
|
export type OrderCreateManyInput = {
|
||||||
id?: number
|
id?: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.PaymentMethodType
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
customerId: number
|
customerId?: number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
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.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
@@ -411,23 +400,12 @@ 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.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
customerId?: Prisma.IntFieldUpdateOperationsInput | number
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
}
|
|
||||||
|
|
||||||
export type OrderListRelationFilter = {
|
|
||||||
every?: Prisma.OrderWhereInput
|
|
||||||
some?: Prisma.OrderWhereInput
|
|
||||||
none?: Prisma.OrderWhereInput
|
|
||||||
}
|
|
||||||
|
|
||||||
export type OrderOrderByRelationAggregateInput = {
|
|
||||||
_count?: Prisma.SortOrder
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderOrderByRelevanceInput = {
|
export type OrderOrderByRelevanceInput = {
|
||||||
@@ -440,7 +418,6 @@ export type OrderCountOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
orderNumber?: Prisma.SortOrder
|
orderNumber?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
@@ -459,7 +436,6 @@ export type OrderMaxOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
orderNumber?: Prisma.SortOrder
|
orderNumber?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
@@ -472,7 +448,6 @@ export type OrderMinOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
orderNumber?: Prisma.SortOrder
|
orderNumber?: Prisma.SortOrder
|
||||||
status?: Prisma.SortOrder
|
status?: Prisma.SortOrder
|
||||||
paymentMethod?: Prisma.SortOrder
|
|
||||||
totalAmount?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
@@ -487,6 +462,47 @@ export type OrderSumOrderByAggregateInput = {
|
|||||||
customerId?: Prisma.SortOrder
|
customerId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type OrderScalarRelationFilter = {
|
||||||
|
is?: Prisma.OrderWhereInput
|
||||||
|
isNot?: Prisma.OrderWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderListRelationFilter = {
|
||||||
|
every?: Prisma.OrderWhereInput
|
||||||
|
some?: Prisma.OrderWhereInput
|
||||||
|
none?: Prisma.OrderWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderOrderByRelationAggregateInput = {
|
||||||
|
_count?: Prisma.SortOrder
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumOrderStatusFieldUpdateOperationsInput = {
|
||||||
|
set?: $Enums.OrderStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NullableIntFieldUpdateOperationsInput = {
|
||||||
|
set?: number | null
|
||||||
|
increment?: number
|
||||||
|
decrement?: number
|
||||||
|
multiply?: number
|
||||||
|
divide?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderCreateNestedOneWithoutOrderItemsInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.OrderCreateWithoutOrderItemsInput, Prisma.OrderUncheckedCreateWithoutOrderItemsInput>
|
||||||
|
connectOrCreate?: Prisma.OrderCreateOrConnectWithoutOrderItemsInput
|
||||||
|
connect?: Prisma.OrderWhereUniqueInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderUpdateOneRequiredWithoutOrderItemsNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.OrderCreateWithoutOrderItemsInput, Prisma.OrderUncheckedCreateWithoutOrderItemsInput>
|
||||||
|
connectOrCreate?: Prisma.OrderCreateOrConnectWithoutOrderItemsInput
|
||||||
|
upsert?: Prisma.OrderUpsertWithoutOrderItemsInput
|
||||||
|
connect?: Prisma.OrderWhereUniqueInput
|
||||||
|
update?: Prisma.XOR<Prisma.XOR<Prisma.OrderUpdateToOneWithWhereWithoutOrderItemsInput, Prisma.OrderUpdateWithoutOrderItemsInput>, Prisma.OrderUncheckedUpdateWithoutOrderItemsInput>
|
||||||
|
}
|
||||||
|
|
||||||
export type OrderCreateNestedManyWithoutCustomerInput = {
|
export type OrderCreateNestedManyWithoutCustomerInput = {
|
||||||
create?: Prisma.XOR<Prisma.OrderCreateWithoutCustomerInput, Prisma.OrderUncheckedCreateWithoutCustomerInput> | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[]
|
create?: Prisma.XOR<Prisma.OrderCreateWithoutCustomerInput, Prisma.OrderUncheckedCreateWithoutCustomerInput> | Prisma.OrderCreateWithoutCustomerInput[] | Prisma.OrderUncheckedCreateWithoutCustomerInput[]
|
||||||
connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[]
|
connectOrCreate?: Prisma.OrderCreateOrConnectWithoutCustomerInput | Prisma.OrderCreateOrConnectWithoutCustomerInput[]
|
||||||
@@ -529,35 +545,89 @@ export type OrderUncheckedUpdateManyWithoutCustomerNestedInput = {
|
|||||||
deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[]
|
deleteMany?: Prisma.OrderScalarWhereInput | Prisma.OrderScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumOrderStatusFieldUpdateOperationsInput = {
|
export type OrderCreateWithoutOrderItemsInput = {
|
||||||
set?: $Enums.OrderStatus
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumPaymentMethodTypeFieldUpdateOperationsInput = {
|
|
||||||
set?: $Enums.PaymentMethodType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type OrderCreateWithoutCustomerInput = {
|
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.PaymentMethodType
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
|
customer?: Prisma.CustomerCreateNestedOneWithoutOrdersInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderUncheckedCreateWithoutOrderItemsInput = {
|
||||||
|
id?: number
|
||||||
|
orderNumber: string
|
||||||
|
status?: $Enums.OrderStatus
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
customerId?: number | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderCreateOrConnectWithoutOrderItemsInput = {
|
||||||
|
where: Prisma.OrderWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.OrderCreateWithoutOrderItemsInput, Prisma.OrderUncheckedCreateWithoutOrderItemsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderUpsertWithoutOrderItemsInput = {
|
||||||
|
update: Prisma.XOR<Prisma.OrderUpdateWithoutOrderItemsInput, Prisma.OrderUncheckedUpdateWithoutOrderItemsInput>
|
||||||
|
create: Prisma.XOR<Prisma.OrderCreateWithoutOrderItemsInput, Prisma.OrderUncheckedCreateWithoutOrderItemsInput>
|
||||||
|
where?: Prisma.OrderWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderUpdateToOneWithWhereWithoutOrderItemsInput = {
|
||||||
|
where?: Prisma.OrderWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.OrderUpdateWithoutOrderItemsInput, Prisma.OrderUncheckedUpdateWithoutOrderItemsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderUpdateWithoutOrderItemsInput = {
|
||||||
|
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
customer?: Prisma.CustomerUpdateOneWithoutOrdersNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderUncheckedUpdateWithoutOrderItemsInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
orderNumber?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
status?: Prisma.EnumOrderStatusFieldUpdateOperationsInput | $Enums.OrderStatus
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderCreateWithoutCustomerInput = {
|
||||||
|
orderNumber: string
|
||||||
|
status?: $Enums.OrderStatus
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutOrderInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderUncheckedCreateWithoutCustomerInput = {
|
export type OrderUncheckedCreateWithoutCustomerInput = {
|
||||||
id?: number
|
id?: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.PaymentMethodType
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
deletedAt?: Date | string | null
|
deletedAt?: Date | string | null
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutOrderInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderCreateOrConnectWithoutCustomerInput = {
|
export type OrderCreateOrConnectWithoutCustomerInput = {
|
||||||
@@ -593,20 +663,18 @@ 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.EnumPaymentMethodTypeFilter<"Order"> | $Enums.PaymentMethodType
|
|
||||||
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
|
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
|
||||||
customerId?: Prisma.IntFilter<"Order"> | number
|
customerId?: Prisma.IntNullableFilter<"Order"> | number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderCreateManyCustomerInput = {
|
export type OrderCreateManyCustomerInput = {
|
||||||
id?: number
|
id?: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status?: $Enums.OrderStatus
|
status?: $Enums.OrderStatus
|
||||||
paymentMethod?: $Enums.PaymentMethodType
|
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
@@ -617,31 +685,30 @@ 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.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutOrderNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderUncheckedUpdateWithoutCustomerInput = {
|
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.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutOrderNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type OrderUncheckedUpdateManyWithoutCustomerInput = {
|
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.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
|
||||||
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
@@ -650,19 +717,49 @@ export type OrderUncheckedUpdateManyWithoutCustomerInput = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Count Type OrderCountOutputType
|
||||||
|
*/
|
||||||
|
|
||||||
|
export type OrderCountOutputType = {
|
||||||
|
orderItems: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type OrderCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
orderItems?: boolean | OrderCountOutputTypeCountOrderItemsArgs
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OrderCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type OrderCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the OrderCountOutputType
|
||||||
|
*/
|
||||||
|
select?: Prisma.OrderCountOutputTypeSelect<ExtArgs> | null
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* OrderCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type OrderCountOutputTypeCountOrderItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.OrderItemWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export type OrderSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type OrderSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
orderNumber?: boolean
|
orderNumber?: boolean
|
||||||
status?: boolean
|
status?: boolean
|
||||||
paymentMethod?: boolean
|
|
||||||
totalAmount?: boolean
|
totalAmount?: boolean
|
||||||
description?: boolean
|
description?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
deletedAt?: boolean
|
deletedAt?: boolean
|
||||||
customerId?: boolean
|
customerId?: boolean
|
||||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
customer?: boolean | Prisma.Order$customerArgs<ExtArgs>
|
||||||
|
orderItems?: boolean | Prisma.Order$orderItemsArgs<ExtArgs>
|
||||||
|
_count?: boolean | Prisma.OrderCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["order"]>
|
}, ExtArgs["result"]["order"]>
|
||||||
|
|
||||||
|
|
||||||
@@ -671,7 +768,6 @@ export type OrderSelectScalar = {
|
|||||||
id?: boolean
|
id?: boolean
|
||||||
orderNumber?: boolean
|
orderNumber?: boolean
|
||||||
status?: boolean
|
status?: boolean
|
||||||
paymentMethod?: boolean
|
|
||||||
totalAmount?: boolean
|
totalAmount?: boolean
|
||||||
description?: boolean
|
description?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
@@ -680,27 +776,29 @@ export type OrderSelectScalar = {
|
|||||||
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" | "description" | "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" | "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.Order$customerArgs<ExtArgs>
|
||||||
|
orderItems?: boolean | Prisma.Order$orderItemsArgs<ExtArgs>
|
||||||
|
_count?: boolean | Prisma.OrderCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type $OrderPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $OrderPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "Order"
|
name: "Order"
|
||||||
objects: {
|
objects: {
|
||||||
customer: Prisma.$CustomerPayload<ExtArgs>
|
customer: Prisma.$CustomerPayload<ExtArgs> | null
|
||||||
|
orderItems: Prisma.$OrderItemPayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
orderNumber: string
|
orderNumber: string
|
||||||
status: $Enums.OrderStatus
|
status: $Enums.OrderStatus
|
||||||
paymentMethod: $Enums.PaymentMethodType
|
|
||||||
totalAmount: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
description: string | null
|
description: string | null
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
updatedAt: Date
|
updatedAt: Date
|
||||||
deletedAt: Date | null
|
deletedAt: Date | null
|
||||||
customerId: number
|
customerId: number | null
|
||||||
}, ExtArgs["result"]["order"]>
|
}, ExtArgs["result"]["order"]>
|
||||||
composites: {}
|
composites: {}
|
||||||
}
|
}
|
||||||
@@ -1041,7 +1139,8 @@ readonly fields: OrderFieldRefs;
|
|||||||
*/
|
*/
|
||||||
export interface Prisma__OrderClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__OrderClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||||
customer<T extends Prisma.CustomerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.CustomerDefaultArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
customer<T extends Prisma.Order$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Order$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||||
|
orderItems<T extends Prisma.Order$orderItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Order$orderItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrderItemPayload<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.
|
||||||
@@ -1074,7 +1173,6 @@ 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", 'PaymentMethodType'>
|
|
||||||
readonly totalAmount: Prisma.FieldRef<"Order", 'Decimal'>
|
readonly totalAmount: Prisma.FieldRef<"Order", 'Decimal'>
|
||||||
readonly description: Prisma.FieldRef<"Order", 'String'>
|
readonly description: Prisma.FieldRef<"Order", 'String'>
|
||||||
readonly createdAt: Prisma.FieldRef<"Order", 'DateTime'>
|
readonly createdAt: Prisma.FieldRef<"Order", 'DateTime'>
|
||||||
@@ -1423,6 +1521,49 @@ export type OrderDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Interna
|
|||||||
limit?: number
|
limit?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order.customer
|
||||||
|
*/
|
||||||
|
export type Order$customerArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the Customer
|
||||||
|
*/
|
||||||
|
select?: Prisma.CustomerSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the Customer
|
||||||
|
*/
|
||||||
|
omit?: Prisma.CustomerOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.CustomerInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.CustomerWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Order.orderItems
|
||||||
|
*/
|
||||||
|
export type Order$orderItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the OrderItem
|
||||||
|
*/
|
||||||
|
select?: Prisma.OrderItemSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the OrderItem
|
||||||
|
*/
|
||||||
|
omit?: Prisma.OrderItemOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.OrderItemInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.OrderItemWhereInput
|
||||||
|
orderBy?: Prisma.OrderItemOrderByWithRelationInput | Prisma.OrderItemOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.OrderItemWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.OrderItemScalarFieldEnum | Prisma.OrderItemScalarFieldEnum[]
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Order without action
|
* Order without action
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -297,6 +297,8 @@ export type ProductWhereInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceListRelationFilter
|
stockBalances?: Prisma.StockBalanceListRelationFilter
|
||||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
|
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
|
||||||
|
stockReservations?: Prisma.StockReservationListRelationFilter
|
||||||
|
orderItems?: Prisma.OrderItemListRelationFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductOrderByWithRelationInput = {
|
export type ProductOrderByWithRelationInput = {
|
||||||
@@ -321,6 +323,8 @@ export type ProductOrderByWithRelationInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput
|
stockBalances?: Prisma.StockBalanceOrderByRelationAggregateInput
|
||||||
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
stockMovements?: Prisma.StockMovementOrderByRelationAggregateInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||||
|
stockReservations?: Prisma.StockReservationOrderByRelationAggregateInput
|
||||||
|
orderItems?: Prisma.OrderItemOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.ProductOrderByRelevanceInput
|
_relevance?: Prisma.ProductOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -349,6 +353,8 @@ export type ProductWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
stockBalances?: Prisma.StockBalanceListRelationFilter
|
stockBalances?: Prisma.StockBalanceListRelationFilter
|
||||||
stockMovements?: Prisma.StockMovementListRelationFilter
|
stockMovements?: Prisma.StockMovementListRelationFilter
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
|
salesInvoiceItems?: Prisma.SalesInvoiceItemListRelationFilter
|
||||||
|
stockReservations?: Prisma.StockReservationListRelationFilter
|
||||||
|
orderItems?: Prisma.OrderItemListRelationFilter
|
||||||
}, "id" | "sku" | "barcode">
|
}, "id" | "sku" | "barcode">
|
||||||
|
|
||||||
export type ProductOrderByWithAggregationInput = {
|
export type ProductOrderByWithAggregationInput = {
|
||||||
@@ -408,6 +414,8 @@ export type ProductCreateInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateInput = {
|
export type ProductUncheckedCreateInput = {
|
||||||
@@ -430,6 +438,8 @@ export type ProductUncheckedCreateInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUpdateInput = {
|
export type ProductUpdateInput = {
|
||||||
@@ -451,6 +461,8 @@ export type ProductUpdateInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateInput = {
|
export type ProductUncheckedUpdateInput = {
|
||||||
@@ -473,6 +485,8 @@ export type ProductUncheckedUpdateInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateManyInput = {
|
export type ProductCreateManyInput = {
|
||||||
@@ -613,18 +627,18 @@ export type ProductUpdateOneRequiredWithoutInventoryTransferItemsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutInventoryTransferItemsInput, Prisma.ProductUpdateWithoutInventoryTransferItemsInput>, Prisma.ProductUncheckedUpdateWithoutInventoryTransferItemsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutInventoryTransferItemsInput, Prisma.ProductUpdateWithoutInventoryTransferItemsInput>, Prisma.ProductUncheckedUpdateWithoutInventoryTransferItemsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateNestedOneWithoutSalesInvoiceItemsInput = {
|
export type ProductCreateNestedOneWithoutOrderItemsInput = {
|
||||||
create?: Prisma.XOR<Prisma.ProductCreateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedCreateWithoutSalesInvoiceItemsInput>
|
create?: Prisma.XOR<Prisma.ProductCreateWithoutOrderItemsInput, Prisma.ProductUncheckedCreateWithoutOrderItemsInput>
|
||||||
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutSalesInvoiceItemsInput
|
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutOrderItemsInput
|
||||||
connect?: Prisma.ProductWhereUniqueInput
|
connect?: Prisma.ProductWhereUniqueInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput = {
|
export type ProductUpdateOneRequiredWithoutOrderItemsNestedInput = {
|
||||||
create?: Prisma.XOR<Prisma.ProductCreateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedCreateWithoutSalesInvoiceItemsInput>
|
create?: Prisma.XOR<Prisma.ProductCreateWithoutOrderItemsInput, Prisma.ProductUncheckedCreateWithoutOrderItemsInput>
|
||||||
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutSalesInvoiceItemsInput
|
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutOrderItemsInput
|
||||||
upsert?: Prisma.ProductUpsertWithoutSalesInvoiceItemsInput
|
upsert?: Prisma.ProductUpsertWithoutOrderItemsInput
|
||||||
connect?: Prisma.ProductWhereUniqueInput
|
connect?: Prisma.ProductWhereUniqueInput
|
||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutSalesInvoiceItemsInput, Prisma.ProductUpdateWithoutSalesInvoiceItemsInput>, Prisma.ProductUncheckedUpdateWithoutSalesInvoiceItemsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutOrderItemsInput, Prisma.ProductUpdateWithoutOrderItemsInput>, Prisma.ProductUncheckedUpdateWithoutOrderItemsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateNestedOneWithoutVariantsInput = {
|
export type ProductCreateNestedOneWithoutVariantsInput = {
|
||||||
@@ -739,6 +753,20 @@ export type ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutPurchaseReceiptItemsInput, Prisma.ProductUpdateWithoutPurchaseReceiptItemsInput>, Prisma.ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutPurchaseReceiptItemsInput, Prisma.ProductUpdateWithoutPurchaseReceiptItemsInput>, Prisma.ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ProductCreateNestedOneWithoutSalesInvoiceItemsInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.ProductCreateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedCreateWithoutSalesInvoiceItemsInput>
|
||||||
|
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutSalesInvoiceItemsInput
|
||||||
|
connect?: Prisma.ProductWhereUniqueInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.ProductCreateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedCreateWithoutSalesInvoiceItemsInput>
|
||||||
|
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutSalesInvoiceItemsInput
|
||||||
|
upsert?: Prisma.ProductUpsertWithoutSalesInvoiceItemsInput
|
||||||
|
connect?: Prisma.ProductWhereUniqueInput
|
||||||
|
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutSalesInvoiceItemsInput, Prisma.ProductUpdateWithoutSalesInvoiceItemsInput>, Prisma.ProductUncheckedUpdateWithoutSalesInvoiceItemsInput>
|
||||||
|
}
|
||||||
|
|
||||||
export type ProductCreateNestedOneWithoutStockMovementsInput = {
|
export type ProductCreateNestedOneWithoutStockMovementsInput = {
|
||||||
create?: Prisma.XOR<Prisma.ProductCreateWithoutStockMovementsInput, Prisma.ProductUncheckedCreateWithoutStockMovementsInput>
|
create?: Prisma.XOR<Prisma.ProductCreateWithoutStockMovementsInput, Prisma.ProductUncheckedCreateWithoutStockMovementsInput>
|
||||||
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockMovementsInput
|
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockMovementsInput
|
||||||
@@ -781,6 +809,20 @@ export type ProductUpdateOneRequiredWithoutStockAdjustmentsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutStockAdjustmentsInput, Prisma.ProductUpdateWithoutStockAdjustmentsInput>, Prisma.ProductUncheckedUpdateWithoutStockAdjustmentsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutStockAdjustmentsInput, Prisma.ProductUpdateWithoutStockAdjustmentsInput>, Prisma.ProductUncheckedUpdateWithoutStockAdjustmentsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type ProductCreateNestedOneWithoutStockReservationsInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.ProductCreateWithoutStockReservationsInput, Prisma.ProductUncheckedCreateWithoutStockReservationsInput>
|
||||||
|
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockReservationsInput
|
||||||
|
connect?: Prisma.ProductWhereUniqueInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUpdateOneRequiredWithoutStockReservationsNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.ProductCreateWithoutStockReservationsInput, Prisma.ProductUncheckedCreateWithoutStockReservationsInput>
|
||||||
|
connectOrCreate?: Prisma.ProductCreateOrConnectWithoutStockReservationsInput
|
||||||
|
upsert?: Prisma.ProductUpsertWithoutStockReservationsInput
|
||||||
|
connect?: Prisma.ProductWhereUniqueInput
|
||||||
|
update?: Prisma.XOR<Prisma.XOR<Prisma.ProductUpdateToOneWithWhereWithoutStockReservationsInput, Prisma.ProductUpdateWithoutStockReservationsInput>, Prisma.ProductUncheckedUpdateWithoutStockReservationsInput>
|
||||||
|
}
|
||||||
|
|
||||||
export type ProductCreateWithoutInventoryTransferItemsInput = {
|
export type ProductCreateWithoutInventoryTransferItemsInput = {
|
||||||
name: string
|
name: string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
@@ -799,6 +841,8 @@ export type ProductCreateWithoutInventoryTransferItemsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateWithoutInventoryTransferItemsInput = {
|
export type ProductUncheckedCreateWithoutInventoryTransferItemsInput = {
|
||||||
@@ -820,6 +864,8 @@ export type ProductUncheckedCreateWithoutInventoryTransferItemsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateOrConnectWithoutInventoryTransferItemsInput = {
|
export type ProductCreateOrConnectWithoutInventoryTransferItemsInput = {
|
||||||
@@ -856,6 +902,8 @@ export type ProductUpdateWithoutInventoryTransferItemsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateWithoutInventoryTransferItemsInput = {
|
export type ProductUncheckedUpdateWithoutInventoryTransferItemsInput = {
|
||||||
@@ -877,9 +925,11 @@ export type ProductUncheckedUpdateWithoutInventoryTransferItemsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateWithoutSalesInvoiceItemsInput = {
|
export type ProductCreateWithoutOrderItemsInput = {
|
||||||
name: string
|
name: string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
sku?: string | null
|
sku?: string | null
|
||||||
@@ -897,9 +947,11 @@ export type ProductCreateWithoutSalesInvoiceItemsInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateWithoutSalesInvoiceItemsInput = {
|
export type ProductUncheckedCreateWithoutOrderItemsInput = {
|
||||||
id?: number
|
id?: number
|
||||||
name: string
|
name: string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
@@ -918,25 +970,27 @@ export type ProductUncheckedCreateWithoutSalesInvoiceItemsInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateOrConnectWithoutSalesInvoiceItemsInput = {
|
export type ProductCreateOrConnectWithoutOrderItemsInput = {
|
||||||
where: Prisma.ProductWhereUniqueInput
|
where: Prisma.ProductWhereUniqueInput
|
||||||
create: Prisma.XOR<Prisma.ProductCreateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedCreateWithoutSalesInvoiceItemsInput>
|
create: Prisma.XOR<Prisma.ProductCreateWithoutOrderItemsInput, Prisma.ProductUncheckedCreateWithoutOrderItemsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUpsertWithoutSalesInvoiceItemsInput = {
|
export type ProductUpsertWithoutOrderItemsInput = {
|
||||||
update: Prisma.XOR<Prisma.ProductUpdateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedUpdateWithoutSalesInvoiceItemsInput>
|
update: Prisma.XOR<Prisma.ProductUpdateWithoutOrderItemsInput, Prisma.ProductUncheckedUpdateWithoutOrderItemsInput>
|
||||||
create: Prisma.XOR<Prisma.ProductCreateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedCreateWithoutSalesInvoiceItemsInput>
|
create: Prisma.XOR<Prisma.ProductCreateWithoutOrderItemsInput, Prisma.ProductUncheckedCreateWithoutOrderItemsInput>
|
||||||
where?: Prisma.ProductWhereInput
|
where?: Prisma.ProductWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUpdateToOneWithWhereWithoutSalesInvoiceItemsInput = {
|
export type ProductUpdateToOneWithWhereWithoutOrderItemsInput = {
|
||||||
where?: Prisma.ProductWhereInput
|
where?: Prisma.ProductWhereInput
|
||||||
data: Prisma.XOR<Prisma.ProductUpdateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedUpdateWithoutSalesInvoiceItemsInput>
|
data: Prisma.XOR<Prisma.ProductUpdateWithoutOrderItemsInput, Prisma.ProductUncheckedUpdateWithoutOrderItemsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUpdateWithoutSalesInvoiceItemsInput = {
|
export type ProductUpdateWithoutOrderItemsInput = {
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
@@ -954,9 +1008,11 @@ export type ProductUpdateWithoutSalesInvoiceItemsInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateWithoutSalesInvoiceItemsInput = {
|
export type ProductUncheckedUpdateWithoutOrderItemsInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
@@ -975,6 +1031,8 @@ export type ProductUncheckedUpdateWithoutSalesInvoiceItemsInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateWithoutVariantsInput = {
|
export type ProductCreateWithoutVariantsInput = {
|
||||||
@@ -995,6 +1053,8 @@ export type ProductCreateWithoutVariantsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateWithoutVariantsInput = {
|
export type ProductUncheckedCreateWithoutVariantsInput = {
|
||||||
@@ -1016,6 +1076,8 @@ export type ProductUncheckedCreateWithoutVariantsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateOrConnectWithoutVariantsInput = {
|
export type ProductCreateOrConnectWithoutVariantsInput = {
|
||||||
@@ -1052,6 +1114,8 @@ export type ProductUpdateWithoutVariantsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateWithoutVariantsInput = {
|
export type ProductUncheckedUpdateWithoutVariantsInput = {
|
||||||
@@ -1073,6 +1137,8 @@ export type ProductUncheckedUpdateWithoutVariantsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateWithoutBrandInput = {
|
export type ProductCreateWithoutBrandInput = {
|
||||||
@@ -1093,6 +1159,8 @@ export type ProductCreateWithoutBrandInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateWithoutBrandInput = {
|
export type ProductUncheckedCreateWithoutBrandInput = {
|
||||||
@@ -1114,6 +1182,8 @@ export type ProductUncheckedCreateWithoutBrandInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateOrConnectWithoutBrandInput = {
|
export type ProductCreateOrConnectWithoutBrandInput = {
|
||||||
@@ -1178,6 +1248,8 @@ export type ProductCreateWithoutCategoryInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateWithoutCategoryInput = {
|
export type ProductUncheckedCreateWithoutCategoryInput = {
|
||||||
@@ -1199,6 +1271,8 @@ export type ProductUncheckedCreateWithoutCategoryInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateOrConnectWithoutCategoryInput = {
|
export type ProductCreateOrConnectWithoutCategoryInput = {
|
||||||
@@ -1245,6 +1319,8 @@ export type ProductCreateWithoutPurchaseReceiptItemsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = {
|
export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = {
|
||||||
@@ -1266,6 +1342,8 @@ export type ProductUncheckedCreateWithoutPurchaseReceiptItemsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateOrConnectWithoutPurchaseReceiptItemsInput = {
|
export type ProductCreateOrConnectWithoutPurchaseReceiptItemsInput = {
|
||||||
@@ -1302,6 +1380,8 @@ export type ProductUpdateWithoutPurchaseReceiptItemsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = {
|
export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = {
|
||||||
@@ -1323,6 +1403,114 @@ export type ProductUncheckedUpdateWithoutPurchaseReceiptItemsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductCreateWithoutSalesInvoiceItemsInput = {
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
sku?: string | null
|
||||||
|
barcode?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||||
|
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||||
|
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||||
|
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||||
|
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||||
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUncheckedCreateWithoutSalesInvoiceItemsInput = {
|
||||||
|
id?: number
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
sku?: string | null
|
||||||
|
barcode?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
brandId?: number | null
|
||||||
|
categoryId?: number | null
|
||||||
|
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductCreateOrConnectWithoutSalesInvoiceItemsInput = {
|
||||||
|
where: Prisma.ProductWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.ProductCreateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedCreateWithoutSalesInvoiceItemsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUpsertWithoutSalesInvoiceItemsInput = {
|
||||||
|
update: Prisma.XOR<Prisma.ProductUpdateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedUpdateWithoutSalesInvoiceItemsInput>
|
||||||
|
create: Prisma.XOR<Prisma.ProductCreateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedCreateWithoutSalesInvoiceItemsInput>
|
||||||
|
where?: Prisma.ProductWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUpdateToOneWithWhereWithoutSalesInvoiceItemsInput = {
|
||||||
|
where?: Prisma.ProductWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.ProductUpdateWithoutSalesInvoiceItemsInput, Prisma.ProductUncheckedUpdateWithoutSalesInvoiceItemsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUpdateWithoutSalesInvoiceItemsInput = {
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||||
|
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||||
|
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||||
|
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||||
|
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||||
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUncheckedUpdateWithoutSalesInvoiceItemsInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateWithoutStockMovementsInput = {
|
export type ProductCreateWithoutStockMovementsInput = {
|
||||||
@@ -1343,6 +1531,8 @@ export type ProductCreateWithoutStockMovementsInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateWithoutStockMovementsInput = {
|
export type ProductUncheckedCreateWithoutStockMovementsInput = {
|
||||||
@@ -1364,6 +1554,8 @@ export type ProductUncheckedCreateWithoutStockMovementsInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateOrConnectWithoutStockMovementsInput = {
|
export type ProductCreateOrConnectWithoutStockMovementsInput = {
|
||||||
@@ -1400,6 +1592,8 @@ export type ProductUpdateWithoutStockMovementsInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateWithoutStockMovementsInput = {
|
export type ProductUncheckedUpdateWithoutStockMovementsInput = {
|
||||||
@@ -1421,6 +1615,8 @@ export type ProductUncheckedUpdateWithoutStockMovementsInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateWithoutStockBalancesInput = {
|
export type ProductCreateWithoutStockBalancesInput = {
|
||||||
@@ -1441,6 +1637,8 @@ export type ProductCreateWithoutStockBalancesInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateWithoutStockBalancesInput = {
|
export type ProductUncheckedCreateWithoutStockBalancesInput = {
|
||||||
@@ -1462,6 +1660,8 @@ export type ProductUncheckedCreateWithoutStockBalancesInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateOrConnectWithoutStockBalancesInput = {
|
export type ProductCreateOrConnectWithoutStockBalancesInput = {
|
||||||
@@ -1498,6 +1698,8 @@ export type ProductUpdateWithoutStockBalancesInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateWithoutStockBalancesInput = {
|
export type ProductUncheckedUpdateWithoutStockBalancesInput = {
|
||||||
@@ -1519,6 +1721,8 @@ export type ProductUncheckedUpdateWithoutStockBalancesInput = {
|
|||||||
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateWithoutStockAdjustmentsInput = {
|
export type ProductCreateWithoutStockAdjustmentsInput = {
|
||||||
@@ -1539,6 +1743,8 @@ export type ProductCreateWithoutStockAdjustmentsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedCreateWithoutStockAdjustmentsInput = {
|
export type ProductUncheckedCreateWithoutStockAdjustmentsInput = {
|
||||||
@@ -1560,6 +1766,8 @@ export type ProductUncheckedCreateWithoutStockAdjustmentsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateOrConnectWithoutStockAdjustmentsInput = {
|
export type ProductCreateOrConnectWithoutStockAdjustmentsInput = {
|
||||||
@@ -1596,6 +1804,8 @@ export type ProductUpdateWithoutStockAdjustmentsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = {
|
export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = {
|
||||||
@@ -1617,6 +1827,114 @@ export type ProductUncheckedUpdateWithoutStockAdjustmentsInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductCreateWithoutStockReservationsInput = {
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
sku?: string | null
|
||||||
|
barcode?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryTransferItems?: Prisma.InventoryTransferItemCreateNestedManyWithoutProductInput
|
||||||
|
variants?: Prisma.ProductVariantCreateNestedManyWithoutProductInput
|
||||||
|
brand?: Prisma.ProductBrandCreateNestedOneWithoutProductsInput
|
||||||
|
category?: Prisma.ProductCategoryCreateNestedOneWithoutProductsInput
|
||||||
|
purchaseReceiptItems?: Prisma.PurchaseReceiptItemCreateNestedManyWithoutProductInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentCreateNestedManyWithoutProductInput
|
||||||
|
stockBalances?: Prisma.StockBalanceCreateNestedManyWithoutProductInput
|
||||||
|
stockMovements?: Prisma.StockMovementCreateNestedManyWithoutProductInput
|
||||||
|
salesInvoiceItems?: Prisma.SalesInvoiceItemCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemCreateNestedManyWithoutProductInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUncheckedCreateWithoutStockReservationsInput = {
|
||||||
|
id?: number
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
sku?: string | null
|
||||||
|
barcode?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
deletedAt?: Date | string | null
|
||||||
|
brandId?: number | null
|
||||||
|
categoryId?: number | null
|
||||||
|
salePrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
minimumStockAlertLevel?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
variants?: Prisma.ProductVariantUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockBalances?: Prisma.StockBalanceUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
stockMovements?: Prisma.StockMovementUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedCreateNestedManyWithoutProductInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductCreateOrConnectWithoutStockReservationsInput = {
|
||||||
|
where: Prisma.ProductWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.ProductCreateWithoutStockReservationsInput, Prisma.ProductUncheckedCreateWithoutStockReservationsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUpsertWithoutStockReservationsInput = {
|
||||||
|
update: Prisma.XOR<Prisma.ProductUpdateWithoutStockReservationsInput, Prisma.ProductUncheckedUpdateWithoutStockReservationsInput>
|
||||||
|
create: Prisma.XOR<Prisma.ProductCreateWithoutStockReservationsInput, Prisma.ProductUncheckedCreateWithoutStockReservationsInput>
|
||||||
|
where?: Prisma.ProductWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUpdateToOneWithWhereWithoutStockReservationsInput = {
|
||||||
|
where?: Prisma.ProductWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.ProductUpdateWithoutStockReservationsInput, Prisma.ProductUncheckedUpdateWithoutStockReservationsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUpdateWithoutStockReservationsInput = {
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryTransferItems?: Prisma.InventoryTransferItemUpdateManyWithoutProductNestedInput
|
||||||
|
variants?: Prisma.ProductVariantUpdateManyWithoutProductNestedInput
|
||||||
|
brand?: Prisma.ProductBrandUpdateOneWithoutProductsNestedInput
|
||||||
|
category?: Prisma.ProductCategoryUpdateOneWithoutProductsNestedInput
|
||||||
|
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentUpdateManyWithoutProductNestedInput
|
||||||
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type ProductUncheckedUpdateWithoutStockReservationsInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deletedAt?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
brandId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
categoryId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
salePrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
minimumStockAlertLevel?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
inventoryTransferItems?: Prisma.InventoryTransferItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
variants?: Prisma.ProductVariantUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
purchaseReceiptItems?: Prisma.PurchaseReceiptItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockAdjustments?: Prisma.StockAdjustmentUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCreateManyBrandInput = {
|
export type ProductCreateManyBrandInput = {
|
||||||
@@ -1651,6 +1969,8 @@ export type ProductUpdateWithoutBrandInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateWithoutBrandInput = {
|
export type ProductUncheckedUpdateWithoutBrandInput = {
|
||||||
@@ -1672,6 +1992,8 @@ export type ProductUncheckedUpdateWithoutBrandInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateManyWithoutBrandInput = {
|
export type ProductUncheckedUpdateManyWithoutBrandInput = {
|
||||||
@@ -1720,6 +2042,8 @@ export type ProductUpdateWithoutCategoryInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateWithoutCategoryInput = {
|
export type ProductUncheckedUpdateWithoutCategoryInput = {
|
||||||
@@ -1741,6 +2065,8 @@ export type ProductUncheckedUpdateWithoutCategoryInput = {
|
|||||||
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
stockBalances?: Prisma.StockBalanceUncheckedUpdateManyWithoutProductNestedInput
|
||||||
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
stockMovements?: Prisma.StockMovementUncheckedUpdateManyWithoutProductNestedInput
|
||||||
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
salesInvoiceItems?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
stockReservations?: Prisma.StockReservationUncheckedUpdateManyWithoutProductNestedInput
|
||||||
|
orderItems?: Prisma.OrderItemUncheckedUpdateManyWithoutProductNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductUncheckedUpdateManyWithoutCategoryInput = {
|
export type ProductUncheckedUpdateManyWithoutCategoryInput = {
|
||||||
@@ -1770,6 +2096,8 @@ export type ProductCountOutputType = {
|
|||||||
stockBalances: number
|
stockBalances: number
|
||||||
stockMovements: number
|
stockMovements: number
|
||||||
salesInvoiceItems: number
|
salesInvoiceItems: number
|
||||||
|
stockReservations: number
|
||||||
|
orderItems: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type ProductCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type ProductCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
@@ -1780,6 +2108,8 @@ export type ProductCountOutputTypeSelect<ExtArgs extends runtime.Types.Extension
|
|||||||
stockBalances?: boolean | ProductCountOutputTypeCountStockBalancesArgs
|
stockBalances?: boolean | ProductCountOutputTypeCountStockBalancesArgs
|
||||||
stockMovements?: boolean | ProductCountOutputTypeCountStockMovementsArgs
|
stockMovements?: boolean | ProductCountOutputTypeCountStockMovementsArgs
|
||||||
salesInvoiceItems?: boolean | ProductCountOutputTypeCountSalesInvoiceItemsArgs
|
salesInvoiceItems?: boolean | ProductCountOutputTypeCountSalesInvoiceItemsArgs
|
||||||
|
stockReservations?: boolean | ProductCountOutputTypeCountStockReservationsArgs
|
||||||
|
orderItems?: boolean | ProductCountOutputTypeCountOrderItemsArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1841,6 +2171,20 @@ export type ProductCountOutputTypeCountSalesInvoiceItemsArgs<ExtArgs extends run
|
|||||||
where?: Prisma.SalesInvoiceItemWhereInput
|
where?: Prisma.SalesInvoiceItemWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ProductCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type ProductCountOutputTypeCountStockReservationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.StockReservationWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* ProductCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type ProductCountOutputTypeCountOrderItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.OrderItemWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export type ProductSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type ProductSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
@@ -1864,6 +2208,8 @@ export type ProductSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
|||||||
stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs>
|
stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs>
|
||||||
stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs>
|
stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs>
|
||||||
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
|
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
|
||||||
|
stockReservations?: boolean | Prisma.Product$stockReservationsArgs<ExtArgs>
|
||||||
|
orderItems?: boolean | Prisma.Product$orderItemsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["product"]>
|
}, ExtArgs["result"]["product"]>
|
||||||
|
|
||||||
@@ -1895,6 +2241,8 @@ export type ProductInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
|||||||
stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs>
|
stockBalances?: boolean | Prisma.Product$stockBalancesArgs<ExtArgs>
|
||||||
stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs>
|
stockMovements?: boolean | Prisma.Product$stockMovementsArgs<ExtArgs>
|
||||||
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
|
salesInvoiceItems?: boolean | Prisma.Product$salesInvoiceItemsArgs<ExtArgs>
|
||||||
|
stockReservations?: boolean | Prisma.Product$stockReservationsArgs<ExtArgs>
|
||||||
|
orderItems?: boolean | Prisma.Product$orderItemsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.ProductCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1910,6 +2258,8 @@ export type $ProductPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
|||||||
stockBalances: Prisma.$StockBalancePayload<ExtArgs>[]
|
stockBalances: Prisma.$StockBalancePayload<ExtArgs>[]
|
||||||
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
stockMovements: Prisma.$StockMovementPayload<ExtArgs>[]
|
||||||
salesInvoiceItems: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
salesInvoiceItems: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||||
|
stockReservations: Prisma.$StockReservationPayload<ExtArgs>[]
|
||||||
|
orderItems: Prisma.$OrderItemPayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
@@ -2273,6 +2623,8 @@ export interface Prisma__ProductClient<T, Null = never, ExtArgs extends runtime.
|
|||||||
stockBalances<T extends Prisma.Product$stockBalancesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockBalancesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
stockBalances<T extends Prisma.Product$stockBalancesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockBalancesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockBalancePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
stockMovements<T extends Prisma.Product$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
stockMovements<T extends Prisma.Product$stockMovementsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockMovementsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockMovementPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
salesInvoiceItems<T extends Prisma.Product$salesInvoiceItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$salesInvoiceItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
salesInvoiceItems<T extends Prisma.Product$salesInvoiceItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$salesInvoiceItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
stockReservations<T extends Prisma.Product$stockReservationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$stockReservationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockReservationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
orderItems<T extends Prisma.Product$orderItemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Product$orderItemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$OrderItemPayload<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.
|
||||||
@@ -2862,6 +3214,54 @@ export type Product$salesInvoiceItemsArgs<ExtArgs extends runtime.Types.Extensio
|
|||||||
distinct?: Prisma.SalesInvoiceItemScalarFieldEnum | Prisma.SalesInvoiceItemScalarFieldEnum[]
|
distinct?: Prisma.SalesInvoiceItemScalarFieldEnum | Prisma.SalesInvoiceItemScalarFieldEnum[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Product.stockReservations
|
||||||
|
*/
|
||||||
|
export type Product$stockReservationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the StockReservation
|
||||||
|
*/
|
||||||
|
select?: Prisma.StockReservationSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the StockReservation
|
||||||
|
*/
|
||||||
|
omit?: Prisma.StockReservationOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.StockReservationInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.StockReservationWhereInput
|
||||||
|
orderBy?: Prisma.StockReservationOrderByWithRelationInput | Prisma.StockReservationOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.StockReservationWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.StockReservationScalarFieldEnum | Prisma.StockReservationScalarFieldEnum[]
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Product.orderItems
|
||||||
|
*/
|
||||||
|
export type Product$orderItemsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the OrderItem
|
||||||
|
*/
|
||||||
|
select?: Prisma.OrderItemSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the OrderItem
|
||||||
|
*/
|
||||||
|
omit?: Prisma.OrderItemOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.OrderItemInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.OrderItemWhereInput
|
||||||
|
orderBy?: Prisma.OrderItemOrderByWithRelationInput | Prisma.OrderItemOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.OrderItemWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.OrderItemScalarFieldEnum | Prisma.OrderItemScalarFieldEnum[]
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Product without action
|
* Product without action
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ export type AggregatePurchaseReceiptItem = {
|
|||||||
export type PurchaseReceiptItemAvgAggregateOutputType = {
|
export type PurchaseReceiptItemAvgAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
count: runtime.Decimal | null
|
count: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
total: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
receiptId: number | null
|
receiptId: number | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
}
|
}
|
||||||
@@ -38,8 +38,8 @@ export type PurchaseReceiptItemAvgAggregateOutputType = {
|
|||||||
export type PurchaseReceiptItemSumAggregateOutputType = {
|
export type PurchaseReceiptItemSumAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
count: runtime.Decimal | null
|
count: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
total: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
receiptId: number | null
|
receiptId: number | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
}
|
}
|
||||||
@@ -47,8 +47,8 @@ export type PurchaseReceiptItemSumAggregateOutputType = {
|
|||||||
export type PurchaseReceiptItemMinAggregateOutputType = {
|
export type PurchaseReceiptItemMinAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
count: runtime.Decimal | null
|
count: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
total: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
receiptId: number | null
|
receiptId: number | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
description: string | null
|
description: string | null
|
||||||
@@ -58,8 +58,8 @@ export type PurchaseReceiptItemMinAggregateOutputType = {
|
|||||||
export type PurchaseReceiptItemMaxAggregateOutputType = {
|
export type PurchaseReceiptItemMaxAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
count: runtime.Decimal | null
|
count: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
total: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
receiptId: number | null
|
receiptId: number | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
description: string | null
|
description: string | null
|
||||||
@@ -69,8 +69,8 @@ export type PurchaseReceiptItemMaxAggregateOutputType = {
|
|||||||
export type PurchaseReceiptItemCountAggregateOutputType = {
|
export type PurchaseReceiptItemCountAggregateOutputType = {
|
||||||
id: number
|
id: number
|
||||||
count: number
|
count: number
|
||||||
fee: number
|
unitPrice: number
|
||||||
total: number
|
totalAmount: number
|
||||||
receiptId: number
|
receiptId: number
|
||||||
productId: number
|
productId: number
|
||||||
description: number
|
description: number
|
||||||
@@ -82,8 +82,8 @@ export type PurchaseReceiptItemCountAggregateOutputType = {
|
|||||||
export type PurchaseReceiptItemAvgAggregateInputType = {
|
export type PurchaseReceiptItemAvgAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
receiptId?: true
|
receiptId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
}
|
}
|
||||||
@@ -91,8 +91,8 @@ export type PurchaseReceiptItemAvgAggregateInputType = {
|
|||||||
export type PurchaseReceiptItemSumAggregateInputType = {
|
export type PurchaseReceiptItemSumAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
receiptId?: true
|
receiptId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
}
|
}
|
||||||
@@ -100,8 +100,8 @@ export type PurchaseReceiptItemSumAggregateInputType = {
|
|||||||
export type PurchaseReceiptItemMinAggregateInputType = {
|
export type PurchaseReceiptItemMinAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
receiptId?: true
|
receiptId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
description?: true
|
description?: true
|
||||||
@@ -111,8 +111,8 @@ export type PurchaseReceiptItemMinAggregateInputType = {
|
|||||||
export type PurchaseReceiptItemMaxAggregateInputType = {
|
export type PurchaseReceiptItemMaxAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
receiptId?: true
|
receiptId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
description?: true
|
description?: true
|
||||||
@@ -122,8 +122,8 @@ export type PurchaseReceiptItemMaxAggregateInputType = {
|
|||||||
export type PurchaseReceiptItemCountAggregateInputType = {
|
export type PurchaseReceiptItemCountAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
receiptId?: true
|
receiptId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
description?: true
|
description?: true
|
||||||
@@ -220,8 +220,8 @@ export type PurchaseReceiptItemGroupByArgs<ExtArgs extends runtime.Types.Extensi
|
|||||||
export type PurchaseReceiptItemGroupByOutputType = {
|
export type PurchaseReceiptItemGroupByOutputType = {
|
||||||
id: number
|
id: number
|
||||||
count: runtime.Decimal
|
count: runtime.Decimal
|
||||||
fee: runtime.Decimal
|
unitPrice: runtime.Decimal
|
||||||
total: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
receiptId: number
|
receiptId: number
|
||||||
productId: number
|
productId: number
|
||||||
description: string | null
|
description: string | null
|
||||||
@@ -254,8 +254,8 @@ export type PurchaseReceiptItemWhereInput = {
|
|||||||
NOT?: Prisma.PurchaseReceiptItemWhereInput | Prisma.PurchaseReceiptItemWhereInput[]
|
NOT?: Prisma.PurchaseReceiptItemWhereInput | Prisma.PurchaseReceiptItemWhereInput[]
|
||||||
id?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
id?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
|
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
|
||||||
@@ -267,8 +267,8 @@ export type PurchaseReceiptItemWhereInput = {
|
|||||||
export type PurchaseReceiptItemOrderByWithRelationInput = {
|
export type PurchaseReceiptItemOrderByWithRelationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
receiptId?: Prisma.SortOrder
|
receiptId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
@@ -284,8 +284,8 @@ export type PurchaseReceiptItemWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
OR?: Prisma.PurchaseReceiptItemWhereInput[]
|
OR?: Prisma.PurchaseReceiptItemWhereInput[]
|
||||||
NOT?: Prisma.PurchaseReceiptItemWhereInput | Prisma.PurchaseReceiptItemWhereInput[]
|
NOT?: Prisma.PurchaseReceiptItemWhereInput | Prisma.PurchaseReceiptItemWhereInput[]
|
||||||
count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
|
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
|
||||||
@@ -297,8 +297,8 @@ export type PurchaseReceiptItemWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
export type PurchaseReceiptItemOrderByWithAggregationInput = {
|
export type PurchaseReceiptItemOrderByWithAggregationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
receiptId?: Prisma.SortOrder
|
receiptId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
@@ -316,8 +316,8 @@ export type PurchaseReceiptItemScalarWhereWithAggregatesInput = {
|
|||||||
NOT?: Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput | Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput[]
|
NOT?: Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput | Prisma.PurchaseReceiptItemScalarWhereWithAggregatesInput[]
|
||||||
id?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number
|
id?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number
|
||||||
count?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalWithAggregatesFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number
|
receiptId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number
|
||||||
productId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number
|
productId?: Prisma.IntWithAggregatesFilter<"PurchaseReceiptItem"> | number
|
||||||
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptItem"> | string | null
|
description?: Prisma.StringNullableWithAggregatesFilter<"PurchaseReceiptItem"> | string | null
|
||||||
@@ -326,8 +326,8 @@ export type PurchaseReceiptItemScalarWhereWithAggregatesInput = {
|
|||||||
|
|
||||||
export type PurchaseReceiptItemCreateInput = {
|
export type PurchaseReceiptItemCreateInput = {
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
product: Prisma.ProductCreateNestedOneWithoutPurchaseReceiptItemsInput
|
product: Prisma.ProductCreateNestedOneWithoutPurchaseReceiptItemsInput
|
||||||
@@ -337,8 +337,8 @@ export type PurchaseReceiptItemCreateInput = {
|
|||||||
export type PurchaseReceiptItemUncheckedCreateInput = {
|
export type PurchaseReceiptItemUncheckedCreateInput = {
|
||||||
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
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId: number
|
receiptId: number
|
||||||
productId: number
|
productId: number
|
||||||
description?: string | null
|
description?: string | null
|
||||||
@@ -347,8 +347,8 @@ export type PurchaseReceiptItemUncheckedCreateInput = {
|
|||||||
|
|
||||||
export type PurchaseReceiptItemUpdateInput = {
|
export type PurchaseReceiptItemUpdateInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
product?: Prisma.ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput
|
product?: Prisma.ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput
|
||||||
@@ -358,8 +358,8 @@ export type PurchaseReceiptItemUpdateInput = {
|
|||||||
export type PurchaseReceiptItemUncheckedUpdateInput = {
|
export type PurchaseReceiptItemUncheckedUpdateInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
|
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
@@ -369,8 +369,8 @@ export type PurchaseReceiptItemUncheckedUpdateInput = {
|
|||||||
export type PurchaseReceiptItemCreateManyInput = {
|
export type PurchaseReceiptItemCreateManyInput = {
|
||||||
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
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId: number
|
receiptId: number
|
||||||
productId: number
|
productId: number
|
||||||
description?: string | null
|
description?: string | null
|
||||||
@@ -379,8 +379,8 @@ export type PurchaseReceiptItemCreateManyInput = {
|
|||||||
|
|
||||||
export type PurchaseReceiptItemUpdateManyMutationInput = {
|
export type PurchaseReceiptItemUpdateManyMutationInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
}
|
}
|
||||||
@@ -388,8 +388,8 @@ export type PurchaseReceiptItemUpdateManyMutationInput = {
|
|||||||
export type PurchaseReceiptItemUncheckedUpdateManyInput = {
|
export type PurchaseReceiptItemUncheckedUpdateManyInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
|
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
@@ -415,8 +415,8 @@ export type PurchaseReceiptItemOrderByRelevanceInput = {
|
|||||||
export type PurchaseReceiptItemCountOrderByAggregateInput = {
|
export type PurchaseReceiptItemCountOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
receiptId?: Prisma.SortOrder
|
receiptId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
@@ -426,8 +426,8 @@ export type PurchaseReceiptItemCountOrderByAggregateInput = {
|
|||||||
export type PurchaseReceiptItemAvgOrderByAggregateInput = {
|
export type PurchaseReceiptItemAvgOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
receiptId?: Prisma.SortOrder
|
receiptId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
@@ -435,8 +435,8 @@ export type PurchaseReceiptItemAvgOrderByAggregateInput = {
|
|||||||
export type PurchaseReceiptItemMaxOrderByAggregateInput = {
|
export type PurchaseReceiptItemMaxOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
receiptId?: Prisma.SortOrder
|
receiptId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
@@ -446,8 +446,8 @@ export type PurchaseReceiptItemMaxOrderByAggregateInput = {
|
|||||||
export type PurchaseReceiptItemMinOrderByAggregateInput = {
|
export type PurchaseReceiptItemMinOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
receiptId?: Prisma.SortOrder
|
receiptId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
@@ -457,8 +457,8 @@ export type PurchaseReceiptItemMinOrderByAggregateInput = {
|
|||||||
export type PurchaseReceiptItemSumOrderByAggregateInput = {
|
export type PurchaseReceiptItemSumOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
receiptId?: Prisma.SortOrder
|
receiptId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
@@ -549,8 +549,8 @@ export type PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptNestedInput = {
|
|||||||
|
|
||||||
export type PurchaseReceiptItemCreateWithoutProductInput = {
|
export type PurchaseReceiptItemCreateWithoutProductInput = {
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutItemsInput
|
receipt: Prisma.PurchaseReceiptCreateNestedOneWithoutItemsInput
|
||||||
@@ -559,8 +559,8 @@ export type PurchaseReceiptItemCreateWithoutProductInput = {
|
|||||||
export type PurchaseReceiptItemUncheckedCreateWithoutProductInput = {
|
export type PurchaseReceiptItemUncheckedCreateWithoutProductInput = {
|
||||||
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
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId: number
|
receiptId: number
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
@@ -598,8 +598,8 @@ export type PurchaseReceiptItemScalarWhereInput = {
|
|||||||
NOT?: Prisma.PurchaseReceiptItemScalarWhereInput | Prisma.PurchaseReceiptItemScalarWhereInput[]
|
NOT?: Prisma.PurchaseReceiptItemScalarWhereInput | Prisma.PurchaseReceiptItemScalarWhereInput[]
|
||||||
id?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
id?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"PurchaseReceiptItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
receiptId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
productId?: Prisma.IntFilter<"PurchaseReceiptItem"> | number
|
||||||
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
|
description?: Prisma.StringNullableFilter<"PurchaseReceiptItem"> | string | null
|
||||||
@@ -608,8 +608,8 @@ export type PurchaseReceiptItemScalarWhereInput = {
|
|||||||
|
|
||||||
export type PurchaseReceiptItemCreateWithoutReceiptInput = {
|
export type PurchaseReceiptItemCreateWithoutReceiptInput = {
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
product: Prisma.ProductCreateNestedOneWithoutPurchaseReceiptItemsInput
|
product: Prisma.ProductCreateNestedOneWithoutPurchaseReceiptItemsInput
|
||||||
@@ -618,8 +618,8 @@ export type PurchaseReceiptItemCreateWithoutReceiptInput = {
|
|||||||
export type PurchaseReceiptItemUncheckedCreateWithoutReceiptInput = {
|
export type PurchaseReceiptItemUncheckedCreateWithoutReceiptInput = {
|
||||||
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
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
productId: number
|
productId: number
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
@@ -654,8 +654,8 @@ export type PurchaseReceiptItemUpdateManyWithWhereWithoutReceiptInput = {
|
|||||||
export type PurchaseReceiptItemCreateManyProductInput = {
|
export type PurchaseReceiptItemCreateManyProductInput = {
|
||||||
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
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId: number
|
receiptId: number
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
@@ -663,8 +663,8 @@ export type PurchaseReceiptItemCreateManyProductInput = {
|
|||||||
|
|
||||||
export type PurchaseReceiptItemUpdateWithoutProductInput = {
|
export type PurchaseReceiptItemUpdateWithoutProductInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
receipt?: Prisma.PurchaseReceiptUpdateOneRequiredWithoutItemsNestedInput
|
||||||
@@ -673,8 +673,8 @@ export type PurchaseReceiptItemUpdateWithoutProductInput = {
|
|||||||
export type PurchaseReceiptItemUncheckedUpdateWithoutProductInput = {
|
export type PurchaseReceiptItemUncheckedUpdateWithoutProductInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
|
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -683,8 +683,8 @@ export type PurchaseReceiptItemUncheckedUpdateWithoutProductInput = {
|
|||||||
export type PurchaseReceiptItemUncheckedUpdateManyWithoutProductInput = {
|
export type PurchaseReceiptItemUncheckedUpdateManyWithoutProductInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
|
receiptId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -693,8 +693,8 @@ export type PurchaseReceiptItemUncheckedUpdateManyWithoutProductInput = {
|
|||||||
export type PurchaseReceiptItemCreateManyReceiptInput = {
|
export type PurchaseReceiptItemCreateManyReceiptInput = {
|
||||||
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
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
productId: number
|
productId: number
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
@@ -702,8 +702,8 @@ export type PurchaseReceiptItemCreateManyReceiptInput = {
|
|||||||
|
|
||||||
export type PurchaseReceiptItemUpdateWithoutReceiptInput = {
|
export type PurchaseReceiptItemUpdateWithoutReceiptInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: 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
|
||||||
product?: Prisma.ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput
|
product?: Prisma.ProductUpdateOneRequiredWithoutPurchaseReceiptItemsNestedInput
|
||||||
@@ -712,8 +712,8 @@ export type PurchaseReceiptItemUpdateWithoutReceiptInput = {
|
|||||||
export type PurchaseReceiptItemUncheckedUpdateWithoutReceiptInput = {
|
export type PurchaseReceiptItemUncheckedUpdateWithoutReceiptInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -722,8 +722,8 @@ export type PurchaseReceiptItemUncheckedUpdateWithoutReceiptInput = {
|
|||||||
export type PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptInput = {
|
export type PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
@@ -734,8 +734,8 @@ export type PurchaseReceiptItemUncheckedUpdateManyWithoutReceiptInput = {
|
|||||||
export type PurchaseReceiptItemSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type PurchaseReceiptItemSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
count?: boolean
|
count?: boolean
|
||||||
fee?: boolean
|
unitPrice?: boolean
|
||||||
total?: boolean
|
totalAmount?: boolean
|
||||||
receiptId?: boolean
|
receiptId?: boolean
|
||||||
productId?: boolean
|
productId?: boolean
|
||||||
description?: boolean
|
description?: boolean
|
||||||
@@ -749,15 +749,15 @@ export type PurchaseReceiptItemSelect<ExtArgs extends runtime.Types.Extensions.I
|
|||||||
export type PurchaseReceiptItemSelectScalar = {
|
export type PurchaseReceiptItemSelectScalar = {
|
||||||
id?: boolean
|
id?: boolean
|
||||||
count?: boolean
|
count?: boolean
|
||||||
fee?: boolean
|
unitPrice?: boolean
|
||||||
total?: boolean
|
totalAmount?: boolean
|
||||||
receiptId?: boolean
|
receiptId?: boolean
|
||||||
productId?: boolean
|
productId?: boolean
|
||||||
description?: boolean
|
description?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type PurchaseReceiptItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "fee" | "total" | "receiptId" | "productId" | "description" | "createdAt", ExtArgs["result"]["purchaseReceiptItem"]>
|
export type PurchaseReceiptItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "unitPrice" | "totalAmount" | "receiptId" | "productId" | "description" | "createdAt", 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> = {
|
||||||
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
||||||
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
|
receipt?: boolean | Prisma.PurchaseReceiptDefaultArgs<ExtArgs>
|
||||||
@@ -772,8 +772,8 @@ export type $PurchaseReceiptItemPayload<ExtArgs extends runtime.Types.Extensions
|
|||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
count: runtime.Decimal
|
count: runtime.Decimal
|
||||||
fee: runtime.Decimal
|
unitPrice: runtime.Decimal
|
||||||
total: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
receiptId: number
|
receiptId: number
|
||||||
productId: number
|
productId: number
|
||||||
description: string | null
|
description: string | null
|
||||||
@@ -1151,8 +1151,8 @@ export interface Prisma__PurchaseReceiptItemClient<T, Null = never, ExtArgs exte
|
|||||||
export interface PurchaseReceiptItemFieldRefs {
|
export interface PurchaseReceiptItemFieldRefs {
|
||||||
readonly id: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'>
|
readonly id: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'>
|
||||||
readonly count: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'>
|
readonly count: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'>
|
||||||
readonly fee: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'>
|
readonly unitPrice: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'>
|
||||||
readonly total: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'>
|
readonly totalAmount: Prisma.FieldRef<"PurchaseReceiptItem", 'Decimal'>
|
||||||
readonly receiptId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'>
|
readonly receiptId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'>
|
||||||
readonly productId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'>
|
readonly productId: Prisma.FieldRef<"PurchaseReceiptItem", 'Int'>
|
||||||
readonly description: Prisma.FieldRef<"PurchaseReceiptItem", 'String'>
|
readonly description: Prisma.FieldRef<"PurchaseReceiptItem", 'String'>
|
||||||
|
|||||||
@@ -654,6 +654,10 @@ export type PurchaseReceiptPaymentsUncheckedUpdateManyWithoutReceiptNestedInput
|
|||||||
deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[]
|
deleteMany?: Prisma.PurchaseReceiptPaymentsScalarWhereInput | Prisma.PurchaseReceiptPaymentsScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumPaymentMethodTypeFieldUpdateOperationsInput = {
|
||||||
|
set?: $Enums.PaymentMethodType
|
||||||
|
}
|
||||||
|
|
||||||
export type EnumPaymentTypeFieldUpdateOperationsInput = {
|
export type EnumPaymentTypeFieldUpdateOperationsInput = {
|
||||||
set?: $Enums.PaymentType
|
set?: $Enums.PaymentType
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -252,9 +252,10 @@ export type SalesInvoiceWhereInput = {
|
|||||||
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
||||||
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
|
||||||
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||||
posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
|
posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
|
||||||
|
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceOrderByWithRelationInput = {
|
export type SalesInvoiceOrderByWithRelationInput = {
|
||||||
@@ -266,9 +267,10 @@ export type SalesInvoiceOrderByWithRelationInput = {
|
|||||||
updatedAt?: Prisma.SortOrder
|
updatedAt?: Prisma.SortOrder
|
||||||
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
customerId?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
posAccountId?: Prisma.SortOrder
|
posAccountId?: Prisma.SortOrder
|
||||||
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
|
||||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||||
posAccount?: Prisma.PosAccountOrderByWithRelationInput
|
posAccount?: Prisma.PosAccountOrderByWithRelationInput
|
||||||
|
items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentOrderByRelationAggregateInput
|
||||||
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
|
_relevance?: Prisma.SalesInvoiceOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -284,9 +286,10 @@ export type SalesInvoiceWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
updatedAt?: Prisma.DateTimeFilter<"SalesInvoice"> | Date | string
|
||||||
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
customerId?: Prisma.IntNullableFilter<"SalesInvoice"> | number | null
|
||||||
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
posAccountId?: Prisma.IntFilter<"SalesInvoice"> | number
|
||||||
items?: Prisma.SalesInvoiceItemListRelationFilter
|
|
||||||
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
customer?: Prisma.XOR<Prisma.CustomerNullableScalarRelationFilter, Prisma.CustomerWhereInput> | null
|
||||||
posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
|
posAccount?: Prisma.XOR<Prisma.PosAccountScalarRelationFilter, Prisma.PosAccountWhereInput>
|
||||||
|
items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentListRelationFilter
|
||||||
}, "id" | "code">
|
}, "id" | "code">
|
||||||
|
|
||||||
export type SalesInvoiceOrderByWithAggregationInput = {
|
export type SalesInvoiceOrderByWithAggregationInput = {
|
||||||
@@ -325,9 +328,10 @@ export type SalesInvoiceCreateInput = {
|
|||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
|
||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||||
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateInput = {
|
export type SalesInvoiceUncheckedCreateInput = {
|
||||||
@@ -340,6 +344,7 @@ export type SalesInvoiceUncheckedCreateInput = {
|
|||||||
customerId?: number | null
|
customerId?: number | null
|
||||||
posAccountId: number
|
posAccountId: number
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUpdateInput = {
|
export type SalesInvoiceUpdateInput = {
|
||||||
@@ -348,9 +353,10 @@ export type SalesInvoiceUpdateInput = {
|
|||||||
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.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
|
||||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||||
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateInput = {
|
export type SalesInvoiceUncheckedUpdateInput = {
|
||||||
@@ -363,6 +369,7 @@ export type SalesInvoiceUncheckedUpdateInput = {
|
|||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyInput = {
|
export type SalesInvoiceCreateManyInput = {
|
||||||
@@ -547,14 +554,6 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput = {
|
|||||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NullableIntFieldUpdateOperationsInput = {
|
|
||||||
set?: number | null
|
|
||||||
increment?: number
|
|
||||||
decrement?: number
|
|
||||||
multiply?: number
|
|
||||||
divide?: number
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
@@ -569,14 +568,29 @@ 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 SalesInvoiceCreateNestedOneWithoutSalesInvoicePaymentsInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput>
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutSalesInvoicePaymentsInput
|
||||||
|
connect?: Prisma.SalesInvoiceWhereUniqueInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUpdateOneRequiredWithoutSalesInvoicePaymentsNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput>
|
||||||
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutSalesInvoicePaymentsInput
|
||||||
|
upsert?: Prisma.SalesInvoiceUpsertWithoutSalesInvoicePaymentsInput
|
||||||
|
connect?: Prisma.SalesInvoiceWhereUniqueInput
|
||||||
|
update?: Prisma.XOR<Prisma.XOR<Prisma.SalesInvoiceUpdateToOneWithWhereWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput>, Prisma.SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput>
|
||||||
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateWithoutPosAccountInput = {
|
export type SalesInvoiceCreateWithoutPosAccountInput = {
|
||||||
code: string
|
code: string
|
||||||
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
|
||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||||
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutPosAccountInput = {
|
export type SalesInvoiceUncheckedCreateWithoutPosAccountInput = {
|
||||||
@@ -588,6 +602,7 @@ export type SalesInvoiceUncheckedCreateWithoutPosAccountInput = {
|
|||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customerId?: number | null
|
customerId?: number | null
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutPosAccountInput = {
|
export type SalesInvoiceCreateOrConnectWithoutPosAccountInput = {
|
||||||
@@ -636,8 +651,9 @@ export type SalesInvoiceCreateWithoutCustomerInput = {
|
|||||||
description?: string | null
|
description?: string | null
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
|
||||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||||
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
||||||
@@ -649,6 +665,7 @@ export type SalesInvoiceUncheckedCreateWithoutCustomerInput = {
|
|||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
posAccountId: number
|
posAccountId: number
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutCustomerInput = {
|
export type SalesInvoiceCreateOrConnectWithoutCustomerInput = {
|
||||||
@@ -685,6 +702,7 @@ export type SalesInvoiceCreateWithoutItemsInput = {
|
|||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||||
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
||||||
@@ -696,6 +714,7 @@ export type SalesInvoiceUncheckedCreateWithoutItemsInput = {
|
|||||||
updatedAt?: Date | string
|
updatedAt?: Date | string
|
||||||
customerId?: number | null
|
customerId?: number | null
|
||||||
posAccountId: number
|
posAccountId: number
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateOrConnectWithoutItemsInput = {
|
export type SalesInvoiceCreateOrConnectWithoutItemsInput = {
|
||||||
@@ -722,6 +741,7 @@ export type SalesInvoiceUpdateWithoutItemsInput = {
|
|||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
||||||
@@ -733,6 +753,69 @@ export type SalesInvoiceUncheckedUpdateWithoutItemsInput = {
|
|||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceCreateWithoutSalesInvoicePaymentsInput = {
|
||||||
|
code: string
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
customer?: Prisma.CustomerCreateNestedOneWithoutSalesInvoicesInput
|
||||||
|
posAccount: Prisma.PosAccountCreateNestedOneWithoutSalesInvoicesInput
|
||||||
|
items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutInvoiceInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput = {
|
||||||
|
id?: number
|
||||||
|
code: string
|
||||||
|
totalAmount: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: string | null
|
||||||
|
createdAt?: Date | string
|
||||||
|
updatedAt?: Date | string
|
||||||
|
customerId?: number | null
|
||||||
|
posAccountId: number
|
||||||
|
items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceCreateOrConnectWithoutSalesInvoicePaymentsInput = {
|
||||||
|
where: Prisma.SalesInvoiceWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUpsertWithoutSalesInvoicePaymentsInput = {
|
||||||
|
update: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput>
|
||||||
|
create: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedCreateWithoutSalesInvoicePaymentsInput>
|
||||||
|
where?: Prisma.SalesInvoiceWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUpdateToOneWithWhereWithoutSalesInvoicePaymentsInput = {
|
||||||
|
where?: Prisma.SalesInvoiceWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput, Prisma.SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUpdateWithoutSalesInvoicePaymentsInput = {
|
||||||
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||||
|
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||||
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceUncheckedUpdateWithoutSalesInvoicePaymentsInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
|
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCreateManyPosAccountInput = {
|
export type SalesInvoiceCreateManyPosAccountInput = {
|
||||||
@@ -751,8 +834,9 @@ export type SalesInvoiceUpdateWithoutPosAccountInput = {
|
|||||||
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.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
|
||||||
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
customer?: Prisma.CustomerUpdateOneWithoutSalesInvoicesNestedInput
|
||||||
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutPosAccountInput = {
|
export type SalesInvoiceUncheckedUpdateWithoutPosAccountInput = {
|
||||||
@@ -764,6 +848,7 @@ export type SalesInvoiceUncheckedUpdateWithoutPosAccountInput = {
|
|||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
customerId?: Prisma.NullableIntFieldUpdateOperationsInput | number | null
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput = {
|
export type SalesInvoiceUncheckedUpdateManyWithoutPosAccountInput = {
|
||||||
@@ -792,8 +877,9 @@ export type SalesInvoiceUpdateWithoutCustomerInput = {
|
|||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
|
||||||
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
posAccount?: Prisma.PosAccountUpdateOneRequiredWithoutSalesInvoicesNestedInput
|
||||||
|
items?: Prisma.SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
||||||
@@ -805,6 +891,7 @@ export type SalesInvoiceUncheckedUpdateWithoutCustomerInput = {
|
|||||||
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updatedAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
posAccountId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
|
salesInvoicePayments?: Prisma.SalesInvoicePaymentUncheckedUpdateManyWithoutInvoiceNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
||||||
@@ -824,10 +911,12 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerInput = {
|
|||||||
|
|
||||||
export type SalesInvoiceCountOutputType = {
|
export type SalesInvoiceCountOutputType = {
|
||||||
items: number
|
items: number
|
||||||
|
salesInvoicePayments: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SalesInvoiceCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
items?: boolean | SalesInvoiceCountOutputTypeCountItemsArgs
|
items?: boolean | SalesInvoiceCountOutputTypeCountItemsArgs
|
||||||
|
salesInvoicePayments?: boolean | SalesInvoiceCountOutputTypeCountSalesInvoicePaymentsArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -847,6 +936,13 @@ export type SalesInvoiceCountOutputTypeCountItemsArgs<ExtArgs extends runtime.Ty
|
|||||||
where?: Prisma.SalesInvoiceItemWhereInput
|
where?: Prisma.SalesInvoiceItemWhereInput
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SalesInvoiceCountOutputType without action
|
||||||
|
*/
|
||||||
|
export type SalesInvoiceCountOutputTypeCountSalesInvoicePaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
where?: Prisma.SalesInvoicePaymentWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
@@ -857,9 +953,10 @@ export type SalesInvoiceSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
|||||||
updatedAt?: boolean
|
updatedAt?: boolean
|
||||||
customerId?: boolean
|
customerId?: boolean
|
||||||
posAccountId?: boolean
|
posAccountId?: boolean
|
||||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
|
||||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||||
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
|
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
|
||||||
|
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||||
|
salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["salesInvoice"]>
|
}, ExtArgs["result"]["salesInvoice"]>
|
||||||
|
|
||||||
@@ -878,18 +975,20 @@ export type SalesInvoiceSelectScalar = {
|
|||||||
|
|
||||||
export type SalesInvoiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "customerId" | "posAccountId", ExtArgs["result"]["salesInvoice"]>
|
export type SalesInvoiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "totalAmount" | "description" | "createdAt" | "updatedAt" | "customerId" | "posAccountId", ExtArgs["result"]["salesInvoice"]>
|
||||||
export type SalesInvoiceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SalesInvoiceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
|
||||||
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
customer?: boolean | Prisma.SalesInvoice$customerArgs<ExtArgs>
|
||||||
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
|
posAccount?: boolean | Prisma.PosAccountDefaultArgs<ExtArgs>
|
||||||
|
items?: boolean | Prisma.SalesInvoice$itemsArgs<ExtArgs>
|
||||||
|
salesInvoicePayments?: boolean | Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.SalesInvoiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type $SalesInvoicePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
name: "SalesInvoice"
|
name: "SalesInvoice"
|
||||||
objects: {
|
objects: {
|
||||||
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
|
||||||
customer: Prisma.$CustomerPayload<ExtArgs> | null
|
customer: Prisma.$CustomerPayload<ExtArgs> | null
|
||||||
posAccount: Prisma.$PosAccountPayload<ExtArgs>
|
posAccount: Prisma.$PosAccountPayload<ExtArgs>
|
||||||
|
items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||||
|
salesInvoicePayments: Prisma.$SalesInvoicePaymentPayload<ExtArgs>[]
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
@@ -1240,9 +1339,10 @@ readonly fields: SalesInvoiceFieldRefs;
|
|||||||
*/
|
*/
|
||||||
export interface Prisma__SalesInvoiceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__SalesInvoiceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||||
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
|
||||||
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
customer<T extends Prisma.SalesInvoice$customerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$customerArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||||
posAccount<T extends Prisma.PosAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PosAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__PosAccountClient<runtime.Types.Result.GetResult<Prisma.$PosAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
posAccount<T extends Prisma.PosAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PosAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__PosAccountClient<runtime.Types.Result.GetResult<Prisma.$PosAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||||
|
items<T extends Prisma.SalesInvoice$itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
salesInvoicePayments<T extends Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoice$salesInvoicePaymentsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePaymentPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
/**
|
/**
|
||||||
* 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.
|
||||||
@@ -1622,6 +1722,25 @@ export type SalesInvoiceDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.
|
|||||||
limit?: number
|
limit?: number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* SalesInvoice.customer
|
||||||
|
*/
|
||||||
|
export type SalesInvoice$customerArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the Customer
|
||||||
|
*/
|
||||||
|
select?: Prisma.CustomerSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the Customer
|
||||||
|
*/
|
||||||
|
omit?: Prisma.CustomerOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.CustomerInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.CustomerWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SalesInvoice.items
|
* SalesInvoice.items
|
||||||
*/
|
*/
|
||||||
@@ -1647,22 +1766,27 @@ export type SalesInvoice$itemsArgs<ExtArgs extends runtime.Types.Extensions.Inte
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* SalesInvoice.customer
|
* SalesInvoice.salesInvoicePayments
|
||||||
*/
|
*/
|
||||||
export type SalesInvoice$customerArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SalesInvoice$salesInvoicePaymentsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
/**
|
/**
|
||||||
* Select specific fields to fetch from the Customer
|
* Select specific fields to fetch from the SalesInvoicePayment
|
||||||
*/
|
*/
|
||||||
select?: Prisma.CustomerSelect<ExtArgs> | null
|
select?: Prisma.SalesInvoicePaymentSelect<ExtArgs> | null
|
||||||
/**
|
/**
|
||||||
* Omit specific fields from the Customer
|
* Omit specific fields from the SalesInvoicePayment
|
||||||
*/
|
*/
|
||||||
omit?: Prisma.CustomerOmit<ExtArgs> | null
|
omit?: Prisma.SalesInvoicePaymentOmit<ExtArgs> | null
|
||||||
/**
|
/**
|
||||||
* Choose, which related nodes to fetch as well
|
* Choose, which related nodes to fetch as well
|
||||||
*/
|
*/
|
||||||
include?: Prisma.CustomerInclude<ExtArgs> | null
|
include?: Prisma.SalesInvoicePaymentInclude<ExtArgs> | null
|
||||||
where?: Prisma.CustomerWhereInput
|
where?: Prisma.SalesInvoicePaymentWhereInput
|
||||||
|
orderBy?: Prisma.SalesInvoicePaymentOrderByWithRelationInput | Prisma.SalesInvoicePaymentOrderByWithRelationInput[]
|
||||||
|
cursor?: Prisma.SalesInvoicePaymentWhereUniqueInput
|
||||||
|
take?: number
|
||||||
|
skip?: number
|
||||||
|
distinct?: Prisma.SalesInvoicePaymentScalarFieldEnum | Prisma.SalesInvoicePaymentScalarFieldEnum[]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ export type AggregateSalesInvoiceItem = {
|
|||||||
export type SalesInvoiceItemAvgAggregateOutputType = {
|
export type SalesInvoiceItemAvgAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
count: runtime.Decimal | null
|
count: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
total: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
invoiceId: number | null
|
invoiceId: number | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
}
|
}
|
||||||
@@ -38,8 +38,8 @@ export type SalesInvoiceItemAvgAggregateOutputType = {
|
|||||||
export type SalesInvoiceItemSumAggregateOutputType = {
|
export type SalesInvoiceItemSumAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
count: runtime.Decimal | null
|
count: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
total: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
invoiceId: number | null
|
invoiceId: number | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
}
|
}
|
||||||
@@ -47,8 +47,8 @@ export type SalesInvoiceItemSumAggregateOutputType = {
|
|||||||
export type SalesInvoiceItemMinAggregateOutputType = {
|
export type SalesInvoiceItemMinAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
count: runtime.Decimal | null
|
count: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
total: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
invoiceId: number | null
|
invoiceId: number | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
@@ -57,8 +57,8 @@ export type SalesInvoiceItemMinAggregateOutputType = {
|
|||||||
export type SalesInvoiceItemMaxAggregateOutputType = {
|
export type SalesInvoiceItemMaxAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
count: runtime.Decimal | null
|
count: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
total: runtime.Decimal | null
|
totalAmount: runtime.Decimal | null
|
||||||
createdAt: Date | null
|
createdAt: Date | null
|
||||||
invoiceId: number | null
|
invoiceId: number | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
@@ -67,8 +67,8 @@ export type SalesInvoiceItemMaxAggregateOutputType = {
|
|||||||
export type SalesInvoiceItemCountAggregateOutputType = {
|
export type SalesInvoiceItemCountAggregateOutputType = {
|
||||||
id: number
|
id: number
|
||||||
count: number
|
count: number
|
||||||
fee: number
|
unitPrice: number
|
||||||
total: number
|
totalAmount: number
|
||||||
createdAt: number
|
createdAt: number
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
productId: number
|
||||||
@@ -79,8 +79,8 @@ export type SalesInvoiceItemCountAggregateOutputType = {
|
|||||||
export type SalesInvoiceItemAvgAggregateInputType = {
|
export type SalesInvoiceItemAvgAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
}
|
}
|
||||||
@@ -88,8 +88,8 @@ export type SalesInvoiceItemAvgAggregateInputType = {
|
|||||||
export type SalesInvoiceItemSumAggregateInputType = {
|
export type SalesInvoiceItemSumAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
}
|
}
|
||||||
@@ -97,8 +97,8 @@ export type SalesInvoiceItemSumAggregateInputType = {
|
|||||||
export type SalesInvoiceItemMinAggregateInputType = {
|
export type SalesInvoiceItemMinAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
@@ -107,8 +107,8 @@ export type SalesInvoiceItemMinAggregateInputType = {
|
|||||||
export type SalesInvoiceItemMaxAggregateInputType = {
|
export type SalesInvoiceItemMaxAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
@@ -117,8 +117,8 @@ export type SalesInvoiceItemMaxAggregateInputType = {
|
|||||||
export type SalesInvoiceItemCountAggregateInputType = {
|
export type SalesInvoiceItemCountAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
count?: true
|
count?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
total?: true
|
totalAmount?: true
|
||||||
createdAt?: true
|
createdAt?: true
|
||||||
invoiceId?: true
|
invoiceId?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
@@ -214,8 +214,8 @@ export type SalesInvoiceItemGroupByArgs<ExtArgs extends runtime.Types.Extensions
|
|||||||
export type SalesInvoiceItemGroupByOutputType = {
|
export type SalesInvoiceItemGroupByOutputType = {
|
||||||
id: number
|
id: number
|
||||||
count: runtime.Decimal
|
count: runtime.Decimal
|
||||||
fee: runtime.Decimal
|
unitPrice: runtime.Decimal
|
||||||
total: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
productId: number
|
||||||
@@ -247,8 +247,8 @@ export type SalesInvoiceItemWhereInput = {
|
|||||||
NOT?: Prisma.SalesInvoiceItemWhereInput | Prisma.SalesInvoiceItemWhereInput[]
|
NOT?: Prisma.SalesInvoiceItemWhereInput | Prisma.SalesInvoiceItemWhereInput[]
|
||||||
id?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
id?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
count?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
@@ -259,8 +259,8 @@ export type SalesInvoiceItemWhereInput = {
|
|||||||
export type SalesInvoiceItemOrderByWithRelationInput = {
|
export type SalesInvoiceItemOrderByWithRelationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
@@ -274,8 +274,8 @@ export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
OR?: Prisma.SalesInvoiceItemWhereInput[]
|
OR?: Prisma.SalesInvoiceItemWhereInput[]
|
||||||
NOT?: Prisma.SalesInvoiceItemWhereInput | Prisma.SalesInvoiceItemWhereInput[]
|
NOT?: Prisma.SalesInvoiceItemWhereInput | Prisma.SalesInvoiceItemWhereInput[]
|
||||||
count?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
@@ -286,8 +286,8 @@ export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
export type SalesInvoiceItemOrderByWithAggregationInput = {
|
export type SalesInvoiceItemOrderByWithAggregationInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
@@ -304,8 +304,8 @@ export type SalesInvoiceItemScalarWhereWithAggregatesInput = {
|
|||||||
NOT?: Prisma.SalesInvoiceItemScalarWhereWithAggregatesInput | Prisma.SalesInvoiceItemScalarWhereWithAggregatesInput[]
|
NOT?: Prisma.SalesInvoiceItemScalarWhereWithAggregatesInput | Prisma.SalesInvoiceItemScalarWhereWithAggregatesInput[]
|
||||||
id?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
id?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
||||||
count?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoiceItem"> | Date | string
|
createdAt?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoiceItem"> | Date | string
|
||||||
invoiceId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
invoiceId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
||||||
productId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
productId?: Prisma.IntWithAggregatesFilter<"SalesInvoiceItem"> | number
|
||||||
@@ -313,8 +313,8 @@ export type SalesInvoiceItemScalarWhereWithAggregatesInput = {
|
|||||||
|
|
||||||
export type SalesInvoiceItemCreateInput = {
|
export type SalesInvoiceItemCreateInput = {
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
product: Prisma.ProductCreateNestedOneWithoutSalesInvoiceItemsInput
|
product: Prisma.ProductCreateNestedOneWithoutSalesInvoiceItemsInput
|
||||||
@@ -323,8 +323,8 @@ export type SalesInvoiceItemCreateInput = {
|
|||||||
export type SalesInvoiceItemUncheckedCreateInput = {
|
export type SalesInvoiceItemUncheckedCreateInput = {
|
||||||
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
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
productId: number
|
||||||
@@ -332,8 +332,8 @@ export type SalesInvoiceItemUncheckedCreateInput = {
|
|||||||
|
|
||||||
export type SalesInvoiceItemUpdateInput = {
|
export type SalesInvoiceItemUpdateInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
product?: Prisma.ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput
|
product?: Prisma.ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput
|
||||||
@@ -342,8 +342,8 @@ export type SalesInvoiceItemUpdateInput = {
|
|||||||
export type SalesInvoiceItemUncheckedUpdateInput = {
|
export type SalesInvoiceItemUncheckedUpdateInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
@@ -352,8 +352,8 @@ export type SalesInvoiceItemUncheckedUpdateInput = {
|
|||||||
export type SalesInvoiceItemCreateManyInput = {
|
export type SalesInvoiceItemCreateManyInput = {
|
||||||
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
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
productId: number
|
||||||
@@ -361,16 +361,16 @@ export type SalesInvoiceItemCreateManyInput = {
|
|||||||
|
|
||||||
export type SalesInvoiceItemUpdateManyMutationInput = {
|
export type SalesInvoiceItemUpdateManyMutationInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
@@ -389,8 +389,8 @@ export type SalesInvoiceItemOrderByRelationAggregateInput = {
|
|||||||
export type SalesInvoiceItemCountOrderByAggregateInput = {
|
export type SalesInvoiceItemCountOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
@@ -399,8 +399,8 @@ export type SalesInvoiceItemCountOrderByAggregateInput = {
|
|||||||
export type SalesInvoiceItemAvgOrderByAggregateInput = {
|
export type SalesInvoiceItemAvgOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
@@ -408,8 +408,8 @@ export type SalesInvoiceItemAvgOrderByAggregateInput = {
|
|||||||
export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
@@ -418,8 +418,8 @@ export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
|||||||
export type SalesInvoiceItemMinOrderByAggregateInput = {
|
export type SalesInvoiceItemMinOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
createdAt?: Prisma.SortOrder
|
createdAt?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
@@ -428,54 +428,12 @@ export type SalesInvoiceItemMinOrderByAggregateInput = {
|
|||||||
export type SalesInvoiceItemSumOrderByAggregateInput = {
|
export type SalesInvoiceItemSumOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
count?: Prisma.SortOrder
|
count?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
total?: Prisma.SortOrder
|
totalAmount?: Prisma.SortOrder
|
||||||
invoiceId?: Prisma.SortOrder
|
invoiceId?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateNestedManyWithoutInvoiceInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyInvoiceInputEnvelope
|
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyInvoiceInputEnvelope
|
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
|
||||||
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyInvoiceInputEnvelope
|
|
||||||
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput[]
|
|
||||||
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput[]
|
|
||||||
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput = {
|
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
|
||||||
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput[]
|
|
||||||
createMany?: Prisma.SalesInvoiceItemCreateManyInvoiceInputEnvelope
|
|
||||||
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
|
||||||
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput[]
|
|
||||||
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput[]
|
|
||||||
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateNestedManyWithoutProductInput = {
|
export type SalesInvoiceItemCreateNestedManyWithoutProductInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutProductInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput> | Prisma.SalesInvoiceItemCreateWithoutProductInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutProductInput[]
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutProductInput[]
|
||||||
@@ -518,66 +476,52 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutProductNestedInput = {
|
|||||||
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
export type SalesInvoiceItemCreateNestedManyWithoutInvoiceInput = {
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
createMany?: Prisma.SalesInvoiceItemCreateManyInvoiceInputEnvelope
|
||||||
createdAt?: Date | string
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
product: Prisma.ProductCreateNestedOneWithoutSalesInvoiceItemsInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = {
|
export type SalesInvoiceItemUncheckedCreateNestedManyWithoutInvoiceInput = {
|
||||||
id?: number
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
createMany?: Prisma.SalesInvoiceItemCreateManyInvoiceInputEnvelope
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
createdAt?: Date | string
|
|
||||||
productId: number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateOrConnectWithoutInvoiceInput = {
|
export type SalesInvoiceItemUpdateManyWithoutInvoiceNestedInput = {
|
||||||
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput>
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
||||||
|
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceItemCreateManyInvoiceInputEnvelope
|
||||||
|
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
|
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput[]
|
||||||
|
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput[]
|
||||||
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyInvoiceInputEnvelope = {
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceNestedInput = {
|
||||||
data: Prisma.SalesInvoiceItemCreateManyInvoiceInput | Prisma.SalesInvoiceItemCreateManyInvoiceInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput> | Prisma.SalesInvoiceItemCreateWithoutInvoiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput[]
|
||||||
skipDuplicates?: boolean
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutInvoiceInput[]
|
||||||
}
|
upsert?: Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput | Prisma.SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput[]
|
||||||
|
createMany?: Prisma.SalesInvoiceItemCreateManyInvoiceInputEnvelope
|
||||||
export type SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput = {
|
set?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
disconnect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
update: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput>
|
delete?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput>
|
connect?: Prisma.SalesInvoiceItemWhereUniqueInput | Prisma.SalesInvoiceItemWhereUniqueInput[]
|
||||||
}
|
update?: Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput | Prisma.SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput[]
|
||||||
|
updateMany?: Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput | Prisma.SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput[]
|
||||||
export type SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput = {
|
deleteMany?: Prisma.SalesInvoiceItemScalarWhereInput | Prisma.SalesInvoiceItemScalarWhereInput[]
|
||||||
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput = {
|
|
||||||
where: Prisma.SalesInvoiceItemScalarWhereInput
|
|
||||||
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput>
|
|
||||||
}
|
|
||||||
|
|
||||||
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 = {
|
export type SalesInvoiceItemCreateWithoutProductInput = {
|
||||||
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
}
|
}
|
||||||
@@ -585,8 +529,8 @@ export type SalesInvoiceItemCreateWithoutProductInput = {
|
|||||||
export type SalesInvoiceItemUncheckedCreateWithoutProductInput = {
|
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
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
}
|
}
|
||||||
@@ -617,54 +561,75 @@ export type SalesInvoiceItemUpdateManyWithWhereWithoutProductInput = {
|
|||||||
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductInput>
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutProductInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyInvoiceInput = {
|
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
|
||||||
|
unitPrice?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
|
invoiceId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
|
productId?: Prisma.IntFilter<"SalesInvoiceItem"> | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
||||||
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
product: Prisma.ProductCreateNestedOneWithoutSalesInvoiceItemsInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = {
|
||||||
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
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
productId: number
|
productId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
export type SalesInvoiceItemCreateOrConnectWithoutInvoiceInput = {
|
||||||
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.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput>
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
product?: Prisma.ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = {
|
export type SalesInvoiceItemCreateManyInvoiceInputEnvelope = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
data: Prisma.SalesInvoiceItemCreateManyInvoiceInput | Prisma.SalesInvoiceItemCreateManyInvoiceInput[]
|
||||||
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
|
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
export type SalesInvoiceItemUpsertWithWhereUniqueWithoutInvoiceInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
update: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput>
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
create: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutInvoiceInput>
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
}
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
|
||||||
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
export type SalesInvoiceItemUpdateWithWhereUniqueWithoutInvoiceInput = {
|
||||||
|
where: Prisma.SalesInvoiceItemWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateWithoutInvoiceInput, Prisma.SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpdateManyWithWhereWithoutInvoiceInput = {
|
||||||
|
where: Prisma.SalesInvoiceItemScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.SalesInvoiceItemUpdateManyMutationInput, Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateManyProductInput = {
|
export type SalesInvoiceItemCreateManyProductInput = {
|
||||||
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
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Date | string
|
createdAt?: Date | string
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemUpdateWithoutProductInput = {
|
export type SalesInvoiceItemUpdateWithoutProductInput = {
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
}
|
}
|
||||||
@@ -672,8 +637,8 @@ export type SalesInvoiceItemUpdateWithoutProductInput = {
|
|||||||
export type SalesInvoiceItemUncheckedUpdateWithoutProductInput = {
|
export type SalesInvoiceItemUncheckedUpdateWithoutProductInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
@@ -681,19 +646,54 @@ export type SalesInvoiceItemUncheckedUpdateWithoutProductInput = {
|
|||||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutProductInput = {
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutProductInput = {
|
||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
total?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
invoiceId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemCreateManyInvoiceInput = {
|
||||||
|
id?: number
|
||||||
|
count: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Date | string
|
||||||
|
productId: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
product?: Prisma.ProductUpdateOneRequiredWithoutSalesInvoiceItemsNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
productId?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
||||||
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
|
count?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
totalAmount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
createdAt?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
productId?: 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<{
|
||||||
id?: boolean
|
id?: boolean
|
||||||
count?: boolean
|
count?: boolean
|
||||||
fee?: boolean
|
unitPrice?: boolean
|
||||||
total?: boolean
|
totalAmount?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
invoiceId?: boolean
|
invoiceId?: boolean
|
||||||
productId?: boolean
|
productId?: boolean
|
||||||
@@ -706,14 +706,14 @@ export type SalesInvoiceItemSelect<ExtArgs extends runtime.Types.Extensions.Inte
|
|||||||
export type SalesInvoiceItemSelectScalar = {
|
export type SalesInvoiceItemSelectScalar = {
|
||||||
id?: boolean
|
id?: boolean
|
||||||
count?: boolean
|
count?: boolean
|
||||||
fee?: boolean
|
unitPrice?: boolean
|
||||||
total?: boolean
|
totalAmount?: boolean
|
||||||
createdAt?: boolean
|
createdAt?: boolean
|
||||||
invoiceId?: boolean
|
invoiceId?: boolean
|
||||||
productId?: boolean
|
productId?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "fee" | "total" | "createdAt" | "invoiceId" | "productId", ExtArgs["result"]["salesInvoiceItem"]>
|
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "count" | "unitPrice" | "totalAmount" | "createdAt" | "invoiceId" | "productId", ExtArgs["result"]["salesInvoiceItem"]>
|
||||||
export type SalesInvoiceItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type SalesInvoiceItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||||
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
product?: boolean | Prisma.ProductDefaultArgs<ExtArgs>
|
||||||
@@ -728,8 +728,8 @@ export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.In
|
|||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: number
|
id: number
|
||||||
count: runtime.Decimal
|
count: runtime.Decimal
|
||||||
fee: runtime.Decimal
|
unitPrice: runtime.Decimal
|
||||||
total: runtime.Decimal
|
totalAmount: runtime.Decimal
|
||||||
createdAt: Date
|
createdAt: Date
|
||||||
invoiceId: number
|
invoiceId: number
|
||||||
productId: number
|
productId: number
|
||||||
@@ -1106,8 +1106,8 @@ export interface Prisma__SalesInvoiceItemClient<T, Null = never, ExtArgs extends
|
|||||||
export interface SalesInvoiceItemFieldRefs {
|
export interface SalesInvoiceItemFieldRefs {
|
||||||
readonly id: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
readonly id: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
||||||
readonly count: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
readonly count: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
||||||
readonly fee: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
readonly unitPrice: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
||||||
readonly total: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
readonly totalAmount: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
||||||
readonly createdAt: Prisma.FieldRef<"SalesInvoiceItem", 'DateTime'>
|
readonly createdAt: Prisma.FieldRef<"SalesInvoiceItem", 'DateTime'>
|
||||||
readonly invoiceId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
readonly invoiceId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
||||||
readonly productId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
readonly productId: Prisma.FieldRef<"SalesInvoiceItem", 'Int'>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -29,7 +29,7 @@ export type AggregateStockMovement = {
|
|||||||
export type StockMovementAvgAggregateOutputType = {
|
export type StockMovementAvgAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
quantity: runtime.Decimal | null
|
quantity: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
totalCost: runtime.Decimal | null
|
totalCost: runtime.Decimal | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
inventoryId: number | null
|
inventoryId: number | null
|
||||||
@@ -43,7 +43,7 @@ export type StockMovementAvgAggregateOutputType = {
|
|||||||
export type StockMovementSumAggregateOutputType = {
|
export type StockMovementSumAggregateOutputType = {
|
||||||
id: number | null
|
id: number | null
|
||||||
quantity: runtime.Decimal | null
|
quantity: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
totalCost: runtime.Decimal | null
|
totalCost: runtime.Decimal | null
|
||||||
productId: number | null
|
productId: number | null
|
||||||
inventoryId: number | null
|
inventoryId: number | null
|
||||||
@@ -58,7 +58,7 @@ export type StockMovementMinAggregateOutputType = {
|
|||||||
id: number | null
|
id: number | null
|
||||||
type: $Enums.MovementType | null
|
type: $Enums.MovementType | null
|
||||||
quantity: runtime.Decimal | null
|
quantity: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
totalCost: runtime.Decimal | null
|
totalCost: runtime.Decimal | null
|
||||||
referenceType: $Enums.MovementReferenceType | null
|
referenceType: $Enums.MovementReferenceType | null
|
||||||
referenceId: string | null
|
referenceId: string | null
|
||||||
@@ -76,7 +76,7 @@ export type StockMovementMaxAggregateOutputType = {
|
|||||||
id: number | null
|
id: number | null
|
||||||
type: $Enums.MovementType | null
|
type: $Enums.MovementType | null
|
||||||
quantity: runtime.Decimal | null
|
quantity: runtime.Decimal | null
|
||||||
fee: runtime.Decimal | null
|
unitPrice: runtime.Decimal | null
|
||||||
totalCost: runtime.Decimal | null
|
totalCost: runtime.Decimal | null
|
||||||
referenceType: $Enums.MovementReferenceType | null
|
referenceType: $Enums.MovementReferenceType | null
|
||||||
referenceId: string | null
|
referenceId: string | null
|
||||||
@@ -94,7 +94,7 @@ export type StockMovementCountAggregateOutputType = {
|
|||||||
id: number
|
id: number
|
||||||
type: number
|
type: number
|
||||||
quantity: number
|
quantity: number
|
||||||
fee: number
|
unitPrice: number
|
||||||
totalCost: number
|
totalCost: number
|
||||||
referenceType: number
|
referenceType: number
|
||||||
referenceId: number
|
referenceId: number
|
||||||
@@ -113,7 +113,7 @@ export type StockMovementCountAggregateOutputType = {
|
|||||||
export type StockMovementAvgAggregateInputType = {
|
export type StockMovementAvgAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
quantity?: true
|
quantity?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
inventoryId?: true
|
inventoryId?: true
|
||||||
@@ -127,7 +127,7 @@ export type StockMovementAvgAggregateInputType = {
|
|||||||
export type StockMovementSumAggregateInputType = {
|
export type StockMovementSumAggregateInputType = {
|
||||||
id?: true
|
id?: true
|
||||||
quantity?: true
|
quantity?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
productId?: true
|
productId?: true
|
||||||
inventoryId?: true
|
inventoryId?: true
|
||||||
@@ -142,7 +142,7 @@ export type StockMovementMinAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
type?: true
|
type?: true
|
||||||
quantity?: true
|
quantity?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
referenceType?: true
|
referenceType?: true
|
||||||
referenceId?: true
|
referenceId?: true
|
||||||
@@ -160,7 +160,7 @@ export type StockMovementMaxAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
type?: true
|
type?: true
|
||||||
quantity?: true
|
quantity?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
referenceType?: true
|
referenceType?: true
|
||||||
referenceId?: true
|
referenceId?: true
|
||||||
@@ -178,7 +178,7 @@ export type StockMovementCountAggregateInputType = {
|
|||||||
id?: true
|
id?: true
|
||||||
type?: true
|
type?: true
|
||||||
quantity?: true
|
quantity?: true
|
||||||
fee?: true
|
unitPrice?: true
|
||||||
totalCost?: true
|
totalCost?: true
|
||||||
referenceType?: true
|
referenceType?: true
|
||||||
referenceId?: true
|
referenceId?: true
|
||||||
@@ -283,7 +283,7 @@ export type StockMovementGroupByOutputType = {
|
|||||||
id: number
|
id: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal
|
quantity: runtime.Decimal
|
||||||
fee: runtime.Decimal
|
unitPrice: runtime.Decimal
|
||||||
totalCost: runtime.Decimal
|
totalCost: runtime.Decimal
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -324,7 +324,7 @@ export type StockMovementWhereInput = {
|
|||||||
id?: Prisma.IntFilter<"StockMovement"> | number
|
id?: Prisma.IntFilter<"StockMovement"> | number
|
||||||
type?: Prisma.EnumMovementTypeFilter<"StockMovement"> | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFilter<"StockMovement"> | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFilter<"StockMovement"> | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFilter<"StockMovement"> | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFilter<"StockMovement"> | string
|
referenceId?: Prisma.StringFilter<"StockMovement"> | string
|
||||||
@@ -347,7 +347,7 @@ export type StockMovementOrderByWithRelationInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
type?: Prisma.SortOrder
|
type?: Prisma.SortOrder
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
referenceType?: Prisma.SortOrder
|
referenceType?: Prisma.SortOrder
|
||||||
referenceId?: Prisma.SortOrder
|
referenceId?: Prisma.SortOrder
|
||||||
@@ -374,7 +374,7 @@ export type StockMovementWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
NOT?: Prisma.StockMovementWhereInput | Prisma.StockMovementWhereInput[]
|
NOT?: Prisma.StockMovementWhereInput | Prisma.StockMovementWhereInput[]
|
||||||
type?: Prisma.EnumMovementTypeFilter<"StockMovement"> | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFilter<"StockMovement"> | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFilter<"StockMovement"> | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFilter<"StockMovement"> | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFilter<"StockMovement"> | string
|
referenceId?: Prisma.StringFilter<"StockMovement"> | string
|
||||||
@@ -397,7 +397,7 @@ export type StockMovementOrderByWithAggregationInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
type?: Prisma.SortOrder
|
type?: Prisma.SortOrder
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
referenceType?: Prisma.SortOrder
|
referenceType?: Prisma.SortOrder
|
||||||
referenceId?: Prisma.SortOrder
|
referenceId?: Prisma.SortOrder
|
||||||
@@ -423,7 +423,7 @@ export type StockMovementScalarWhereWithAggregatesInput = {
|
|||||||
id?: Prisma.IntWithAggregatesFilter<"StockMovement"> | number
|
id?: Prisma.IntWithAggregatesFilter<"StockMovement"> | number
|
||||||
type?: Prisma.EnumMovementTypeWithAggregatesFilter<"StockMovement"> | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeWithAggregatesFilter<"StockMovement"> | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalWithAggregatesFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeWithAggregatesFilter<"StockMovement"> | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeWithAggregatesFilter<"StockMovement"> | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringWithAggregatesFilter<"StockMovement"> | string
|
referenceId?: Prisma.StringWithAggregatesFilter<"StockMovement"> | string
|
||||||
@@ -440,7 +440,7 @@ export type StockMovementScalarWhereWithAggregatesInput = {
|
|||||||
export type StockMovementCreateInput = {
|
export type StockMovementCreateInput = {
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -458,7 +458,7 @@ export type StockMovementUncheckedCreateInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -475,7 +475,7 @@ export type StockMovementUncheckedCreateInput = {
|
|||||||
export type StockMovementUpdateInput = {
|
export type StockMovementUpdateInput = {
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -493,7 +493,7 @@ export type StockMovementUncheckedUpdateInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -511,7 +511,7 @@ export type StockMovementCreateManyInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -528,7 +528,7 @@ export type StockMovementCreateManyInput = {
|
|||||||
export type StockMovementUpdateManyMutationInput = {
|
export type StockMovementUpdateManyMutationInput = {
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -541,7 +541,7 @@ export type StockMovementUncheckedUpdateManyInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -575,7 +575,7 @@ export type StockMovementCountOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
type?: Prisma.SortOrder
|
type?: Prisma.SortOrder
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
referenceType?: Prisma.SortOrder
|
referenceType?: Prisma.SortOrder
|
||||||
referenceId?: Prisma.SortOrder
|
referenceId?: Prisma.SortOrder
|
||||||
@@ -592,7 +592,7 @@ export type StockMovementCountOrderByAggregateInput = {
|
|||||||
export type StockMovementAvgOrderByAggregateInput = {
|
export type StockMovementAvgOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
inventoryId?: Prisma.SortOrder
|
inventoryId?: Prisma.SortOrder
|
||||||
@@ -607,7 +607,7 @@ export type StockMovementMaxOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
type?: Prisma.SortOrder
|
type?: Prisma.SortOrder
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
referenceType?: Prisma.SortOrder
|
referenceType?: Prisma.SortOrder
|
||||||
referenceId?: Prisma.SortOrder
|
referenceId?: Prisma.SortOrder
|
||||||
@@ -625,7 +625,7 @@ export type StockMovementMinOrderByAggregateInput = {
|
|||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
type?: Prisma.SortOrder
|
type?: Prisma.SortOrder
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
referenceType?: Prisma.SortOrder
|
referenceType?: Prisma.SortOrder
|
||||||
referenceId?: Prisma.SortOrder
|
referenceId?: Prisma.SortOrder
|
||||||
@@ -642,7 +642,7 @@ export type StockMovementMinOrderByAggregateInput = {
|
|||||||
export type StockMovementSumOrderByAggregateInput = {
|
export type StockMovementSumOrderByAggregateInput = {
|
||||||
id?: Prisma.SortOrder
|
id?: Prisma.SortOrder
|
||||||
quantity?: Prisma.SortOrder
|
quantity?: Prisma.SortOrder
|
||||||
fee?: Prisma.SortOrder
|
unitPrice?: Prisma.SortOrder
|
||||||
totalCost?: Prisma.SortOrder
|
totalCost?: Prisma.SortOrder
|
||||||
productId?: Prisma.SortOrder
|
productId?: Prisma.SortOrder
|
||||||
inventoryId?: Prisma.SortOrder
|
inventoryId?: Prisma.SortOrder
|
||||||
@@ -874,7 +874,7 @@ export type StockMovementUncheckedUpdateManyWithoutSupplierNestedInput = {
|
|||||||
export type StockMovementCreateWithoutCounterInventoryInput = {
|
export type StockMovementCreateWithoutCounterInventoryInput = {
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -891,7 +891,7 @@ export type StockMovementUncheckedCreateWithoutCounterInventoryInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -917,7 +917,7 @@ export type StockMovementCreateManyCounterInventoryInputEnvelope = {
|
|||||||
export type StockMovementCreateWithoutInventoryInput = {
|
export type StockMovementCreateWithoutInventoryInput = {
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -934,7 +934,7 @@ export type StockMovementUncheckedCreateWithoutInventoryInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -980,7 +980,7 @@ export type StockMovementScalarWhereInput = {
|
|||||||
id?: Prisma.IntFilter<"StockMovement"> | number
|
id?: Prisma.IntFilter<"StockMovement"> | number
|
||||||
type?: Prisma.EnumMovementTypeFilter<"StockMovement"> | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFilter<"StockMovement"> | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFilter<"StockMovement"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFilter<"StockMovement"> | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFilter<"StockMovement"> | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFilter<"StockMovement"> | string
|
referenceId?: Prisma.StringFilter<"StockMovement"> | string
|
||||||
@@ -1013,7 +1013,7 @@ export type StockMovementUpdateManyWithWhereWithoutInventoryInput = {
|
|||||||
export type StockMovementCreateWithoutCustomerInput = {
|
export type StockMovementCreateWithoutCustomerInput = {
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1030,7 +1030,7 @@ export type StockMovementUncheckedCreateWithoutCustomerInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1072,7 +1072,7 @@ export type StockMovementUpdateManyWithWhereWithoutCustomerInput = {
|
|||||||
export type StockMovementCreateWithoutProductInput = {
|
export type StockMovementCreateWithoutProductInput = {
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1089,7 +1089,7 @@ export type StockMovementUncheckedCreateWithoutProductInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1131,7 +1131,7 @@ export type StockMovementUpdateManyWithWhereWithoutProductInput = {
|
|||||||
export type StockMovementCreateWithoutSupplierInput = {
|
export type StockMovementCreateWithoutSupplierInput = {
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1148,7 +1148,7 @@ export type StockMovementUncheckedCreateWithoutSupplierInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1191,7 +1191,7 @@ export type StockMovementCreateManyCounterInventoryInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1208,7 +1208,7 @@ export type StockMovementCreateManyInventoryInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1224,7 +1224,7 @@ export type StockMovementCreateManyInventoryInput = {
|
|||||||
export type StockMovementUpdateWithoutCounterInventoryInput = {
|
export type StockMovementUpdateWithoutCounterInventoryInput = {
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1241,7 +1241,7 @@ export type StockMovementUncheckedUpdateWithoutCounterInventoryInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1258,7 +1258,7 @@ export type StockMovementUncheckedUpdateManyWithoutCounterInventoryInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1274,7 +1274,7 @@ export type StockMovementUncheckedUpdateManyWithoutCounterInventoryInput = {
|
|||||||
export type StockMovementUpdateWithoutInventoryInput = {
|
export type StockMovementUpdateWithoutInventoryInput = {
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1291,7 +1291,7 @@ export type StockMovementUncheckedUpdateWithoutInventoryInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1308,7 +1308,7 @@ export type StockMovementUncheckedUpdateManyWithoutInventoryInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1325,7 +1325,7 @@ export type StockMovementCreateManyCustomerInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1341,7 +1341,7 @@ export type StockMovementCreateManyCustomerInput = {
|
|||||||
export type StockMovementUpdateWithoutCustomerInput = {
|
export type StockMovementUpdateWithoutCustomerInput = {
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1358,7 +1358,7 @@ export type StockMovementUncheckedUpdateWithoutCustomerInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1375,7 +1375,7 @@ export type StockMovementUncheckedUpdateManyWithoutCustomerInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1392,7 +1392,7 @@ export type StockMovementCreateManyProductInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1408,7 +1408,7 @@ export type StockMovementCreateManyProductInput = {
|
|||||||
export type StockMovementUpdateWithoutProductInput = {
|
export type StockMovementUpdateWithoutProductInput = {
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1425,7 +1425,7 @@ export type StockMovementUncheckedUpdateWithoutProductInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1442,7 +1442,7 @@ export type StockMovementUncheckedUpdateManyWithoutProductInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1459,7 +1459,7 @@ export type StockMovementCreateManySupplierInput = {
|
|||||||
id?: number
|
id?: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee: runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1475,7 +1475,7 @@ export type StockMovementCreateManySupplierInput = {
|
|||||||
export type StockMovementUpdateWithoutSupplierInput = {
|
export type StockMovementUpdateWithoutSupplierInput = {
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1492,7 +1492,7 @@ export type StockMovementUncheckedUpdateWithoutSupplierInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1509,7 +1509,7 @@ export type StockMovementUncheckedUpdateManyWithoutSupplierInput = {
|
|||||||
id?: Prisma.IntFieldUpdateOperationsInput | number
|
id?: Prisma.IntFieldUpdateOperationsInput | number
|
||||||
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
type?: Prisma.EnumMovementTypeFieldUpdateOperationsInput | $Enums.MovementType
|
||||||
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
quantity?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
fee?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
unitPrice?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
totalCost?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
referenceType?: Prisma.EnumMovementReferenceTypeFieldUpdateOperationsInput | $Enums.MovementReferenceType
|
||||||
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
referenceId?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
@@ -1528,7 +1528,7 @@ export type StockMovementSelect<ExtArgs extends runtime.Types.Extensions.Interna
|
|||||||
id?: boolean
|
id?: boolean
|
||||||
type?: boolean
|
type?: boolean
|
||||||
quantity?: boolean
|
quantity?: boolean
|
||||||
fee?: boolean
|
unitPrice?: boolean
|
||||||
totalCost?: boolean
|
totalCost?: boolean
|
||||||
referenceType?: boolean
|
referenceType?: boolean
|
||||||
referenceId?: boolean
|
referenceId?: boolean
|
||||||
@@ -1553,7 +1553,7 @@ export type StockMovementSelectScalar = {
|
|||||||
id?: boolean
|
id?: boolean
|
||||||
type?: boolean
|
type?: boolean
|
||||||
quantity?: boolean
|
quantity?: boolean
|
||||||
fee?: boolean
|
unitPrice?: boolean
|
||||||
totalCost?: boolean
|
totalCost?: boolean
|
||||||
referenceType?: boolean
|
referenceType?: boolean
|
||||||
referenceId?: boolean
|
referenceId?: boolean
|
||||||
@@ -1567,7 +1567,7 @@ export type StockMovementSelectScalar = {
|
|||||||
customerId?: boolean
|
customerId?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StockMovementOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "quantity" | "fee" | "totalCost" | "referenceType" | "referenceId" | "createdAt" | "productId" | "inventoryId" | "avgCost" | "supplierId" | "remainedInStock" | "counterInventoryId" | "customerId", ExtArgs["result"]["stockMovement"]>
|
export type StockMovementOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "quantity" | "unitPrice" | "totalCost" | "referenceType" | "referenceId" | "createdAt" | "productId" | "inventoryId" | "avgCost" | "supplierId" | "remainedInStock" | "counterInventoryId" | "customerId", ExtArgs["result"]["stockMovement"]>
|
||||||
export type StockMovementInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type StockMovementInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
counterInventory?: boolean | Prisma.StockMovement$counterInventoryArgs<ExtArgs>
|
counterInventory?: boolean | Prisma.StockMovement$counterInventoryArgs<ExtArgs>
|
||||||
customer?: boolean | Prisma.StockMovement$customerArgs<ExtArgs>
|
customer?: boolean | Prisma.StockMovement$customerArgs<ExtArgs>
|
||||||
@@ -1589,7 +1589,7 @@ export type $StockMovementPayload<ExtArgs extends runtime.Types.Extensions.Inter
|
|||||||
id: number
|
id: number
|
||||||
type: $Enums.MovementType
|
type: $Enums.MovementType
|
||||||
quantity: runtime.Decimal
|
quantity: runtime.Decimal
|
||||||
fee: runtime.Decimal
|
unitPrice: runtime.Decimal
|
||||||
totalCost: runtime.Decimal
|
totalCost: runtime.Decimal
|
||||||
referenceType: $Enums.MovementReferenceType
|
referenceType: $Enums.MovementReferenceType
|
||||||
referenceId: string
|
referenceId: string
|
||||||
@@ -1978,7 +1978,7 @@ export interface StockMovementFieldRefs {
|
|||||||
readonly id: Prisma.FieldRef<"StockMovement", 'Int'>
|
readonly id: Prisma.FieldRef<"StockMovement", 'Int'>
|
||||||
readonly type: Prisma.FieldRef<"StockMovement", 'MovementType'>
|
readonly type: Prisma.FieldRef<"StockMovement", 'MovementType'>
|
||||||
readonly quantity: Prisma.FieldRef<"StockMovement", 'Decimal'>
|
readonly quantity: Prisma.FieldRef<"StockMovement", 'Decimal'>
|
||||||
readonly fee: Prisma.FieldRef<"StockMovement", 'Decimal'>
|
readonly unitPrice: Prisma.FieldRef<"StockMovement", 'Decimal'>
|
||||||
readonly totalCost: Prisma.FieldRef<"StockMovement", 'Decimal'>
|
readonly totalCost: Prisma.FieldRef<"StockMovement", 'Decimal'>
|
||||||
readonly referenceType: Prisma.FieldRef<"StockMovement", 'MovementReferenceType'>
|
readonly referenceType: Prisma.FieldRef<"StockMovement", 'MovementReferenceType'>
|
||||||
readonly referenceId: Prisma.FieldRef<"StockMovement", 'String'>
|
readonly referenceId: Prisma.FieldRef<"StockMovement", 'String'>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -92,13 +92,13 @@ export class InventoriesService {
|
|||||||
console.log(movements)
|
console.log(movements)
|
||||||
|
|
||||||
const mapped = movements.map(movement => {
|
const mapped = movements.map(movement => {
|
||||||
const { id, quantity, fee, totalCost, avgCost, product } = movement
|
const { id, quantity, unitPrice, totalCost, avgCost, product } = movement
|
||||||
if (info === null) {
|
if (info === null) {
|
||||||
info = {
|
info = {
|
||||||
date: movement.createdAt,
|
date: movement.createdAt,
|
||||||
type: movement.type,
|
type: movement.type,
|
||||||
quantity: Number(movement.quantity),
|
quantity: Number(movement.quantity),
|
||||||
fee: Number(movement.fee),
|
unitPrice: Number(movement.unitPrice),
|
||||||
totalCost: Number(movement.totalCost),
|
totalCost: Number(movement.totalCost),
|
||||||
referenceType: movement.referenceType,
|
referenceType: movement.referenceType,
|
||||||
referenceId: movement.referenceId,
|
referenceId: movement.referenceId,
|
||||||
@@ -107,13 +107,13 @@ export class InventoriesService {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
info.quantity += Number(movement.quantity)
|
info.quantity += Number(movement.quantity)
|
||||||
info.fee += Number(movement.fee)
|
info.unitPrice += Number(movement.unitPrice)
|
||||||
info.totalCost += Number(movement.totalCost)
|
info.totalCost += Number(movement.totalCost)
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
id,
|
id,
|
||||||
quantity: Number(quantity),
|
quantity: Number(quantity),
|
||||||
fee: Number(fee),
|
unitPrice: Number(unitPrice),
|
||||||
totalCost: Number(totalCost),
|
totalCost: Number(totalCost),
|
||||||
avgCost: Number(avgCost),
|
avgCost: Number(avgCost),
|
||||||
product,
|
product,
|
||||||
|
|||||||
@@ -33,5 +33,5 @@ export class CreateOrderItemDto {
|
|||||||
@ApiProperty()
|
@ApiProperty()
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
fee: number
|
unitPrice: number
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -170,7 +170,10 @@ export class PosService {
|
|||||||
|
|
||||||
const newCode = String(Number(lastCode) + 1)
|
const newCode = String(Number(lastCode) + 1)
|
||||||
|
|
||||||
const totalAmount = data.items.reduce((acc, item) => acc + item.count * item.fee, 0)
|
const totalAmount = data.items.reduce(
|
||||||
|
(acc, item) => acc + item.count * item.unitPrice,
|
||||||
|
0,
|
||||||
|
)
|
||||||
|
|
||||||
const preparedOrder: SalesInvoiceCreateInput = {
|
const preparedOrder: SalesInvoiceCreateInput = {
|
||||||
...res,
|
...res,
|
||||||
@@ -182,8 +185,8 @@ export class PosService {
|
|||||||
create: items.map(item => ({
|
create: items.map(item => ({
|
||||||
product: { connect: { id: Number(item.productId) } },
|
product: { connect: { id: Number(item.productId) } },
|
||||||
count: item.count,
|
count: item.count,
|
||||||
fee: item.fee,
|
unitPrice: item.unitPrice,
|
||||||
total: item.count * item.fee,
|
total: item.count * item.unitPrice,
|
||||||
})),
|
})),
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
SELECT p.id
|
||||||
|
FROM Products p
|
||||||
|
WHERE (
|
||||||
|
SELECT COALESCE(SUM(sb.quantity), 0)
|
||||||
|
FROM Stock_Balance sb
|
||||||
|
WHERE
|
||||||
|
sb.productId = p.id
|
||||||
|
) < p.minimumStockAlertLevel
|
||||||
|
ORDER BY (
|
||||||
|
p.minimumStockAlertLevel - (
|
||||||
|
SELECT COALESCE(SUM(sb.quantity), 0)
|
||||||
|
FROM Stock_Balance sb
|
||||||
|
WHERE
|
||||||
|
sb.productId = p.id
|
||||||
|
)
|
||||||
|
) DESC
|
||||||
|
LIMIT 10
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
import { Controller, Get } from '@nestjs/common'
|
||||||
|
import { StatisticsService } from './statistics.service'
|
||||||
|
|
||||||
|
@Controller('statistics')
|
||||||
|
export class StatisticsController {
|
||||||
|
constructor(private readonly statisticsService: StatisticsService) {}
|
||||||
|
|
||||||
|
@Get('top-last-sales')
|
||||||
|
getTopLastSales() {
|
||||||
|
return this.statisticsService.getTopLastSales()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get('top-alert-stocks')
|
||||||
|
getTopAlertStocks() {
|
||||||
|
return this.statisticsService.getTopAlertStocks()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get('top-supplier-debts')
|
||||||
|
getTopSupplierDebts() {
|
||||||
|
return this.statisticsService.getTopSupplierDebts()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get('top-sales')
|
||||||
|
getTopSellProducts() {
|
||||||
|
return this.statisticsService.getTopSellProducts()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { PrismaService } from '../../prisma/prisma.service'
|
||||||
|
import { StatisticsController } from './statistics.controller'
|
||||||
|
import { StatisticsService } from './statistics.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
controllers: [StatisticsController],
|
||||||
|
providers: [StatisticsService, PrismaService],
|
||||||
|
})
|
||||||
|
export class StatisticsModule {}
|
||||||
@@ -0,0 +1,184 @@
|
|||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import * as fs from 'fs'
|
||||||
|
import * as path from 'path'
|
||||||
|
import { ResponseMapper } from '../../common/response/response-mapper'
|
||||||
|
import { PrismaService } from '../../prisma/prisma.service'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class StatisticsService {
|
||||||
|
constructor(private prisma: PrismaService) {}
|
||||||
|
|
||||||
|
private readSqlFile(filename: string): string {
|
||||||
|
const filePath = path.join(__dirname, 'queries', filename)
|
||||||
|
return fs.readFileSync(filePath, 'utf8')
|
||||||
|
}
|
||||||
|
|
||||||
|
async getTopLastSales() {
|
||||||
|
const sales = await this.prisma.salesInvoice.findMany({
|
||||||
|
take: 10,
|
||||||
|
orderBy: { createdAt: 'desc' },
|
||||||
|
include: {
|
||||||
|
customer: { select: { id: true, firstName: true, lastName: true } },
|
||||||
|
posAccount: { select: { id: true, name: true } },
|
||||||
|
items: {
|
||||||
|
include: {
|
||||||
|
product: { select: { id: true, name: true } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const mapped = sales.map(sale => ({
|
||||||
|
...sale,
|
||||||
|
totalAmount: Number(sale.totalAmount),
|
||||||
|
itemsCount: sale.items.length,
|
||||||
|
}))
|
||||||
|
|
||||||
|
return ResponseMapper.list(mapped)
|
||||||
|
}
|
||||||
|
|
||||||
|
async getTopAlertStocks() {
|
||||||
|
const productIds = await this.prisma.$queryRaw<{ id: number }[]>`
|
||||||
|
SELECT p.id
|
||||||
|
FROM Products p
|
||||||
|
WHERE (SELECT COALESCE(SUM(sb.quantity), 0) FROM Stock_Balance sb WHERE sb.productId = p.id) < p.minimumStockAlertLevel
|
||||||
|
-- ORDER BY (p.minimumStockAlertLevel - (SELECT COALESCE(SUM(sb.quantity), 0) FROM stock_balance sb WHERE sb.productId = p.id)) DESC
|
||||||
|
LIMIT 10
|
||||||
|
`
|
||||||
|
|
||||||
|
const ids = productIds.map(p => p.id)
|
||||||
|
|
||||||
|
if (ids.length === 0) {
|
||||||
|
return ResponseMapper.list([])
|
||||||
|
}
|
||||||
|
|
||||||
|
const products = await this.prisma.product.findMany({
|
||||||
|
where: { id: { in: ids } },
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
name: true,
|
||||||
|
sku: true,
|
||||||
|
minimumStockAlertLevel: true,
|
||||||
|
stockBalances: {
|
||||||
|
select: {
|
||||||
|
quantity: true,
|
||||||
|
inventory: { select: { id: true, name: true } },
|
||||||
|
},
|
||||||
|
},
|
||||||
|
category: { select: { id: true, name: true } },
|
||||||
|
brand: { select: { id: true, name: true } },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const mappedData = products.map(product => ({
|
||||||
|
...product,
|
||||||
|
stock: product.stockBalances.reduce((acc, sb) => acc + Number(sb.quantity), 0),
|
||||||
|
deficit:
|
||||||
|
Number(product.minimumStockAlertLevel) -
|
||||||
|
product.stockBalances.reduce((acc, sb) => acc + Number(sb.quantity), 0),
|
||||||
|
}))
|
||||||
|
|
||||||
|
return ResponseMapper.list(mappedData)
|
||||||
|
}
|
||||||
|
|
||||||
|
async getTopSupplierDebts() {
|
||||||
|
// Get unpaid receipts
|
||||||
|
const receipts = await this.prisma.purchaseReceipt.findMany({
|
||||||
|
where: {
|
||||||
|
status: { not: 'PAID' },
|
||||||
|
},
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
totalAmount: true,
|
||||||
|
paidAmount: true,
|
||||||
|
supplierId: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const debtMap = new Map<
|
||||||
|
number,
|
||||||
|
{ supplierId: number; totalDebt: number; unpaidReceipts: number }
|
||||||
|
>()
|
||||||
|
|
||||||
|
for (const receipt of receipts) {
|
||||||
|
const debt = Number(receipt.totalAmount) - Number(receipt.paidAmount)
|
||||||
|
if (debt > 0) {
|
||||||
|
const existing = debtMap.get(receipt.supplierId)
|
||||||
|
if (existing) {
|
||||||
|
existing.totalDebt += debt
|
||||||
|
existing.unpaidReceipts += 1
|
||||||
|
} else {
|
||||||
|
debtMap.set(receipt.supplierId, {
|
||||||
|
supplierId: receipt.supplierId,
|
||||||
|
totalDebt: debt,
|
||||||
|
unpaidReceipts: 1,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const supplierIds = Array.from(debtMap.keys())
|
||||||
|
const suppliers = await this.prisma.supplier.findMany({
|
||||||
|
where: { id: { in: supplierIds } },
|
||||||
|
select: { id: true, firstName: true, lastName: true },
|
||||||
|
})
|
||||||
|
|
||||||
|
const supplierMap = new Map(
|
||||||
|
suppliers.map(s => [s.id, `${s.firstName} ${s.lastName}`.trim()]),
|
||||||
|
)
|
||||||
|
|
||||||
|
const mapped = Array.from(debtMap.values())
|
||||||
|
.map(item => ({
|
||||||
|
id: item.supplierId,
|
||||||
|
name: supplierMap.get(item.supplierId) || 'Unknown',
|
||||||
|
totalDebt: item.totalDebt,
|
||||||
|
unpaidReceipts: item.unpaidReceipts,
|
||||||
|
}))
|
||||||
|
.sort((a, b) => b.totalDebt - a.totalDebt)
|
||||||
|
.slice(0, 10)
|
||||||
|
|
||||||
|
return ResponseMapper.list(mapped)
|
||||||
|
}
|
||||||
|
|
||||||
|
async getTopSellProducts() {
|
||||||
|
const productData = await this.prisma.$queryRaw<any[]>`
|
||||||
|
SELECT p.id, p.name, p.sku, COALESCE(SUM(sii.count), 0) as totalSold
|
||||||
|
FROM Products p
|
||||||
|
LEFT JOIN Sales_Invoice_Items sii ON p.id = sii.productId
|
||||||
|
GROUP BY p.id
|
||||||
|
HAVING totalSold > 0
|
||||||
|
ORDER BY totalSold DESC
|
||||||
|
LIMIT 10
|
||||||
|
`
|
||||||
|
|
||||||
|
const ids = productData.map(p => p.id)
|
||||||
|
|
||||||
|
if (ids.length === 0) {
|
||||||
|
return ResponseMapper.list([])
|
||||||
|
}
|
||||||
|
|
||||||
|
const products = await this.prisma.product.findMany({
|
||||||
|
where: { id: { in: ids } },
|
||||||
|
select: {
|
||||||
|
id: true,
|
||||||
|
category: { select: { id: true, name: true } },
|
||||||
|
brand: { select: { id: true, name: true } },
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
const productMap = new Map(
|
||||||
|
products.map(p => [p.id, { category: p.category, brand: p.brand }]),
|
||||||
|
)
|
||||||
|
|
||||||
|
const mapped = productData.map(product => ({
|
||||||
|
id: product.id,
|
||||||
|
name: product.name,
|
||||||
|
sku: product.sku,
|
||||||
|
totalSold: Number(product.totalSold),
|
||||||
|
category: productMap.get(product.id)?.category,
|
||||||
|
brand: productMap.get(product.id)?.brand,
|
||||||
|
}))
|
||||||
|
|
||||||
|
return ResponseMapper.list(mapped)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -23,8 +23,8 @@ export class SupplierInvoicesService {
|
|||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
count: true,
|
count: true,
|
||||||
fee: true,
|
unitPrice: true,
|
||||||
total: true,
|
totalAmount: true,
|
||||||
product: {
|
product: {
|
||||||
select: {
|
select: {
|
||||||
id: true,
|
id: true,
|
||||||
@@ -149,6 +149,8 @@ export class SupplierInvoicesService {
|
|||||||
|
|
||||||
async createPayment(invoiceId: number, data: CreateReceiptPaymentDto) {
|
async createPayment(invoiceId: number, data: CreateReceiptPaymentDto) {
|
||||||
const { bankAccountId, ...rest } = data
|
const { bankAccountId, ...rest } = data
|
||||||
|
console.log(data)
|
||||||
|
|
||||||
const payment = await this.prisma.purchaseReceiptPayments.create({
|
const payment = await this.prisma.purchaseReceiptPayments.create({
|
||||||
data: {
|
data: {
|
||||||
...rest,
|
...rest,
|
||||||
|
|||||||
@@ -10,12 +10,12 @@ export class CreatePurchaseReceiptItemDto {
|
|||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
@Min(0)
|
@Min(0)
|
||||||
fee: number
|
unitPrice: number
|
||||||
|
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
@Min(0)
|
@Min(0)
|
||||||
total: number
|
totalAmount: number
|
||||||
|
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
@IsNotEmpty()
|
@IsNotEmpty()
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export class UpdatePurchaseReceiptItemDto {
|
|||||||
@IsOptional()
|
@IsOptional()
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
fee?: number
|
unitPrice?: number
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export class PurchaseReceiptItemsService {
|
|||||||
payload.receipt = { connect: { id: Number(payload.receiptId) } }
|
payload.receipt = { connect: { id: Number(payload.receiptId) } }
|
||||||
delete payload.receiptId
|
delete payload.receiptId
|
||||||
}
|
}
|
||||||
payload.fee = String(payload.fee)
|
payload.unitPrice = String(payload.unitPrice)
|
||||||
payload.count = String(payload.count)
|
payload.count = String(payload.count)
|
||||||
payload.total = String(payload.total)
|
payload.total = String(payload.total)
|
||||||
const item = await this.prisma.purchaseReceiptItem.create({ data: payload })
|
const item = await this.prisma.purchaseReceiptItem.create({ data: payload })
|
||||||
|
|||||||
@@ -21,8 +21,8 @@ export class PurchaseReceiptsService {
|
|||||||
create: dto.items.map((item, idx) => {
|
create: dto.items.map((item, idx) => {
|
||||||
const mapped = {
|
const mapped = {
|
||||||
count: new Prisma.Decimal(item.count ?? 0),
|
count: new Prisma.Decimal(item.count ?? 0),
|
||||||
fee: new Prisma.Decimal(item.fee ?? 0),
|
unitPrice: new Prisma.Decimal(item.unitPrice ?? 0),
|
||||||
total: new Prisma.Decimal(item.total ?? 0),
|
totalAmount: new Prisma.Decimal(item.totalAmount ?? 0),
|
||||||
description: item.description ?? null,
|
description: item.description ?? null,
|
||||||
product: { connect: { id: item.productId } },
|
product: { connect: { id: item.productId } },
|
||||||
}
|
}
|
||||||
@@ -34,6 +34,10 @@ export class PurchaseReceiptsService {
|
|||||||
const item = await this.prisma.purchaseReceipt.create({
|
const item = await this.prisma.purchaseReceipt.create({
|
||||||
data,
|
data,
|
||||||
include: { items: true },
|
include: { items: true },
|
||||||
|
omit: {
|
||||||
|
supplierId: true,
|
||||||
|
inventoryId: true,
|
||||||
|
},
|
||||||
})
|
})
|
||||||
return ResponseMapper.create(item)
|
return ResponseMapper.create(item)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ export class CreateSalesInvoiceItemDto {
|
|||||||
|
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
fee: number
|
unitPrice: number
|
||||||
|
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ export class UpdateSalesInvoiceItemDto {
|
|||||||
@IsOptional()
|
@IsOptional()
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
fee?: number
|
unitPrice?: number
|
||||||
|
|
||||||
@IsOptional()
|
@IsOptional()
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ export class CreateStockMovementDto {
|
|||||||
|
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
fee: number
|
unitPrice: number
|
||||||
|
|
||||||
@Type(() => Number)
|
@Type(() => Number)
|
||||||
@IsNumber()
|
@IsNumber()
|
||||||
|
|||||||
Reference in New Issue
Block a user