transform core api codes into this project, update modules as admin/pos context modules
This commit is contained in:
@@ -7,7 +7,9 @@
|
|||||||
"@nestjs/platform-express": "^11.0.1",
|
"@nestjs/platform-express": "^11.0.1",
|
||||||
"@nestjs/swagger": "^11.2.3",
|
"@nestjs/swagger": "^11.2.3",
|
||||||
"@prisma/adapter-mariadb": "^7.1.0",
|
"@prisma/adapter-mariadb": "^7.1.0",
|
||||||
|
"@types/bcrypt": "^6.0.0",
|
||||||
"@types/multer": "^2.0.0",
|
"@types/multer": "^2.0.0",
|
||||||
|
"bcrypt": "^6.0.0",
|
||||||
"class-transformer": "^0.5.1",
|
"class-transformer": "^0.5.1",
|
||||||
"class-validator": "^0.14.3",
|
"class-validator": "^0.14.3",
|
||||||
"cookie-parser": "^1.4.7",
|
"cookie-parser": "^1.4.7",
|
||||||
|
|||||||
Generated
+34
@@ -26,9 +26,15 @@ importers:
|
|||||||
'@prisma/adapter-mariadb':
|
'@prisma/adapter-mariadb':
|
||||||
specifier: ^7.1.0
|
specifier: ^7.1.0
|
||||||
version: 7.1.0
|
version: 7.1.0
|
||||||
|
'@types/bcrypt':
|
||||||
|
specifier: ^6.0.0
|
||||||
|
version: 6.0.0
|
||||||
'@types/multer':
|
'@types/multer':
|
||||||
specifier: ^2.0.0
|
specifier: ^2.0.0
|
||||||
version: 2.0.0
|
version: 2.0.0
|
||||||
|
bcrypt:
|
||||||
|
specifier: ^6.0.0
|
||||||
|
version: 6.0.0
|
||||||
class-transformer:
|
class-transformer:
|
||||||
specifier: ^0.5.1
|
specifier: ^0.5.1
|
||||||
version: 0.5.1
|
version: 0.5.1
|
||||||
@@ -1125,6 +1131,9 @@ packages:
|
|||||||
'@types/babel__traverse@7.28.0':
|
'@types/babel__traverse@7.28.0':
|
||||||
resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==}
|
resolution: {integrity: sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==}
|
||||||
|
|
||||||
|
'@types/bcrypt@6.0.0':
|
||||||
|
resolution: {integrity: sha512-/oJGukuH3D2+D+3H4JWLaAsJ/ji86dhRidzZ/Od7H/i8g+aCmvkeCc6Ni/f9uxGLSQVCRZkX2/lqEFG2BvWtlQ==}
|
||||||
|
|
||||||
'@types/body-parser@1.19.6':
|
'@types/body-parser@1.19.6':
|
||||||
resolution: {integrity: sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==}
|
resolution: {integrity: sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==}
|
||||||
|
|
||||||
@@ -1581,6 +1590,10 @@ packages:
|
|||||||
resolution: {integrity: sha512-Mh++g+2LPfzZToywfE1BUzvZbfOY52Nil0rn9H1CPC5DJ7fX+Vir7nToBeoiSbB1zTNeGYbELEvJESujgGrzXw==}
|
resolution: {integrity: sha512-Mh++g+2LPfzZToywfE1BUzvZbfOY52Nil0rn9H1CPC5DJ7fX+Vir7nToBeoiSbB1zTNeGYbELEvJESujgGrzXw==}
|
||||||
hasBin: true
|
hasBin: true
|
||||||
|
|
||||||
|
bcrypt@6.0.0:
|
||||||
|
resolution: {integrity: sha512-cU8v/EGSrnH+HnxV2z0J7/blxH8gq7Xh2JFT6Aroax7UohdmiJJlxApMxtKfuI7z68NvvVcmR78k2LbT6efhRg==}
|
||||||
|
engines: {node: '>= 18'}
|
||||||
|
|
||||||
bl@4.1.0:
|
bl@4.1.0:
|
||||||
resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}
|
resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==}
|
||||||
|
|
||||||
@@ -2837,12 +2850,20 @@ packages:
|
|||||||
node-abort-controller@3.1.1:
|
node-abort-controller@3.1.1:
|
||||||
resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==}
|
resolution: {integrity: sha512-AGK2yQKIjRuqnc6VkX2Xj5d+QW8xZ87pa1UK6yA6ouUyuxfHuMP6umE5QK7UmTeOAymo+Zx1Fxiuw9rVx8taHQ==}
|
||||||
|
|
||||||
|
node-addon-api@8.5.0:
|
||||||
|
resolution: {integrity: sha512-/bRZty2mXUIFY/xU5HLvveNHlswNJej+RnxBjOMkidWfwZzgTbPG1E3K5TOxRLOR+5hX7bSofy8yf1hZevMS8A==}
|
||||||
|
engines: {node: ^18 || ^20 || >= 21}
|
||||||
|
|
||||||
node-emoji@1.11.0:
|
node-emoji@1.11.0:
|
||||||
resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==}
|
resolution: {integrity: sha512-wo2DpQkQp7Sjm2A0cq+sN7EHKO6Sl0ctXeBdFZrL9T9+UywORbufTcTZxom8YqpLQt/FqNMUkOpkZrJVYSKD3A==}
|
||||||
|
|
||||||
node-fetch-native@1.6.7:
|
node-fetch-native@1.6.7:
|
||||||
resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==}
|
resolution: {integrity: sha512-g9yhqoedzIUm0nTnTqAQvueMPVOuIY16bqgAJJC8XOOubYFNwz6IER9qs0Gq2Xd0+CecCKFjtdDTMA4u4xG06Q==}
|
||||||
|
|
||||||
|
node-gyp-build@4.8.4:
|
||||||
|
resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==}
|
||||||
|
hasBin: true
|
||||||
|
|
||||||
node-int64@0.4.0:
|
node-int64@0.4.0:
|
||||||
resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==}
|
resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==}
|
||||||
|
|
||||||
@@ -4745,6 +4766,10 @@ snapshots:
|
|||||||
dependencies:
|
dependencies:
|
||||||
'@babel/types': 7.28.5
|
'@babel/types': 7.28.5
|
||||||
|
|
||||||
|
'@types/bcrypt@6.0.0':
|
||||||
|
dependencies:
|
||||||
|
'@types/node': 22.19.1
|
||||||
|
|
||||||
'@types/body-parser@1.19.6':
|
'@types/body-parser@1.19.6':
|
||||||
dependencies:
|
dependencies:
|
||||||
'@types/connect': 3.4.38
|
'@types/connect': 3.4.38
|
||||||
@@ -5246,6 +5271,11 @@ snapshots:
|
|||||||
|
|
||||||
baseline-browser-mapping@2.9.0: {}
|
baseline-browser-mapping@2.9.0: {}
|
||||||
|
|
||||||
|
bcrypt@6.0.0:
|
||||||
|
dependencies:
|
||||||
|
node-addon-api: 8.5.0
|
||||||
|
node-gyp-build: 4.8.4
|
||||||
|
|
||||||
bl@4.1.0:
|
bl@4.1.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
buffer: 5.7.1
|
buffer: 5.7.1
|
||||||
@@ -6694,12 +6724,16 @@ snapshots:
|
|||||||
|
|
||||||
node-abort-controller@3.1.1: {}
|
node-abort-controller@3.1.1: {}
|
||||||
|
|
||||||
|
node-addon-api@8.5.0: {}
|
||||||
|
|
||||||
node-emoji@1.11.0:
|
node-emoji@1.11.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
lodash: 4.17.21
|
lodash: 4.17.21
|
||||||
|
|
||||||
node-fetch-native@1.6.7: {}
|
node-fetch-native@1.6.7: {}
|
||||||
|
|
||||||
|
node-gyp-build@4.8.4: {}
|
||||||
|
|
||||||
node-int64@0.4.0: {}
|
node-int64@0.4.0: {}
|
||||||
|
|
||||||
node-releases@2.0.27: {}
|
node-releases@2.0.27: {}
|
||||||
|
|||||||
@@ -0,0 +1,272 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- The primary key for the `devices` table will be changed. If it partially fails, the table could be left without primary key constraint.
|
||||||
|
- You are about to drop the column `account_id` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `app_version` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `brand` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `browser_name` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `build_number` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `device` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `fcm_token` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `model` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `platform` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `release_number` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `sdk_version` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `uuid` on the `devices` table. All the data in the column will be lost.
|
||||||
|
- A unique constraint covering the columns `[complex_id,national_id]` on the table `customer_individuals` will be added. If there are existing duplicate values, this will fail.
|
||||||
|
- A unique constraint covering the columns `[complex_id,registration_number]` on the table `customer_legal` will be added. If there are existing duplicate values, this will fail.
|
||||||
|
- Added the required column `complex_id` to the `customer_individuals` table without a default value. This is not possible if the table is not empty.
|
||||||
|
- Added the required column `complex_id` to the `customer_legal` table without a default value. This is not possible if the table is not empty.
|
||||||
|
- Added the required column `brand_id` to the `devices` table without a default value. This is not possible if the table is not empty.
|
||||||
|
- The required column `id` was added to the `devices` table with a prisma-level default value. This is not possible if the table is not empty. Please add this column as optional, then populate it before making it required.
|
||||||
|
- Added the required column `name` to the `devices` table without a default value. This is not possible if the table is not empty.
|
||||||
|
- Added the required column `updated_at` to the `devices` table without a default value. This is not possible if the table is not empty.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- DropIndex
|
||||||
|
DROP INDEX `devices_uuid_key` ON `devices`;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `customer_individuals` ADD COLUMN `complex_id` VARCHAR(191) NOT NULL;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `customer_legal` ADD COLUMN `complex_id` VARCHAR(191) NOT NULL;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `devices` DROP PRIMARY KEY,
|
||||||
|
DROP COLUMN `account_id`,
|
||||||
|
DROP COLUMN `app_version`,
|
||||||
|
DROP COLUMN `brand`,
|
||||||
|
DROP COLUMN `browser_name`,
|
||||||
|
DROP COLUMN `build_number`,
|
||||||
|
DROP COLUMN `device`,
|
||||||
|
DROP COLUMN `fcm_token`,
|
||||||
|
DROP COLUMN `model`,
|
||||||
|
DROP COLUMN `platform`,
|
||||||
|
DROP COLUMN `release_number`,
|
||||||
|
DROP COLUMN `sdk_version`,
|
||||||
|
DROP COLUMN `uuid`,
|
||||||
|
ADD COLUMN `brand_id` VARCHAR(191) NOT NULL,
|
||||||
|
ADD COLUMN `created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
ADD COLUMN `id` VARCHAR(191) NOT NULL,
|
||||||
|
ADD COLUMN `name` VARCHAR(191) NOT NULL,
|
||||||
|
ADD COLUMN `updated_at` DATETIME(3) NOT NULL,
|
||||||
|
MODIFY `os_version` VARCHAR(191) NULL,
|
||||||
|
ADD PRIMARY KEY (`id`);
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `tokens` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`token` VARCHAR(191) NOT NULL,
|
||||||
|
`type` ENUM('ACCESS', 'REFRESH') NOT NULL,
|
||||||
|
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`expires_at` DATETIME(3) NOT NULL,
|
||||||
|
`account_id` VARCHAR(191) NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `tokens_token_key`(`token`),
|
||||||
|
UNIQUE INDEX `tokens_type_account_id_key`(`type`, `account_id`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `verification_codes` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`code` VARCHAR(191) NOT NULL,
|
||||||
|
`is_used` BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`expires_at` DATETIME(3) NOT NULL,
|
||||||
|
`account_id` VARCHAR(191) NOT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `guilds` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`name` VARCHAR(191) NOT NULL,
|
||||||
|
`code` VARCHAR(191) NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `business_activities` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`name` VARCHAR(191) NOT NULL,
|
||||||
|
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`tax_id` VARCHAR(191) NULL,
|
||||||
|
`guild_id` VARCHAR(191) NOT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `complexes` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`name` VARCHAR(191) NOT NULL,
|
||||||
|
`address` VARCHAR(191) NULL,
|
||||||
|
`business_activity_id` VARCHAR(191) NOT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `poses` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`serial` VARCHAR(191) NOT NULL,
|
||||||
|
`model` VARCHAR(191) NULL,
|
||||||
|
`status` ENUM('ACTIVE', 'DISABLED') NOT NULL DEFAULT 'ACTIVE',
|
||||||
|
`pos_type` ENUM('PSP', 'MOBILE', 'API') NOT NULL,
|
||||||
|
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`updated_at` DATETIME(3) NOT NULL,
|
||||||
|
`complex_id` VARCHAR(191) NOT NULL,
|
||||||
|
`device_id` VARCHAR(191) NOT NULL,
|
||||||
|
`provider_id` VARCHAR(191) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `poses_serial_key`(`serial`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `device_brands` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`name` VARCHAR(191) NOT NULL,
|
||||||
|
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`updated_at` DATETIME(3) NOT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `licenses` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`pos_id` VARCHAR(191) NOT NULL,
|
||||||
|
`partner_id` VARCHAR(191) NOT NULL,
|
||||||
|
`starts_at` DATETIME(3) NOT NULL,
|
||||||
|
`expires_at` DATETIME(3) NOT NULL,
|
||||||
|
`status` ENUM('ACTIVE', 'EXPIRED', 'SUSPENDED') NOT NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `partners` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`name` VARCHAR(191) NOT NULL,
|
||||||
|
`code` VARCHAR(191) NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `users` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`mobile_number` VARCHAR(191) NOT NULL,
|
||||||
|
`national_code` VARCHAR(191) NULL,
|
||||||
|
`first_name` VARCHAR(191) NOT NULL,
|
||||||
|
`last_name` VARCHAR(191) NOT NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `users_mobile_number_key`(`mobile_number`),
|
||||||
|
UNIQUE INDEX `users_national_code_key`(`national_code`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `accounts` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`username` VARCHAR(191) NOT NULL,
|
||||||
|
`type` ENUM('PARTNER', 'BUSINESS', 'ADMIN', 'PROVIDER', 'POS') NOT NULL,
|
||||||
|
`status` ENUM('ACTIVE', 'SUSPENDED') NOT NULL,
|
||||||
|
`password` VARCHAR(191) NOT NULL,
|
||||||
|
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||||
|
`user_id` VARCHAR(191) NOT NULL,
|
||||||
|
`partner_id` VARCHAR(191) NULL,
|
||||||
|
`business_id` VARCHAR(191) NULL,
|
||||||
|
`provider_id` VARCHAR(191) NULL,
|
||||||
|
`pos_id` VARCHAR(191) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `accounts_username_key`(`username`),
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `providers` (
|
||||||
|
`id` VARCHAR(191) NOT NULL,
|
||||||
|
`name` VARCHAR(191) NOT NULL,
|
||||||
|
`code` VARCHAR(191) NULL,
|
||||||
|
|
||||||
|
PRIMARY KEY (`id`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateTable
|
||||||
|
CREATE TABLE `user_devices` (
|
||||||
|
`account_id` VARCHAR(255) NULL,
|
||||||
|
`app_version` VARCHAR(20) NOT NULL,
|
||||||
|
`build_number` VARCHAR(20) NOT NULL,
|
||||||
|
`uuid` VARCHAR(255) NOT NULL,
|
||||||
|
`platform` VARCHAR(100) NOT NULL,
|
||||||
|
`brand` VARCHAR(100) NOT NULL,
|
||||||
|
`model` VARCHAR(100) NOT NULL,
|
||||||
|
`device` VARCHAR(100) NOT NULL,
|
||||||
|
`os_version` VARCHAR(20) NOT NULL,
|
||||||
|
`sdk_version` VARCHAR(20) NOT NULL,
|
||||||
|
`release_number` VARCHAR(20) NOT NULL,
|
||||||
|
`browser_name` VARCHAR(100) NULL,
|
||||||
|
`fcm_token` VARCHAR(100) NULL,
|
||||||
|
|
||||||
|
UNIQUE INDEX `user_devices_uuid_key`(`uuid`),
|
||||||
|
PRIMARY KEY (`uuid`)
|
||||||
|
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX `customer_individuals_complex_id_national_id_key` ON `customer_individuals`(`complex_id`, `national_id`);
|
||||||
|
|
||||||
|
-- CreateIndex
|
||||||
|
CREATE UNIQUE INDEX `customer_legal_complex_id_registration_number_key` ON `customer_legal`(`complex_id`, `registration_number`);
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `tokens` ADD CONSTRAINT `tokens_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `verification_codes` ADD CONSTRAINT `verification_codes_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `business_activities` ADD CONSTRAINT `business_activities_guild_id_fkey` FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `complexes` ADD CONSTRAINT `complexes_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `poses` ADD CONSTRAINT `poses_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `poses` ADD CONSTRAINT `poses_device_id_fkey` FOREIGN KEY (`device_id`) REFERENCES `devices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `poses` ADD CONSTRAINT `poses_provider_id_fkey` FOREIGN KEY (`provider_id`) REFERENCES `providers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `devices` ADD CONSTRAINT `devices_brand_id_fkey` FOREIGN KEY (`brand_id`) REFERENCES `device_brands`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `licenses` ADD CONSTRAINT `licenses_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `licenses` ADD CONSTRAINT `licenses_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `accounts` ADD CONSTRAINT `accounts_user_id_fkey` FOREIGN KEY (`user_id`) REFERENCES `users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `accounts` ADD CONSTRAINT `accounts_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `accounts` ADD CONSTRAINT `accounts_business_id_fkey` FOREIGN KEY (`business_id`) REFERENCES `business_activities`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `accounts` ADD CONSTRAINT `accounts_provider_id_fkey` FOREIGN KEY (`provider_id`) REFERENCES `providers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `accounts` ADD CONSTRAINT `accounts_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
@@ -0,0 +1,31 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `account_id` on the `good_categories` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `account_id` on the `goods` table. All the data in the column will be lost.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `good_categories` DROP COLUMN `account_id`,
|
||||||
|
ADD COLUMN `guild_id` VARCHAR(191) NULL,
|
||||||
|
ADD COLUMN `is_default_guild_good` BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
MODIFY `complex_id` VARCHAR(191) NULL;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `goods` DROP COLUMN `account_id`,
|
||||||
|
ADD COLUMN `guild_id` VARCHAR(191) NULL,
|
||||||
|
ADD COLUMN `is_default_guild_good` BOOLEAN NOT NULL DEFAULT false,
|
||||||
|
MODIFY `base_sale_price` DECIMAL(15, 0) NULL DEFAULT 0.00,
|
||||||
|
MODIFY `complex_id` VARCHAR(191) NULL;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `goods` ADD CONSTRAINT `goods_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `goods` ADD CONSTRAINT `goods_guild_id_fkey` FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `good_categories` ADD CONSTRAINT `good_categories_guild_id_fkey` FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `good_categories` ADD CONSTRAINT `good_categories_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
/*
|
||||||
|
Warnings:
|
||||||
|
|
||||||
|
- You are about to drop the column `tax_id` on the `business_activities` table. All the data in the column will be lost.
|
||||||
|
- You are about to drop the column `pricingModel` on the `sales_invoice_items` table. All the data in the column will be lost.
|
||||||
|
- Added the required column `owner_id` to the `business_activities` table without a default value. This is not possible if the table is not empty.
|
||||||
|
|
||||||
|
*/
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `business_activities` DROP COLUMN `tax_id`,
|
||||||
|
ADD COLUMN `owner_id` VARCHAR(191) NOT NULL;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `complexes` ADD COLUMN `tax_id` VARCHAR(191) NULL;
|
||||||
|
|
||||||
|
-- AlterTable
|
||||||
|
ALTER TABLE `sales_invoice_items` DROP COLUMN `pricingModel`,
|
||||||
|
MODIFY `unit_type` ENUM('COUNT', 'GRAM', 'KILOGRAM', 'MILLILITER', 'LITER', 'METER', 'HOUR') NOT NULL;
|
||||||
|
|
||||||
|
-- AddForeignKey
|
||||||
|
ALTER TABLE `business_activities` ADD CONSTRAINT `business_activities_owner_id_fkey` FOREIGN KEY (`owner_id`) REFERENCES `users`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
model Token {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
token String @unique
|
||||||
|
type TokenType
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
expires_at DateTime
|
||||||
|
|
||||||
|
account_id String
|
||||||
|
account Account @relation(fields: [account_id], references: [id])
|
||||||
|
|
||||||
|
@@unique([type, account_id])
|
||||||
|
@@map("tokens")
|
||||||
|
}
|
||||||
|
|
||||||
|
model VerificationCode {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
code String
|
||||||
|
is_used Boolean @default(false)
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
expires_at DateTime
|
||||||
|
|
||||||
|
account_id String
|
||||||
|
account Account @relation(fields: [account_id], references: [id])
|
||||||
|
|
||||||
|
@@map("verification_codes")
|
||||||
|
}
|
||||||
@@ -0,0 +1,96 @@
|
|||||||
|
model Guild {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
name String
|
||||||
|
code String?
|
||||||
|
|
||||||
|
business_activities BusinessActivity[]
|
||||||
|
goods Good[]
|
||||||
|
good_categories GoodCategory[]
|
||||||
|
|
||||||
|
@@map("guilds")
|
||||||
|
}
|
||||||
|
|
||||||
|
model BusinessActivity {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
name String
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
guild_id String
|
||||||
|
owner_id String
|
||||||
|
|
||||||
|
guild Guild @relation(fields: [guild_id], references: [id])
|
||||||
|
user User @relation(fields: [owner_id], references: [id])
|
||||||
|
|
||||||
|
complexes Complex[]
|
||||||
|
accounts Account[]
|
||||||
|
|
||||||
|
@@map("business_activities")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Complex {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
name String
|
||||||
|
address String?
|
||||||
|
tax_id String?
|
||||||
|
|
||||||
|
business_activity_id String
|
||||||
|
|
||||||
|
business_activity BusinessActivity @relation(fields: [business_activity_id], references: [id])
|
||||||
|
|
||||||
|
pos_list Pos[]
|
||||||
|
goods Good[]
|
||||||
|
good_categories GoodCategory[]
|
||||||
|
|
||||||
|
@@map("complexes")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Pos {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
serial String @unique
|
||||||
|
model String?
|
||||||
|
status POSStatus @default(ACTIVE)
|
||||||
|
pos_type POSType
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
updated_at DateTime @updatedAt()
|
||||||
|
|
||||||
|
complex_id String
|
||||||
|
device_id String
|
||||||
|
provider_id String?
|
||||||
|
|
||||||
|
complex Complex @relation(fields: [complex_id], references: [id])
|
||||||
|
device Device @relation(fields: [device_id], references: [id])
|
||||||
|
provider Provider? @relation(fields: [provider_id], references: [id])
|
||||||
|
|
||||||
|
licenses License[]
|
||||||
|
accounts Account[]
|
||||||
|
|
||||||
|
@@map("poses")
|
||||||
|
}
|
||||||
|
|
||||||
|
// model BusinessAccount {
|
||||||
|
// id String @id @default(uuid())
|
||||||
|
// role BusinessRole
|
||||||
|
// status AccountStatus @default(ACTIVE)
|
||||||
|
// created_at DateTime @default(now())
|
||||||
|
// business_activity_id String
|
||||||
|
// account_id String @unique
|
||||||
|
|
||||||
|
// account Account @relation(fields: [account_id], references: [id])
|
||||||
|
// owned_activities BusinessActivity[] @relation("business_owner")
|
||||||
|
|
||||||
|
// @@unique([business_activity_id, account_id])
|
||||||
|
// @@map("business_accounts")
|
||||||
|
// }
|
||||||
|
|
||||||
|
// model PosAccount {
|
||||||
|
// id String @id @default(uuid())
|
||||||
|
// pos_id String
|
||||||
|
// account_id String
|
||||||
|
// role POSRole
|
||||||
|
// created_at DateTime @default(now())
|
||||||
|
|
||||||
|
// pos Pos @relation(fields: [pos_id], references: [id])
|
||||||
|
// account Account @relation(fields: [account_id], references: [id])
|
||||||
|
|
||||||
|
// @@unique([pos_id, account_id])
|
||||||
|
// @@map("pos_accounts")
|
||||||
|
// }
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
model DeviceBrand {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
name String
|
||||||
|
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
updated_at DateTime @updatedAt()
|
||||||
|
|
||||||
|
devices Device[]
|
||||||
|
|
||||||
|
@@map("device_brands")
|
||||||
|
}
|
||||||
|
|
||||||
|
model Device {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
name String
|
||||||
|
os_version String?
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
updated_at DateTime @updatedAt()
|
||||||
|
brand_id String
|
||||||
|
|
||||||
|
brand DeviceBrand @relation(fields: [brand_id], references: [id])
|
||||||
|
poses Pos[]
|
||||||
|
|
||||||
|
@@map("devices")
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
model License {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
starts_at DateTime
|
||||||
|
expires_at DateTime
|
||||||
|
status LicenseStatus
|
||||||
|
|
||||||
|
pos_id String
|
||||||
|
partner_id String
|
||||||
|
|
||||||
|
pos Pos @relation(fields: [pos_id], references: [id])
|
||||||
|
partner Partner @relation(fields: [partner_id], references: [id])
|
||||||
|
|
||||||
|
@@map("licenses")
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
model Partner {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
name String
|
||||||
|
code String?
|
||||||
|
|
||||||
|
licenses License[]
|
||||||
|
account Account[]
|
||||||
|
|
||||||
|
@@map("partners")
|
||||||
|
}
|
||||||
|
|
||||||
|
// model PartnerAccount {
|
||||||
|
// id String @id @default(uuid())
|
||||||
|
// role PartnerRole
|
||||||
|
// status AccountStatus @default(ACTIVE)
|
||||||
|
// created_at DateTime @default(now())
|
||||||
|
// partner_id String
|
||||||
|
// account_id String @unique
|
||||||
|
|
||||||
|
// partner Partner @relation(fields: [partner_id], references: [id])
|
||||||
|
// account Account @relation(fields: [account_id], references: [id])
|
||||||
|
|
||||||
|
// @@unique([partner_id, account_id])
|
||||||
|
// @@map("partner_accounts")
|
||||||
|
// }
|
||||||
@@ -0,0 +1,72 @@
|
|||||||
|
model User {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
// user_type UserType
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
|
||||||
|
// individual_profile IndividualProfile?
|
||||||
|
// legal_profile LegalProfile?
|
||||||
|
mobile_number String @unique()
|
||||||
|
national_code String? @unique()
|
||||||
|
first_name String
|
||||||
|
last_name String
|
||||||
|
// username String
|
||||||
|
accounts Account[]
|
||||||
|
businessActivities BusinessActivity[]
|
||||||
|
|
||||||
|
@@map("users")
|
||||||
|
}
|
||||||
|
|
||||||
|
// model LegalProfile {
|
||||||
|
// user_id String @id
|
||||||
|
// company_name String
|
||||||
|
// register_no String @unique()
|
||||||
|
// representative_name String?
|
||||||
|
// representative_national_id String?
|
||||||
|
|
||||||
|
// // user User @relation(fields: [user_id], references: [id])
|
||||||
|
|
||||||
|
// @@map("legal_profiles")
|
||||||
|
// }
|
||||||
|
|
||||||
|
// model IndividualProfile {
|
||||||
|
// user_id String @id
|
||||||
|
// national_code String @unique()
|
||||||
|
// first_name String
|
||||||
|
// last_name String
|
||||||
|
// birth_date DateTime?
|
||||||
|
// mobile_number String
|
||||||
|
// // user User @relation(fields: [user_id], references: [id])
|
||||||
|
|
||||||
|
// @@map("individual_profiles")
|
||||||
|
// }
|
||||||
|
|
||||||
|
model Account {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
username String @unique()
|
||||||
|
// first_name String
|
||||||
|
// last_name String
|
||||||
|
type AccountType
|
||||||
|
status AccountStatus
|
||||||
|
password String
|
||||||
|
created_at DateTime @default(now())
|
||||||
|
|
||||||
|
user_id String
|
||||||
|
user User @relation(fields: [user_id], references: [id])
|
||||||
|
|
||||||
|
partner_id String?
|
||||||
|
partner Partner? @relation(fields: [partner_id], references: [id])
|
||||||
|
|
||||||
|
business_id String?
|
||||||
|
business BusinessActivity? @relation(fields: [business_id], references: [id])
|
||||||
|
|
||||||
|
provider_id String?
|
||||||
|
provider Provider? @relation(fields: [provider_id], references: [id])
|
||||||
|
|
||||||
|
pos_id String?
|
||||||
|
pos Pos? @relation(fields: [pos_id], references: [id])
|
||||||
|
|
||||||
|
verification_codes VerificationCode[]
|
||||||
|
tokens Token[]
|
||||||
|
|
||||||
|
@@map("accounts")
|
||||||
|
}
|
||||||
@@ -0,0 +1,25 @@
|
|||||||
|
model Provider {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
name String
|
||||||
|
code String?
|
||||||
|
|
||||||
|
pos_list Pos[]
|
||||||
|
accounts Account[]
|
||||||
|
|
||||||
|
@@map("providers")
|
||||||
|
}
|
||||||
|
|
||||||
|
// model ProviderAccount {
|
||||||
|
// id String @id @default(uuid())
|
||||||
|
// role ProviderRole
|
||||||
|
// status AccountStatus @default(ACTIVE)
|
||||||
|
// created_at DateTime @default(now())
|
||||||
|
// provider_id String
|
||||||
|
// account_id String @unique
|
||||||
|
|
||||||
|
// provider Provider @relation(fields: [provider_id], references: [id])
|
||||||
|
// account Account @relation(fields: [account_id], references: [id])
|
||||||
|
|
||||||
|
// @@unique([provider_id, account_id])
|
||||||
|
// @@map("provider_accounts")
|
||||||
|
// }
|
||||||
@@ -1,40 +0,0 @@
|
|||||||
enum PaymentMethodType {
|
|
||||||
TERMINAL
|
|
||||||
CASH
|
|
||||||
SET_OFF
|
|
||||||
CARD
|
|
||||||
BANK
|
|
||||||
CHECK
|
|
||||||
OTHER
|
|
||||||
}
|
|
||||||
|
|
||||||
enum PurchaseReceiptStatus {
|
|
||||||
UNPAID
|
|
||||||
PARTIALLY_PAID
|
|
||||||
PAID
|
|
||||||
}
|
|
||||||
|
|
||||||
enum SalesInvoiceType {
|
|
||||||
GOOD
|
|
||||||
SERVICE
|
|
||||||
}
|
|
||||||
|
|
||||||
enum UnitType {
|
|
||||||
COUNT
|
|
||||||
GRAM
|
|
||||||
KILOGRAM
|
|
||||||
LITER
|
|
||||||
METER
|
|
||||||
HOUR
|
|
||||||
}
|
|
||||||
|
|
||||||
enum CustomerType {
|
|
||||||
INDIVIDUAL
|
|
||||||
LEGAL
|
|
||||||
UNKNOWN
|
|
||||||
}
|
|
||||||
|
|
||||||
enum SalesInvoiceItemPricingModel {
|
|
||||||
STANDARD
|
|
||||||
GOLD
|
|
||||||
}
|
|
||||||
@@ -1,37 +0,0 @@
|
|||||||
model Good {
|
|
||||||
id String @id @default(uuid())
|
|
||||||
name String @db.VarChar(255)
|
|
||||||
description String? @db.Text
|
|
||||||
sku String @db.VarChar(100)
|
|
||||||
local_sku String? @unique() @db.VarChar(100)
|
|
||||||
barcode String? @unique() @db.VarChar(100)
|
|
||||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deleted_at DateTime? @db.Timestamp(0)
|
|
||||||
category_id String?
|
|
||||||
base_sale_price Decimal @default(0.00) @db.Decimal(15, 0)
|
|
||||||
account_id String
|
|
||||||
complex_id String
|
|
||||||
|
|
||||||
category GoodCategory? @relation(fields: [category_id], references: [id])
|
|
||||||
sales_invoice_items SalesInvoiceItem[]
|
|
||||||
|
|
||||||
@@index([category_id])
|
|
||||||
@@map("goods")
|
|
||||||
}
|
|
||||||
|
|
||||||
model GoodCategory {
|
|
||||||
id String @id @default(uuid())
|
|
||||||
name String @db.VarChar(100)
|
|
||||||
description String? @db.Text
|
|
||||||
image_url String? @db.VarChar(255)
|
|
||||||
account_id String
|
|
||||||
complex_id String
|
|
||||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
|
||||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
|
||||||
deleted_at DateTime? @db.Timestamp(0)
|
|
||||||
|
|
||||||
goods Good[]
|
|
||||||
|
|
||||||
@@map("good_categories")
|
|
||||||
}
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
model Device {
|
model UserDevices {
|
||||||
account_id String? @db.VarChar(255)
|
account_id String? @db.VarChar(255)
|
||||||
app_version String @db.VarChar(20)
|
app_version String @db.VarChar(20)
|
||||||
build_number String @db.VarChar(20)
|
build_number String @db.VarChar(20)
|
||||||
@@ -14,5 +14,5 @@ model Device {
|
|||||||
browser_name String? @db.VarChar(100)
|
browser_name String? @db.VarChar(100)
|
||||||
fcm_token String? @db.VarChar(100)
|
fcm_token String? @db.VarChar(100)
|
||||||
|
|
||||||
@@map("devices")
|
@@map("user_devices")
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,119 @@
|
|||||||
|
enum PaymentMethodType {
|
||||||
|
TERMINAL
|
||||||
|
CASH
|
||||||
|
SET_OFF
|
||||||
|
CARD
|
||||||
|
BANK
|
||||||
|
CHECK
|
||||||
|
OTHER
|
||||||
|
}
|
||||||
|
|
||||||
|
enum PurchaseReceiptStatus {
|
||||||
|
UNPAID
|
||||||
|
PARTIALLY_PAID
|
||||||
|
PAID
|
||||||
|
}
|
||||||
|
|
||||||
|
enum SalesInvoiceType {
|
||||||
|
GOOD
|
||||||
|
SERVICE
|
||||||
|
}
|
||||||
|
|
||||||
|
enum UnitType {
|
||||||
|
COUNT
|
||||||
|
GRAM
|
||||||
|
KILOGRAM
|
||||||
|
MILLILITER
|
||||||
|
LITER
|
||||||
|
METER
|
||||||
|
HOUR
|
||||||
|
}
|
||||||
|
|
||||||
|
enum GoodPricingModel {
|
||||||
|
STANDARD
|
||||||
|
GOLD
|
||||||
|
}
|
||||||
|
|
||||||
|
enum CustomerType {
|
||||||
|
INDIVIDUAL
|
||||||
|
LEGAL
|
||||||
|
UNKNOWN
|
||||||
|
}
|
||||||
|
|
||||||
|
enum UserStatus {
|
||||||
|
ACTIVE
|
||||||
|
INACTIVE
|
||||||
|
}
|
||||||
|
|
||||||
|
enum AccountRole {
|
||||||
|
OWNER
|
||||||
|
OPERATOR
|
||||||
|
ACCOUNTANT
|
||||||
|
}
|
||||||
|
|
||||||
|
enum AccountStatus {
|
||||||
|
ACTIVE
|
||||||
|
SUSPENDED
|
||||||
|
}
|
||||||
|
|
||||||
|
enum POSStatus {
|
||||||
|
ACTIVE
|
||||||
|
DISABLED
|
||||||
|
}
|
||||||
|
|
||||||
|
enum POSRole {
|
||||||
|
MANAGER
|
||||||
|
OPERATOR
|
||||||
|
VIEWER
|
||||||
|
}
|
||||||
|
|
||||||
|
enum LicenseType {
|
||||||
|
BASIC
|
||||||
|
PRO
|
||||||
|
ENTERPRISE
|
||||||
|
}
|
||||||
|
|
||||||
|
enum LicenseStatus {
|
||||||
|
ACTIVE
|
||||||
|
EXPIRED
|
||||||
|
SUSPENDED
|
||||||
|
}
|
||||||
|
|
||||||
|
enum POSType {
|
||||||
|
PSP
|
||||||
|
MOBILE
|
||||||
|
API
|
||||||
|
}
|
||||||
|
|
||||||
|
enum UserType {
|
||||||
|
LEGAL
|
||||||
|
INDIVIDUAL
|
||||||
|
}
|
||||||
|
|
||||||
|
enum AccountType {
|
||||||
|
PARTNER
|
||||||
|
BUSINESS
|
||||||
|
ADMIN
|
||||||
|
PROVIDER
|
||||||
|
POS
|
||||||
|
}
|
||||||
|
|
||||||
|
enum PartnerRole {
|
||||||
|
ADMIN
|
||||||
|
OPERATOR
|
||||||
|
}
|
||||||
|
|
||||||
|
enum BusinessRole {
|
||||||
|
ADMIN
|
||||||
|
OPERATOR
|
||||||
|
}
|
||||||
|
|
||||||
|
enum ProviderRole {
|
||||||
|
ADMIN
|
||||||
|
OPERATOR
|
||||||
|
}
|
||||||
|
|
||||||
|
enum TokenType {
|
||||||
|
ACCESS
|
||||||
|
REFRESH
|
||||||
|
}
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
model Good {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
name String @db.VarChar(255)
|
||||||
|
description String? @db.Text
|
||||||
|
sku String @db.VarChar(100)
|
||||||
|
local_sku String? @unique() @db.VarChar(100)
|
||||||
|
barcode String? @unique() @db.VarChar(100)
|
||||||
|
base_sale_price Decimal? @default(0.00) @db.Decimal(15, 0)
|
||||||
|
is_default_guild_good Boolean @default(false)
|
||||||
|
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deleted_at DateTime? @db.Timestamp(0)
|
||||||
|
|
||||||
|
complex_id String?
|
||||||
|
category_id String?
|
||||||
|
guild_id String?
|
||||||
|
|
||||||
|
category GoodCategory? @relation(fields: [category_id], references: [id])
|
||||||
|
complex Complex? @relation(fields: [complex_id], references: [id])
|
||||||
|
guild Guild? @relation(fields: [guild_id], references: [id])
|
||||||
|
sales_invoice_items SalesInvoiceItem[]
|
||||||
|
|
||||||
|
@@index([category_id])
|
||||||
|
@@map("goods")
|
||||||
|
}
|
||||||
|
|
||||||
|
model GoodCategory {
|
||||||
|
id String @id @default(uuid())
|
||||||
|
name String @db.VarChar(100)
|
||||||
|
description String? @db.Text
|
||||||
|
image_url String? @db.VarChar(255)
|
||||||
|
complex_id String?
|
||||||
|
is_default_guild_good Boolean @default(false)
|
||||||
|
guild_id String?
|
||||||
|
|
||||||
|
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||||
|
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||||
|
deleted_at DateTime? @db.Timestamp(0)
|
||||||
|
|
||||||
|
goods Good[]
|
||||||
|
guild Guild? @relation(fields: [guild_id], references: [id])
|
||||||
|
complex Complex? @relation(fields: [complex_id], references: [id])
|
||||||
|
|
||||||
|
@@map("good_categories")
|
||||||
|
}
|
||||||
@@ -28,7 +28,6 @@ model SalesInvoiceItem {
|
|||||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||||
discount Decimal @default(0.00) @db.Decimal(15, 2)
|
discount Decimal @default(0.00) @db.Decimal(15, 2)
|
||||||
notes String? @db.Text
|
notes String? @db.Text
|
||||||
pricingModel SalesInvoiceItemPricingModel @default(STANDARD)
|
|
||||||
|
|
||||||
invoice_id String
|
invoice_id String
|
||||||
good_id String?
|
good_id String?
|
||||||
+20
-334
@@ -1,340 +1,26 @@
|
|||||||
|
import { PasswordUtil } from '@/common/utils/password.util'
|
||||||
import { prisma } from '../src/lib/prisma'
|
import { prisma } from '../src/lib/prisma'
|
||||||
|
|
||||||
async function main() {
|
async function main() {
|
||||||
// if ((await prisma.role.count()) === 0) {
|
const password = await PasswordUtil.hash('123456')
|
||||||
// await prisma.role.upsert({
|
const adminUser = await prisma.account.upsert({
|
||||||
// where: { id: 0, name: 'Admin' },
|
where: { username: 'superAdmin' },
|
||||||
// update: {},
|
update: {},
|
||||||
// create: {
|
create: {
|
||||||
// name: 'Admin',
|
username: 'superAdmin',
|
||||||
// },
|
password,
|
||||||
// })
|
type: 'ADMIN',
|
||||||
// }
|
status: 'ACTIVE',
|
||||||
// if ((await prisma.user.count()) === 0) {
|
user: {
|
||||||
// const adminRole = await prisma.role.findUnique({ where: { name: 'Admin' } })
|
create: {
|
||||||
// if (!adminRole) {
|
first_name: 'عباس',
|
||||||
// return
|
last_name: 'حسنی',
|
||||||
// }
|
national_code: '0016022289',
|
||||||
// await prisma.user.upsert({
|
mobile_number: '09120258156',
|
||||||
// where: { id: 1, firstName: 'عباس', lastName: 'حسنی' },
|
},
|
||||||
// update: {},
|
},
|
||||||
// create: {
|
},
|
||||||
// firstName: 'عباس',
|
})
|
||||||
// lastName: 'حسنی',
|
|
||||||
// roleId: adminRole.id,
|
|
||||||
// mobileNumber: '09120258156',
|
|
||||||
// password: '12345678',
|
|
||||||
// },
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if ((await prisma.inventory.count()) === 0) {
|
|
||||||
// await prisma.inventory.createMany({
|
|
||||||
// data: [
|
|
||||||
// { name: 'انبار مرکزی', location: 'تهران', isPointOfSale: false, isActive: true },
|
|
||||||
// {
|
|
||||||
// name: 'فروشگاه حضوری',
|
|
||||||
// location: 'مرکز شهر',
|
|
||||||
// isPointOfSale: true,
|
|
||||||
// isActive: true,
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'فروشگاه اینترنتی',
|
|
||||||
// location: 'مرکز شهر',
|
|
||||||
// isPointOfSale: true,
|
|
||||||
// isActive: true,
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if ((await prisma.productCategory.count()) === 0) {
|
|
||||||
// await prisma.productCategory.createMany({
|
|
||||||
// data: Array.from({ length: 10 }, (_, i) => ({ name: `دستهی ${i + 1}` })),
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if ((await prisma.productBrand.count()) === 0) {
|
|
||||||
// await prisma.productBrand.createMany({
|
|
||||||
// data: Array.from({ length: 10 }, (_, i) => ({ name: `برند ${i + 1}` })),
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if ((await prisma.supplier.count()) === 0) {
|
|
||||||
// await prisma.supplier.createMany({
|
|
||||||
// data: Array.from({ length: 9 }, (_, i) => ({
|
|
||||||
// firstName: 'تامین',
|
|
||||||
// lastName: `کننده ${i + 1}`,
|
|
||||||
// mobileNumber: `0912000000${i + 1}`,
|
|
||||||
// email: `supplier${i + 1}@example.com`,
|
|
||||||
// })),
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if ((await prisma.customer.count()) === 0) {
|
|
||||||
// await prisma.customer.createMany({
|
|
||||||
// data: Array.from({ length: 5 }, (_, i) => ({
|
|
||||||
// firstName: 'مشتری',
|
|
||||||
// lastName: `${i + 1}`,
|
|
||||||
// mobileNumber: `0913000000${i + 1}`,
|
|
||||||
// email: `customer${i + 1}@example.com`,
|
|
||||||
// })),
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if ((await prisma.product.count()) === 0) {
|
|
||||||
// const categories = await prisma.productCategory.findMany()
|
|
||||||
// const brands = await prisma.productBrand.findMany()
|
|
||||||
// await prisma.product.createMany({
|
|
||||||
// data: Array.from({ length: 20 }, (_, i) => ({
|
|
||||||
// name: `کالای ${i + 1}`,
|
|
||||||
// sku: `SKU-${1000 + i + 1}`,
|
|
||||||
// salePrice: parseInt((Math.random() * (100 - 10) + 10).toString()) * 10000,
|
|
||||||
// categoryId: categories[i % categories.length].id,
|
|
||||||
// brandId: brands[i % brands.length].id,
|
|
||||||
// })),
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if ((await prisma.bank.count()) === 0) {
|
|
||||||
// await prisma.bank.createMany({
|
|
||||||
// data: [
|
|
||||||
// {
|
|
||||||
// name: 'آینده',
|
|
||||||
// shortName: 'ain',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'ایران زمین',
|
|
||||||
// shortName: 'irz',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'اقتصاد نوین',
|
|
||||||
// shortName: 'eqn',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'انصار',
|
|
||||||
// shortName: 'ans',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'پاسارگاد',
|
|
||||||
// shortName: 'pas',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'پارسیان',
|
|
||||||
// shortName: 'prs',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'پست بانک ایران',
|
|
||||||
// shortName: 'pbi',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'تجارت',
|
|
||||||
// shortName: 'tej',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'توسعه تعاون',
|
|
||||||
// shortName: 'tav',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'توسعه صادرات',
|
|
||||||
// shortName: 'tes',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'حکمت ایرانیان',
|
|
||||||
// shortName: 'hek',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'رفاه کارگران',
|
|
||||||
// shortName: 'ref',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'قرضالحسنه رسالت',
|
|
||||||
// shortName: 'res',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'قرضالحسنه مهر ایران',
|
|
||||||
// shortName: 'meh',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'قوامین',
|
|
||||||
// shortName: 'qva',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'کشاورزی',
|
|
||||||
// shortName: 'kes',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'کوثر',
|
|
||||||
// shortName: 'kos',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'دی',
|
|
||||||
// shortName: 'diy',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'صنعت و معدن',
|
|
||||||
// shortName: 'san',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'سینا',
|
|
||||||
// shortName: 'sin',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'سرمایه',
|
|
||||||
// shortName: 'sar',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'سپه',
|
|
||||||
// shortName: 'sep',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'شهر',
|
|
||||||
// shortName: 'shr',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'صادرات ایران',
|
|
||||||
// shortName: 'sir',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'سامان',
|
|
||||||
// shortName: 'sam',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'مرکزی',
|
|
||||||
// shortName: 'mar',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'مسکن',
|
|
||||||
// shortName: 'mas',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'ملت',
|
|
||||||
// shortName: 'mel',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'ملی ایران',
|
|
||||||
// shortName: 'mli',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'مهر اقتصاد',
|
|
||||||
// shortName: 'meg',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'کارآفرین',
|
|
||||||
// shortName: 'kar',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// name: 'تات',
|
|
||||||
// shortName: 'tat',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if ((await prisma.bankBranch.count()) === 0) {
|
|
||||||
// await prisma.bankBranch.createMany({
|
|
||||||
// data: [
|
|
||||||
// {
|
|
||||||
// bankId: 1,
|
|
||||||
// name: 'شعبه مرکزی',
|
|
||||||
// code: '001',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// bankId: 2,
|
|
||||||
// name: 'شعبه مرکزی',
|
|
||||||
// code: '002',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// bankId: 1,
|
|
||||||
// name: 'شعبه ونک',
|
|
||||||
// code: '003',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// if ((await prisma.bankAccount.count()) === 0) {
|
|
||||||
// await prisma.bankAccount.createMany({
|
|
||||||
// data: [
|
|
||||||
// {
|
|
||||||
// branchId: 1,
|
|
||||||
// accountNumber: '1234567890',
|
|
||||||
// name: 'حساب اصلی آینده',
|
|
||||||
// iban: 'IR000123456789012345678901',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// branchId: 2,
|
|
||||||
// accountNumber: '0987654321',
|
|
||||||
// name: 'حساب اصلی ایران زمین',
|
|
||||||
// iban: 'IR000987654321098765432109',
|
|
||||||
// },
|
|
||||||
// {
|
|
||||||
// branchId: 3,
|
|
||||||
// accountNumber: '1122334455',
|
|
||||||
// name: 'حساب ونک آینده',
|
|
||||||
// iban: 'IR000112233445566778899001',
|
|
||||||
// },
|
|
||||||
// ],
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// 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
|
|
||||||
// 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
|
|
||||||
// const inventories = await prisma.inventory.findMany()
|
|
||||||
// const products = await prisma.product.findMany({ take: 5 }) // select 5 products for demo
|
|
||||||
// const supplier = await prisma.supplier.findFirst()
|
|
||||||
// const customers = await prisma.customer.findMany({ take: 2 })
|
|
||||||
// if (supplier && customers.length > 0) {
|
|
||||||
// PurchaseReceiptsService.prototype.create({
|
|
||||||
// code: '123123',
|
|
||||||
// inventoryId: inventories[0].id,
|
|
||||||
// supplierId: supplier.id,
|
|
||||||
// paidAmount: 0,
|
|
||||||
// totalAmount: products.reduce((acc, a) => (acc += Number(a.salePrice) * 10), 0),
|
|
||||||
// items: products.map(product => ({
|
|
||||||
// productId: product.id,
|
|
||||||
// count: 10,
|
|
||||||
// unitPrice: Number(product.salePrice),
|
|
||||||
// total: 10 * Number(product.salePrice),
|
|
||||||
// })),
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
main()
|
main()
|
||||||
|
|||||||
+7
-13
@@ -1,16 +1,13 @@
|
|||||||
import { Module } from '@nestjs/common'
|
import { Module } from '@nestjs/common'
|
||||||
import { AppController } from './app.controller'
|
import { AppController } from './app.controller'
|
||||||
import { AppService } from './app.service'
|
import { AppService } from './app.service'
|
||||||
|
import { AdminModule } from './modules/admin/admin.module'
|
||||||
import { AuthModule } from './modules/auth/auth.module'
|
import { AuthModule } from './modules/auth/auth.module'
|
||||||
import { ConfigModule } from './modules/config/config.module'
|
|
||||||
import { CustomersModule } from './modules/customers/customers.module'
|
|
||||||
import { EnumsModule } from './modules/enums/enums.module'
|
import { EnumsModule } from './modules/enums/enums.module'
|
||||||
import { GoodCategoriesModule } from './modules/good-categories/good-categories.module'
|
import { PosModule } from './modules/pos/pos.module'
|
||||||
import { GoodsModule } from './modules/goods/goods.module'
|
import { SalesInvoiceItemsModule } from './modules/pos/sales-invoices/sales-invoice-items/sales-invoice-items.module'
|
||||||
|
import { SalesInvoicePaymentsModule } from './modules/pos/sales-invoices/sales-invoice-payments/sales-invoice-payments.module'
|
||||||
import { ProfileModule } from './modules/profile/profile.module'
|
import { ProfileModule } from './modules/profile/profile.module'
|
||||||
import { SalesInvoiceItemsModule } from './modules/sales-invoice-items/sales-invoice-items.module'
|
|
||||||
import { SalesInvoicePaymentsModule } from './modules/sales-invoice-payments/sales-invoice-payments.module'
|
|
||||||
import { SalesInvoicesModule } from './modules/sales-invoices/sales-invoices.module'
|
|
||||||
import { ServiceCategoriesModule } from './modules/service-categories/service-categories.module'
|
import { ServiceCategoriesModule } from './modules/service-categories/service-categories.module'
|
||||||
import { ServicesModule } from './modules/services/services.module'
|
import { ServicesModule } from './modules/services/services.module'
|
||||||
import { TriggerLogsModule } from './modules/trigger-logs/trigger-logs.module'
|
import { TriggerLogsModule } from './modules/trigger-logs/trigger-logs.module'
|
||||||
@@ -20,20 +17,17 @@ import { PrismaModule } from './prisma/prisma.module'
|
|||||||
@Module({
|
@Module({
|
||||||
imports: [
|
imports: [
|
||||||
PrismaModule,
|
PrismaModule,
|
||||||
|
EnumsModule,
|
||||||
|
AdminModule,
|
||||||
|
PosModule,
|
||||||
AuthModule,
|
AuthModule,
|
||||||
CustomersModule,
|
|
||||||
GoodCategoriesModule,
|
|
||||||
GoodsModule,
|
|
||||||
SalesInvoiceItemsModule,
|
SalesInvoiceItemsModule,
|
||||||
SalesInvoicePaymentsModule,
|
SalesInvoicePaymentsModule,
|
||||||
SalesInvoicesModule,
|
|
||||||
ServiceCategoriesModule,
|
ServiceCategoriesModule,
|
||||||
ServicesModule,
|
ServicesModule,
|
||||||
TriggerLogsModule,
|
TriggerLogsModule,
|
||||||
UploadersModule,
|
UploadersModule,
|
||||||
ConfigModule,
|
|
||||||
ProfileModule,
|
ProfileModule,
|
||||||
EnumsModule,
|
|
||||||
],
|
],
|
||||||
controllers: [AppController],
|
controllers: [AppController],
|
||||||
providers: [AppService],
|
providers: [AppService],
|
||||||
|
|||||||
@@ -0,0 +1,11 @@
|
|||||||
|
export default {
|
||||||
|
COUNT: 'تعداد',
|
||||||
|
GRAM: 'گرم',
|
||||||
|
KILO_GRAM: 'کیلوگرم',
|
||||||
|
LITER: 'لیتر',
|
||||||
|
MILLILITER: 'میلیلیتر',
|
||||||
|
STANDARD: 'استاندارد',
|
||||||
|
GOLD: 'طلا',
|
||||||
|
ACTIVE: 'فعال',
|
||||||
|
SUSPENDED: 'غیرفعال',
|
||||||
|
}
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
import enums from './enums'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
enums,
|
||||||
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
// src/common/database/transaction.helper.ts
|
// src/common/database/transaction.helper.ts
|
||||||
import { PrismaService } from '../../prisma/prisma.service'
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
|
|
||||||
export async function withTransaction<T>(
|
export async function withTransaction<T>(
|
||||||
prisma: PrismaService,
|
prisma: PrismaService,
|
||||||
|
|||||||
+10
-10
@@ -1,18 +1,18 @@
|
|||||||
export enum TokenType {
|
export enum TokenType {
|
||||||
ACCESS,
|
ACCESS = 'ACCESS',
|
||||||
REFRESH,
|
REFRESH = 'REFRESH',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum AccountType {
|
export enum AccountType {
|
||||||
PARTNER,
|
PARTNER = 'PARTNER',
|
||||||
BUSINESS,
|
BUSINESS = 'BUSINESS',
|
||||||
ADMIN,
|
ADMIN = 'ADMIN',
|
||||||
PROVIDER,
|
PROVIDER = 'PROVIDER',
|
||||||
POS,
|
POS = 'POS',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum GoldKarat {
|
export enum GoldKarat {
|
||||||
KARAT_18 = 18,
|
KARAT_18 = '18',
|
||||||
KARAT_21 = 21,
|
KARAT_21 = '21',
|
||||||
KARAT_24 = 24,
|
KARAT_24 = '24',
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import {
|
|||||||
HttpStatus,
|
HttpStatus,
|
||||||
} from '@nestjs/common'
|
} from '@nestjs/common'
|
||||||
import type { Request, Response } from 'express'
|
import type { Request, Response } from 'express'
|
||||||
import { Prisma } from '../../generated/prisma/client'
|
import { Prisma } from 'generated/prisma/client'
|
||||||
|
|
||||||
@Catch()
|
@Catch()
|
||||||
export class PrismaExceptionFilter implements ExceptionFilter {
|
export class PrismaExceptionFilter implements ExceptionFilter {
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
import {
|
||||||
|
CanActivate,
|
||||||
|
ExecutionContext,
|
||||||
|
Injectable,
|
||||||
|
UnauthorizedException,
|
||||||
|
} from '@nestjs/common'
|
||||||
|
import { Reflector } from '@nestjs/core'
|
||||||
|
import { JwtService } from '@nestjs/jwt'
|
||||||
|
import { IS_PUBLIC_KEY } from '../decorators/public.decorator'
|
||||||
|
import { IWithJWTPayloadRequest } from '../models/token-model'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class JwtAuthGuard implements CanActivate {
|
||||||
|
constructor(
|
||||||
|
private jwt: JwtService,
|
||||||
|
private reflector: Reflector,
|
||||||
|
) {}
|
||||||
|
|
||||||
|
async canActivate(context: ExecutionContext): Promise<boolean> {
|
||||||
|
const isPublic = this.reflector.getAllAndOverride<boolean>(IS_PUBLIC_KEY, [
|
||||||
|
context.getHandler(),
|
||||||
|
context.getClass(),
|
||||||
|
])
|
||||||
|
if (isPublic) return true
|
||||||
|
|
||||||
|
const req = context.switchToHttp().getRequest<IWithJWTPayloadRequest>()
|
||||||
|
|
||||||
|
let token: string | undefined = req.cookies?.accessToken
|
||||||
|
if (!token) {
|
||||||
|
const authHeader = (req.headers.authorization || req.headers.Authorization) as
|
||||||
|
| string
|
||||||
|
| undefined
|
||||||
|
if (authHeader && authHeader.startsWith('Bearer ')) {
|
||||||
|
token = authHeader.slice(7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!token) throw new UnauthorizedException('Missing access token')
|
||||||
|
|
||||||
|
try {
|
||||||
|
const payload = this.jwt.verify(token, {
|
||||||
|
secret: process.env.JWT_SECRET || 'secret',
|
||||||
|
})
|
||||||
|
|
||||||
|
if (payload.type !== 'POS')
|
||||||
|
throw new UnauthorizedException('Invalid or expired token')
|
||||||
|
|
||||||
|
// Set the typed dataPayload to the request
|
||||||
|
req.dataPayload = payload
|
||||||
|
|
||||||
|
return true
|
||||||
|
} catch (err) {
|
||||||
|
console.log(err)
|
||||||
|
throw new UnauthorizedException('Invalid or expired token')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -6,8 +6,8 @@ import {
|
|||||||
} from '@nestjs/common'
|
} from '@nestjs/common'
|
||||||
import { Reflector } from '@nestjs/core'
|
import { Reflector } from '@nestjs/core'
|
||||||
import { JwtService } from '@nestjs/jwt'
|
import { JwtService } from '@nestjs/jwt'
|
||||||
import { IS_PUBLIC_KEY } from '../../common/decorators/public.decorator'
|
import { IS_PUBLIC_KEY } from '../decorators/public.decorator'
|
||||||
import { IWithJWTPayloadRequest } from '../../common/models/token-model'
|
import { IWithJWTPayloadRequest } from '../models/token-model'
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class JwtAuthGuard implements CanActivate {
|
export class JwtAuthGuard implements CanActivate {
|
||||||
@@ -17,6 +17,8 @@ export class JwtAuthGuard implements CanActivate {
|
|||||||
) {}
|
) {}
|
||||||
|
|
||||||
async canActivate(context: ExecutionContext): Promise<boolean> {
|
async canActivate(context: ExecutionContext): Promise<boolean> {
|
||||||
|
console.log('asd')
|
||||||
|
|
||||||
const isPublic = this.reflector.getAllAndOverride<boolean>(IS_PUBLIC_KEY, [
|
const isPublic = this.reflector.getAllAndOverride<boolean>(IS_PUBLIC_KEY, [
|
||||||
context.getHandler(),
|
context.getHandler(),
|
||||||
context.getClass(),
|
context.getClass(),
|
||||||
@@ -42,8 +44,8 @@ export class JwtAuthGuard implements CanActivate {
|
|||||||
secret: process.env.JWT_SECRET || 'secret',
|
secret: process.env.JWT_SECRET || 'secret',
|
||||||
})
|
})
|
||||||
|
|
||||||
if (payload.type !== 'POS')
|
// if (payload.type !== 'POS')
|
||||||
throw new UnauthorizedException('Invalid or expired token')
|
// throw new UnauthorizedException('Invalid or expired token')
|
||||||
|
|
||||||
// Set the typed dataPayload to the request
|
// Set the typed dataPayload to the request
|
||||||
req.dataPayload = payload
|
req.dataPayload = payload
|
||||||
@@ -76,12 +76,12 @@ export class ResponseMappingInterceptor implements NestInterceptor {
|
|||||||
break
|
break
|
||||||
case 'list':
|
case 'list':
|
||||||
payload = Array.isArray(wrapped.items) ? wrapped.items : []
|
payload = Array.isArray(wrapped.items) ? wrapped.items : []
|
||||||
meta = {
|
// meta = {
|
||||||
totalRecords: payload.length,
|
// totalRecords: payload.length,
|
||||||
totalPages: 1,
|
// totalPages: 1,
|
||||||
page: 1,
|
// page: 1,
|
||||||
perPage: payload.length,
|
// perPage: payload.length,
|
||||||
}
|
// }
|
||||||
break
|
break
|
||||||
case 'paginate': {
|
case 'paginate': {
|
||||||
const items = Array.isArray(wrapped.items) ? wrapped.items : []
|
const items = Array.isArray(wrapped.items) ? wrapped.items : []
|
||||||
@@ -193,7 +193,7 @@ export class ResponseMappingInterceptor implements NestInterceptor {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (meta)
|
if (meta || ['list', 'paginate'].includes((data as any).__mapped))
|
||||||
return {
|
return {
|
||||||
data: data.items,
|
data: data.items,
|
||||||
meta,
|
meta,
|
||||||
|
|||||||
@@ -5,10 +5,17 @@
|
|||||||
* the global `ResponseMappingInterceptor` understands and normalizes.
|
* the global `ResponseMappingInterceptor` understands and normalizes.
|
||||||
*/
|
*/
|
||||||
export type MapperWrapper<T> =
|
export type MapperWrapper<T> =
|
||||||
| { __mapped: 'create' | 'update' | 'single' | 'delete'; data: T }
|
| { __mapped: 'create' | 'update' | 'single'; data: T }
|
||||||
| { __mapped: 'list'; items: T[] }
|
| { __mapped: 'list'; items: T[] }
|
||||||
| { __mapped: 'paginate'; items: T[]; total: number; page?: number; perPage?: number }
|
| { __mapped: 'paginate'; items: T[]; count: number; page?: number; pageSize?: number }
|
||||||
| { __mapped: 'sequelize'; rows: T[]; count: number; page?: number; perPage?: number }
|
| { __mapped: 'sequelize'; rows: T[]; count: number; page?: number; perPage?: number }
|
||||||
|
| { __mapped: 'delete' }
|
||||||
|
|
||||||
|
interface IPaginateMeta {
|
||||||
|
count: number
|
||||||
|
page?: number
|
||||||
|
pageSize?: number
|
||||||
|
}
|
||||||
|
|
||||||
export const ResponseMapper = {
|
export const ResponseMapper = {
|
||||||
create<T>(item: T): MapperWrapper<T> {
|
create<T>(item: T): MapperWrapper<T> {
|
||||||
@@ -23,20 +30,20 @@ export const ResponseMapper = {
|
|||||||
return { __mapped: 'single', data: item }
|
return { __mapped: 'single', data: item }
|
||||||
},
|
},
|
||||||
|
|
||||||
delete<T>(item: T): MapperWrapper<T> {
|
delete(): MapperWrapper<boolean> {
|
||||||
return { __mapped: 'delete', data: item }
|
return { __mapped: 'delete' }
|
||||||
},
|
},
|
||||||
|
|
||||||
list<T>(items: T[]): MapperWrapper<T> {
|
list<T>(items: T[]): MapperWrapper<T> {
|
||||||
return { __mapped: 'list', items }
|
return { __mapped: 'list', items }
|
||||||
},
|
},
|
||||||
|
|
||||||
paginate<T>(items: T[], total: number, page = 1, perPage = items.length) {
|
paginate<T>(items: T[], { count, page = 1, pageSize: perPage }: IPaginateMeta) {
|
||||||
return { __mapped: 'paginate', items, total, page, perPage }
|
return { __mapped: 'paginate', items, count, page, perPage }
|
||||||
},
|
},
|
||||||
|
|
||||||
sequelizePaginate<T>(rows: T[], count: number, page = 1, perPage = rows.length) {
|
sequelizePaginate<T>(rows: T[], count: number, page = 1, pageSize = rows.length) {
|
||||||
return { __mapped: 'sequelize', rows, count, page, perPage }
|
return { __mapped: 'sequelize', rows, count, page, pageSize }
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,30 @@
|
|||||||
|
import { UnauthorizedException } from '@nestjs/common'
|
||||||
|
import { JwtService } from '@nestjs/jwt'
|
||||||
|
import { Request } from 'express'
|
||||||
|
import { AccessTokenPayload } from 'modules/auth/models'
|
||||||
|
|
||||||
|
export function getAccountIdFromJwt(req: Request, jwtService: JwtService): string | null {
|
||||||
|
// Try to get token from Authorization header
|
||||||
|
|
||||||
|
let token = req.cookies?.accessToken
|
||||||
|
|
||||||
|
if (!token) {
|
||||||
|
const authHeader = (req.headers.authorization || req.headers.Authorization) as
|
||||||
|
| string
|
||||||
|
| undefined
|
||||||
|
if (authHeader && authHeader.startsWith('Bearer ')) {
|
||||||
|
token = authHeader.slice(7)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (!token) throw new UnauthorizedException('Missing accessToken cookie')
|
||||||
|
|
||||||
|
// const token = authHeader.replace('Bearer ', '')
|
||||||
|
try {
|
||||||
|
const payload = jwtService.decode(token) as AccessTokenPayload
|
||||||
|
console.log(payload)
|
||||||
|
|
||||||
|
return payload?.account_id || null
|
||||||
|
} catch {
|
||||||
|
return null
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import * as bcrypt from 'bcrypt'
|
||||||
|
|
||||||
|
export class PasswordUtil {
|
||||||
|
static async hash(password: string, saltRounds = 10): Promise<string> {
|
||||||
|
return bcrypt.hash(password, saltRounds)
|
||||||
|
}
|
||||||
|
|
||||||
|
static async compare(password: string, hashedPassword: string): Promise<boolean> {
|
||||||
|
return bcrypt.compare(password, hashedPassword)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -17,6 +17,81 @@ import * as Prisma from './internal/prismaNamespaceBrowser.js'
|
|||||||
export { Prisma }
|
export { Prisma }
|
||||||
export * as $Enums from './enums.js'
|
export * as $Enums from './enums.js'
|
||||||
export * from './enums.js';
|
export * from './enums.js';
|
||||||
|
/**
|
||||||
|
* Model Token
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Token = Prisma.TokenModel
|
||||||
|
/**
|
||||||
|
* Model VerificationCode
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type VerificationCode = Prisma.VerificationCodeModel
|
||||||
|
/**
|
||||||
|
* Model Guild
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Guild = Prisma.GuildModel
|
||||||
|
/**
|
||||||
|
* Model BusinessActivity
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BusinessActivity = Prisma.BusinessActivityModel
|
||||||
|
/**
|
||||||
|
* Model Complex
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Complex = Prisma.ComplexModel
|
||||||
|
/**
|
||||||
|
* Model Pos
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Pos = Prisma.PosModel
|
||||||
|
/**
|
||||||
|
* Model DeviceBrand
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type DeviceBrand = Prisma.DeviceBrandModel
|
||||||
|
/**
|
||||||
|
* Model Device
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Device = Prisma.DeviceModel
|
||||||
|
/**
|
||||||
|
* Model License
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type License = Prisma.LicenseModel
|
||||||
|
/**
|
||||||
|
* Model Partner
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Partner = Prisma.PartnerModel
|
||||||
|
/**
|
||||||
|
* Model User
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type User = Prisma.UserModel
|
||||||
|
/**
|
||||||
|
* Model Account
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Account = Prisma.AccountModel
|
||||||
|
/**
|
||||||
|
* Model Provider
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Provider = Prisma.ProviderModel
|
||||||
|
/**
|
||||||
|
* Model TriggerLog
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type TriggerLog = Prisma.TriggerLogModel
|
||||||
|
/**
|
||||||
|
* Model UserDevices
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type UserDevices = Prisma.UserDevicesModel
|
||||||
/**
|
/**
|
||||||
* Model Customer
|
* Model Customer
|
||||||
*
|
*
|
||||||
@@ -32,11 +107,6 @@ export type CustomerIndividual = Prisma.CustomerIndividualModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type CustomerLegal = Prisma.CustomerLegalModel
|
export type CustomerLegal = Prisma.CustomerLegalModel
|
||||||
/**
|
|
||||||
* Model Device
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Device = Prisma.DeviceModel
|
|
||||||
/**
|
/**
|
||||||
* Model Good
|
* Model Good
|
||||||
*
|
*
|
||||||
@@ -47,11 +117,6 @@ export type Good = Prisma.GoodModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type GoodCategory = Prisma.GoodCategoryModel
|
export type GoodCategory = Prisma.GoodCategoryModel
|
||||||
/**
|
|
||||||
* Model TriggerLog
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type TriggerLog = Prisma.TriggerLogModel
|
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoice
|
* Model SalesInvoice
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -27,8 +27,8 @@ export * from "./enums.js"
|
|||||||
* @example
|
* @example
|
||||||
* ```
|
* ```
|
||||||
* const prisma = new PrismaClient()
|
* const prisma = new PrismaClient()
|
||||||
* // Fetch zero or more Customers
|
* // Fetch zero or more Tokens
|
||||||
* const customers = await prisma.customer.findMany()
|
* const tokens = await prisma.token.findMany()
|
||||||
* ```
|
* ```
|
||||||
*
|
*
|
||||||
* Read more in our [docs](https://pris.ly/d/client).
|
* Read more in our [docs](https://pris.ly/d/client).
|
||||||
@@ -37,6 +37,81 @@ export const PrismaClient = $Class.getPrismaClientClass()
|
|||||||
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
export type PrismaClient<LogOpts extends Prisma.LogLevel = never, OmitOpts extends Prisma.PrismaClientOptions["omit"] = Prisma.PrismaClientOptions["omit"], ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = $Class.PrismaClient<LogOpts, OmitOpts, ExtArgs>
|
||||||
export { Prisma }
|
export { Prisma }
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Model Token
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Token = Prisma.TokenModel
|
||||||
|
/**
|
||||||
|
* Model VerificationCode
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type VerificationCode = Prisma.VerificationCodeModel
|
||||||
|
/**
|
||||||
|
* Model Guild
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Guild = Prisma.GuildModel
|
||||||
|
/**
|
||||||
|
* Model BusinessActivity
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type BusinessActivity = Prisma.BusinessActivityModel
|
||||||
|
/**
|
||||||
|
* Model Complex
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Complex = Prisma.ComplexModel
|
||||||
|
/**
|
||||||
|
* Model Pos
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Pos = Prisma.PosModel
|
||||||
|
/**
|
||||||
|
* Model DeviceBrand
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type DeviceBrand = Prisma.DeviceBrandModel
|
||||||
|
/**
|
||||||
|
* Model Device
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Device = Prisma.DeviceModel
|
||||||
|
/**
|
||||||
|
* Model License
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type License = Prisma.LicenseModel
|
||||||
|
/**
|
||||||
|
* Model Partner
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Partner = Prisma.PartnerModel
|
||||||
|
/**
|
||||||
|
* Model User
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type User = Prisma.UserModel
|
||||||
|
/**
|
||||||
|
* Model Account
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Account = Prisma.AccountModel
|
||||||
|
/**
|
||||||
|
* Model Provider
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type Provider = Prisma.ProviderModel
|
||||||
|
/**
|
||||||
|
* Model TriggerLog
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type TriggerLog = Prisma.TriggerLogModel
|
||||||
|
/**
|
||||||
|
* Model UserDevices
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
export type UserDevices = Prisma.UserDevicesModel
|
||||||
/**
|
/**
|
||||||
* Model Customer
|
* Model Customer
|
||||||
*
|
*
|
||||||
@@ -52,11 +127,6 @@ export type CustomerIndividual = Prisma.CustomerIndividualModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type CustomerLegal = Prisma.CustomerLegalModel
|
export type CustomerLegal = Prisma.CustomerLegalModel
|
||||||
/**
|
|
||||||
* Model Device
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type Device = Prisma.DeviceModel
|
|
||||||
/**
|
/**
|
||||||
* Model Good
|
* Model Good
|
||||||
*
|
*
|
||||||
@@ -67,11 +137,6 @@ export type Good = Prisma.GoodModel
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
export type GoodCategory = Prisma.GoodCategoryModel
|
export type GoodCategory = Prisma.GoodCategoryModel
|
||||||
/**
|
|
||||||
* Model TriggerLog
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
export type TriggerLog = Prisma.TriggerLogModel
|
|
||||||
/**
|
/**
|
||||||
* Model SalesInvoice
|
* Model SalesInvoice
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -29,6 +29,13 @@ export type StringFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type EnumTokenTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TokenType | Prisma.EnumTokenTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TokenType[]
|
||||||
|
notIn?: $Enums.TokenType[]
|
||||||
|
not?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel> | $Enums.TokenType
|
||||||
|
}
|
||||||
|
|
||||||
export type DateTimeFilter<$PrismaModel = never> = {
|
export type DateTimeFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
in?: Date[] | string[]
|
in?: Date[] | string[]
|
||||||
@@ -40,6 +47,211 @@ export type DateTimeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
in?: string[]
|
||||||
|
notIn?: string[]
|
||||||
|
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
search?: string
|
||||||
|
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumTokenTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TokenType | Prisma.EnumTokenTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TokenType[]
|
||||||
|
notIn?: $Enums.TokenType[]
|
||||||
|
not?: Prisma.NestedEnumTokenTypeWithAggregatesFilter<$PrismaModel> | $Enums.TokenType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
in?: Date[] | string[]
|
||||||
|
notIn?: Date[] | string[]
|
||||||
|
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BoolFilter<$PrismaModel = never> = {
|
||||||
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export type BoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StringNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: string[] | null
|
||||||
|
notIn?: string[] | null
|
||||||
|
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
search?: string
|
||||||
|
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type SortOrderInput = {
|
||||||
|
sort: Prisma.SortOrder
|
||||||
|
nulls?: Prisma.NullsOrder
|
||||||
|
}
|
||||||
|
|
||||||
|
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: string[] | null
|
||||||
|
notIn?: string[] | null
|
||||||
|
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
|
search?: string
|
||||||
|
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
||||||
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumPOSStatusFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.POSStatus[]
|
||||||
|
notIn?: $Enums.POSStatus[]
|
||||||
|
not?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel> | $Enums.POSStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumPOSTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.POSType | Prisma.EnumPOSTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.POSType[]
|
||||||
|
notIn?: $Enums.POSType[]
|
||||||
|
not?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel> | $Enums.POSType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumPOSStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.POSStatus[]
|
||||||
|
notIn?: $Enums.POSStatus[]
|
||||||
|
not?: Prisma.NestedEnumPOSStatusWithAggregatesFilter<$PrismaModel> | $Enums.POSStatus
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumPOSTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.POSType | Prisma.EnumPOSTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.POSType[]
|
||||||
|
notIn?: $Enums.POSType[]
|
||||||
|
not?: Prisma.NestedEnumPOSTypeWithAggregatesFilter<$PrismaModel> | $Enums.POSType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumLicenseStatusFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.LicenseStatus | Prisma.EnumLicenseStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.LicenseStatus[]
|
||||||
|
notIn?: $Enums.LicenseStatus[]
|
||||||
|
not?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel> | $Enums.LicenseStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumLicenseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.LicenseStatus | Prisma.EnumLicenseStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.LicenseStatus[]
|
||||||
|
notIn?: $Enums.LicenseStatus[]
|
||||||
|
not?: Prisma.NestedEnumLicenseStatusWithAggregatesFilter<$PrismaModel> | $Enums.LicenseStatus
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumAccountTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.AccountType | Prisma.EnumAccountTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.AccountType[]
|
||||||
|
notIn?: $Enums.AccountType[]
|
||||||
|
not?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel> | $Enums.AccountType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumAccountStatusFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.AccountStatus[]
|
||||||
|
notIn?: $Enums.AccountStatus[]
|
||||||
|
not?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel> | $Enums.AccountStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumAccountTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.AccountType | Prisma.EnumAccountTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.AccountType[]
|
||||||
|
notIn?: $Enums.AccountType[]
|
||||||
|
not?: Prisma.NestedEnumAccountTypeWithAggregatesFilter<$PrismaModel> | $Enums.AccountType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type EnumAccountStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.AccountStatus[]
|
||||||
|
notIn?: $Enums.AccountStatus[]
|
||||||
|
not?: Prisma.NestedEnumAccountStatusWithAggregatesFilter<$PrismaModel> | $Enums.AccountStatus
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IntFilter<$PrismaModel = never> = {
|
||||||
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
in?: number[]
|
||||||
|
notIn?: number[]
|
||||||
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||||
|
}
|
||||||
|
|
||||||
|
export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
in?: number[]
|
||||||
|
notIn?: number[]
|
||||||
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type DateTimeNullableFilter<$PrismaModel = never> = {
|
export type DateTimeNullableFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||||
in?: Date[] | string[] | null
|
in?: Date[] | string[] | null
|
||||||
@@ -63,43 +275,6 @@ export type BoolNullableFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SortOrderInput = {
|
|
||||||
sort: Prisma.SortOrder
|
|
||||||
nulls?: Prisma.NullsOrder
|
|
||||||
}
|
|
||||||
|
|
||||||
export type StringWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
in?: string[]
|
|
||||||
notIn?: string[]
|
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
search?: string
|
|
||||||
not?: Prisma.NestedStringWithAggregatesFilter<$PrismaModel> | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedStringFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedStringFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
in?: Date[] | string[]
|
|
||||||
notIn?: Date[] | string[]
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeWithAggregatesFilter<$PrismaModel> | Date | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
export type DateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||||
in?: Date[] | string[] | null
|
in?: Date[] | string[] | null
|
||||||
@@ -132,37 +307,31 @@ export type BoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StringNullableFilter<$PrismaModel = never> = {
|
export type DecimalNullableFilter<$PrismaModel = never> = {
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||||
in?: string[] | null
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
notIn?: string[] | null
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
search?: string
|
|
||||||
not?: Prisma.NestedStringNullableFilter<$PrismaModel> | string | null
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel> | null
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||||
in?: string[] | null
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
notIn?: string[] | null
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
lt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
lte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
gt?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
gte?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||||
startsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
endsWith?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
|
||||||
search?: string
|
|
||||||
not?: Prisma.NestedStringNullableWithAggregatesFilter<$PrismaModel> | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type DecimalFilter<$PrismaModel = never> = {
|
export type DecimalFilter<$PrismaModel = never> = {
|
||||||
@@ -176,49 +345,6 @@ 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 DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type IntFilter<$PrismaModel = never> = {
|
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
in?: number[]
|
|
||||||
notIn?: number[]
|
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
|
||||||
}
|
|
||||||
|
|
||||||
export type IntWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
in?: number[]
|
|
||||||
notIn?: number[]
|
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedIntWithAggregatesFilter<$PrismaModel> | number
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_avg?: Prisma.NestedFloatFilter<$PrismaModel>
|
|
||||||
_sum?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type JsonNullableFilter<$PrismaModel = never> =
|
export type JsonNullableFilter<$PrismaModel = never> =
|
||||||
| Prisma.PatchUndefined<
|
| Prisma.PatchUndefined<
|
||||||
Prisma.Either<Required<JsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
Prisma.Either<Required<JsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
||||||
@@ -243,6 +369,22 @@ export type JsonNullableFilterBase<$PrismaModel = never> = {
|
|||||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type JsonNullableWithAggregatesFilter<$PrismaModel = never> =
|
export type JsonNullableWithAggregatesFilter<$PrismaModel = never> =
|
||||||
| Prisma.PatchUndefined<
|
| Prisma.PatchUndefined<
|
||||||
Prisma.Either<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
Prisma.Either<Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonNullableWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
||||||
@@ -277,13 +419,6 @@ export type EnumUnitTypeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel> | $Enums.UnitType
|
not?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel> | $Enums.UnitType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumSalesInvoiceItemPricingModelFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.SalesInvoiceItemPricingModel | Prisma.EnumSalesInvoiceItemPricingModelFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.SalesInvoiceItemPricingModel[]
|
|
||||||
notIn?: $Enums.SalesInvoiceItemPricingModel[]
|
|
||||||
not?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel> | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type EnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.UnitType[]
|
in?: $Enums.UnitType[]
|
||||||
@@ -294,16 +429,6 @@ export type EnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumSalesInvoiceItemPricingModelWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.SalesInvoiceItemPricingModel | Prisma.EnumSalesInvoiceItemPricingModelFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.SalesInvoiceItemPricingModel[]
|
|
||||||
notIn?: $Enums.SalesInvoiceItemPricingModel[]
|
|
||||||
not?: Prisma.NestedEnumSalesInvoiceItemPricingModelWithAggregatesFilter<$PrismaModel> | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PaymentMethodType[]
|
in?: $Enums.PaymentMethodType[]
|
||||||
@@ -336,6 +461,13 @@ export type NestedStringFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
not?: Prisma.NestedStringFilter<$PrismaModel> | string
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedEnumTokenTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TokenType | Prisma.EnumTokenTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TokenType[]
|
||||||
|
notIn?: $Enums.TokenType[]
|
||||||
|
not?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel> | $Enums.TokenType
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
export type NestedDateTimeFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
in?: Date[] | string[]
|
in?: Date[] | string[]
|
||||||
@@ -347,29 +479,6 @@ export type NestedDateTimeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
not?: Prisma.NestedDateTimeFilter<$PrismaModel> | Date | string
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
|
||||||
in?: Date[] | string[] | null
|
|
||||||
notIn?: Date[] | string[] | null
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumCustomerTypeFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.CustomerType[]
|
|
||||||
notIn?: $Enums.CustomerType[]
|
|
||||||
not?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel> | $Enums.CustomerType
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedBoolNullableFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
|
||||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedStringWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
equals?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||||
in?: string[]
|
in?: string[]
|
||||||
@@ -399,6 +508,16 @@ export type NestedIntFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
not?: Prisma.NestedIntFilter<$PrismaModel> | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedEnumTokenTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.TokenType | Prisma.EnumTokenTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.TokenType[]
|
||||||
|
notIn?: $Enums.TokenType[]
|
||||||
|
not?: Prisma.NestedEnumTokenTypeWithAggregatesFilter<$PrismaModel> | $Enums.TokenType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumTokenTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
in?: Date[] | string[]
|
in?: Date[] | string[]
|
||||||
@@ -413,47 +532,17 @@ export type NestedDateTimeWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
_max?: Prisma.NestedDateTimeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedBoolFilter<$PrismaModel = never> = {
|
||||||
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
in?: Date[] | string[] | null
|
not?: Prisma.NestedBoolFilter<$PrismaModel> | boolean
|
||||||
notIn?: Date[] | string[] | null
|
|
||||||
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
export type NestedBoolWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel>
|
||||||
in?: number[] | null
|
not?: Prisma.NestedBoolWithAggregatesFilter<$PrismaModel> | boolean
|
||||||
notIn?: number[] | null
|
|
||||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
|
||||||
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.CustomerType[]
|
|
||||||
notIn?: $Enums.CustomerType[]
|
|
||||||
not?: Prisma.NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel> | $Enums.CustomerType
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
_min?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
_max?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedBoolFilter<$PrismaModel>
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedBoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
|
||||||
not?: Prisma.NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null
|
|
||||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
export type NestedStringNullableFilter<$PrismaModel = never> = {
|
||||||
@@ -489,31 +578,100 @@ export type NestedStringNullableWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
_max?: Prisma.NestedStringNullableFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
export type NestedIntNullableFilter<$PrismaModel = never> = {
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
in?: number[] | null
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
notIn?: number[] | null
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumPOSStatusFilter<$PrismaModel = never> = {
|
||||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
in?: $Enums.POSStatus[]
|
||||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
notIn?: $Enums.POSStatus[]
|
||||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
not?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel> | $Enums.POSStatus
|
||||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
}
|
||||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
|
||||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
export type NestedEnumPOSTypeFilter<$PrismaModel = never> = {
|
||||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
equals?: $Enums.POSType | Prisma.EnumPOSTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.POSType[]
|
||||||
|
notIn?: $Enums.POSType[]
|
||||||
|
not?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel> | $Enums.POSType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumPOSStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.POSStatus[]
|
||||||
|
notIn?: $Enums.POSStatus[]
|
||||||
|
not?: Prisma.NestedEnumPOSStatusWithAggregatesFilter<$PrismaModel> | $Enums.POSStatus
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
_min?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
}
|
||||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
|
||||||
|
export type NestedEnumPOSTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.POSType | Prisma.EnumPOSTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.POSType[]
|
||||||
|
notIn?: $Enums.POSType[]
|
||||||
|
not?: Prisma.NestedEnumPOSTypeWithAggregatesFilter<$PrismaModel> | $Enums.POSType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumPOSTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumLicenseStatusFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.LicenseStatus | Prisma.EnumLicenseStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.LicenseStatus[]
|
||||||
|
notIn?: $Enums.LicenseStatus[]
|
||||||
|
not?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel> | $Enums.LicenseStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumLicenseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.LicenseStatus | Prisma.EnumLicenseStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.LicenseStatus[]
|
||||||
|
notIn?: $Enums.LicenseStatus[]
|
||||||
|
not?: Prisma.NestedEnumLicenseStatusWithAggregatesFilter<$PrismaModel> | $Enums.LicenseStatus
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumLicenseStatusFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumAccountTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.AccountType | Prisma.EnumAccountTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.AccountType[]
|
||||||
|
notIn?: $Enums.AccountType[]
|
||||||
|
not?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel> | $Enums.AccountType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumAccountStatusFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.AccountStatus[]
|
||||||
|
notIn?: $Enums.AccountStatus[]
|
||||||
|
not?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel> | $Enums.AccountStatus
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumAccountTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.AccountType | Prisma.EnumAccountTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.AccountType[]
|
||||||
|
notIn?: $Enums.AccountType[]
|
||||||
|
not?: Prisma.NestedEnumAccountTypeWithAggregatesFilter<$PrismaModel> | $Enums.AccountType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumAccountStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.AccountStatus | Prisma.EnumAccountStatusFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.AccountStatus[]
|
||||||
|
notIn?: $Enums.AccountStatus[]
|
||||||
|
not?: Prisma.NestedEnumAccountStatusWithAggregatesFilter<$PrismaModel> | $Enums.AccountStatus
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumAccountStatusFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
@@ -543,6 +701,115 @@ export type NestedFloatFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedFloatFilter<$PrismaModel> | number
|
not?: Prisma.NestedFloatFilter<$PrismaModel> | number
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type NestedDateTimeNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: Date[] | string[] | null
|
||||||
|
notIn?: Date[] | string[] | null
|
||||||
|
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDateTimeNullableFilter<$PrismaModel> | Date | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumCustomerTypeFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.CustomerType[]
|
||||||
|
notIn?: $Enums.CustomerType[]
|
||||||
|
not?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel> | $Enums.CustomerType
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedBoolNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
||||||
|
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDateTimeNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: Date[] | string[] | null
|
||||||
|
notIn?: Date[] | string[] | null
|
||||||
|
lt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
lte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
gt?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
gte?: Date | string | Prisma.DateTimeFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDateTimeNullableWithAggregatesFilter<$PrismaModel> | Date | string | null
|
||||||
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDateTimeNullableFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||||
|
in?: $Enums.CustomerType[]
|
||||||
|
notIn?: $Enums.CustomerType[]
|
||||||
|
not?: Prisma.NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel> | $Enums.CustomerType
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedBoolNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
||||||
|
not?: Prisma.NestedBoolNullableWithAggregatesFilter<$PrismaModel> | boolean | null
|
||||||
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedBoolNullableFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalNullableFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||||
|
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
}
|
||||||
|
|
||||||
|
export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
|
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||||
|
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||||
|
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
|
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||||
|
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||||
|
}
|
||||||
|
|
||||||
export type NestedJsonNullableFilter<$PrismaModel = never> =
|
export type NestedJsonNullableFilter<$PrismaModel = never> =
|
||||||
| Prisma.PatchUndefined<
|
| Prisma.PatchUndefined<
|
||||||
Prisma.Either<Required<NestedJsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
Prisma.Either<Required<NestedJsonNullableFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonNullableFilterBase<$PrismaModel>>, 'path'>>,
|
||||||
@@ -574,13 +841,6 @@ export type NestedEnumUnitTypeFilter<$PrismaModel = never> = {
|
|||||||
not?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel> | $Enums.UnitType
|
not?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel> | $Enums.UnitType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.SalesInvoiceItemPricingModel | Prisma.EnumSalesInvoiceItemPricingModelFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.SalesInvoiceItemPricingModel[]
|
|
||||||
notIn?: $Enums.SalesInvoiceItemPricingModel[]
|
|
||||||
not?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel> | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
export type NestedEnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.UnitType[]
|
in?: $Enums.UnitType[]
|
||||||
@@ -591,16 +851,6 @@ export type NestedEnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
|||||||
_max?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
_max?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NestedEnumSalesInvoiceItemPricingModelWithAggregatesFilter<$PrismaModel = never> = {
|
|
||||||
equals?: $Enums.SalesInvoiceItemPricingModel | Prisma.EnumSalesInvoiceItemPricingModelFieldRefInput<$PrismaModel>
|
|
||||||
in?: $Enums.SalesInvoiceItemPricingModel[]
|
|
||||||
notIn?: $Enums.SalesInvoiceItemPricingModel[]
|
|
||||||
not?: Prisma.NestedEnumSalesInvoiceItemPricingModelWithAggregatesFilter<$PrismaModel> | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
|
||||||
_min?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel>
|
|
||||||
_max?: Prisma.NestedEnumSalesInvoiceItemPricingModelFilter<$PrismaModel>
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||||
in?: $Enums.PaymentMethodType[]
|
in?: $Enums.PaymentMethodType[]
|
||||||
|
|||||||
@@ -43,6 +43,7 @@ export const UnitType = {
|
|||||||
COUNT: 'COUNT',
|
COUNT: 'COUNT',
|
||||||
GRAM: 'GRAM',
|
GRAM: 'GRAM',
|
||||||
KILOGRAM: 'KILOGRAM',
|
KILOGRAM: 'KILOGRAM',
|
||||||
|
MILLILITER: 'MILLILITER',
|
||||||
LITER: 'LITER',
|
LITER: 'LITER',
|
||||||
METER: 'METER',
|
METER: 'METER',
|
||||||
HOUR: 'HOUR'
|
HOUR: 'HOUR'
|
||||||
@@ -51,6 +52,14 @@ export const UnitType = {
|
|||||||
export type UnitType = (typeof UnitType)[keyof typeof UnitType]
|
export type UnitType = (typeof UnitType)[keyof typeof UnitType]
|
||||||
|
|
||||||
|
|
||||||
|
export const GoodPricingModel = {
|
||||||
|
STANDARD: 'STANDARD',
|
||||||
|
GOLD: 'GOLD'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type GoodPricingModel = (typeof GoodPricingModel)[keyof typeof GoodPricingModel]
|
||||||
|
|
||||||
|
|
||||||
export const CustomerType = {
|
export const CustomerType = {
|
||||||
INDIVIDUAL: 'INDIVIDUAL',
|
INDIVIDUAL: 'INDIVIDUAL',
|
||||||
LEGAL: 'LEGAL',
|
LEGAL: 'LEGAL',
|
||||||
@@ -60,9 +69,121 @@ export const CustomerType = {
|
|||||||
export type CustomerType = (typeof CustomerType)[keyof typeof CustomerType]
|
export type CustomerType = (typeof CustomerType)[keyof typeof CustomerType]
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoiceItemPricingModel = {
|
export const UserStatus = {
|
||||||
STANDARD: 'STANDARD',
|
ACTIVE: 'ACTIVE',
|
||||||
GOLD: 'GOLD'
|
INACTIVE: 'INACTIVE'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type SalesInvoiceItemPricingModel = (typeof SalesInvoiceItemPricingModel)[keyof typeof SalesInvoiceItemPricingModel]
|
export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus]
|
||||||
|
|
||||||
|
|
||||||
|
export const AccountRole = {
|
||||||
|
OWNER: 'OWNER',
|
||||||
|
OPERATOR: 'OPERATOR',
|
||||||
|
ACCOUNTANT: 'ACCOUNTANT'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type AccountRole = (typeof AccountRole)[keyof typeof AccountRole]
|
||||||
|
|
||||||
|
|
||||||
|
export const AccountStatus = {
|
||||||
|
ACTIVE: 'ACTIVE',
|
||||||
|
SUSPENDED: 'SUSPENDED'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type AccountStatus = (typeof AccountStatus)[keyof typeof AccountStatus]
|
||||||
|
|
||||||
|
|
||||||
|
export const POSStatus = {
|
||||||
|
ACTIVE: 'ACTIVE',
|
||||||
|
DISABLED: 'DISABLED'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type POSStatus = (typeof POSStatus)[keyof typeof POSStatus]
|
||||||
|
|
||||||
|
|
||||||
|
export const POSRole = {
|
||||||
|
MANAGER: 'MANAGER',
|
||||||
|
OPERATOR: 'OPERATOR',
|
||||||
|
VIEWER: 'VIEWER'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type POSRole = (typeof POSRole)[keyof typeof POSRole]
|
||||||
|
|
||||||
|
|
||||||
|
export const LicenseType = {
|
||||||
|
BASIC: 'BASIC',
|
||||||
|
PRO: 'PRO',
|
||||||
|
ENTERPRISE: 'ENTERPRISE'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type LicenseType = (typeof LicenseType)[keyof typeof LicenseType]
|
||||||
|
|
||||||
|
|
||||||
|
export const LicenseStatus = {
|
||||||
|
ACTIVE: 'ACTIVE',
|
||||||
|
EXPIRED: 'EXPIRED',
|
||||||
|
SUSPENDED: 'SUSPENDED'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type LicenseStatus = (typeof LicenseStatus)[keyof typeof LicenseStatus]
|
||||||
|
|
||||||
|
|
||||||
|
export const POSType = {
|
||||||
|
PSP: 'PSP',
|
||||||
|
MOBILE: 'MOBILE',
|
||||||
|
API: 'API'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type POSType = (typeof POSType)[keyof typeof POSType]
|
||||||
|
|
||||||
|
|
||||||
|
export const UserType = {
|
||||||
|
LEGAL: 'LEGAL',
|
||||||
|
INDIVIDUAL: 'INDIVIDUAL'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type UserType = (typeof UserType)[keyof typeof UserType]
|
||||||
|
|
||||||
|
|
||||||
|
export const AccountType = {
|
||||||
|
PARTNER: 'PARTNER',
|
||||||
|
BUSINESS: 'BUSINESS',
|
||||||
|
ADMIN: 'ADMIN',
|
||||||
|
PROVIDER: 'PROVIDER',
|
||||||
|
POS: 'POS'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type AccountType = (typeof AccountType)[keyof typeof AccountType]
|
||||||
|
|
||||||
|
|
||||||
|
export const PartnerRole = {
|
||||||
|
ADMIN: 'ADMIN',
|
||||||
|
OPERATOR: 'OPERATOR'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type PartnerRole = (typeof PartnerRole)[keyof typeof PartnerRole]
|
||||||
|
|
||||||
|
|
||||||
|
export const BusinessRole = {
|
||||||
|
ADMIN: 'ADMIN',
|
||||||
|
OPERATOR: 'OPERATOR'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BusinessRole = (typeof BusinessRole)[keyof typeof BusinessRole]
|
||||||
|
|
||||||
|
|
||||||
|
export const ProviderRole = {
|
||||||
|
ADMIN: 'ADMIN',
|
||||||
|
OPERATOR: 'OPERATOR'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type ProviderRole = (typeof ProviderRole)[keyof typeof ProviderRole]
|
||||||
|
|
||||||
|
|
||||||
|
export const TokenType = {
|
||||||
|
ACCESS: 'ACCESS',
|
||||||
|
REFRESH: 'REFRESH'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type TokenType = (typeof TokenType)[keyof typeof TokenType]
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -51,13 +51,26 @@ export const AnyNull = runtime.AnyNull
|
|||||||
|
|
||||||
|
|
||||||
export const ModelName = {
|
export const ModelName = {
|
||||||
|
Token: 'Token',
|
||||||
|
VerificationCode: 'VerificationCode',
|
||||||
|
Guild: 'Guild',
|
||||||
|
BusinessActivity: 'BusinessActivity',
|
||||||
|
Complex: 'Complex',
|
||||||
|
Pos: 'Pos',
|
||||||
|
DeviceBrand: 'DeviceBrand',
|
||||||
|
Device: 'Device',
|
||||||
|
License: 'License',
|
||||||
|
Partner: 'Partner',
|
||||||
|
User: 'User',
|
||||||
|
Account: 'Account',
|
||||||
|
Provider: 'Provider',
|
||||||
|
TriggerLog: 'TriggerLog',
|
||||||
|
UserDevices: 'UserDevices',
|
||||||
Customer: 'Customer',
|
Customer: 'Customer',
|
||||||
CustomerIndividual: 'CustomerIndividual',
|
CustomerIndividual: 'CustomerIndividual',
|
||||||
CustomerLegal: 'CustomerLegal',
|
CustomerLegal: 'CustomerLegal',
|
||||||
Device: 'Device',
|
|
||||||
Good: 'Good',
|
Good: 'Good',
|
||||||
GoodCategory: 'GoodCategory',
|
GoodCategory: 'GoodCategory',
|
||||||
TriggerLog: 'TriggerLog',
|
|
||||||
SalesInvoice: 'SalesInvoice',
|
SalesInvoice: 'SalesInvoice',
|
||||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||||
SalesInvoicePayment: 'SalesInvoicePayment',
|
SalesInvoicePayment: 'SalesInvoicePayment',
|
||||||
@@ -81,6 +94,187 @@ export const TransactionIsolationLevel = {
|
|||||||
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
export type TransactionIsolationLevel = (typeof TransactionIsolationLevel)[keyof typeof TransactionIsolationLevel]
|
||||||
|
|
||||||
|
|
||||||
|
export const TokenScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
token: 'token',
|
||||||
|
type: 'type',
|
||||||
|
created_at: 'created_at',
|
||||||
|
expires_at: 'expires_at',
|
||||||
|
account_id: 'account_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type TokenScalarFieldEnum = (typeof TokenScalarFieldEnum)[keyof typeof TokenScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const VerificationCodeScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
code: 'code',
|
||||||
|
is_used: 'is_used',
|
||||||
|
created_at: 'created_at',
|
||||||
|
expires_at: 'expires_at',
|
||||||
|
account_id: 'account_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type VerificationCodeScalarFieldEnum = (typeof VerificationCodeScalarFieldEnum)[keyof typeof VerificationCodeScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const GuildScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
code: 'code'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type GuildScalarFieldEnum = (typeof GuildScalarFieldEnum)[keyof typeof GuildScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BusinessActivityScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
created_at: 'created_at',
|
||||||
|
guild_id: 'guild_id',
|
||||||
|
owner_id: 'owner_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BusinessActivityScalarFieldEnum = (typeof BusinessActivityScalarFieldEnum)[keyof typeof BusinessActivityScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const ComplexScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
address: 'address',
|
||||||
|
tax_id: 'tax_id',
|
||||||
|
business_activity_id: 'business_activity_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type ComplexScalarFieldEnum = (typeof ComplexScalarFieldEnum)[keyof typeof ComplexScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const PosScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
serial: 'serial',
|
||||||
|
model: 'model',
|
||||||
|
status: 'status',
|
||||||
|
pos_type: 'pos_type',
|
||||||
|
created_at: 'created_at',
|
||||||
|
updated_at: 'updated_at',
|
||||||
|
complex_id: 'complex_id',
|
||||||
|
device_id: 'device_id',
|
||||||
|
provider_id: 'provider_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type PosScalarFieldEnum = (typeof PosScalarFieldEnum)[keyof typeof PosScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const DeviceBrandScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
created_at: 'created_at',
|
||||||
|
updated_at: 'updated_at'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type DeviceBrandScalarFieldEnum = (typeof DeviceBrandScalarFieldEnum)[keyof typeof DeviceBrandScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const DeviceScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
os_version: 'os_version',
|
||||||
|
created_at: 'created_at',
|
||||||
|
updated_at: 'updated_at',
|
||||||
|
brand_id: 'brand_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type DeviceScalarFieldEnum = (typeof DeviceScalarFieldEnum)[keyof typeof DeviceScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const LicenseScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
starts_at: 'starts_at',
|
||||||
|
expires_at: 'expires_at',
|
||||||
|
status: 'status',
|
||||||
|
pos_id: 'pos_id',
|
||||||
|
partner_id: 'partner_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type LicenseScalarFieldEnum = (typeof LicenseScalarFieldEnum)[keyof typeof LicenseScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const PartnerScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
code: 'code'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type PartnerScalarFieldEnum = (typeof PartnerScalarFieldEnum)[keyof typeof PartnerScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const UserScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
created_at: 'created_at',
|
||||||
|
mobile_number: 'mobile_number',
|
||||||
|
national_code: 'national_code',
|
||||||
|
first_name: 'first_name',
|
||||||
|
last_name: 'last_name'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type UserScalarFieldEnum = (typeof UserScalarFieldEnum)[keyof typeof UserScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const AccountScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
username: 'username',
|
||||||
|
type: 'type',
|
||||||
|
status: 'status',
|
||||||
|
password: 'password',
|
||||||
|
created_at: 'created_at',
|
||||||
|
user_id: 'user_id',
|
||||||
|
partner_id: 'partner_id',
|
||||||
|
business_id: 'business_id',
|
||||||
|
provider_id: 'provider_id',
|
||||||
|
pos_id: 'pos_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type AccountScalarFieldEnum = (typeof AccountScalarFieldEnum)[keyof typeof AccountScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const ProviderScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
code: 'code'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type ProviderScalarFieldEnum = (typeof ProviderScalarFieldEnum)[keyof typeof ProviderScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const TriggerLogScalarFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
message: 'message',
|
||||||
|
createdAt: 'createdAt',
|
||||||
|
name: 'name'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const UserDevicesScalarFieldEnum = {
|
||||||
|
account_id: 'account_id',
|
||||||
|
app_version: 'app_version',
|
||||||
|
build_number: 'build_number',
|
||||||
|
uuid: 'uuid',
|
||||||
|
platform: 'platform',
|
||||||
|
brand: 'brand',
|
||||||
|
model: 'model',
|
||||||
|
device: 'device',
|
||||||
|
os_version: 'os_version',
|
||||||
|
sdk_version: 'sdk_version',
|
||||||
|
release_number: 'release_number',
|
||||||
|
browser_name: 'browser_name',
|
||||||
|
fcm_token: 'fcm_token'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type UserDevicesScalarFieldEnum = (typeof UserDevicesScalarFieldEnum)[keyof typeof UserDevicesScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const CustomerScalarFieldEnum = {
|
export const CustomerScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
@@ -119,25 +313,6 @@ export const CustomerLegalScalarFieldEnum = {
|
|||||||
export type CustomerLegalScalarFieldEnum = (typeof CustomerLegalScalarFieldEnum)[keyof typeof CustomerLegalScalarFieldEnum]
|
export type CustomerLegalScalarFieldEnum = (typeof CustomerLegalScalarFieldEnum)[keyof typeof CustomerLegalScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const DeviceScalarFieldEnum = {
|
|
||||||
account_id: 'account_id',
|
|
||||||
app_version: 'app_version',
|
|
||||||
build_number: 'build_number',
|
|
||||||
uuid: 'uuid',
|
|
||||||
platform: 'platform',
|
|
||||||
brand: 'brand',
|
|
||||||
model: 'model',
|
|
||||||
device: 'device',
|
|
||||||
os_version: 'os_version',
|
|
||||||
sdk_version: 'sdk_version',
|
|
||||||
release_number: 'release_number',
|
|
||||||
browser_name: 'browser_name',
|
|
||||||
fcm_token: 'fcm_token'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type DeviceScalarFieldEnum = (typeof DeviceScalarFieldEnum)[keyof typeof DeviceScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const GoodScalarFieldEnum = {
|
export const GoodScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
@@ -145,13 +320,14 @@ export const GoodScalarFieldEnum = {
|
|||||||
sku: 'sku',
|
sku: 'sku',
|
||||||
local_sku: 'local_sku',
|
local_sku: 'local_sku',
|
||||||
barcode: 'barcode',
|
barcode: 'barcode',
|
||||||
|
base_sale_price: 'base_sale_price',
|
||||||
|
is_default_guild_good: 'is_default_guild_good',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
updated_at: 'updated_at',
|
updated_at: 'updated_at',
|
||||||
deleted_at: 'deleted_at',
|
deleted_at: 'deleted_at',
|
||||||
|
complex_id: 'complex_id',
|
||||||
category_id: 'category_id',
|
category_id: 'category_id',
|
||||||
base_sale_price: 'base_sale_price',
|
guild_id: 'guild_id'
|
||||||
account_id: 'account_id',
|
|
||||||
complex_id: 'complex_id'
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type GoodScalarFieldEnum = (typeof GoodScalarFieldEnum)[keyof typeof GoodScalarFieldEnum]
|
export type GoodScalarFieldEnum = (typeof GoodScalarFieldEnum)[keyof typeof GoodScalarFieldEnum]
|
||||||
@@ -162,8 +338,9 @@ export const GoodCategoryScalarFieldEnum = {
|
|||||||
name: 'name',
|
name: 'name',
|
||||||
description: 'description',
|
description: 'description',
|
||||||
image_url: 'image_url',
|
image_url: 'image_url',
|
||||||
account_id: 'account_id',
|
|
||||||
complex_id: 'complex_id',
|
complex_id: 'complex_id',
|
||||||
|
is_default_guild_good: 'is_default_guild_good',
|
||||||
|
guild_id: 'guild_id',
|
||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
updated_at: 'updated_at',
|
updated_at: 'updated_at',
|
||||||
deleted_at: 'deleted_at'
|
deleted_at: 'deleted_at'
|
||||||
@@ -172,16 +349,6 @@ export const GoodCategoryScalarFieldEnum = {
|
|||||||
export type GoodCategoryScalarFieldEnum = (typeof GoodCategoryScalarFieldEnum)[keyof typeof GoodCategoryScalarFieldEnum]
|
export type GoodCategoryScalarFieldEnum = (typeof GoodCategoryScalarFieldEnum)[keyof typeof GoodCategoryScalarFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const TriggerLogScalarFieldEnum = {
|
|
||||||
id: 'id',
|
|
||||||
message: 'message',
|
|
||||||
createdAt: 'createdAt',
|
|
||||||
name: 'name'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const SalesInvoiceScalarFieldEnum = {
|
export const SalesInvoiceScalarFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
code: 'code',
|
code: 'code',
|
||||||
@@ -208,7 +375,6 @@ export const SalesInvoiceItemScalarFieldEnum = {
|
|||||||
created_at: 'created_at',
|
created_at: 'created_at',
|
||||||
discount: 'discount',
|
discount: 'discount',
|
||||||
notes: 'notes',
|
notes: 'notes',
|
||||||
pricingModel: 'pricingModel',
|
|
||||||
invoice_id: 'invoice_id',
|
invoice_id: 'invoice_id',
|
||||||
good_id: 'good_id',
|
good_id: 'good_id',
|
||||||
service_id: 'service_id',
|
service_id: 'service_id',
|
||||||
@@ -280,6 +446,24 @@ export const NullableJsonNullValueInput = {
|
|||||||
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
||||||
|
|
||||||
|
|
||||||
|
export const TokenOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
token: 'token',
|
||||||
|
account_id: 'account_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type TokenOrderByRelevanceFieldEnum = (typeof TokenOrderByRelevanceFieldEnum)[keyof typeof TokenOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const VerificationCodeOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
code: 'code',
|
||||||
|
account_id: 'account_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type VerificationCodeOrderByRelevanceFieldEnum = (typeof VerificationCodeOrderByRelevanceFieldEnum)[keyof typeof VerificationCodeOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const NullsOrder = {
|
export const NullsOrder = {
|
||||||
first: 'first',
|
first: 'first',
|
||||||
last: 'last'
|
last: 'last'
|
||||||
@@ -288,6 +472,145 @@ export const NullsOrder = {
|
|||||||
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
export type NullsOrder = (typeof NullsOrder)[keyof typeof NullsOrder]
|
||||||
|
|
||||||
|
|
||||||
|
export const GuildOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
code: 'code'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type GuildOrderByRelevanceFieldEnum = (typeof GuildOrderByRelevanceFieldEnum)[keyof typeof GuildOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const BusinessActivityOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
guild_id: 'guild_id',
|
||||||
|
owner_id: 'owner_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type BusinessActivityOrderByRelevanceFieldEnum = (typeof BusinessActivityOrderByRelevanceFieldEnum)[keyof typeof BusinessActivityOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const ComplexOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
address: 'address',
|
||||||
|
tax_id: 'tax_id',
|
||||||
|
business_activity_id: 'business_activity_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type ComplexOrderByRelevanceFieldEnum = (typeof ComplexOrderByRelevanceFieldEnum)[keyof typeof ComplexOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const PosOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
serial: 'serial',
|
||||||
|
model: 'model',
|
||||||
|
complex_id: 'complex_id',
|
||||||
|
device_id: 'device_id',
|
||||||
|
provider_id: 'provider_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type PosOrderByRelevanceFieldEnum = (typeof PosOrderByRelevanceFieldEnum)[keyof typeof PosOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const DeviceBrandOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type DeviceBrandOrderByRelevanceFieldEnum = (typeof DeviceBrandOrderByRelevanceFieldEnum)[keyof typeof DeviceBrandOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const DeviceOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
os_version: 'os_version',
|
||||||
|
brand_id: 'brand_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type DeviceOrderByRelevanceFieldEnum = (typeof DeviceOrderByRelevanceFieldEnum)[keyof typeof DeviceOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const LicenseOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
pos_id: 'pos_id',
|
||||||
|
partner_id: 'partner_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type LicenseOrderByRelevanceFieldEnum = (typeof LicenseOrderByRelevanceFieldEnum)[keyof typeof LicenseOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const PartnerOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
code: 'code'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type PartnerOrderByRelevanceFieldEnum = (typeof PartnerOrderByRelevanceFieldEnum)[keyof typeof PartnerOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const UserOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
mobile_number: 'mobile_number',
|
||||||
|
national_code: 'national_code',
|
||||||
|
first_name: 'first_name',
|
||||||
|
last_name: 'last_name'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type UserOrderByRelevanceFieldEnum = (typeof UserOrderByRelevanceFieldEnum)[keyof typeof UserOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const AccountOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
username: 'username',
|
||||||
|
password: 'password',
|
||||||
|
user_id: 'user_id',
|
||||||
|
partner_id: 'partner_id',
|
||||||
|
business_id: 'business_id',
|
||||||
|
provider_id: 'provider_id',
|
||||||
|
pos_id: 'pos_id'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type AccountOrderByRelevanceFieldEnum = (typeof AccountOrderByRelevanceFieldEnum)[keyof typeof AccountOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const ProviderOrderByRelevanceFieldEnum = {
|
||||||
|
id: 'id',
|
||||||
|
name: 'name',
|
||||||
|
code: 'code'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type ProviderOrderByRelevanceFieldEnum = (typeof ProviderOrderByRelevanceFieldEnum)[keyof typeof ProviderOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const TriggerLogOrderByRelevanceFieldEnum = {
|
||||||
|
message: 'message',
|
||||||
|
name: 'name'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
|
export const UserDevicesOrderByRelevanceFieldEnum = {
|
||||||
|
account_id: 'account_id',
|
||||||
|
app_version: 'app_version',
|
||||||
|
build_number: 'build_number',
|
||||||
|
uuid: 'uuid',
|
||||||
|
platform: 'platform',
|
||||||
|
brand: 'brand',
|
||||||
|
model: 'model',
|
||||||
|
device: 'device',
|
||||||
|
os_version: 'os_version',
|
||||||
|
sdk_version: 'sdk_version',
|
||||||
|
release_number: 'release_number',
|
||||||
|
browser_name: 'browser_name',
|
||||||
|
fcm_token: 'fcm_token'
|
||||||
|
} as const
|
||||||
|
|
||||||
|
export type UserDevicesOrderByRelevanceFieldEnum = (typeof UserDevicesOrderByRelevanceFieldEnum)[keyof typeof UserDevicesOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const CustomerOrderByRelevanceFieldEnum = {
|
export const CustomerOrderByRelevanceFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
complex_id: 'complex_id'
|
complex_id: 'complex_id'
|
||||||
@@ -321,25 +644,6 @@ export const CustomerLegalOrderByRelevanceFieldEnum = {
|
|||||||
export type CustomerLegalOrderByRelevanceFieldEnum = (typeof CustomerLegalOrderByRelevanceFieldEnum)[keyof typeof CustomerLegalOrderByRelevanceFieldEnum]
|
export type CustomerLegalOrderByRelevanceFieldEnum = (typeof CustomerLegalOrderByRelevanceFieldEnum)[keyof typeof CustomerLegalOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const DeviceOrderByRelevanceFieldEnum = {
|
|
||||||
account_id: 'account_id',
|
|
||||||
app_version: 'app_version',
|
|
||||||
build_number: 'build_number',
|
|
||||||
uuid: 'uuid',
|
|
||||||
platform: 'platform',
|
|
||||||
brand: 'brand',
|
|
||||||
model: 'model',
|
|
||||||
device: 'device',
|
|
||||||
os_version: 'os_version',
|
|
||||||
sdk_version: 'sdk_version',
|
|
||||||
release_number: 'release_number',
|
|
||||||
browser_name: 'browser_name',
|
|
||||||
fcm_token: 'fcm_token'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type DeviceOrderByRelevanceFieldEnum = (typeof DeviceOrderByRelevanceFieldEnum)[keyof typeof DeviceOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const GoodOrderByRelevanceFieldEnum = {
|
export const GoodOrderByRelevanceFieldEnum = {
|
||||||
id: 'id',
|
id: 'id',
|
||||||
name: 'name',
|
name: 'name',
|
||||||
@@ -347,9 +651,9 @@ export const GoodOrderByRelevanceFieldEnum = {
|
|||||||
sku: 'sku',
|
sku: 'sku',
|
||||||
local_sku: 'local_sku',
|
local_sku: 'local_sku',
|
||||||
barcode: 'barcode',
|
barcode: 'barcode',
|
||||||
|
complex_id: 'complex_id',
|
||||||
category_id: 'category_id',
|
category_id: 'category_id',
|
||||||
account_id: 'account_id',
|
guild_id: 'guild_id'
|
||||||
complex_id: 'complex_id'
|
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type GoodOrderByRelevanceFieldEnum = (typeof GoodOrderByRelevanceFieldEnum)[keyof typeof GoodOrderByRelevanceFieldEnum]
|
export type GoodOrderByRelevanceFieldEnum = (typeof GoodOrderByRelevanceFieldEnum)[keyof typeof GoodOrderByRelevanceFieldEnum]
|
||||||
@@ -360,21 +664,13 @@ export const GoodCategoryOrderByRelevanceFieldEnum = {
|
|||||||
name: 'name',
|
name: 'name',
|
||||||
description: 'description',
|
description: 'description',
|
||||||
image_url: 'image_url',
|
image_url: 'image_url',
|
||||||
account_id: 'account_id',
|
complex_id: 'complex_id',
|
||||||
complex_id: 'complex_id'
|
guild_id: 'guild_id'
|
||||||
} as const
|
} as const
|
||||||
|
|
||||||
export type GoodCategoryOrderByRelevanceFieldEnum = (typeof GoodCategoryOrderByRelevanceFieldEnum)[keyof typeof GoodCategoryOrderByRelevanceFieldEnum]
|
export type GoodCategoryOrderByRelevanceFieldEnum = (typeof GoodCategoryOrderByRelevanceFieldEnum)[keyof typeof GoodCategoryOrderByRelevanceFieldEnum]
|
||||||
|
|
||||||
|
|
||||||
export const TriggerLogOrderByRelevanceFieldEnum = {
|
|
||||||
message: 'message',
|
|
||||||
name: 'name'
|
|
||||||
} as const
|
|
||||||
|
|
||||||
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
|
||||||
|
|
||||||
|
|
||||||
export const JsonNullValueFilter = {
|
export const JsonNullValueFilter = {
|
||||||
DbNull: 'DbNull',
|
DbNull: 'DbNull',
|
||||||
JsonNull: 'JsonNull',
|
JsonNull: 'JsonNull',
|
||||||
|
|||||||
@@ -8,13 +8,26 @@
|
|||||||
*
|
*
|
||||||
* 🟢 You can import this file directly.
|
* 🟢 You can import this file directly.
|
||||||
*/
|
*/
|
||||||
|
export type * from './models/Token.js'
|
||||||
|
export type * from './models/VerificationCode.js'
|
||||||
|
export type * from './models/Guild.js'
|
||||||
|
export type * from './models/BusinessActivity.js'
|
||||||
|
export type * from './models/Complex.js'
|
||||||
|
export type * from './models/Pos.js'
|
||||||
|
export type * from './models/DeviceBrand.js'
|
||||||
|
export type * from './models/Device.js'
|
||||||
|
export type * from './models/License.js'
|
||||||
|
export type * from './models/Partner.js'
|
||||||
|
export type * from './models/User.js'
|
||||||
|
export type * from './models/Account.js'
|
||||||
|
export type * from './models/Provider.js'
|
||||||
|
export type * from './models/TriggerLog.js'
|
||||||
|
export type * from './models/UserDevices.js'
|
||||||
export type * from './models/Customer.js'
|
export type * from './models/Customer.js'
|
||||||
export type * from './models/CustomerIndividual.js'
|
export type * from './models/CustomerIndividual.js'
|
||||||
export type * from './models/CustomerLegal.js'
|
export type * from './models/CustomerLegal.js'
|
||||||
export type * from './models/Device.js'
|
|
||||||
export type * from './models/Good.js'
|
export type * from './models/Good.js'
|
||||||
export type * from './models/GoodCategory.js'
|
export type * from './models/GoodCategory.js'
|
||||||
export type * from './models/TriggerLog.js'
|
|
||||||
export type * from './models/SalesInvoice.js'
|
export type * from './models/SalesInvoice.js'
|
||||||
export type * from './models/SalesInvoiceItem.js'
|
export type * from './models/SalesInvoiceItem.js'
|
||||||
export type * from './models/SalesInvoicePayment.js'
|
export type * from './models/SalesInvoicePayment.js'
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -387,14 +387,6 @@ export type CustomerNullableScalarRelationFilter = {
|
|||||||
isNot?: Prisma.CustomerWhereInput | null
|
isNot?: Prisma.CustomerWhereInput | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type StringFieldUpdateOperationsInput = {
|
|
||||||
set?: string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type DateTimeFieldUpdateOperationsInput = {
|
|
||||||
set?: Date | string
|
|
||||||
}
|
|
||||||
|
|
||||||
export type NullableDateTimeFieldUpdateOperationsInput = {
|
export type NullableDateTimeFieldUpdateOperationsInput = {
|
||||||
set?: Date | string | null
|
set?: Date | string | null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -401,10 +401,6 @@ export type CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerIndividualUpdateToOneWithWhereWithoutCustomerInput, Prisma.CustomerIndividualUpdateWithoutCustomerInput>, Prisma.CustomerIndividualUncheckedUpdateWithoutCustomerInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerIndividualUpdateToOneWithWhereWithoutCustomerInput, Prisma.CustomerIndividualUpdateWithoutCustomerInput>, Prisma.CustomerIndividualUncheckedUpdateWithoutCustomerInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
export type NullableStringFieldUpdateOperationsInput = {
|
|
||||||
set?: string | null
|
|
||||||
}
|
|
||||||
|
|
||||||
export type CustomerIndividualCreateWithoutCustomerInput = {
|
export type CustomerIndividualCreateWithoutCustomerInput = {
|
||||||
first_name: string
|
first_name: string
|
||||||
last_name: string
|
last_name: string
|
||||||
|
|||||||
@@ -206,17 +206,17 @@ export type CustomerLegalOrderByWithRelationInput = {
|
|||||||
|
|
||||||
export type CustomerLegalWhereUniqueInput = Prisma.AtLeast<{
|
export type CustomerLegalWhereUniqueInput = Prisma.AtLeast<{
|
||||||
customer_id?: string
|
customer_id?: string
|
||||||
registration_number?: string
|
|
||||||
complex_id_registration_number?: Prisma.CustomerLegalComplex_idRegistration_numberCompoundUniqueInput
|
complex_id_registration_number?: Prisma.CustomerLegalComplex_idRegistration_numberCompoundUniqueInput
|
||||||
AND?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
AND?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||||
OR?: Prisma.CustomerLegalWhereInput[]
|
OR?: Prisma.CustomerLegalWhereInput[]
|
||||||
NOT?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
NOT?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||||
company_name?: Prisma.StringFilter<"CustomerLegal"> | string
|
company_name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||||
economic_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
economic_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||||
|
registration_number?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||||
complex_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
complex_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||||
}, "customer_id" | "registration_number" | "complex_id_registration_number">
|
}, "customer_id" | "complex_id_registration_number">
|
||||||
|
|
||||||
export type CustomerLegalOrderByWithAggregationInput = {
|
export type CustomerLegalOrderByWithAggregationInput = {
|
||||||
customer_id?: Prisma.SortOrder
|
customer_id?: Prisma.SortOrder
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+563
-140
File diff suppressed because it is too large
Load Diff
@@ -29,8 +29,9 @@ export type GoodCategoryMinAggregateOutputType = {
|
|||||||
name: string | null
|
name: string | null
|
||||||
description: string | null
|
description: string | null
|
||||||
image_url: string | null
|
image_url: string | null
|
||||||
account_id: string | null
|
|
||||||
complex_id: string | null
|
complex_id: string | null
|
||||||
|
is_default_guild_good: boolean | null
|
||||||
|
guild_id: string | null
|
||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
updated_at: Date | null
|
updated_at: Date | null
|
||||||
deleted_at: Date | null
|
deleted_at: Date | null
|
||||||
@@ -41,8 +42,9 @@ export type GoodCategoryMaxAggregateOutputType = {
|
|||||||
name: string | null
|
name: string | null
|
||||||
description: string | null
|
description: string | null
|
||||||
image_url: string | null
|
image_url: string | null
|
||||||
account_id: string | null
|
|
||||||
complex_id: string | null
|
complex_id: string | null
|
||||||
|
is_default_guild_good: boolean | null
|
||||||
|
guild_id: string | null
|
||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
updated_at: Date | null
|
updated_at: Date | null
|
||||||
deleted_at: Date | null
|
deleted_at: Date | null
|
||||||
@@ -53,8 +55,9 @@ export type GoodCategoryCountAggregateOutputType = {
|
|||||||
name: number
|
name: number
|
||||||
description: number
|
description: number
|
||||||
image_url: number
|
image_url: number
|
||||||
account_id: number
|
|
||||||
complex_id: number
|
complex_id: number
|
||||||
|
is_default_guild_good: number
|
||||||
|
guild_id: number
|
||||||
created_at: number
|
created_at: number
|
||||||
updated_at: number
|
updated_at: number
|
||||||
deleted_at: number
|
deleted_at: number
|
||||||
@@ -67,8 +70,9 @@ export type GoodCategoryMinAggregateInputType = {
|
|||||||
name?: true
|
name?: true
|
||||||
description?: true
|
description?: true
|
||||||
image_url?: true
|
image_url?: true
|
||||||
account_id?: true
|
|
||||||
complex_id?: true
|
complex_id?: true
|
||||||
|
is_default_guild_good?: true
|
||||||
|
guild_id?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
deleted_at?: true
|
deleted_at?: true
|
||||||
@@ -79,8 +83,9 @@ export type GoodCategoryMaxAggregateInputType = {
|
|||||||
name?: true
|
name?: true
|
||||||
description?: true
|
description?: true
|
||||||
image_url?: true
|
image_url?: true
|
||||||
account_id?: true
|
|
||||||
complex_id?: true
|
complex_id?: true
|
||||||
|
is_default_guild_good?: true
|
||||||
|
guild_id?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
deleted_at?: true
|
deleted_at?: true
|
||||||
@@ -91,8 +96,9 @@ export type GoodCategoryCountAggregateInputType = {
|
|||||||
name?: true
|
name?: true
|
||||||
description?: true
|
description?: true
|
||||||
image_url?: true
|
image_url?: true
|
||||||
account_id?: true
|
|
||||||
complex_id?: true
|
complex_id?: true
|
||||||
|
is_default_guild_good?: true
|
||||||
|
guild_id?: true
|
||||||
created_at?: true
|
created_at?: true
|
||||||
updated_at?: true
|
updated_at?: true
|
||||||
deleted_at?: true
|
deleted_at?: true
|
||||||
@@ -176,8 +182,9 @@ export type GoodCategoryGroupByOutputType = {
|
|||||||
name: string
|
name: string
|
||||||
description: string | null
|
description: string | null
|
||||||
image_url: string | null
|
image_url: string | null
|
||||||
account_id: string
|
complex_id: string | null
|
||||||
complex_id: string
|
is_default_guild_good: boolean
|
||||||
|
guild_id: string | null
|
||||||
created_at: Date
|
created_at: Date
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
deleted_at: Date | null
|
deleted_at: Date | null
|
||||||
@@ -209,12 +216,15 @@ export type GoodCategoryWhereInput = {
|
|||||||
name?: Prisma.StringFilter<"GoodCategory"> | string
|
name?: Prisma.StringFilter<"GoodCategory"> | string
|
||||||
description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
image_url?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
image_url?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
account_id?: Prisma.StringFilter<"GoodCategory"> | string
|
complex_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
complex_id?: Prisma.StringFilter<"GoodCategory"> | string
|
is_default_guild_good?: Prisma.BoolFilter<"GoodCategory"> | boolean
|
||||||
|
guild_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||||
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
||||||
goods?: Prisma.GoodListRelationFilter
|
goods?: Prisma.GoodListRelationFilter
|
||||||
|
guild?: Prisma.XOR<Prisma.GuildNullableScalarRelationFilter, Prisma.GuildWhereInput> | null
|
||||||
|
complex?: Prisma.XOR<Prisma.ComplexNullableScalarRelationFilter, Prisma.ComplexWhereInput> | null
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GoodCategoryOrderByWithRelationInput = {
|
export type GoodCategoryOrderByWithRelationInput = {
|
||||||
@@ -222,12 +232,15 @@ export type GoodCategoryOrderByWithRelationInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
image_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
image_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
account_id?: Prisma.SortOrder
|
complex_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
complex_id?: Prisma.SortOrder
|
is_default_guild_good?: Prisma.SortOrder
|
||||||
|
guild_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
goods?: Prisma.GoodOrderByRelationAggregateInput
|
goods?: Prisma.GoodOrderByRelationAggregateInput
|
||||||
|
guild?: Prisma.GuildOrderByWithRelationInput
|
||||||
|
complex?: Prisma.ComplexOrderByWithRelationInput
|
||||||
_relevance?: Prisma.GoodCategoryOrderByRelevanceInput
|
_relevance?: Prisma.GoodCategoryOrderByRelevanceInput
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -239,12 +252,15 @@ export type GoodCategoryWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
name?: Prisma.StringFilter<"GoodCategory"> | string
|
name?: Prisma.StringFilter<"GoodCategory"> | string
|
||||||
description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
image_url?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
image_url?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
account_id?: Prisma.StringFilter<"GoodCategory"> | string
|
complex_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
complex_id?: Prisma.StringFilter<"GoodCategory"> | string
|
is_default_guild_good?: Prisma.BoolFilter<"GoodCategory"> | boolean
|
||||||
|
guild_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||||
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
||||||
goods?: Prisma.GoodListRelationFilter
|
goods?: Prisma.GoodListRelationFilter
|
||||||
|
guild?: Prisma.XOR<Prisma.GuildNullableScalarRelationFilter, Prisma.GuildWhereInput> | null
|
||||||
|
complex?: Prisma.XOR<Prisma.ComplexNullableScalarRelationFilter, Prisma.ComplexWhereInput> | null
|
||||||
}, "id">
|
}, "id">
|
||||||
|
|
||||||
export type GoodCategoryOrderByWithAggregationInput = {
|
export type GoodCategoryOrderByWithAggregationInput = {
|
||||||
@@ -252,8 +268,9 @@ export type GoodCategoryOrderByWithAggregationInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
description?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
image_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
image_url?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
account_id?: Prisma.SortOrder
|
complex_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
complex_id?: Prisma.SortOrder
|
is_default_guild_good?: Prisma.SortOrder
|
||||||
|
guild_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
@@ -270,8 +287,9 @@ export type GoodCategoryScalarWhereWithAggregatesInput = {
|
|||||||
name?: Prisma.StringWithAggregatesFilter<"GoodCategory"> | string
|
name?: Prisma.StringWithAggregatesFilter<"GoodCategory"> | string
|
||||||
description?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
description?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
||||||
image_url?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
image_url?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
||||||
account_id?: Prisma.StringWithAggregatesFilter<"GoodCategory"> | string
|
complex_id?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
||||||
complex_id?: Prisma.StringWithAggregatesFilter<"GoodCategory"> | string
|
is_default_guild_good?: Prisma.BoolWithAggregatesFilter<"GoodCategory"> | boolean
|
||||||
|
guild_id?: Prisma.StringNullableWithAggregatesFilter<"GoodCategory"> | string | null
|
||||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"GoodCategory"> | Date | string
|
created_at?: Prisma.DateTimeWithAggregatesFilter<"GoodCategory"> | Date | string
|
||||||
updated_at?: Prisma.DateTimeWithAggregatesFilter<"GoodCategory"> | Date | string
|
updated_at?: Prisma.DateTimeWithAggregatesFilter<"GoodCategory"> | Date | string
|
||||||
deleted_at?: Prisma.DateTimeNullableWithAggregatesFilter<"GoodCategory"> | Date | string | null
|
deleted_at?: Prisma.DateTimeNullableWithAggregatesFilter<"GoodCategory"> | Date | string | null
|
||||||
@@ -282,12 +300,13 @@ export type GoodCategoryCreateInput = {
|
|||||||
name: string
|
name: string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
image_url?: string | null
|
image_url?: string | null
|
||||||
account_id: string
|
is_default_guild_good?: boolean
|
||||||
complex_id: string
|
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
deleted_at?: Date | string | null
|
deleted_at?: Date | string | null
|
||||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||||
|
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||||
|
complex?: Prisma.ComplexCreateNestedOneWithoutGood_categoriesInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GoodCategoryUncheckedCreateInput = {
|
export type GoodCategoryUncheckedCreateInput = {
|
||||||
@@ -295,8 +314,9 @@ export type GoodCategoryUncheckedCreateInput = {
|
|||||||
name: string
|
name: string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
image_url?: string | null
|
image_url?: string | null
|
||||||
account_id: string
|
complex_id?: string | null
|
||||||
complex_id: string
|
is_default_guild_good?: boolean
|
||||||
|
guild_id?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
deleted_at?: Date | string | null
|
deleted_at?: Date | string | null
|
||||||
@@ -308,12 +328,13 @@ export type GoodCategoryUpdateInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||||
|
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||||
|
complex?: Prisma.ComplexUpdateOneWithoutGood_categoriesNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GoodCategoryUncheckedUpdateInput = {
|
export type GoodCategoryUncheckedUpdateInput = {
|
||||||
@@ -321,8 +342,9 @@ export type GoodCategoryUncheckedUpdateInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -334,8 +356,9 @@ export type GoodCategoryCreateManyInput = {
|
|||||||
name: string
|
name: string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
image_url?: string | null
|
image_url?: string | null
|
||||||
account_id: string
|
complex_id?: string | null
|
||||||
complex_id: string
|
is_default_guild_good?: boolean
|
||||||
|
guild_id?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
deleted_at?: Date | string | null
|
deleted_at?: Date | string | null
|
||||||
@@ -346,8 +369,7 @@ export type GoodCategoryUpdateManyMutationInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -358,13 +380,24 @@ export type GoodCategoryUncheckedUpdateManyInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryListRelationFilter = {
|
||||||
|
every?: Prisma.GoodCategoryWhereInput
|
||||||
|
some?: Prisma.GoodCategoryWhereInput
|
||||||
|
none?: Prisma.GoodCategoryWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryOrderByRelationAggregateInput = {
|
||||||
|
_count?: Prisma.SortOrder
|
||||||
|
}
|
||||||
|
|
||||||
export type GoodCategoryNullableScalarRelationFilter = {
|
export type GoodCategoryNullableScalarRelationFilter = {
|
||||||
is?: Prisma.GoodCategoryWhereInput | null
|
is?: Prisma.GoodCategoryWhereInput | null
|
||||||
isNot?: Prisma.GoodCategoryWhereInput | null
|
isNot?: Prisma.GoodCategoryWhereInput | null
|
||||||
@@ -381,8 +414,9 @@ export type GoodCategoryCountOrderByAggregateInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
image_url?: Prisma.SortOrder
|
image_url?: Prisma.SortOrder
|
||||||
account_id?: Prisma.SortOrder
|
|
||||||
complex_id?: Prisma.SortOrder
|
complex_id?: Prisma.SortOrder
|
||||||
|
is_default_guild_good?: Prisma.SortOrder
|
||||||
|
guild_id?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
deleted_at?: Prisma.SortOrder
|
deleted_at?: Prisma.SortOrder
|
||||||
@@ -393,8 +427,9 @@ export type GoodCategoryMaxOrderByAggregateInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
image_url?: Prisma.SortOrder
|
image_url?: Prisma.SortOrder
|
||||||
account_id?: Prisma.SortOrder
|
|
||||||
complex_id?: Prisma.SortOrder
|
complex_id?: Prisma.SortOrder
|
||||||
|
is_default_guild_good?: Prisma.SortOrder
|
||||||
|
guild_id?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
deleted_at?: Prisma.SortOrder
|
deleted_at?: Prisma.SortOrder
|
||||||
@@ -405,13 +440,98 @@ export type GoodCategoryMinOrderByAggregateInput = {
|
|||||||
name?: Prisma.SortOrder
|
name?: Prisma.SortOrder
|
||||||
description?: Prisma.SortOrder
|
description?: Prisma.SortOrder
|
||||||
image_url?: Prisma.SortOrder
|
image_url?: Prisma.SortOrder
|
||||||
account_id?: Prisma.SortOrder
|
|
||||||
complex_id?: Prisma.SortOrder
|
complex_id?: Prisma.SortOrder
|
||||||
|
is_default_guild_good?: Prisma.SortOrder
|
||||||
|
guild_id?: Prisma.SortOrder
|
||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
updated_at?: Prisma.SortOrder
|
updated_at?: Prisma.SortOrder
|
||||||
deleted_at?: Prisma.SortOrder
|
deleted_at?: Prisma.SortOrder
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateNestedManyWithoutGuildInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput> | Prisma.GoodCategoryCreateWithoutGuildInput[] | Prisma.GoodCategoryUncheckedCreateWithoutGuildInput[]
|
||||||
|
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGuildInput | Prisma.GoodCategoryCreateOrConnectWithoutGuildInput[]
|
||||||
|
createMany?: Prisma.GoodCategoryCreateManyGuildInputEnvelope
|
||||||
|
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedCreateNestedManyWithoutGuildInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput> | Prisma.GoodCategoryCreateWithoutGuildInput[] | Prisma.GoodCategoryUncheckedCreateWithoutGuildInput[]
|
||||||
|
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGuildInput | Prisma.GoodCategoryCreateOrConnectWithoutGuildInput[]
|
||||||
|
createMany?: Prisma.GoodCategoryCreateManyGuildInputEnvelope
|
||||||
|
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpdateManyWithoutGuildNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput> | Prisma.GoodCategoryCreateWithoutGuildInput[] | Prisma.GoodCategoryUncheckedCreateWithoutGuildInput[]
|
||||||
|
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGuildInput | Prisma.GoodCategoryCreateOrConnectWithoutGuildInput[]
|
||||||
|
upsert?: Prisma.GoodCategoryUpsertWithWhereUniqueWithoutGuildInput | Prisma.GoodCategoryUpsertWithWhereUniqueWithoutGuildInput[]
|
||||||
|
createMany?: Prisma.GoodCategoryCreateManyGuildInputEnvelope
|
||||||
|
set?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
delete?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
update?: Prisma.GoodCategoryUpdateWithWhereUniqueWithoutGuildInput | Prisma.GoodCategoryUpdateWithWhereUniqueWithoutGuildInput[]
|
||||||
|
updateMany?: Prisma.GoodCategoryUpdateManyWithWhereWithoutGuildInput | Prisma.GoodCategoryUpdateManyWithWhereWithoutGuildInput[]
|
||||||
|
deleteMany?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedUpdateManyWithoutGuildNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput> | Prisma.GoodCategoryCreateWithoutGuildInput[] | Prisma.GoodCategoryUncheckedCreateWithoutGuildInput[]
|
||||||
|
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGuildInput | Prisma.GoodCategoryCreateOrConnectWithoutGuildInput[]
|
||||||
|
upsert?: Prisma.GoodCategoryUpsertWithWhereUniqueWithoutGuildInput | Prisma.GoodCategoryUpsertWithWhereUniqueWithoutGuildInput[]
|
||||||
|
createMany?: Prisma.GoodCategoryCreateManyGuildInputEnvelope
|
||||||
|
set?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
delete?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
update?: Prisma.GoodCategoryUpdateWithWhereUniqueWithoutGuildInput | Prisma.GoodCategoryUpdateWithWhereUniqueWithoutGuildInput[]
|
||||||
|
updateMany?: Prisma.GoodCategoryUpdateManyWithWhereWithoutGuildInput | Prisma.GoodCategoryUpdateManyWithWhereWithoutGuildInput[]
|
||||||
|
deleteMany?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateNestedManyWithoutComplexInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput> | Prisma.GoodCategoryCreateWithoutComplexInput[] | Prisma.GoodCategoryUncheckedCreateWithoutComplexInput[]
|
||||||
|
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutComplexInput | Prisma.GoodCategoryCreateOrConnectWithoutComplexInput[]
|
||||||
|
createMany?: Prisma.GoodCategoryCreateManyComplexInputEnvelope
|
||||||
|
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedCreateNestedManyWithoutComplexInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput> | Prisma.GoodCategoryCreateWithoutComplexInput[] | Prisma.GoodCategoryUncheckedCreateWithoutComplexInput[]
|
||||||
|
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutComplexInput | Prisma.GoodCategoryCreateOrConnectWithoutComplexInput[]
|
||||||
|
createMany?: Prisma.GoodCategoryCreateManyComplexInputEnvelope
|
||||||
|
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpdateManyWithoutComplexNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput> | Prisma.GoodCategoryCreateWithoutComplexInput[] | Prisma.GoodCategoryUncheckedCreateWithoutComplexInput[]
|
||||||
|
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutComplexInput | Prisma.GoodCategoryCreateOrConnectWithoutComplexInput[]
|
||||||
|
upsert?: Prisma.GoodCategoryUpsertWithWhereUniqueWithoutComplexInput | Prisma.GoodCategoryUpsertWithWhereUniqueWithoutComplexInput[]
|
||||||
|
createMany?: Prisma.GoodCategoryCreateManyComplexInputEnvelope
|
||||||
|
set?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
delete?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
update?: Prisma.GoodCategoryUpdateWithWhereUniqueWithoutComplexInput | Prisma.GoodCategoryUpdateWithWhereUniqueWithoutComplexInput[]
|
||||||
|
updateMany?: Prisma.GoodCategoryUpdateManyWithWhereWithoutComplexInput | Prisma.GoodCategoryUpdateManyWithWhereWithoutComplexInput[]
|
||||||
|
deleteMany?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput = {
|
||||||
|
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput> | Prisma.GoodCategoryCreateWithoutComplexInput[] | Prisma.GoodCategoryUncheckedCreateWithoutComplexInput[]
|
||||||
|
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutComplexInput | Prisma.GoodCategoryCreateOrConnectWithoutComplexInput[]
|
||||||
|
upsert?: Prisma.GoodCategoryUpsertWithWhereUniqueWithoutComplexInput | Prisma.GoodCategoryUpsertWithWhereUniqueWithoutComplexInput[]
|
||||||
|
createMany?: Prisma.GoodCategoryCreateManyComplexInputEnvelope
|
||||||
|
set?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
disconnect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
delete?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
connect?: Prisma.GoodCategoryWhereUniqueInput | Prisma.GoodCategoryWhereUniqueInput[]
|
||||||
|
update?: Prisma.GoodCategoryUpdateWithWhereUniqueWithoutComplexInput | Prisma.GoodCategoryUpdateWithWhereUniqueWithoutComplexInput[]
|
||||||
|
updateMany?: Prisma.GoodCategoryUpdateManyWithWhereWithoutComplexInput | Prisma.GoodCategoryUpdateManyWithWhereWithoutComplexInput[]
|
||||||
|
deleteMany?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||||
|
}
|
||||||
|
|
||||||
export type GoodCategoryCreateNestedOneWithoutGoodsInput = {
|
export type GoodCategoryCreateNestedOneWithoutGoodsInput = {
|
||||||
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGoodsInput, Prisma.GoodCategoryUncheckedCreateWithoutGoodsInput>
|
create?: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGoodsInput, Prisma.GoodCategoryUncheckedCreateWithoutGoodsInput>
|
||||||
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGoodsInput
|
connectOrCreate?: Prisma.GoodCategoryCreateOrConnectWithoutGoodsInput
|
||||||
@@ -428,16 +548,137 @@ export type GoodCategoryUpdateOneWithoutGoodsNestedInput = {
|
|||||||
update?: Prisma.XOR<Prisma.XOR<Prisma.GoodCategoryUpdateToOneWithWhereWithoutGoodsInput, Prisma.GoodCategoryUpdateWithoutGoodsInput>, Prisma.GoodCategoryUncheckedUpdateWithoutGoodsInput>
|
update?: Prisma.XOR<Prisma.XOR<Prisma.GoodCategoryUpdateToOneWithWhereWithoutGoodsInput, Prisma.GoodCategoryUpdateWithoutGoodsInput>, Prisma.GoodCategoryUncheckedUpdateWithoutGoodsInput>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateWithoutGuildInput = {
|
||||||
|
id?: string
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
image_url?: string | null
|
||||||
|
is_default_guild_good?: boolean
|
||||||
|
created_at?: Date | string
|
||||||
|
updated_at?: Date | string
|
||||||
|
deleted_at?: Date | string | null
|
||||||
|
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||||
|
complex?: Prisma.ComplexCreateNestedOneWithoutGood_categoriesInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedCreateWithoutGuildInput = {
|
||||||
|
id?: string
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
image_url?: string | null
|
||||||
|
complex_id?: string | null
|
||||||
|
is_default_guild_good?: boolean
|
||||||
|
created_at?: Date | string
|
||||||
|
updated_at?: Date | string
|
||||||
|
deleted_at?: Date | string | null
|
||||||
|
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutCategoryInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateOrConnectWithoutGuildInput = {
|
||||||
|
where: Prisma.GoodCategoryWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateManyGuildInputEnvelope = {
|
||||||
|
data: Prisma.GoodCategoryCreateManyGuildInput | Prisma.GoodCategoryCreateManyGuildInput[]
|
||||||
|
skipDuplicates?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpsertWithWhereUniqueWithoutGuildInput = {
|
||||||
|
where: Prisma.GoodCategoryWhereUniqueInput
|
||||||
|
update: Prisma.XOR<Prisma.GoodCategoryUpdateWithoutGuildInput, Prisma.GoodCategoryUncheckedUpdateWithoutGuildInput>
|
||||||
|
create: Prisma.XOR<Prisma.GoodCategoryCreateWithoutGuildInput, Prisma.GoodCategoryUncheckedCreateWithoutGuildInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpdateWithWhereUniqueWithoutGuildInput = {
|
||||||
|
where: Prisma.GoodCategoryWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.GoodCategoryUpdateWithoutGuildInput, Prisma.GoodCategoryUncheckedUpdateWithoutGuildInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpdateManyWithWhereWithoutGuildInput = {
|
||||||
|
where: Prisma.GoodCategoryScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.GoodCategoryUpdateManyMutationInput, Prisma.GoodCategoryUncheckedUpdateManyWithoutGuildInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryScalarWhereInput = {
|
||||||
|
AND?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||||
|
OR?: Prisma.GoodCategoryScalarWhereInput[]
|
||||||
|
NOT?: Prisma.GoodCategoryScalarWhereInput | Prisma.GoodCategoryScalarWhereInput[]
|
||||||
|
id?: Prisma.StringFilter<"GoodCategory"> | string
|
||||||
|
name?: Prisma.StringFilter<"GoodCategory"> | string
|
||||||
|
description?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
|
image_url?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
|
complex_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
|
is_default_guild_good?: Prisma.BoolFilter<"GoodCategory"> | boolean
|
||||||
|
guild_id?: Prisma.StringNullableFilter<"GoodCategory"> | string | null
|
||||||
|
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||||
|
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||||
|
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateWithoutComplexInput = {
|
||||||
|
id?: string
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
image_url?: string | null
|
||||||
|
is_default_guild_good?: boolean
|
||||||
|
created_at?: Date | string
|
||||||
|
updated_at?: Date | string
|
||||||
|
deleted_at?: Date | string | null
|
||||||
|
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||||
|
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedCreateWithoutComplexInput = {
|
||||||
|
id?: string
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
image_url?: string | null
|
||||||
|
is_default_guild_good?: boolean
|
||||||
|
guild_id?: string | null
|
||||||
|
created_at?: Date | string
|
||||||
|
updated_at?: Date | string
|
||||||
|
deleted_at?: Date | string | null
|
||||||
|
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutCategoryInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateOrConnectWithoutComplexInput = {
|
||||||
|
where: Prisma.GoodCategoryWhereUniqueInput
|
||||||
|
create: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateManyComplexInputEnvelope = {
|
||||||
|
data: Prisma.GoodCategoryCreateManyComplexInput | Prisma.GoodCategoryCreateManyComplexInput[]
|
||||||
|
skipDuplicates?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpsertWithWhereUniqueWithoutComplexInput = {
|
||||||
|
where: Prisma.GoodCategoryWhereUniqueInput
|
||||||
|
update: Prisma.XOR<Prisma.GoodCategoryUpdateWithoutComplexInput, Prisma.GoodCategoryUncheckedUpdateWithoutComplexInput>
|
||||||
|
create: Prisma.XOR<Prisma.GoodCategoryCreateWithoutComplexInput, Prisma.GoodCategoryUncheckedCreateWithoutComplexInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpdateWithWhereUniqueWithoutComplexInput = {
|
||||||
|
where: Prisma.GoodCategoryWhereUniqueInput
|
||||||
|
data: Prisma.XOR<Prisma.GoodCategoryUpdateWithoutComplexInput, Prisma.GoodCategoryUncheckedUpdateWithoutComplexInput>
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpdateManyWithWhereWithoutComplexInput = {
|
||||||
|
where: Prisma.GoodCategoryScalarWhereInput
|
||||||
|
data: Prisma.XOR<Prisma.GoodCategoryUpdateManyMutationInput, Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexInput>
|
||||||
|
}
|
||||||
|
|
||||||
export type GoodCategoryCreateWithoutGoodsInput = {
|
export type GoodCategoryCreateWithoutGoodsInput = {
|
||||||
id?: string
|
id?: string
|
||||||
name: string
|
name: string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
image_url?: string | null
|
image_url?: string | null
|
||||||
account_id: string
|
is_default_guild_good?: boolean
|
||||||
complex_id: string
|
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
deleted_at?: Date | string | null
|
deleted_at?: Date | string | null
|
||||||
|
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||||
|
complex?: Prisma.ComplexCreateNestedOneWithoutGood_categoriesInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GoodCategoryUncheckedCreateWithoutGoodsInput = {
|
export type GoodCategoryUncheckedCreateWithoutGoodsInput = {
|
||||||
@@ -445,8 +686,9 @@ export type GoodCategoryUncheckedCreateWithoutGoodsInput = {
|
|||||||
name: string
|
name: string
|
||||||
description?: string | null
|
description?: string | null
|
||||||
image_url?: string | null
|
image_url?: string | null
|
||||||
account_id: string
|
complex_id?: string | null
|
||||||
complex_id: string
|
is_default_guild_good?: boolean
|
||||||
|
guild_id?: string | null
|
||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
updated_at?: Date | string
|
updated_at?: Date | string
|
||||||
deleted_at?: Date | string | null
|
deleted_at?: Date | string | null
|
||||||
@@ -473,11 +715,12 @@ export type GoodCategoryUpdateWithoutGoodsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||||
|
complex?: Prisma.ComplexUpdateOneWithoutGood_categoriesNestedInput
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GoodCategoryUncheckedUpdateWithoutGoodsInput = {
|
export type GoodCategoryUncheckedUpdateWithoutGoodsInput = {
|
||||||
@@ -485,8 +728,109 @@ export type GoodCategoryUncheckedUpdateWithoutGoodsInput = {
|
|||||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateManyGuildInput = {
|
||||||
|
id?: string
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
image_url?: string | null
|
||||||
|
complex_id?: string | null
|
||||||
|
is_default_guild_good?: boolean
|
||||||
|
created_at?: Date | string
|
||||||
|
updated_at?: Date | string
|
||||||
|
deleted_at?: Date | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpdateWithoutGuildInput = {
|
||||||
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||||
|
complex?: Prisma.ComplexUpdateOneWithoutGood_categoriesNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedUpdateWithoutGuildInput = {
|
||||||
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
goods?: Prisma.GoodUncheckedUpdateManyWithoutCategoryNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedUpdateManyWithoutGuildInput = {
|
||||||
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
complex_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryCreateManyComplexInput = {
|
||||||
|
id?: string
|
||||||
|
name: string
|
||||||
|
description?: string | null
|
||||||
|
image_url?: string | null
|
||||||
|
is_default_guild_good?: boolean
|
||||||
|
guild_id?: string | null
|
||||||
|
created_at?: Date | string
|
||||||
|
updated_at?: Date | string
|
||||||
|
deleted_at?: Date | string | null
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUpdateWithoutComplexInput = {
|
||||||
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||||
|
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedUpdateWithoutComplexInput = {
|
||||||
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
|
goods?: Prisma.GoodUncheckedUpdateManyWithoutCategoryNestedInput
|
||||||
|
}
|
||||||
|
|
||||||
|
export type GoodCategoryUncheckedUpdateManyWithoutComplexInput = {
|
||||||
|
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
|
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
|
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||||
|
guild_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||||
@@ -528,12 +872,15 @@ export type GoodCategorySelect<ExtArgs extends runtime.Types.Extensions.Internal
|
|||||||
name?: boolean
|
name?: boolean
|
||||||
description?: boolean
|
description?: boolean
|
||||||
image_url?: boolean
|
image_url?: boolean
|
||||||
account_id?: boolean
|
|
||||||
complex_id?: boolean
|
complex_id?: boolean
|
||||||
|
is_default_guild_good?: boolean
|
||||||
|
guild_id?: boolean
|
||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
updated_at?: boolean
|
updated_at?: boolean
|
||||||
deleted_at?: boolean
|
deleted_at?: boolean
|
||||||
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
||||||
|
guild?: boolean | Prisma.GoodCategory$guildArgs<ExtArgs>
|
||||||
|
complex?: boolean | Prisma.GoodCategory$complexArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}, ExtArgs["result"]["goodCategory"]>
|
}, ExtArgs["result"]["goodCategory"]>
|
||||||
|
|
||||||
@@ -544,16 +891,19 @@ export type GoodCategorySelectScalar = {
|
|||||||
name?: boolean
|
name?: boolean
|
||||||
description?: boolean
|
description?: boolean
|
||||||
image_url?: boolean
|
image_url?: boolean
|
||||||
account_id?: boolean
|
|
||||||
complex_id?: boolean
|
complex_id?: boolean
|
||||||
|
is_default_guild_good?: boolean
|
||||||
|
guild_id?: boolean
|
||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
updated_at?: boolean
|
updated_at?: boolean
|
||||||
deleted_at?: boolean
|
deleted_at?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type GoodCategoryOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "image_url" | "account_id" | "complex_id" | "created_at" | "updated_at" | "deleted_at", ExtArgs["result"]["goodCategory"]>
|
export type GoodCategoryOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "image_url" | "complex_id" | "is_default_guild_good" | "guild_id" | "created_at" | "updated_at" | "deleted_at", ExtArgs["result"]["goodCategory"]>
|
||||||
export type GoodCategoryInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
export type GoodCategoryInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
||||||
|
guild?: boolean | Prisma.GoodCategory$guildArgs<ExtArgs>
|
||||||
|
complex?: boolean | Prisma.GoodCategory$complexArgs<ExtArgs>
|
||||||
_count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs<ExtArgs>
|
_count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs<ExtArgs>
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -561,14 +911,17 @@ export type $GoodCategoryPayload<ExtArgs extends runtime.Types.Extensions.Intern
|
|||||||
name: "GoodCategory"
|
name: "GoodCategory"
|
||||||
objects: {
|
objects: {
|
||||||
goods: Prisma.$GoodPayload<ExtArgs>[]
|
goods: Prisma.$GoodPayload<ExtArgs>[]
|
||||||
|
guild: Prisma.$GuildPayload<ExtArgs> | null
|
||||||
|
complex: Prisma.$ComplexPayload<ExtArgs> | null
|
||||||
}
|
}
|
||||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||||
id: string
|
id: string
|
||||||
name: string
|
name: string
|
||||||
description: string | null
|
description: string | null
|
||||||
image_url: string | null
|
image_url: string | null
|
||||||
account_id: string
|
complex_id: string | null
|
||||||
complex_id: string
|
is_default_guild_good: boolean
|
||||||
|
guild_id: string | null
|
||||||
created_at: Date
|
created_at: Date
|
||||||
updated_at: Date
|
updated_at: Date
|
||||||
deleted_at: Date | null
|
deleted_at: Date | null
|
||||||
@@ -913,6 +1266,8 @@ readonly fields: GoodCategoryFieldRefs;
|
|||||||
export interface Prisma__GoodCategoryClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
export interface Prisma__GoodCategoryClient<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"
|
||||||
goods<T extends Prisma.GoodCategory$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
goods<T extends Prisma.GoodCategory$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||||
|
guild<T extends Prisma.GoodCategory$guildArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$guildArgs<ExtArgs>>): Prisma.Prisma__GuildClient<runtime.Types.Result.GetResult<Prisma.$GuildPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||||
|
complex<T extends Prisma.GoodCategory$complexArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$complexArgs<ExtArgs>>): Prisma.Prisma__ComplexClient<runtime.Types.Result.GetResult<Prisma.$ComplexPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||||
/**
|
/**
|
||||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||||
@@ -946,8 +1301,9 @@ export interface GoodCategoryFieldRefs {
|
|||||||
readonly name: Prisma.FieldRef<"GoodCategory", 'String'>
|
readonly name: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||||
readonly description: Prisma.FieldRef<"GoodCategory", 'String'>
|
readonly description: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||||
readonly image_url: Prisma.FieldRef<"GoodCategory", 'String'>
|
readonly image_url: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||||
readonly account_id: Prisma.FieldRef<"GoodCategory", 'String'>
|
|
||||||
readonly complex_id: Prisma.FieldRef<"GoodCategory", 'String'>
|
readonly complex_id: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||||
|
readonly is_default_guild_good: Prisma.FieldRef<"GoodCategory", 'Boolean'>
|
||||||
|
readonly guild_id: Prisma.FieldRef<"GoodCategory", 'String'>
|
||||||
readonly created_at: Prisma.FieldRef<"GoodCategory", 'DateTime'>
|
readonly created_at: Prisma.FieldRef<"GoodCategory", 'DateTime'>
|
||||||
readonly updated_at: Prisma.FieldRef<"GoodCategory", 'DateTime'>
|
readonly updated_at: Prisma.FieldRef<"GoodCategory", 'DateTime'>
|
||||||
readonly deleted_at: Prisma.FieldRef<"GoodCategory", 'DateTime'>
|
readonly deleted_at: Prisma.FieldRef<"GoodCategory", 'DateTime'>
|
||||||
@@ -1317,6 +1673,44 @@ export type GoodCategory$goodsArgs<ExtArgs extends runtime.Types.Extensions.Inte
|
|||||||
distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[]
|
distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GoodCategory.guild
|
||||||
|
*/
|
||||||
|
export type GoodCategory$guildArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the Guild
|
||||||
|
*/
|
||||||
|
select?: Prisma.GuildSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the Guild
|
||||||
|
*/
|
||||||
|
omit?: Prisma.GuildOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.GuildInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.GuildWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* GoodCategory.complex
|
||||||
|
*/
|
||||||
|
export type GoodCategory$complexArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||||
|
/**
|
||||||
|
* Select specific fields to fetch from the Complex
|
||||||
|
*/
|
||||||
|
select?: Prisma.ComplexSelect<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Omit specific fields from the Complex
|
||||||
|
*/
|
||||||
|
omit?: Prisma.ComplexOmit<ExtArgs> | null
|
||||||
|
/**
|
||||||
|
* Choose, which related nodes to fetch as well
|
||||||
|
*/
|
||||||
|
include?: Prisma.ComplexInclude<ExtArgs> | null
|
||||||
|
where?: Prisma.ComplexWhereInput
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GoodCategory without action
|
* GoodCategory without action
|
||||||
*/
|
*/
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -555,6 +555,14 @@ export type SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput = {
|
|||||||
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
deleteMany?: Prisma.SalesInvoiceScalarWhereInput | Prisma.SalesInvoiceScalarWhereInput[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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 SalesInvoiceCreateNestedOneWithoutItemsInput = {
|
export type SalesInvoiceCreateNestedOneWithoutItemsInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutItemsInput, Prisma.SalesInvoiceUncheckedCreateWithoutItemsInput>
|
create?: Prisma.XOR<Prisma.SalesInvoiceCreateWithoutItemsInput, Prisma.SalesInvoiceUncheckedCreateWithoutItemsInput>
|
||||||
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutItemsInput
|
connectOrCreate?: Prisma.SalesInvoiceCreateOrConnectWithoutItemsInput
|
||||||
|
|||||||
@@ -49,7 +49,6 @@ export type SalesInvoiceItemMinAggregateOutputType = {
|
|||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
discount: runtime.Decimal | null
|
discount: runtime.Decimal | null
|
||||||
notes: string | null
|
notes: string | null
|
||||||
pricingModel: $Enums.SalesInvoiceItemPricingModel | null
|
|
||||||
invoice_id: string | null
|
invoice_id: string | null
|
||||||
good_id: string | null
|
good_id: string | null
|
||||||
service_id: string | null
|
service_id: string | null
|
||||||
@@ -64,7 +63,6 @@ export type SalesInvoiceItemMaxAggregateOutputType = {
|
|||||||
created_at: Date | null
|
created_at: Date | null
|
||||||
discount: runtime.Decimal | null
|
discount: runtime.Decimal | null
|
||||||
notes: string | null
|
notes: string | null
|
||||||
pricingModel: $Enums.SalesInvoiceItemPricingModel | null
|
|
||||||
invoice_id: string | null
|
invoice_id: string | null
|
||||||
good_id: string | null
|
good_id: string | null
|
||||||
service_id: string | null
|
service_id: string | null
|
||||||
@@ -79,7 +77,6 @@ export type SalesInvoiceItemCountAggregateOutputType = {
|
|||||||
created_at: number
|
created_at: number
|
||||||
discount: number
|
discount: number
|
||||||
notes: number
|
notes: number
|
||||||
pricingModel: number
|
|
||||||
invoice_id: number
|
invoice_id: number
|
||||||
good_id: number
|
good_id: number
|
||||||
service_id: number
|
service_id: number
|
||||||
@@ -111,7 +108,6 @@ export type SalesInvoiceItemMinAggregateInputType = {
|
|||||||
created_at?: true
|
created_at?: true
|
||||||
discount?: true
|
discount?: true
|
||||||
notes?: true
|
notes?: true
|
||||||
pricingModel?: true
|
|
||||||
invoice_id?: true
|
invoice_id?: true
|
||||||
good_id?: true
|
good_id?: true
|
||||||
service_id?: true
|
service_id?: true
|
||||||
@@ -126,7 +122,6 @@ export type SalesInvoiceItemMaxAggregateInputType = {
|
|||||||
created_at?: true
|
created_at?: true
|
||||||
discount?: true
|
discount?: true
|
||||||
notes?: true
|
notes?: true
|
||||||
pricingModel?: true
|
|
||||||
invoice_id?: true
|
invoice_id?: true
|
||||||
good_id?: true
|
good_id?: true
|
||||||
service_id?: true
|
service_id?: true
|
||||||
@@ -141,7 +136,6 @@ export type SalesInvoiceItemCountAggregateInputType = {
|
|||||||
created_at?: true
|
created_at?: true
|
||||||
discount?: true
|
discount?: true
|
||||||
notes?: true
|
notes?: true
|
||||||
pricingModel?: true
|
|
||||||
invoice_id?: true
|
invoice_id?: true
|
||||||
good_id?: true
|
good_id?: true
|
||||||
service_id?: true
|
service_id?: true
|
||||||
@@ -244,7 +238,6 @@ export type SalesInvoiceItemGroupByOutputType = {
|
|||||||
created_at: Date
|
created_at: Date
|
||||||
discount: runtime.Decimal
|
discount: runtime.Decimal
|
||||||
notes: string | null
|
notes: string | null
|
||||||
pricingModel: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id: string | null
|
good_id: string | null
|
||||||
service_id: string | null
|
service_id: string | null
|
||||||
@@ -283,7 +276,6 @@ export type SalesInvoiceItemWhereInput = {
|
|||||||
created_at?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFilter<"SalesInvoiceItem"> | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||||
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
@@ -302,7 +294,6 @@ export type SalesInvoiceItemOrderByWithRelationInput = {
|
|||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
discount?: Prisma.SortOrder
|
discount?: Prisma.SortOrder
|
||||||
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
pricingModel?: Prisma.SortOrder
|
|
||||||
invoice_id?: Prisma.SortOrder
|
invoice_id?: Prisma.SortOrder
|
||||||
good_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
good_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
@@ -325,7 +316,6 @@ export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{
|
|||||||
created_at?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFilter<"SalesInvoiceItem"> | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||||
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
@@ -344,7 +334,6 @@ export type SalesInvoiceItemOrderByWithAggregationInput = {
|
|||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
discount?: Prisma.SortOrder
|
discount?: Prisma.SortOrder
|
||||||
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
notes?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
pricingModel?: Prisma.SortOrder
|
|
||||||
invoice_id?: Prisma.SortOrder
|
invoice_id?: Prisma.SortOrder
|
||||||
good_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
good_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||||
@@ -368,7 +357,6 @@ export type SalesInvoiceItemScalarWhereWithAggregatesInput = {
|
|||||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoiceItem"> | Date | string
|
created_at?: Prisma.DateTimeWithAggregatesFilter<"SalesInvoiceItem"> | Date | string
|
||||||
discount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
notes?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelWithAggregatesFilter<"SalesInvoiceItem"> | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringWithAggregatesFilter<"SalesInvoiceItem"> | string
|
invoice_id?: Prisma.StringWithAggregatesFilter<"SalesInvoiceItem"> | string
|
||||||
good_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
good_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
||||||
service_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
service_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
||||||
@@ -384,7 +372,6 @@ export type SalesInvoiceItemCreateInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
@@ -400,7 +387,6 @@ export type SalesInvoiceItemUncheckedCreateInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id?: string | null
|
good_id?: string | null
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
@@ -416,7 +402,6 @@ export type SalesInvoiceItemUpdateInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||||
@@ -432,7 +417,6 @@ export type SalesInvoiceItemUncheckedUpdateInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
@@ -448,7 +432,6 @@ export type SalesInvoiceItemCreateManyInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id?: string | null
|
good_id?: string | null
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
@@ -464,7 +447,6 @@ export type SalesInvoiceItemUpdateManyMutationInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,7 +459,6 @@ export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
@@ -509,7 +490,6 @@ export type SalesInvoiceItemCountOrderByAggregateInput = {
|
|||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
discount?: Prisma.SortOrder
|
discount?: Prisma.SortOrder
|
||||||
notes?: Prisma.SortOrder
|
notes?: Prisma.SortOrder
|
||||||
pricingModel?: Prisma.SortOrder
|
|
||||||
invoice_id?: Prisma.SortOrder
|
invoice_id?: Prisma.SortOrder
|
||||||
good_id?: Prisma.SortOrder
|
good_id?: Prisma.SortOrder
|
||||||
service_id?: Prisma.SortOrder
|
service_id?: Prisma.SortOrder
|
||||||
@@ -532,7 +512,6 @@ export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
|||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
discount?: Prisma.SortOrder
|
discount?: Prisma.SortOrder
|
||||||
notes?: Prisma.SortOrder
|
notes?: Prisma.SortOrder
|
||||||
pricingModel?: Prisma.SortOrder
|
|
||||||
invoice_id?: Prisma.SortOrder
|
invoice_id?: Prisma.SortOrder
|
||||||
good_id?: Prisma.SortOrder
|
good_id?: Prisma.SortOrder
|
||||||
service_id?: Prisma.SortOrder
|
service_id?: Prisma.SortOrder
|
||||||
@@ -547,7 +526,6 @@ export type SalesInvoiceItemMinOrderByAggregateInput = {
|
|||||||
created_at?: Prisma.SortOrder
|
created_at?: Prisma.SortOrder
|
||||||
discount?: Prisma.SortOrder
|
discount?: Prisma.SortOrder
|
||||||
notes?: Prisma.SortOrder
|
notes?: Prisma.SortOrder
|
||||||
pricingModel?: Prisma.SortOrder
|
|
||||||
invoice_id?: Prisma.SortOrder
|
invoice_id?: Prisma.SortOrder
|
||||||
good_id?: Prisma.SortOrder
|
good_id?: Prisma.SortOrder
|
||||||
service_id?: Prisma.SortOrder
|
service_id?: Prisma.SortOrder
|
||||||
@@ -648,10 +626,6 @@ export type EnumUnitTypeFieldUpdateOperationsInput = {
|
|||||||
set?: $Enums.UnitType
|
set?: $Enums.UnitType
|
||||||
}
|
}
|
||||||
|
|
||||||
export type EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput = {
|
|
||||||
set?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
}
|
|
||||||
|
|
||||||
export type SalesInvoiceItemCreateNestedManyWithoutServiceInput = {
|
export type SalesInvoiceItemCreateNestedManyWithoutServiceInput = {
|
||||||
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput> | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[]
|
create?: Prisma.XOR<Prisma.SalesInvoiceItemCreateWithoutServiceInput, Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput> | Prisma.SalesInvoiceItemCreateWithoutServiceInput[] | Prisma.SalesInvoiceItemUncheckedCreateWithoutServiceInput[]
|
||||||
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[]
|
connectOrCreate?: Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput | Prisma.SalesInvoiceItemCreateOrConnectWithoutServiceInput[]
|
||||||
@@ -703,7 +677,6 @@ export type SalesInvoiceItemCreateWithoutGoodInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
@@ -718,7 +691,6 @@ export type SalesInvoiceItemUncheckedCreateWithoutGoodInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -762,7 +734,6 @@ export type SalesInvoiceItemScalarWhereInput = {
|
|||||||
created_at?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
created_at?: Prisma.DateTimeFilter<"SalesInvoiceItem"> | Date | string
|
||||||
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
notes?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFilter<"SalesInvoiceItem"> | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||||
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
good_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||||
@@ -778,7 +749,6 @@ export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
@@ -793,7 +763,6 @@ export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
good_id?: string | null
|
good_id?: string | null
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -834,7 +803,6 @@ export type SalesInvoiceItemCreateWithoutServiceInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||||
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
good?: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||||
@@ -849,7 +817,6 @@ export type SalesInvoiceItemUncheckedCreateWithoutServiceInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id?: string | null
|
good_id?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -890,7 +857,6 @@ export type SalesInvoiceItemCreateManyGoodInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -905,7 +871,6 @@ export type SalesInvoiceItemUpdateWithoutGoodInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||||
@@ -920,7 +885,6 @@ export type SalesInvoiceItemUncheckedUpdateWithoutGoodInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -935,7 +899,6 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutGoodInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -950,7 +913,6 @@ export type SalesInvoiceItemCreateManyInvoiceInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
good_id?: string | null
|
good_id?: string | null
|
||||||
service_id?: string | null
|
service_id?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -965,7 +927,6 @@ export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||||
@@ -980,7 +941,6 @@ export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -995,7 +955,6 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -1010,7 +969,6 @@ export type SalesInvoiceItemCreateManyServiceInput = {
|
|||||||
created_at?: Date | string
|
created_at?: Date | string
|
||||||
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: string | null
|
notes?: string | null
|
||||||
pricingModel?: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id?: string | null
|
good_id?: string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -1025,7 +983,6 @@ export type SalesInvoiceItemUpdateWithoutServiceInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||||
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
good?: Prisma.GoodUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||||
@@ -1040,7 +997,6 @@ export type SalesInvoiceItemUncheckedUpdateWithoutServiceInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -1055,7 +1011,6 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput = {
|
|||||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||||
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
discount?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
pricingModel?: Prisma.EnumSalesInvoiceItemPricingModelFieldUpdateOperationsInput | $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||||
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
good_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||||
@@ -1072,7 +1027,6 @@ export type SalesInvoiceItemSelect<ExtArgs extends runtime.Types.Extensions.Inte
|
|||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
discount?: boolean
|
discount?: boolean
|
||||||
notes?: boolean
|
notes?: boolean
|
||||||
pricingModel?: boolean
|
|
||||||
invoice_id?: boolean
|
invoice_id?: boolean
|
||||||
good_id?: boolean
|
good_id?: boolean
|
||||||
service_id?: boolean
|
service_id?: boolean
|
||||||
@@ -1093,14 +1047,13 @@ export type SalesInvoiceItemSelectScalar = {
|
|||||||
created_at?: boolean
|
created_at?: boolean
|
||||||
discount?: boolean
|
discount?: boolean
|
||||||
notes?: boolean
|
notes?: boolean
|
||||||
pricingModel?: boolean
|
|
||||||
invoice_id?: boolean
|
invoice_id?: boolean
|
||||||
good_id?: boolean
|
good_id?: boolean
|
||||||
service_id?: boolean
|
service_id?: boolean
|
||||||
payload?: boolean
|
payload?: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "quantity" | "unit_type" | "unit_price" | "total_amount" | "created_at" | "discount" | "notes" | "pricingModel" | "invoice_id" | "good_id" | "service_id" | "payload", ExtArgs["result"]["salesInvoiceItem"]>
|
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "quantity" | "unit_type" | "unit_price" | "total_amount" | "created_at" | "discount" | "notes" | "invoice_id" | "good_id" | "service_id" | "payload", 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>
|
||||||
good?: boolean | Prisma.SalesInvoiceItem$goodArgs<ExtArgs>
|
good?: boolean | Prisma.SalesInvoiceItem$goodArgs<ExtArgs>
|
||||||
@@ -1123,7 +1076,6 @@ export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.In
|
|||||||
created_at: Date
|
created_at: Date
|
||||||
discount: runtime.Decimal
|
discount: runtime.Decimal
|
||||||
notes: string | null
|
notes: string | null
|
||||||
pricingModel: $Enums.SalesInvoiceItemPricingModel
|
|
||||||
invoice_id: string
|
invoice_id: string
|
||||||
good_id: string | null
|
good_id: string | null
|
||||||
service_id: string | null
|
service_id: string | null
|
||||||
@@ -1508,7 +1460,6 @@ export interface SalesInvoiceItemFieldRefs {
|
|||||||
readonly created_at: Prisma.FieldRef<"SalesInvoiceItem", 'DateTime'>
|
readonly created_at: Prisma.FieldRef<"SalesInvoiceItem", 'DateTime'>
|
||||||
readonly discount: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
readonly discount: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
||||||
readonly notes: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
readonly notes: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||||
readonly pricingModel: Prisma.FieldRef<"SalesInvoiceItem", 'SalesInvoiceItemPricingModel'>
|
|
||||||
readonly invoice_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
readonly invoice_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||||
readonly good_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
readonly good_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||||
readonly service_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
readonly service_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -5,9 +5,9 @@ import { DocumentBuilder, SwaggerModule } from '@nestjs/swagger'
|
|||||||
import { AppModule } from './app.module'
|
import { AppModule } from './app.module'
|
||||||
import { PrismaExceptionFilter } from './common/filters/prisma-exception.filter'
|
import { PrismaExceptionFilter } from './common/filters/prisma-exception.filter'
|
||||||
import { ValidationExceptionFilter } from './common/filters/validation-exception.filter'
|
import { ValidationExceptionFilter } from './common/filters/validation-exception.filter'
|
||||||
|
import { JwtAuthGuard } from './common/guards/jwt-auth.guard'
|
||||||
import { LoggingInterceptor } from './common/interceptors/logging.interceptor'
|
import { LoggingInterceptor } from './common/interceptors/logging.interceptor'
|
||||||
import { ResponseMappingInterceptor } from './common/interceptors/response-mapping.interceptor'
|
import { ResponseMappingInterceptor } from './common/interceptors/response-mapping.interceptor'
|
||||||
import { JwtAuthGuard } from './modules/auth/jwt-auth.guard'
|
|
||||||
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
const app = await NestFactory.create(AppModule)
|
const app = await NestFactory.create(AppModule)
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { Controller } from '@nestjs/common'
|
||||||
|
import { ApiTags } from '@nestjs/swagger'
|
||||||
|
|
||||||
|
@ApiTags('Admin')
|
||||||
|
@Controller('admin')
|
||||||
|
export class AdminController {}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
// import { Injectable, CanActivate, ExecutionContext } from '@nestjs/common'
|
||||||
|
// import { Observable } from 'rxjs'
|
||||||
|
|
||||||
|
// @Injectable()
|
||||||
|
// export class AdminGuard implements CanActivate {
|
||||||
|
// canActivate(
|
||||||
|
// _context: ExecutionContext,
|
||||||
|
// ): boolean | Promise<boolean> | Observable<boolean> {
|
||||||
|
// // Replace with real auth/permission checks (e.g., check JWT claims)
|
||||||
|
// const request = _context.switchToHttp().getRequest()
|
||||||
|
// const isAdminHeader = request.headers['x-admin']
|
||||||
|
// return isAdminHeader === 'true' || request.isAdminRequest === true
|
||||||
|
// }
|
||||||
|
// }
|
||||||
@@ -0,0 +1,24 @@
|
|||||||
|
import { Injectable, NestMiddleware, UnauthorizedException } from '@nestjs/common'
|
||||||
|
import { NextFunction, Request, Response } from 'express'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class AdminMiddleware implements NestMiddleware {
|
||||||
|
use(req: Request, _res: Response, next: NextFunction) {
|
||||||
|
console.log('first')
|
||||||
|
// @ts-ignore
|
||||||
|
console.log(req.dataPayload)
|
||||||
|
// const a = reqTokenPayload()
|
||||||
|
// console.log(a)
|
||||||
|
|
||||||
|
// Middleware-based admin check (replace with real auth logic)
|
||||||
|
const isAdminHeader = req.headers['x-admin']
|
||||||
|
|
||||||
|
if (isAdminHeader === 'true') {
|
||||||
|
// mark request if needed downstream
|
||||||
|
req['isAdminRequest'] = true
|
||||||
|
}
|
||||||
|
return next()
|
||||||
|
|
||||||
|
throw new UnauthorizedException('Admin access required')
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,38 @@
|
|||||||
|
import { MiddlewareConsumer, Module, NestModule, RequestMethod } from '@nestjs/common'
|
||||||
|
import { AdminController } from './admin.controller'
|
||||||
|
import { AdminMiddleware } from './admin.middleware'
|
||||||
|
import { AdminDeviceBrandsModule } from './device-brands/device-brands.module'
|
||||||
|
import { AdminDevicesModule } from './devices/devices.module'
|
||||||
|
import { AdminGuildsModule } from './guilds/guilds.module'
|
||||||
|
import { AdminLicensesModule } from './licenses/licenses.module'
|
||||||
|
import { AdminPartnersModule } from './partners/partners.module'
|
||||||
|
import { AdminProvidersModule } from './providers/providers.module'
|
||||||
|
import { AdminTranslateModule } from './translate/translate.module'
|
||||||
|
import { AdminUserAccountsModule } from './users/accounts/accounts.module'
|
||||||
|
import { AdminUsersModule } from './users/users.module'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
controllers: [AdminController],
|
||||||
|
imports: [
|
||||||
|
AdminUsersModule,
|
||||||
|
AdminUserAccountsModule,
|
||||||
|
AdminTranslateModule,
|
||||||
|
AdminProvidersModule,
|
||||||
|
AdminPartnersModule,
|
||||||
|
AdminPartnersModule,
|
||||||
|
AdminGuildsModule,
|
||||||
|
AdminDeviceBrandsModule,
|
||||||
|
AdminDevicesModule,
|
||||||
|
AdminLicensesModule,
|
||||||
|
],
|
||||||
|
})
|
||||||
|
export class AdminModule implements NestModule {
|
||||||
|
configure(consumer: MiddlewareConsumer) {
|
||||||
|
// apply middleware to all routes within this module (scoped under /admin)
|
||||||
|
consumer.apply(AdminMiddleware).forRoutes({
|
||||||
|
path: '/admin*path',
|
||||||
|
method: RequestMethod.ALL,
|
||||||
|
version: '1',
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||||
|
import { DeviceBrandsService } from './device-brands.service'
|
||||||
|
import { CreateDeviceBrandDto } from './dto/create-device-brand.dto'
|
||||||
|
import { UpdateDeviceBrandDto } from './dto/update-device-brand.dto'
|
||||||
|
|
||||||
|
@Controller('admin/device_brands')
|
||||||
|
export class DeviceBrandsController {
|
||||||
|
constructor(private readonly deviceBrandsService: DeviceBrandsService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
async findAll() {
|
||||||
|
return this.deviceBrandsService.findAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
async findOne(@Param('id') id: string) {
|
||||||
|
return this.deviceBrandsService.findOne(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
async create(@Body() data: CreateDeviceBrandDto) {
|
||||||
|
return this.deviceBrandsService.create(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Put(':id')
|
||||||
|
async update(@Param('id') id: string, @Body() data: UpdateDeviceBrandDto) {
|
||||||
|
return this.deviceBrandsService.update(id, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Delete(':id')
|
||||||
|
async delete(@Param('id') id: string) {
|
||||||
|
return this.deviceBrandsService.delete(id)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { PrismaModule } from '@/prisma/prisma.module'
|
||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { DeviceBrandsController } from './device-brands.controller'
|
||||||
|
import { DeviceBrandsService } from './device-brands.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [PrismaModule],
|
||||||
|
controllers: [DeviceBrandsController],
|
||||||
|
providers: [DeviceBrandsService],
|
||||||
|
})
|
||||||
|
export class AdminDeviceBrandsModule {}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { ResponseMapper } from 'common/response/response-mapper'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class DeviceBrandsService {
|
||||||
|
constructor(private readonly prisma: PrismaService) {}
|
||||||
|
|
||||||
|
async findAll() {
|
||||||
|
const brands = await this.prisma.deviceBrand.findMany()
|
||||||
|
return ResponseMapper.list(brands)
|
||||||
|
}
|
||||||
|
|
||||||
|
async findOne(id: string) {
|
||||||
|
const brand = await this.prisma.deviceBrand.findUnique({
|
||||||
|
where: { id },
|
||||||
|
})
|
||||||
|
return ResponseMapper.single(brand)
|
||||||
|
}
|
||||||
|
|
||||||
|
async create(data: any) {
|
||||||
|
const device = await this.prisma.deviceBrand.create({ data })
|
||||||
|
return ResponseMapper.create(device)
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(id: string, data: any) {
|
||||||
|
const device = await this.prisma.deviceBrand.update({ where: { id }, data })
|
||||||
|
return ResponseMapper.update(device)
|
||||||
|
}
|
||||||
|
|
||||||
|
async delete(id: string) {
|
||||||
|
await this.prisma.deviceBrand.delete({ where: { id } })
|
||||||
|
return ResponseMapper.delete()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,6 @@
|
|||||||
|
import { IsString } from 'class-validator'
|
||||||
|
|
||||||
|
export class CreateDeviceBrandDto {
|
||||||
|
@IsString()
|
||||||
|
name: string
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { PartialType } from '@nestjs/swagger'
|
||||||
|
import { CreateDeviceBrandDto } from './create-device-brand.dto'
|
||||||
|
|
||||||
|
export class UpdateDeviceBrandDto extends PartialType(CreateDeviceBrandDto) {}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||||
|
import { DevicesService } from './devices.service'
|
||||||
|
import { CreateDeviceDto, UpdateDeviceDto } from './dto/device.dto'
|
||||||
|
|
||||||
|
@Controller('admin/devices')
|
||||||
|
export class DevicesController {
|
||||||
|
constructor(private readonly devicesService: DevicesService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
async findAll() {
|
||||||
|
return this.devicesService.findAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
async findOne(@Param('id') id: string) {
|
||||||
|
return this.devicesService.findOne(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
async create(@Body() data: CreateDeviceDto) {
|
||||||
|
return this.devicesService.create(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Put(':id')
|
||||||
|
async update(@Param('id') id: string, @Body() data: UpdateDeviceDto) {
|
||||||
|
return this.devicesService.update(id, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Delete(':id')
|
||||||
|
async delete(@Param('id') id: string) {
|
||||||
|
return this.devicesService.delete(id)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,11 @@
|
|||||||
|
import { PrismaModule } from '@/prisma/prisma.module'
|
||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { DevicesController } from './devices.controller'
|
||||||
|
import { DevicesService } from './devices.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [PrismaModule],
|
||||||
|
controllers: [DevicesController],
|
||||||
|
providers: [DevicesService],
|
||||||
|
})
|
||||||
|
export class AdminDevicesModule {}
|
||||||
@@ -0,0 +1,52 @@
|
|||||||
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { ResponseMapper } from 'common/response/response-mapper'
|
||||||
|
import { CreateDeviceDto, UpdateDeviceDto } from './dto/device.dto'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class DevicesService {
|
||||||
|
constructor(private readonly prisma: PrismaService) {}
|
||||||
|
|
||||||
|
async findAll(page = 1, pageSize = 10) {
|
||||||
|
const [items, count] = await this.prisma.$transaction([
|
||||||
|
this.prisma.device.findMany({
|
||||||
|
skip: (page - 1) * pageSize,
|
||||||
|
take: pageSize,
|
||||||
|
include: { brand: true },
|
||||||
|
}),
|
||||||
|
this.prisma.device.count(),
|
||||||
|
])
|
||||||
|
return ResponseMapper.paginate(items, { count, page, pageSize })
|
||||||
|
}
|
||||||
|
|
||||||
|
async findOne(id: string) {
|
||||||
|
const item = await this.prisma.device.findUnique({
|
||||||
|
where: { id },
|
||||||
|
include: { brand: true },
|
||||||
|
})
|
||||||
|
return ResponseMapper.single(item)
|
||||||
|
}
|
||||||
|
|
||||||
|
async create(data: CreateDeviceDto) {
|
||||||
|
const { brand_id, ...rest } = data
|
||||||
|
|
||||||
|
const dataToCreate = {
|
||||||
|
...rest,
|
||||||
|
brand: { connect: { id: brand_id } },
|
||||||
|
}
|
||||||
|
const device = await this.prisma.device.create({
|
||||||
|
data: dataToCreate,
|
||||||
|
})
|
||||||
|
return ResponseMapper.create(device)
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(id: string, data: UpdateDeviceDto) {
|
||||||
|
const device = await this.prisma.device.update({ where: { id }, data })
|
||||||
|
return ResponseMapper.update(device)
|
||||||
|
}
|
||||||
|
|
||||||
|
async delete(id: string) {
|
||||||
|
await this.prisma.device.delete({ where: { id } })
|
||||||
|
return ResponseMapper.delete()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
import { IsOptional, IsString } from 'class-validator'
|
||||||
|
|
||||||
|
export class CreateDeviceDto {
|
||||||
|
@IsString()
|
||||||
|
name: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
os_version?: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
brand_id: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class UpdateDeviceDto {
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
name?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
os_version?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
brand_id?: string
|
||||||
|
}
|
||||||
@@ -0,0 +1,10 @@
|
|||||||
|
import { IsOptional, IsString } from 'class-validator'
|
||||||
|
|
||||||
|
export class CreateGuildDto {
|
||||||
|
@IsString()
|
||||||
|
name: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
code?: string
|
||||||
|
}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
import { PartialType } from '@nestjs/swagger'
|
||||||
|
import { CreateGuildDto } from './create-guild.dto'
|
||||||
|
|
||||||
|
export class UpdateGuildDto extends PartialType(CreateGuildDto) {}
|
||||||
@@ -0,0 +1,35 @@
|
|||||||
|
import { Body, Controller, Get, Param, Patch, Post } from '@nestjs/common'
|
||||||
|
import {
|
||||||
|
CreateGoodCategoryDto,
|
||||||
|
UpdateGoodCategoryDto,
|
||||||
|
} from './dto/create-good-category.dto'
|
||||||
|
import { GoodCategoriesService } from './good-categories.service'
|
||||||
|
|
||||||
|
@Controller('admin/guilds/:guildId/good_categories')
|
||||||
|
export class GoodCategoriesController {
|
||||||
|
constructor(private readonly goodCategoriesService: GoodCategoriesService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
findAll(@Param('guildId') guildId: string) {
|
||||||
|
return this.goodCategoriesService.findAll(guildId)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
findOne(@Param('guildId') guildId: string, @Param('id') id: string) {
|
||||||
|
return this.goodCategoriesService.findOne(guildId, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
create(@Param('guildId') guildId: string, @Body() data: CreateGoodCategoryDto) {
|
||||||
|
return this.goodCategoriesService.create(guildId, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Patch(':id')
|
||||||
|
update(
|
||||||
|
@Param('guildId') guildId: string,
|
||||||
|
@Param('id') id: string,
|
||||||
|
@Body() data: UpdateGoodCategoryDto,
|
||||||
|
) {
|
||||||
|
return this.goodCategoriesService.update(guildId, id, data)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { GoodCategoriesController } from './good-categories.controller'
|
||||||
|
import { GoodCategoriesService } from './good-categories.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
controllers: [GoodCategoriesController],
|
||||||
|
providers: [GoodCategoriesService],
|
||||||
|
})
|
||||||
|
export class GuildGoodCategoriesModule {}
|
||||||
@@ -0,0 +1,121 @@
|
|||||||
|
import { GoodCategoryOmit } from '@/generated/prisma/models'
|
||||||
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { ResponseMapper } from 'common/response/response-mapper'
|
||||||
|
import {
|
||||||
|
CreateGoodCategoryDto,
|
||||||
|
UpdateGoodCategoryDto,
|
||||||
|
} from './dto/create-good-category.dto'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class GoodCategoriesService {
|
||||||
|
constructor(private prisma: PrismaService) {}
|
||||||
|
|
||||||
|
private readonly goodCategoriesOmit = {
|
||||||
|
complex_id: true,
|
||||||
|
guild_id: true,
|
||||||
|
is_default_guild_good: true,
|
||||||
|
} as GoodCategoryOmit
|
||||||
|
|
||||||
|
async findAll(guild_id: string) {
|
||||||
|
const categories = await this.prisma.goodCategory.findMany({
|
||||||
|
where: {
|
||||||
|
guild_id,
|
||||||
|
is_default_guild_good: true,
|
||||||
|
},
|
||||||
|
include: {
|
||||||
|
_count: {
|
||||||
|
select: {
|
||||||
|
goods: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
omit: this.goodCategoriesOmit,
|
||||||
|
})
|
||||||
|
|
||||||
|
return ResponseMapper.list(
|
||||||
|
categories.map(category => {
|
||||||
|
const { _count, ...rest } = category
|
||||||
|
return {
|
||||||
|
...rest,
|
||||||
|
goods_count: Number(_count.goods),
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
async findOne(guild_id: string, categoryId: string) {
|
||||||
|
const category = await this.prisma.goodCategory.findUnique({
|
||||||
|
where: {
|
||||||
|
guild_id,
|
||||||
|
id: categoryId,
|
||||||
|
is_default_guild_good: true,
|
||||||
|
},
|
||||||
|
include: {
|
||||||
|
_count: {
|
||||||
|
select: {
|
||||||
|
goods: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
omit: this.goodCategoriesOmit,
|
||||||
|
})
|
||||||
|
|
||||||
|
return ResponseMapper.single({
|
||||||
|
...category,
|
||||||
|
goods_count: Number(category?._count.goods),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
create(guild_id: string, data: CreateGoodCategoryDto) {
|
||||||
|
const category = this.prisma.goodCategory.create({
|
||||||
|
data: {
|
||||||
|
guild: {
|
||||||
|
connect: {
|
||||||
|
id: guild_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
name: data.name,
|
||||||
|
image_url: data.image_url,
|
||||||
|
description: data.description,
|
||||||
|
is_default_guild_good: true,
|
||||||
|
},
|
||||||
|
omit: this.goodCategoriesOmit,
|
||||||
|
})
|
||||||
|
|
||||||
|
return ResponseMapper.create({ ...category, goods_count: 0 })
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(guild_id: string, id: string, data: UpdateGoodCategoryDto) {
|
||||||
|
const category = await this.prisma.goodCategory.update({
|
||||||
|
where: {
|
||||||
|
guild_id,
|
||||||
|
id,
|
||||||
|
},
|
||||||
|
data: {
|
||||||
|
guild: {
|
||||||
|
connect: {
|
||||||
|
id: guild_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
name: data.name,
|
||||||
|
image_url: data.image_url,
|
||||||
|
description: data.description,
|
||||||
|
is_default_guild_good: true,
|
||||||
|
},
|
||||||
|
include: {
|
||||||
|
_count: {
|
||||||
|
select: {
|
||||||
|
goods: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
omit: this.goodCategoriesOmit,
|
||||||
|
})
|
||||||
|
|
||||||
|
return ResponseMapper.update({
|
||||||
|
...category,
|
||||||
|
goods_count: Number(category?._count.goods),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||||
|
import { IsNumber, IsOptional, IsString } from 'class-validator'
|
||||||
|
|
||||||
|
export class CreateGoodDto {
|
||||||
|
@IsString()
|
||||||
|
@ApiProperty()
|
||||||
|
name: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
@ApiProperty()
|
||||||
|
sku: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
category_id: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
@IsOptional()
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
local_sku?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
barcode?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
description?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsNumber()
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
base_sale_price?: number
|
||||||
|
}
|
||||||
|
|
||||||
|
export class UpdateGoodDto extends PartialType(CreateGoodDto) {}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
import { Body, Controller, Get, Param, Post } from '@nestjs/common'
|
||||||
|
import { CreateGoodDto } from './dto/create-good.dto'
|
||||||
|
import { GoodsService } from './goods.service'
|
||||||
|
|
||||||
|
@Controller('admin/guilds/:guildId/goods')
|
||||||
|
export class GoodsController {
|
||||||
|
constructor(private readonly goodsService: GoodsService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
findAll(@Param('guildId') guildId: string) {
|
||||||
|
return this.goodsService.findAll(guildId)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
findOne(@Param('guildId') guildId: string, @Param('id') goodId: string) {
|
||||||
|
return this.goodsService.findOne(guildId, goodId)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
create(@Param('guildId') guildId: string, @Body() data: CreateGoodDto) {
|
||||||
|
return this.goodsService.create(guildId, data)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,9 @@
|
|||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { GoodsController } from './goods.controller'
|
||||||
|
import { GoodsService } from './goods.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
controllers: [GoodsController],
|
||||||
|
providers: [GoodsService],
|
||||||
|
})
|
||||||
|
export class GuildGoodsModule {}
|
||||||
@@ -0,0 +1,73 @@
|
|||||||
|
import { GoodOmit } from '@/generated/prisma/models'
|
||||||
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { ResponseMapper } from 'common/response/response-mapper'
|
||||||
|
import { CreateGoodDto } from './dto/create-good.dto'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class GoodsService {
|
||||||
|
constructor(private prisma: PrismaService) {}
|
||||||
|
|
||||||
|
private readonly goodOmit = {
|
||||||
|
complex_id: true,
|
||||||
|
barcode: true,
|
||||||
|
base_sale_price: true,
|
||||||
|
is_default_guild_good: true,
|
||||||
|
local_sku: true,
|
||||||
|
guild_id: true,
|
||||||
|
} as GoodOmit
|
||||||
|
|
||||||
|
async findAll(guildId: string) {
|
||||||
|
const [goods, count] = await this.prisma.$transaction([
|
||||||
|
this.prisma.good.findMany({
|
||||||
|
where: {
|
||||||
|
guild_id: guildId,
|
||||||
|
is_default_guild_good: true,
|
||||||
|
},
|
||||||
|
omit: this.goodOmit,
|
||||||
|
}),
|
||||||
|
this.prisma.good.count(),
|
||||||
|
])
|
||||||
|
return ResponseMapper.paginate(goods, {
|
||||||
|
count,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
async findOne(guild_id: string, id: string) {
|
||||||
|
const good = await this.prisma.good.findUnique({
|
||||||
|
where: {
|
||||||
|
guild_id,
|
||||||
|
id,
|
||||||
|
is_default_guild_good: true,
|
||||||
|
},
|
||||||
|
|
||||||
|
omit: this.goodOmit,
|
||||||
|
})
|
||||||
|
|
||||||
|
return ResponseMapper.single(good)
|
||||||
|
}
|
||||||
|
|
||||||
|
async create(guild_id: string, data: CreateGoodDto) {
|
||||||
|
const { category_id, ...rest } = data
|
||||||
|
|
||||||
|
const good = await this.prisma.good.create({
|
||||||
|
data: {
|
||||||
|
guild: {
|
||||||
|
connect: {
|
||||||
|
id: guild_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
category: {
|
||||||
|
connect: {
|
||||||
|
id: category_id,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
...rest,
|
||||||
|
is_default_guild_good: true,
|
||||||
|
},
|
||||||
|
omit: this.goodOmit,
|
||||||
|
})
|
||||||
|
|
||||||
|
return ResponseMapper.create(good)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import { Body, Controller, Get, Param, Post, Put } from '@nestjs/common'
|
||||||
|
import { ApiTags } from '@nestjs/swagger'
|
||||||
|
import { CreateGuildDto } from './dto/create-guild.dto'
|
||||||
|
import { UpdateGuildDto } from './dto/update-guild.dto'
|
||||||
|
import { GuildsService } from './guilds.service'
|
||||||
|
|
||||||
|
@ApiTags('guilds')
|
||||||
|
@Controller('admin/guilds')
|
||||||
|
export class GuildsController {
|
||||||
|
constructor(private readonly guildsService: GuildsService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
async findAll() {
|
||||||
|
return this.guildsService.findAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
async findOne(@Param('id') id: string) {
|
||||||
|
return this.guildsService.findOne(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
async create(@Body() data: CreateGuildDto) {
|
||||||
|
return await this.guildsService.create(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Put(':id')
|
||||||
|
async update(@Param('id') id: string, @Body() data: UpdateGuildDto) {
|
||||||
|
return await this.guildsService.update(id, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Delete(':id')
|
||||||
|
// async delete(@Param('id') id: string) {
|
||||||
|
// await this.guildsService.delete(id)
|
||||||
|
// return ResponseMapper.delete()
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
import { PrismaModule } from '@/prisma/prisma.module'
|
||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { GuildGoodCategoriesModule } from './good-categories/good-categories.module'
|
||||||
|
import { GuildGoodsModule } from './goods/goods.module'
|
||||||
|
import { GuildsController } from './guilds.controller'
|
||||||
|
import { GuildsService } from './guilds.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [PrismaModule, GuildGoodsModule, GuildGoodCategoriesModule],
|
||||||
|
providers: [GuildsService],
|
||||||
|
controllers: [GuildsController],
|
||||||
|
})
|
||||||
|
export class AdminGuildsModule {}
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
import { ResponseMapper } from '@/common/response/response-mapper'
|
||||||
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { CreateGuildDto } from './dto/create-guild.dto'
|
||||||
|
import { UpdateGuildDto } from './dto/update-guild.dto'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class GuildsService {
|
||||||
|
constructor(private prisma: PrismaService) {}
|
||||||
|
|
||||||
|
async findAll() {
|
||||||
|
const [guilds, count] = await this.prisma.$transaction([
|
||||||
|
this.prisma.guild.findMany({
|
||||||
|
include: {
|
||||||
|
_count: {
|
||||||
|
select: {
|
||||||
|
business_activities: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
this.prisma.guild.count(),
|
||||||
|
])
|
||||||
|
|
||||||
|
return ResponseMapper.paginate(
|
||||||
|
guilds.map(guild => {
|
||||||
|
const { _count, ...rest } = guild
|
||||||
|
return {
|
||||||
|
...rest,
|
||||||
|
businessActivitiesCount: guild._count.business_activities,
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
{ count },
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
async findOne(id: string) {
|
||||||
|
const guild = await this.prisma.guild.findUnique({
|
||||||
|
where: { id },
|
||||||
|
include: {
|
||||||
|
business_activities: {
|
||||||
|
omit: {
|
||||||
|
guild_id: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return ResponseMapper.single(guild)
|
||||||
|
}
|
||||||
|
|
||||||
|
async create(data: CreateGuildDto) {
|
||||||
|
const guild = await this.prisma.guild.create({ data })
|
||||||
|
return ResponseMapper.create(guild)
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(id: string, data: UpdateGuildDto) {
|
||||||
|
const guild = await this.prisma.guild.update({ where: { id }, data })
|
||||||
|
return ResponseMapper.update(guild)
|
||||||
|
}
|
||||||
|
|
||||||
|
// async delete(id: string) {
|
||||||
|
// await this.prisma.guild.delete({ where: { id } })
|
||||||
|
// return ResponseMapper.
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
import { ApiProperty } from '@nestjs/swagger'
|
||||||
|
import { IsDateString, IsEnum, IsOptional, IsString } from 'class-validator'
|
||||||
|
import { LicenseStatus } from 'generated/prisma/enums'
|
||||||
|
|
||||||
|
export class CreateLicenseDto {
|
||||||
|
@IsString()
|
||||||
|
@ApiProperty()
|
||||||
|
account_id: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
@ApiProperty()
|
||||||
|
pos_id: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
@ApiProperty({ required: true })
|
||||||
|
partner_id: string
|
||||||
|
|
||||||
|
@IsDateString()
|
||||||
|
@IsOptional()
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
starts_at: string
|
||||||
|
|
||||||
|
@IsDateString()
|
||||||
|
@IsOptional()
|
||||||
|
@ApiProperty({ required: false })
|
||||||
|
expires_at: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class UpdateLicenseDto {
|
||||||
|
@IsString()
|
||||||
|
pos_id?: string
|
||||||
|
|
||||||
|
@IsDateString()
|
||||||
|
starts_at?: string
|
||||||
|
|
||||||
|
@IsDateString()
|
||||||
|
expires_at?: string
|
||||||
|
|
||||||
|
@IsEnum(LicenseStatus)
|
||||||
|
status?: LicenseStatus
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { Body, Controller, Get, Param, Post, Put } from '@nestjs/common'
|
||||||
|
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||||
|
import { PartnerLicensesService } from './licenses.service'
|
||||||
|
|
||||||
|
@Controller('admin/licenses')
|
||||||
|
export class LicensesController {
|
||||||
|
constructor(private readonly licensesService: PartnerLicensesService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
async findAll() {
|
||||||
|
return this.licensesService.findAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
async findOne(@Param('id') id: string) {
|
||||||
|
return this.licensesService.findOne(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
async create(@Body() data: CreateLicenseDto) {
|
||||||
|
return this.licensesService.create(data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Put(':id')
|
||||||
|
async update(@Param('id') id: string, @Body() data: UpdateLicenseDto) {
|
||||||
|
return this.licensesService.update(id, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
// @Delete(':id')
|
||||||
|
// async delete(@Param('id') id: string) {
|
||||||
|
// return this.licensesService.delete(id)
|
||||||
|
// }
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { PrismaModule } from '@/prisma/prisma.module'
|
||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { LicensesController } from './licenses.controller'
|
||||||
|
import { PartnerLicensesService } from './licenses.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [PrismaModule],
|
||||||
|
controllers: [LicensesController],
|
||||||
|
providers: [PartnerLicensesService],
|
||||||
|
exports: [PartnerLicensesService],
|
||||||
|
})
|
||||||
|
export class AdminLicensesModule {}
|
||||||
@@ -0,0 +1,122 @@
|
|||||||
|
import { LicenseInclude } from '@/generated/prisma/models'
|
||||||
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { ResponseMapper } from 'common/response/response-mapper'
|
||||||
|
import { LicenseStatus } from 'generated/prisma/enums'
|
||||||
|
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class PartnerLicensesService {
|
||||||
|
constructor(private readonly prisma: PrismaService) {}
|
||||||
|
|
||||||
|
private readonly licenseInclude = {
|
||||||
|
partner: true,
|
||||||
|
pos: {
|
||||||
|
include: {
|
||||||
|
complex: true,
|
||||||
|
provider: true,
|
||||||
|
accounts: {
|
||||||
|
include: {
|
||||||
|
user: true,
|
||||||
|
},
|
||||||
|
omit: {
|
||||||
|
business_id: true,
|
||||||
|
partner_id: true,
|
||||||
|
provider_id: true,
|
||||||
|
pos_id: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
device: {
|
||||||
|
include: {
|
||||||
|
brand: true,
|
||||||
|
},
|
||||||
|
omit: {
|
||||||
|
brand_id: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
} as LicenseInclude
|
||||||
|
|
||||||
|
async findAll() {
|
||||||
|
const [licenses, count] = await this.prisma.$transaction([
|
||||||
|
this.prisma.license.findMany({
|
||||||
|
include: this.licenseInclude,
|
||||||
|
omit: {
|
||||||
|
pos_id: true,
|
||||||
|
partner_id: true,
|
||||||
|
},
|
||||||
|
}),
|
||||||
|
this.prisma.license.count(),
|
||||||
|
])
|
||||||
|
return ResponseMapper.paginate(
|
||||||
|
licenses.map(license => {
|
||||||
|
const { pos, ...rest } = license
|
||||||
|
// @ts-ignore
|
||||||
|
const { accounts, ...posRest } = pos
|
||||||
|
return {
|
||||||
|
account: accounts[0],
|
||||||
|
pos: posRest,
|
||||||
|
...rest,
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
{
|
||||||
|
count,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
async findOne(id: string) {
|
||||||
|
const license = await this.prisma.license.findFirst({
|
||||||
|
where: { id },
|
||||||
|
include: this.licenseInclude,
|
||||||
|
omit: {
|
||||||
|
pos_id: true,
|
||||||
|
partner_id: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if (license) {
|
||||||
|
const { pos, ...rest } = license
|
||||||
|
// @ts-ignore
|
||||||
|
const { accounts, ...posRest } = pos
|
||||||
|
return ResponseMapper.single({
|
||||||
|
account: accounts[0],
|
||||||
|
pos: posRest,
|
||||||
|
...rest,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseMapper.single(license)
|
||||||
|
}
|
||||||
|
|
||||||
|
async create(data: CreateLicenseDto) {
|
||||||
|
const date = new Date(data.starts_at || '')
|
||||||
|
const expiresAt =
|
||||||
|
data.expires_at || new Date(date.setFullYear(date.getFullYear() + 1))
|
||||||
|
|
||||||
|
const license = await this.prisma.license.create({
|
||||||
|
data: {
|
||||||
|
partner_id: data.partner_id,
|
||||||
|
pos_id: data.pos_id,
|
||||||
|
starts_at: date,
|
||||||
|
expires_at: expiresAt,
|
||||||
|
status: LicenseStatus.ACTIVE,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
|
||||||
|
return ResponseMapper.create(license)
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(id: string, data: UpdateLicenseDto) {
|
||||||
|
const license = await this.prisma.license.update({
|
||||||
|
where: { id },
|
||||||
|
data: { ...data },
|
||||||
|
})
|
||||||
|
return ResponseMapper.update(license)
|
||||||
|
}
|
||||||
|
|
||||||
|
async delete(id: string) {
|
||||||
|
await this.prisma.license.delete({ where: { id } })
|
||||||
|
return ResponseMapper.delete()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
import { IsOptional, IsString } from 'class-validator'
|
||||||
|
|
||||||
|
export class CreatePartnerDto {
|
||||||
|
@IsString()
|
||||||
|
name: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
code?: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class UpdatePartnerDto {
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
name?: string
|
||||||
|
|
||||||
|
@IsOptional()
|
||||||
|
@IsString()
|
||||||
|
code?: string
|
||||||
|
}
|
||||||
@@ -0,0 +1,71 @@
|
|||||||
|
import { IsDateString, IsEnum, IsOptional, IsString } from 'class-validator'
|
||||||
|
import { AccountStatus, LicenseStatus, POSType } from 'generated/prisma/enums'
|
||||||
|
|
||||||
|
export class CreateLicenseDto {
|
||||||
|
@IsString()
|
||||||
|
first_name: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
last_name: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
mobile_number: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
national_code: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
username: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
password: string
|
||||||
|
|
||||||
|
@IsEnum(AccountStatus)
|
||||||
|
account_status: AccountStatus
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
guild: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
business_activity_name: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
tax_id: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
complex_name: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
pos_serial: string
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
pos_status: string
|
||||||
|
|
||||||
|
@IsEnum(POSType)
|
||||||
|
pos_type: POSType
|
||||||
|
|
||||||
|
@IsString()
|
||||||
|
pos_device: string
|
||||||
|
|
||||||
|
@IsDateString()
|
||||||
|
@IsOptional()
|
||||||
|
starts_at: string
|
||||||
|
|
||||||
|
@IsDateString()
|
||||||
|
@IsOptional()
|
||||||
|
expires_at: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export class UpdateLicenseDto {
|
||||||
|
@IsString()
|
||||||
|
pos_id?: string
|
||||||
|
|
||||||
|
@IsDateString()
|
||||||
|
starts_at?: string
|
||||||
|
|
||||||
|
@IsDateString()
|
||||||
|
expires_at?: string
|
||||||
|
|
||||||
|
@IsEnum(LicenseStatus)
|
||||||
|
status?: LicenseStatus
|
||||||
|
}
|
||||||
@@ -0,0 +1,37 @@
|
|||||||
|
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||||
|
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||||
|
import { PartnerLicensesService } from './licenses.service'
|
||||||
|
|
||||||
|
@Controller('admin/partners/:partnerId/licenses')
|
||||||
|
export class PartnerLicensesController {
|
||||||
|
constructor(private readonly licensesService: PartnerLicensesService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
async findAll(@Param('partnerId') partnerId: string) {
|
||||||
|
return this.licensesService.findAll(partnerId)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
async findOne(@Param('partnerId') partnerId: string, @Param('id') id: string) {
|
||||||
|
return this.licensesService.findOne(partnerId, id)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
async create(@Param('partnerId') partnerId: string, @Body() data: CreateLicenseDto) {
|
||||||
|
return this.licensesService.create(partnerId, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Put(':id')
|
||||||
|
async update(
|
||||||
|
@Param('partnerId') partnerId: string,
|
||||||
|
@Param('id') id: string,
|
||||||
|
@Body() data: UpdateLicenseDto,
|
||||||
|
) {
|
||||||
|
return this.licensesService.update(partnerId, id, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Delete(':id')
|
||||||
|
async delete(@Param('partnerId') partnerId: string, @Param('id') id: string) {
|
||||||
|
return this.licensesService.delete(partnerId, id)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { PrismaModule } from '@/prisma/prisma.module'
|
||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { PartnerLicensesController } from './licenses.controller'
|
||||||
|
import { PartnerLicensesService } from './licenses.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [PrismaModule],
|
||||||
|
controllers: [PartnerLicensesController],
|
||||||
|
providers: [PartnerLicensesService],
|
||||||
|
exports: [PartnerLicensesService],
|
||||||
|
})
|
||||||
|
export class AdminPartnerLicensesModule {}
|
||||||
@@ -0,0 +1,197 @@
|
|||||||
|
import { PrismaService } from '@/prisma/prisma.service'
|
||||||
|
import { Injectable } from '@nestjs/common'
|
||||||
|
import { ResponseMapper } from 'common/response/response-mapper'
|
||||||
|
import { CreateLicenseDto, UpdateLicenseDto } from './dto/license.dto'
|
||||||
|
|
||||||
|
@Injectable()
|
||||||
|
export class PartnerLicensesService {
|
||||||
|
constructor(private readonly prisma: PrismaService) {}
|
||||||
|
|
||||||
|
async findAll(partnerId: string) {
|
||||||
|
const licenses = await this.prisma.license.findMany({
|
||||||
|
where: { partner_id: partnerId },
|
||||||
|
include: {
|
||||||
|
pos: {
|
||||||
|
include: {
|
||||||
|
complex: true,
|
||||||
|
provider: true,
|
||||||
|
|
||||||
|
accounts: {
|
||||||
|
include: {
|
||||||
|
user: true,
|
||||||
|
},
|
||||||
|
omit: {
|
||||||
|
business_id: true,
|
||||||
|
partner_id: true,
|
||||||
|
provider_id: true,
|
||||||
|
pos_id: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
device: {
|
||||||
|
include: {
|
||||||
|
brand: true,
|
||||||
|
},
|
||||||
|
omit: {
|
||||||
|
brand_id: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
omit: {
|
||||||
|
pos_id: true,
|
||||||
|
partner_id: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
return ResponseMapper.list(
|
||||||
|
licenses.map(license => {
|
||||||
|
const { pos, ...rest } = license
|
||||||
|
const { accounts, ...posRest } = pos
|
||||||
|
return {
|
||||||
|
account: accounts[0],
|
||||||
|
pos: posRest,
|
||||||
|
...rest,
|
||||||
|
}
|
||||||
|
}),
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
async findOne(partnerId: string, id: string) {
|
||||||
|
const license = await this.prisma.license.findFirst({
|
||||||
|
where: { id, partner_id: partnerId },
|
||||||
|
include: {
|
||||||
|
pos: {
|
||||||
|
include: {
|
||||||
|
complex: true,
|
||||||
|
provider: true,
|
||||||
|
|
||||||
|
accounts: {
|
||||||
|
include: {
|
||||||
|
user: true,
|
||||||
|
},
|
||||||
|
omit: {
|
||||||
|
business_id: true,
|
||||||
|
partner_id: true,
|
||||||
|
provider_id: true,
|
||||||
|
pos_id: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
device: {
|
||||||
|
include: {
|
||||||
|
brand: true,
|
||||||
|
},
|
||||||
|
omit: {
|
||||||
|
brand_id: true,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
omit: {
|
||||||
|
pos_id: true,
|
||||||
|
partner_id: true,
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if (license) {
|
||||||
|
const { pos, ...rest } = license
|
||||||
|
const { accounts, ...posRest } = pos
|
||||||
|
return ResponseMapper.single({
|
||||||
|
account: accounts[0],
|
||||||
|
pos: posRest,
|
||||||
|
...rest,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
return ResponseMapper.single(license)
|
||||||
|
}
|
||||||
|
|
||||||
|
async create(partnerId: string, data: CreateLicenseDto) {
|
||||||
|
// const license = await this.prisma.$transaction(async tx => {
|
||||||
|
// const user = await tx.user.upsert({
|
||||||
|
// where: {
|
||||||
|
// mobile_number: data.mobile_number,
|
||||||
|
// },
|
||||||
|
// update: {},
|
||||||
|
// create: {
|
||||||
|
// first_name: data.first_name,
|
||||||
|
// last_name: data.last_name,
|
||||||
|
// mobile_number: data.mobile_number,
|
||||||
|
// national_code: data.national_code,
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
|
||||||
|
// const business = await tx.businessActivity.create({
|
||||||
|
// data: {
|
||||||
|
// name: data.business_activity_name,
|
||||||
|
// guild_id: data.guild,
|
||||||
|
// user: {
|
||||||
|
// connect: {
|
||||||
|
// id: user.id,
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
|
||||||
|
// const complex = await tx.complex.create({
|
||||||
|
// data: {
|
||||||
|
// name: data.complex_name,
|
||||||
|
// tax_id: data.tax_id,
|
||||||
|
// business_activity_id: business.id,
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
|
||||||
|
// const pos = await tx.pos.create({
|
||||||
|
// data: {
|
||||||
|
// pos_type: data.pos_type,
|
||||||
|
// serial: data.pos_serial,
|
||||||
|
// device_id: data.pos_device,
|
||||||
|
// complex_id: complex.id,
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
|
||||||
|
// const date = new Date()
|
||||||
|
// const expiresAt = new Date(date.setFullYear(date.getFullYear() + 1))
|
||||||
|
|
||||||
|
// const license = await tx.license.create({
|
||||||
|
// data: {
|
||||||
|
// partner_id: partnerId,
|
||||||
|
// pos_id: pos.id,
|
||||||
|
// starts_at: data.starts_at || new Date(),
|
||||||
|
// expires_at: data.expires_at || expiresAt,
|
||||||
|
// status: LicenseStatus.ACTIVE,
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
|
||||||
|
// const hashedPassword = await PasswordUtil.hash(data.password)
|
||||||
|
|
||||||
|
// const account = await tx.account.create({
|
||||||
|
// data: {
|
||||||
|
// username: data.username,
|
||||||
|
// password: hashedPassword,
|
||||||
|
// type: AccountType.POS,
|
||||||
|
// user_id: user.id,
|
||||||
|
// pos_id: pos.id,
|
||||||
|
// status: data.account_status,
|
||||||
|
// },
|
||||||
|
// })
|
||||||
|
|
||||||
|
// return {
|
||||||
|
// license,
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
return ResponseMapper.create('license')
|
||||||
|
}
|
||||||
|
|
||||||
|
async update(partnerId: string, id: string, data: UpdateLicenseDto) {
|
||||||
|
const license = await this.prisma.license.update({
|
||||||
|
where: { id },
|
||||||
|
data: { ...data, partner_id: partnerId },
|
||||||
|
})
|
||||||
|
return ResponseMapper.update(license)
|
||||||
|
}
|
||||||
|
|
||||||
|
async delete(partnerId: string, id: string) {
|
||||||
|
await this.prisma.license.delete({ where: { id } })
|
||||||
|
return ResponseMapper.delete()
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,33 @@
|
|||||||
|
import { Body, Controller, Delete, Get, Param, Post, Put } from '@nestjs/common'
|
||||||
|
import { AccountsService } from './accounts.service'
|
||||||
|
import { CreateAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||||
|
|
||||||
|
@Controller('admin/partners/:partnerId/accounts')
|
||||||
|
export class AccountsController {
|
||||||
|
constructor(private readonly accountsService: AccountsService) {}
|
||||||
|
|
||||||
|
@Get()
|
||||||
|
async findAll(@Param('partnerId') partnerId: string) {
|
||||||
|
return this.accountsService.findAll(partnerId)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Get(':id')
|
||||||
|
async findOne(@Param('id') id: string) {
|
||||||
|
return this.accountsService.findOne(id)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Post()
|
||||||
|
async create(@Param('partnerId') partnerId: string, @Body() data: CreateAccountDto) {
|
||||||
|
return this.accountsService.create(partnerId, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Put(':id')
|
||||||
|
async update(@Param('id') id: string, @Body() data: UpdateAccountDto) {
|
||||||
|
return this.accountsService.update(id, data)
|
||||||
|
}
|
||||||
|
|
||||||
|
@Delete(':id')
|
||||||
|
async delete(@Param('id') id: string) {
|
||||||
|
return this.accountsService.delete(id)
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
import { PrismaModule } from '@/prisma/prisma.module'
|
||||||
|
import { Module } from '@nestjs/common'
|
||||||
|
import { AccountsController } from './accounts.controller'
|
||||||
|
import { AccountsService } from './accounts.service'
|
||||||
|
|
||||||
|
@Module({
|
||||||
|
imports: [PrismaModule],
|
||||||
|
controllers: [AccountsController],
|
||||||
|
providers: [AccountsService],
|
||||||
|
exports: [AccountsService],
|
||||||
|
})
|
||||||
|
export class AdminPartnerAccountsModule {}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user