Compare commits
10 Commits
34793295c9
...
4e61ff618e
| Author | SHA1 | Date | |
|---|---|---|---|
| 4e61ff618e | |||
| fbe7230865 | |||
| 658496320b | |||
| 4af07fe3e8 | |||
| 6a48f203a9 | |||
| a486127ade | |||
| ad470d2166 | |||
| a68a7f594d | |||
| 58a7c359d8 | |||
| dee96b6e91 |
Vendored
+9
-1
@@ -16,8 +16,16 @@
|
||||
"ARVANCLOUD",
|
||||
"autoincrement",
|
||||
"Cardex",
|
||||
"consfee",
|
||||
"fkey",
|
||||
"iban",
|
||||
"MAYKET"
|
||||
"indatim",
|
||||
"inno",
|
||||
"inty",
|
||||
"irtaxid",
|
||||
"MAYKET",
|
||||
"setm",
|
||||
"spro",
|
||||
"sstid"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `raw_request_payload` to the `sale_invoice_tsp_attempts` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `sale_invoice_tsp_attempts` DROP FOREIGN KEY `sale_invoice_tsp_attempts_invoice_id_fkey`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `sale_invoice_tsp_attempts_invoice_id_key` ON `sale_invoice_tsp_attempts`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `sale_invoice_tsp_attempts` ADD COLUMN `raw_request_payload` JSON NOT NULL,
|
||||
ADD COLUMN `raw_response_payload` JSON NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_legal` ADD CONSTRAINT `customer_legal_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@@ -0,0 +1,104 @@
|
||||
# AGENT.md
|
||||
|
||||
Operational guide for AI/coding agents working in `consumer_api`.
|
||||
|
||||
## Scope
|
||||
- Applies to the whole repository.
|
||||
- Stack: NestJS + Prisma + TypeScript.
|
||||
|
||||
## Primary Goals
|
||||
- Deliver minimal, safe, and focused changes.
|
||||
- Preserve existing API behavior unless explicitly requested.
|
||||
- Keep Prisma schema/data operations forward-safe.
|
||||
|
||||
## Project Conventions
|
||||
- Keep module layering consistent: `controller -> service -> prisma/shared service`.
|
||||
- Reuse shared services for cross-module business logic (for example, sales invoice create flow).
|
||||
- Keep DTO validation at API boundaries; avoid unchecked `any` in new code.
|
||||
- Keep response shaping aligned with existing `ResponseMapper` usage.
|
||||
- Prefer explicit Prisma `select`/`include` to control payload shape.
|
||||
|
||||
## Sales Invoice / TSP Rules
|
||||
- `originalSend`, `correctionSend`, and `revoke` flows should be consistent and auditable.
|
||||
- For correction/revoke creation, prepare data from the related invoice when required.
|
||||
- Persist attempt records with clear status transitions (`QUEUED` -> final status).
|
||||
- Store request/response payloads for traceability.
|
||||
- Avoid changing fiscal/tax status semantics without explicit approval.
|
||||
|
||||
## Prisma and Migration Safety
|
||||
- Treat committed migrations as immutable history.
|
||||
- Prefer forward migrations; avoid destructive resets unless explicitly requested.
|
||||
- For data-affecting changes:
|
||||
- use transactions,
|
||||
- verify expected row scope,
|
||||
- keep logic idempotent where possible.
|
||||
|
||||
## Editing Principles
|
||||
- Do not modify unrelated files.
|
||||
- Do not revert user changes unless asked.
|
||||
- Keep functions cohesive; extract shared logic when duplication appears.
|
||||
- Remove debug leftovers (`console.log`, dead code) before finishing unless explicitly needed.
|
||||
|
||||
## Validation Checklist (before handoff)
|
||||
1. Read target module/service/DTO end-to-end before edits.
|
||||
2. Apply minimal patch with consistent naming.
|
||||
3. Run typecheck: `pnpm -s tsc --noEmit`.
|
||||
4. If behavior changed, run targeted checks/tests where possible.
|
||||
5. Summarize changed files and behavior impact clearly.
|
||||
|
||||
## Useful Commands
|
||||
- Typecheck: `pnpm -s tsc --noEmit`
|
||||
- Migration status: `pnpm prisma migrate status`
|
||||
- Create migration: `pnpm prisma migrate dev --name <name>`
|
||||
- Deploy migrations: `pnpm prisma migrate deploy`
|
||||
|
||||
## Communication Style
|
||||
- Be concise and implementation-focused.
|
||||
- Call out assumptions/risk before risky steps.
|
||||
- Provide practical next actions after task completion.
|
||||
|
||||
## Do / Don't (Repo-Specific)
|
||||
|
||||
### Do
|
||||
- Do derive correction/revoke invoice creation data from `relatedInvoice` when the flow requires historical consistency.
|
||||
- Do keep TSP attempt lifecycle explicit (`QUEUED`, then update with provider result and timestamps).
|
||||
- Do use shared invoice-creation service instead of duplicating create logic across modules.
|
||||
- Do normalize numeric DB values (`Decimal`) with `Number(...)` before DTO/payload composition.
|
||||
- Do keep Prisma queries tight with `select`/`include` only for fields you actually use.
|
||||
|
||||
### Don't
|
||||
- Don't pass undefined/out-of-scope variables in TSP flows (common regressions: `invoice_id`, `attemptId`, `pos_id` mismatches).
|
||||
- Don't leave placeholder query blocks (for example empty `select: {}`) in production code.
|
||||
- Don't mix method semantics (`send` vs `originalSend`) across services without verifying signatures.
|
||||
- Don't leave debug logs (`console.log`) in critical invoice/tax paths unless explicitly requested.
|
||||
- Don't change invoice type semantics (`ORIGINAL`, `CORRECTION`, `REVOKE`) implicitly.
|
||||
|
||||
### Common Pitfalls To Recheck
|
||||
- Incorrect relation field names (`tax_id` on wrong model, missing relation selects).
|
||||
- Building payloads from the wrong invoice (must match the expected new/ref invoice in each flow).
|
||||
- Creating attempts without persisting request payload and final response payload.
|
||||
- Mismatch between DTO shapes and shared service input contracts.
|
||||
|
||||
## Thread Notes (May 2026)
|
||||
- Shared sale-invoice creation was introduced and must be injected/exported correctly in consuming modules (example failure: `UnknownDependenciesException` for `SharedSaleInvoiceCreateService`).
|
||||
- In `SalesInvoiceTspService.revoke`, prepare all creation/update data from `relatedInvoice` (no external `dataToUpdate` argument expected).
|
||||
- Prisma client is generated to `src/generated/prisma` via:
|
||||
- `provider = "prisma-client"`
|
||||
- `output = "../../src/generated/prisma"`
|
||||
- `moduleFormat = "cjs"`
|
||||
- Docker/runtime must include generated Prisma artifacts and `@prisma/client` runtime; missing `@prisma/client/runtime/client` indicates build/copy/install mismatch.
|
||||
- Seeder commands that use `tsx` require dev dependencies/runtime tools; if running in slim production container, use a dedicated seed target/container or run seed from build/dev image.
|
||||
- `pnpm` invocation in containers should use executable form (`pnpm ...`), not `node /app/pnpm`.
|
||||
- Added SQL/Prisma error normalization utility: `src/common/utils/prisma-error.util.ts`; prefer mapping duplicate/constraint DB errors to domain-friendly messages.
|
||||
- Partner-module list endpoints were standardized toward `ResponseMapper.paginate` where pagination response contract is expected.
|
||||
- For heavy license provisioning (100+), request path should not synchronously insert all licenses; queue/background + batching is required.
|
||||
|
||||
## Migration Drift Playbook (Prisma/MySQL)
|
||||
- If Prisma reports `modified after applied`, never edit an already-applied migration in-place for shared environments; create a new forward migration instead.
|
||||
- If migration history and DB drift mismatch:
|
||||
1. Verify local migration folders are complete and ordered.
|
||||
2. Check `_prisma_migrations` for missing/applied names.
|
||||
3. Use `prisma migrate resolve` only to reconcile history state, then apply a forward fix migration.
|
||||
- Duplicate FK error seen in this repo: `sales_invoices_ref_id_fkey` (MySQL 1826). Recheck migration SQL for repeated `ADD CONSTRAINT` statements before rerun.
|
||||
- Drift that repeatedly showed in this project: missing FK/unique on `sale_invoice_tsp_attempts.invoice_id`. Validate both schema and migration SQL produce the same final state.
|
||||
- `prisma migrate status` may show up-to-date while `migrate dev` still detects drift (shadow DB/application history issue); treat `migrate dev` output as source of truth for fixing local history.
|
||||
+63
@@ -0,0 +1,63 @@
|
||||
# AI Agent Specification
|
||||
|
||||
## Identity
|
||||
- Name: `consumer_api_agent`
|
||||
- Purpose: Assist with development, refactoring, migration, debugging, and data-safe operations for this repository.
|
||||
- Scope: Entire project rooted at `consumer_api`.
|
||||
|
||||
## Core Responsibilities
|
||||
- Implement and refactor backend features in NestJS modules.
|
||||
- Keep Prisma schema/migrations consistent and safe.
|
||||
- Preserve API behavior unless explicitly asked to change it.
|
||||
- Prefer minimal, focused changes over broad rewrites.
|
||||
|
||||
## Working Rules
|
||||
- Follow repository instructions in `AGENTS.md`.
|
||||
- Respect existing project conventions (naming, DTO patterns, response mapping).
|
||||
- Do not revert unrelated user changes.
|
||||
- Do not run destructive DB commands unless explicitly requested.
|
||||
- For risky DB operations, perform backup-first workflow.
|
||||
|
||||
## Code Standards
|
||||
- Keep functions small and cohesive.
|
||||
- Extract reusable logic to utilities/services when complexity grows.
|
||||
- Validate DTO inputs at boundaries.
|
||||
- Use typed response DTO aliases where possible.
|
||||
- Keep Prisma queries explicit with `select` for response control.
|
||||
|
||||
## Database Safety
|
||||
- Never run `prisma migrate reset` on important environments unless explicitly approved.
|
||||
- Treat applied migration files as immutable history.
|
||||
- Prefer forward-only migrations.
|
||||
- For data updates:
|
||||
- Use transactions.
|
||||
- Verify row counts before/after.
|
||||
- Keep operations idempotent when feasible.
|
||||
|
||||
## API Patterns
|
||||
- List endpoints: paginate + summary payload.
|
||||
- Detail endpoints: full resource shape.
|
||||
- Enum presentation: use shared translator utility (`translateEnumValue`).
|
||||
- Fiscal status fallback rule: if no fiscal record, return `NOT_SEND`.
|
||||
|
||||
## Execution Checklist
|
||||
1. Read target module/controller/service/DTO before edits.
|
||||
2. Apply minimal patch.
|
||||
3. Run typecheck (`pnpm -s tsc --noEmit`).
|
||||
4. If data logic changed, verify behavior with targeted checks.
|
||||
5. Summarize changed files and behavior impact.
|
||||
|
||||
## Useful Commands
|
||||
- Type check:
|
||||
- `pnpm -s tsc --noEmit`
|
||||
- Prisma migration status:
|
||||
- `pnpm prisma migrate status`
|
||||
- Create migration:
|
||||
- `pnpm prisma migrate dev --name <name>`
|
||||
- Apply production migrations:
|
||||
- `pnpm prisma migrate deploy`
|
||||
|
||||
## Communication Style
|
||||
- Be concise, direct, and implementation-focused.
|
||||
- Call out assumptions and risky steps before execution.
|
||||
- Provide concrete next actions after each completed task.
|
||||
+14
-23
@@ -1,48 +1,39 @@
|
||||
FROM node:22-slim AS deps
|
||||
FROM node:22-slim AS base
|
||||
|
||||
WORKDIR /app
|
||||
ARG NPM_REGISTRY=https://registry.npmjs.org/
|
||||
ENV NPM_CONFIG_REGISTRY=${NPM_REGISTRY}
|
||||
ENV npm_config_registry=${NPM_REGISTRY}
|
||||
ENV PNPM_HOME="/pnpm"
|
||||
ENV PATH="${PNPM_HOME}:${PATH}"
|
||||
|
||||
RUN corepack enable
|
||||
RUN npm config set registry ${NPM_REGISTRY}
|
||||
RUN corepack enable && npm config set registry ${NPM_REGISTRY}
|
||||
|
||||
FROM base AS build
|
||||
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --frozen-lockfile
|
||||
|
||||
|
||||
FROM node:22-slim AS build
|
||||
|
||||
WORKDIR /app
|
||||
ARG NPM_REGISTRY=https://registry.npmjs.org/
|
||||
ENV NPM_CONFIG_REGISTRY=${NPM_REGISTRY}
|
||||
ENV npm_config_registry=${NPM_REGISTRY}
|
||||
|
||||
RUN corepack enable
|
||||
RUN npm config set registry ${NPM_REGISTRY}
|
||||
|
||||
COPY --from=deps /app/node_modules ./node_modules
|
||||
COPY . .
|
||||
|
||||
ENV PRISMA_CLIENT_ENGINE_TYPE=binary
|
||||
RUN pnpm run build
|
||||
|
||||
RUN pnpm run build && pnpm prune --prod
|
||||
FROM base AS prod-deps
|
||||
|
||||
COPY package.json pnpm-lock.yaml ./
|
||||
RUN pnpm install --prod --frozen-lockfile \
|
||||
&& pnpm store prune \
|
||||
&& rm -rf /root/.npm /root/.cache
|
||||
|
||||
FROM node:22-slim AS runtime
|
||||
|
||||
WORKDIR /app
|
||||
ARG NPM_REGISTRY=https://registry.npmjs.org/
|
||||
ENV NPM_CONFIG_REGISTRY=${NPM_REGISTRY}
|
||||
ENV npm_config_registry=${NPM_REGISTRY}
|
||||
|
||||
ENV NODE_ENV=production
|
||||
|
||||
COPY --from=build /app/node_modules ./node_modules
|
||||
COPY --from=prod-deps /app/node_modules ./node_modules
|
||||
COPY --from=build /app/dist ./dist
|
||||
COPY --from=build /app/prisma ./prisma
|
||||
COPY --from=build /app/package.json ./package.json
|
||||
|
||||
USER node
|
||||
CMD ["node", "dist/src/main.js"]
|
||||
|
||||
|
||||
+1533
File diff suppressed because one or more lines are too long
+48
-5
@@ -15,7 +15,6 @@ services:
|
||||
- "${DATABASE_PORT}:3306"
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
- ./prisma/migrations:/docker-entrypoint-initdb.d
|
||||
healthcheck:
|
||||
test: "mysqladmin ping -h 127.0.0.1 -u ${DATABASE_USER} -p'${DB_ROOT_PASSWORD}'"
|
||||
interval: 15s # Shortened interval, as MySQL is starting fast now
|
||||
@@ -68,10 +67,13 @@ services:
|
||||
OTP_STATIC_CODE: ${OTP_STATIC_CODE} # From .env
|
||||
ports:
|
||||
- "${PORT:-5002}:5002"
|
||||
volumes:
|
||||
- ./src:/app/src
|
||||
- /app/dist
|
||||
- /app/node_modules
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
security_opt:
|
||||
- no-new-privileges:true
|
||||
cap_drop:
|
||||
- ALL
|
||||
networks:
|
||||
- psp_consumer_network
|
||||
# healthcheck:
|
||||
@@ -89,6 +91,47 @@ services:
|
||||
# retries: 3
|
||||
# start_period: 10s
|
||||
|
||||
seed:
|
||||
platform: ${DOCKER_PLATFORM:-linux/amd64}
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
target: build
|
||||
args:
|
||||
NODE_ENV: ${NODE_ENV:-production}
|
||||
PORT: ${PORT}
|
||||
DATABASE_NAME: ${DATABASE_NAME}
|
||||
DATABASE_USER: ${DATABASE_USER}
|
||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
||||
DATABASE_PORT: ${DATABASE_PORT}
|
||||
DATABASE_HOST: ${DATABASE_HOST}
|
||||
DATABASE_URL: mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
|
||||
SHADOW_DATABASE_URL: mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}_shadow
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
|
||||
OTP_STATIC_CODE: ${OTP_STATIC_CODE}
|
||||
depends_on:
|
||||
database:
|
||||
condition: service_healthy
|
||||
environment:
|
||||
NODE_ENV: ${NODE_ENV:-production}
|
||||
PORT: ${PORT}
|
||||
DATABASE_NAME: ${DATABASE_NAME}
|
||||
DATABASE_USER: ${DATABASE_USER}
|
||||
DATABASE_PASSWORD: ${DATABASE_PASSWORD}
|
||||
DATABASE_PORT: ${DATABASE_PORT}
|
||||
DATABASE_HOST: ${DATABASE_HOST}
|
||||
DATABASE_URL: mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}
|
||||
SHADOW_DATABASE_URL: mysql://${DATABASE_USER}:${DATABASE_PASSWORD}@${DATABASE_HOST}:${DATABASE_PORT}/${DATABASE_NAME}_shadow
|
||||
JWT_SECRET: ${JWT_SECRET}
|
||||
JWT_EXPIRES_IN: ${JWT_EXPIRES_IN}
|
||||
OTP_STATIC_CODE: ${OTP_STATIC_CODE}
|
||||
networks:
|
||||
- psp_consumer_network
|
||||
profiles:
|
||||
- tools
|
||||
command: ["pnpm", "seed:sku"]
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
driver: local
|
||||
|
||||
+2
-1
@@ -8,6 +8,7 @@
|
||||
"@nestjs/jwt": "^11.0.2",
|
||||
"@nestjs/platform-express": "^11.1.19",
|
||||
"@nestjs/swagger": "^11.3.2",
|
||||
"@prisma/client": "^7.7.0",
|
||||
"@prisma/adapter-mariadb": "^7.7.0",
|
||||
"@types/bcrypt": "^6.0.0",
|
||||
"@types/multer": "^2.1.0",
|
||||
@@ -33,7 +34,6 @@
|
||||
"@nestjs/cli": "^11.0.21",
|
||||
"@nestjs/schematics": "^11.1.0",
|
||||
"@nestjs/testing": "^11.1.19",
|
||||
"@prisma/client": "^7.7.0",
|
||||
"@types/cookie-parser": "^1.4.10",
|
||||
"@types/express": "^5.0.6",
|
||||
"@types/jest": "^30.0.0",
|
||||
@@ -82,6 +82,7 @@
|
||||
"dump-triggers": "tsx scripts/dump-triggers.ts",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||
"generate:permissions": "tsx scripts/generate-permissions.ts",
|
||||
"seed:sku": "tsx scripts/seedStockKeepingUnits.ts",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||
"start": "nest start",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
|
||||
Generated
+3
-3
@@ -32,6 +32,9 @@ importers:
|
||||
'@prisma/adapter-mariadb':
|
||||
specifier: ^7.7.0
|
||||
version: 7.7.0
|
||||
'@prisma/client':
|
||||
specifier: ^7.7.0
|
||||
version: 7.7.0(prisma@7.7.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3))(typescript@5.9.3)
|
||||
'@types/bcrypt':
|
||||
specifier: ^6.0.0
|
||||
version: 6.0.0
|
||||
@@ -96,9 +99,6 @@ importers:
|
||||
'@nestjs/testing':
|
||||
specifier: ^11.1.19
|
||||
version: 11.1.19(@nestjs/common@11.1.19(class-transformer@0.5.1)(class-validator@0.14.4)(reflect-metadata@0.2.2)(rxjs@7.8.2))(@nestjs/core@11.1.19)(@nestjs/platform-express@11.1.19)
|
||||
'@prisma/client':
|
||||
specifier: ^7.7.0
|
||||
version: 7.7.0(prisma@7.7.0(@types/react@19.2.7)(react-dom@19.2.1(react@19.2.1))(react@19.2.1)(typescript@5.9.3))(typescript@5.9.3)
|
||||
'@types/cookie-parser':
|
||||
specifier: ^1.4.10
|
||||
version: 1.4.10(@types/express@5.0.6)
|
||||
|
||||
@@ -1,50 +0,0 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `permission_business_activities` DROP FOREIGN KEY `permission_business_activities_business_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `permission_business_activities` DROP FOREIGN KEY `permission_business_activities_permission_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `permission_complexes` DROP FOREIGN KEY `permission_complexes_complex_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `permission_complexes` DROP FOREIGN KEY `permission_complexes_permission_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `permission_consumers` DROP FOREIGN KEY `permission_consumers_consumer_account_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `permission_poses` DROP FOREIGN KEY `permission_poses_permission_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `permission_poses` DROP FOREIGN KEY `permission_poses_pos_id_fkey`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `permission_business_activities_business_id_fkey` ON `permission_business_activities`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `permission_complexes_complex_id_fkey` ON `permission_complexes`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `permission_poses_pos_id_fkey` ON `permission_poses`;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_consumers` ADD CONSTRAINT `permission_consumers_consumer_account_id_fkey` FOREIGN KEY (`consumer_account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_poses` ADD CONSTRAINT `permission_poses_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_poses` ADD CONSTRAINT `permission_poses_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_complexes` ADD CONSTRAINT `permission_complexes_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_complexes` ADD CONSTRAINT `permission_complexes_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_business_activities` ADD CONSTRAINT `permission_business_activities_business_id_fkey` FOREIGN KEY (`business_id`) REFERENCES `business_activities`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_business_activities` ADD CONSTRAINT `permission_business_activities_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
@@ -1,2 +0,0 @@
|
||||
-- AlterTable
|
||||
ALTER TABLE `goods` ADD COLUMN `image_url` VARCHAR(255) NULL;
|
||||
@@ -1,78 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `consumer_id` on the `licenses` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `expires_at` on the `licenses` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `starts_at` on the `licenses` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `status` on the `licenses` table. All the data in the column will be lost.
|
||||
- A unique constraint covering the columns `[activated_license_id]` on the table `consumers` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `activation_expires_at` to the `licenses` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `charged_license_transaction_id` to the `licenses` table without a default value. This is not possible if the table is not empty.
|
||||
- Made the column `partner_id` on table `licenses` required. This step will fail if there are existing NULL values in that column.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `licenses` DROP FOREIGN KEY `licenses_consumer_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `licenses` DROP FOREIGN KEY `licenses_partner_id_fkey`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `licenses_consumer_id_key` ON `licenses`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `licenses_partner_id_fkey` ON `licenses`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `consumers` ADD COLUMN `activated_license_id` VARCHAR(191) NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `licenses` DROP COLUMN `consumer_id`,
|
||||
DROP COLUMN `expires_at`,
|
||||
DROP COLUMN `starts_at`,
|
||||
DROP COLUMN `status`,
|
||||
ADD COLUMN `activation_expires_at` DATETIME(3) NOT NULL,
|
||||
ADD COLUMN `charged_license_transaction_id` VARCHAR(191) NOT NULL,
|
||||
MODIFY `partner_id` VARCHAR(191) NOT NULL;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `activated_licenses` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`starts_at` DATETIME(3) NOT NULL,
|
||||
`expires_at` DATETIME(3) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`license_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `activated_licenses_id_key`(`id`),
|
||||
UNIQUE INDEX `activated_licenses_license_id_key`(`license_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `charged_license_transactions` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `consumers_activated_license_id_key` ON `consumers`(`activated_license_id`);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumers` ADD CONSTRAINT `consumers_activated_license_id_fkey` FOREIGN KEY (`activated_license_id`) REFERENCES `activated_licenses`(`id`) ON DELETE SET NULL 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 `licenses` ADD CONSTRAINT `licenses_charged_license_transaction_id_fkey` FOREIGN KEY (`charged_license_transaction_id`) REFERENCES `charged_license_transactions`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `activated_licenses` ADD CONSTRAINT `activated_licenses_license_id_fkey` FOREIGN KEY (`license_id`) REFERENCES `licenses`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `charged_license_transactions` ADD CONSTRAINT `charged_license_transactions_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@@ -1,41 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `activated_license_id` on the `consumers` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `activation_expires_at` on the `licenses` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `partner_id` on the `licenses` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `license_quota` on the `partners` table. All the data in the column will be lost.
|
||||
- Added the required column `consumer_id` to the `activated_licenses` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `activation_expires_at` to the `charged_license_transactions` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `consumers` DROP FOREIGN KEY `consumers_activated_license_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `licenses` DROP FOREIGN KEY `licenses_partner_id_fkey`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `consumers_activated_license_id_key` ON `consumers`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `licenses_partner_id_fkey` ON `licenses`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `activated_licenses` ADD COLUMN `consumer_id` VARCHAR(191) NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `charged_license_transactions` ADD COLUMN `activation_expires_at` DATETIME(3) NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `consumers` DROP COLUMN `activated_license_id`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `licenses` DROP COLUMN `activation_expires_at`,
|
||||
DROP COLUMN `partner_id`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `partners` DROP COLUMN `license_quota`;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `activated_licenses` ADD CONSTRAINT `activated_licenses_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
-70
@@ -1,70 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `user_devices` table. If the table is not empty, all the data it contains will be lost.
|
||||
- A unique constraint covering the columns `[tracking_code]` on the table `charged_license_transactions` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `tracking_code` to the `charged_license_transactions` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropTable
|
||||
DROP TABLE `user_devices`;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `consumer_devices` (
|
||||
`uuid` VARCHAR(255) NOT NULL,
|
||||
`app_version` VARCHAR(20) NOT NULL,
|
||||
`build_number` VARCHAR(20) 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,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
UNIQUE INDEX `consumer_devices_uuid_key` (`uuid`),
|
||||
PRIMARY KEY (`uuid`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `application_released_info` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`version` VARCHAR(191) NOT NULL,
|
||||
`build_number` VARCHAR(191) NOT NULL,
|
||||
`is_stable` BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
`is_minimum_supported` BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
`type` ENUM('ANDROID', 'IOS') NOT NULL,
|
||||
`notes` JSON NULL,
|
||||
`release_date` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumer_devices`
|
||||
ADD CONSTRAINT `consumer_devices_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers` (`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
ALTER TABLE `charged_license_transactions`
|
||||
ADD COLUMN `tracking_code` VARCHAR(191) NULL;
|
||||
|
||||
UPDATE `charged_license_transactions`
|
||||
SET
|
||||
`tracking_code` = CONCAT(
|
||||
'TRX-',
|
||||
UPPER(
|
||||
REPLACE (`id`, '-', '')
|
||||
)
|
||||
)
|
||||
WHERE
|
||||
`tracking_code` IS NULL
|
||||
OR `tracking_code` = '';
|
||||
|
||||
ALTER TABLE `charged_license_transactions`
|
||||
MODIFY `tracking_code` VARCHAR(191) NOT NULL;
|
||||
|
||||
CREATE UNIQUE INDEX `charged_license_transactions_tracking_code_key` ON `charged_license_transactions` (`tracking_code`);
|
||||
@@ -1,19 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `is_stable` on the `application_released_info` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `type` on the `application_released_info` table. All the data in the column will be lost.
|
||||
- Added the required column `platform` to the `application_released_info` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `release_type` to the `application_released_info` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `publisher` to the `consumer_devices` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE `application_released_info` DROP COLUMN `is_stable`,
|
||||
DROP COLUMN `type`,
|
||||
ADD COLUMN `platform` ENUM('ANDROID', 'IOS') NOT NULL,
|
||||
ADD COLUMN `release_type` ENUM('STABLE', 'BETA', 'ALPHA') NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `consumer_devices` ADD COLUMN `publisher` ENUM('DIRECT', 'CAFE_BAZAR', 'MAYKET') NOT NULL,
|
||||
ADD COLUMN `user_agent` VARCHAR(100) NULL;
|
||||
@@ -1,35 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `tax_id` on the `complexes` table. All the data in the column will be lost.
|
||||
- A unique constraint covering the columns `[economic_code]` on the table `business_activities` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[mobile_number,national_code,partner_id]` on the table `consumers` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `economic_code` to the `business_activities` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `national_code` to the `consumers` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `partner_id` to the `consumers` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropIndex
|
||||
DROP INDEX `consumers_mobile_number_key` ON `consumers`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `business_activities` ADD COLUMN `economic_code` VARCHAR(191) NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `complexes` DROP COLUMN `tax_id`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `consumers` ADD COLUMN `national_code` VARCHAR(191) NOT NULL,
|
||||
ADD COLUMN `partner_id` VARCHAR(191) NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `licenses` ADD COLUMN `accounts_limit` INTEGER NOT NULL DEFAULT 3;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `business_activities_economic_code_key` ON `business_activities`(`economic_code`);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `consumers_mobile_number_national_code_partner_id_key` ON `consumers`(`mobile_number`, `national_code`, `partner_id`);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumers` ADD CONSTRAINT `consumers_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@@ -1,8 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- Added the required column `branch_code` to the `complexes` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE `complexes` ADD COLUMN `branch_code` VARCHAR(191) NOT NULL;
|
||||
@@ -1,151 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `charged_license_transaction_id` on the `licenses` table. All the data in the column will be lost.
|
||||
- You are about to drop the `activated_licenses` table. If the table is not empty, all the data it contains will be lost.
|
||||
- You are about to drop the `charged_license_transactions` table. If the table is not empty, all the data it contains will be lost.
|
||||
- A unique constraint covering the columns `[mobile_number,partner_id]` on the table `consumers` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[national_code,partner_id]` on the table `consumers` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `charge_transaction_id` to the `licenses` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `activated_licenses` DROP FOREIGN KEY `activated_licenses_consumer_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `activated_licenses` DROP FOREIGN KEY `activated_licenses_license_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `charged_license_transactions` DROP FOREIGN KEY `charged_license_transactions_partner_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `licenses` DROP FOREIGN KEY `licenses_charged_license_transaction_id_fkey`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `consumers_mobile_number_national_code_partner_id_key` ON `consumers`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `licenses_charged_license_transaction_id_fkey` ON `licenses`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `licenses` DROP COLUMN `charged_license_transaction_id`,
|
||||
ADD COLUMN `charge_transaction_id` VARCHAR(191) NOT NULL;
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE `activated_licenses`;
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE `charged_license_transactions`;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `licenses_activated` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`starts_at` DATETIME(3) NOT NULL,
|
||||
`expires_at` DATETIME(3) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`license_id` VARCHAR(191) NOT NULL,
|
||||
`business_activity_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `licenses_activated_id_key`(`id`),
|
||||
UNIQUE INDEX `licenses_activated_license_id_key`(`license_id`),
|
||||
UNIQUE INDEX `licenses_activated_business_activity_id_key`(`business_activity_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `license_charged_transactions` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`activation_expires_at` DATETIME(3) NOT NULL,
|
||||
`tracking_code` VARCHAR(191) NOT NULL,
|
||||
`purchased_count` INTEGER NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `license_charged_transactions_tracking_code_key`(`tracking_code`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `license_renew` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`charge_transaction_id` VARCHAR(191) NOT NULL,
|
||||
`activation_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `license_renew_charge_transaction` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`activation_expires_at` DATETIME(3) NOT NULL,
|
||||
`tracking_code` VARCHAR(191) NOT NULL,
|
||||
`purchased_count` INTEGER NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `license_renew_charge_transaction_tracking_code_key`(`tracking_code`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `partner_account_quota_charge_transaction` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`purchased_count` INTEGER NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `partner_account_quota_allocation` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`charge_transaction_id` VARCHAR(191) NOT NULL,
|
||||
`license_id` VARCHAR(191) NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `consumers_mobile_number_partner_id_key` ON `consumers`(`mobile_number`, `partner_id`);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `consumers_national_code_partner_id_key` ON `consumers`(`national_code`, `partner_id`);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `licenses` ADD CONSTRAINT `licenses_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `license_charged_transactions`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `licenses_activated` ADD CONSTRAINT `licenses_activated_license_id_fkey` FOREIGN KEY (`license_id`) REFERENCES `licenses`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `licenses_activated` ADD CONSTRAINT `licenses_activated_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_charged_transactions` ADD CONSTRAINT `license_charged_transactions_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_renew` ADD CONSTRAINT `license_renew_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `license_renew_charge_transaction`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_renew` ADD CONSTRAINT `license_renew_activation_id_fkey` FOREIGN KEY (`activation_id`) REFERENCES `licenses_activated`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_renew_charge_transaction` ADD CONSTRAINT `license_renew_charge_transaction_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_account_quota_charge_transaction` ADD CONSTRAINT `partner_account_quota_charge_transaction_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_account_quota_allocation` ADD CONSTRAINT `partner_account_quota_allocation_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `partner_account_quota_charge_transaction`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_account_quota_allocation` ADD CONSTRAINT `partner_account_quota_allocation_license_id_fkey` FOREIGN KEY (`license_id`) REFERENCES `licenses`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -1,18 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[tracking_code]` on the table `partner_account_quota_charge_transaction` will be added. If there are existing duplicate values, this will fail.
|
||||
- Added the required column `expires_at` to the `license_renew` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `activation_expires_at` to the `partner_account_quota_charge_transaction` table without a default value. This is not possible if the table is not empty.
|
||||
- Added the required column `tracking_code` to the `partner_account_quota_charge_transaction` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE `license_renew` ADD COLUMN `expires_at` DATETIME(3) NOT NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `partner_account_quota_charge_transaction` ADD COLUMN `activation_expires_at` DATETIME(3) NOT NULL,
|
||||
ADD COLUMN `tracking_code` VARCHAR(191) NOT NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `partner_account_quota_charge_transaction_tracking_code_key` ON `partner_account_quota_charge_transaction`(`tracking_code`);
|
||||
@@ -1,16 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `serial` on the `poses` table. All the data in the column will be lost.
|
||||
- A unique constraint covering the columns `[serial_number]` on the table `poses` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- DropIndex
|
||||
DROP INDEX `poses_serial_key` ON `poses`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `poses` DROP COLUMN `serial`,
|
||||
ADD COLUMN `serial_number` VARCHAR(191) NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `poses_serial_number_key` ON `poses`(`serial_number`);
|
||||
@@ -1,20 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[account_id]` on the table `poses` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE `licenses` MODIFY `accounts_limit` INTEGER NOT NULL DEFAULT 2;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `partners` ADD COLUMN `logo_url` VARCHAR(191) NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `poses` ADD COLUMN `account_id` VARCHAR(191) NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `poses_account_id_key` ON `poses`(`account_id`);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `poses` ADD CONSTRAINT `poses_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -1,50 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `partner_account_quota_allocation` table. If the table is not empty, all the data it contains will be lost.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `partner_account_quota_allocation` DROP FOREIGN KEY `partner_account_quota_allocation_charge_transaction_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `partner_account_quota_allocation` DROP FOREIGN KEY `partner_account_quota_allocation_license_id_fkey`;
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE `partner_account_quota_allocation`;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `partner_account_quota_credit` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`charge_transaction_id` VARCHAR(191) NOT NULL,
|
||||
`allocation_id` VARCHAR(191) NULL,
|
||||
|
||||
UNIQUE INDEX `partner_account_quota_credit_allocation_id_key`(`allocation_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `license_account_allocation` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`license_activation_id` VARCHAR(191) NOT NULL,
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `license_account_allocation_account_id_key`(`account_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_account_quota_credit` ADD CONSTRAINT `partner_account_quota_credit_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `partner_account_quota_charge_transaction`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_account_quota_credit` ADD CONSTRAINT `partner_account_quota_credit_allocation_id_fkey` FOREIGN KEY (`allocation_id`) REFERENCES `license_account_allocation`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_account_allocation` ADD CONSTRAINT `license_account_allocation_license_activation_id_fkey` FOREIGN KEY (`license_activation_id`) REFERENCES `licenses_activated`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_account_allocation` ADD CONSTRAINT `license_account_allocation_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@@ -1,30 +0,0 @@
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `license_account_allocation` DROP FOREIGN KEY `license_account_allocation_account_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `license_account_allocation` DROP FOREIGN KEY `license_account_allocation_license_activation_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `partner_account_quota_credit` DROP FOREIGN KEY `partner_account_quota_credit_charge_transaction_id_fkey`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `license_account_allocation_license_activation_id_fkey` ON `license_account_allocation`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `partner_account_quota_credit_charge_transaction_id_fkey` ON `partner_account_quota_credit`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `license_account_allocation` MODIFY `license_activation_id` VARCHAR(191) NULL,
|
||||
MODIFY `account_id` VARCHAR(191) NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `partner_account_quota_credit` MODIFY `charge_transaction_id` VARCHAR(191) NULL;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_account_quota_credit` ADD CONSTRAINT `partner_account_quota_credit_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `partner_account_quota_charge_transaction`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_account_allocation` ADD CONSTRAINT `license_account_allocation_license_activation_id_fkey` FOREIGN KEY (`license_activation_id`) REFERENCES `licenses_activated`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_account_allocation` ADD CONSTRAINT `license_account_allocation_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -1,53 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `allocation_id` on the `partner_account_quota_credit` table. All the data in the column will be lost.
|
||||
- A unique constraint covering the columns `[economic_code,consumer_id]` on the table `business_activities` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[credit_id]` on the table `license_account_allocation` will be added. If there are existing duplicate values, this will fail.
|
||||
- Made the column `account_id` on table `poses` required. This step will fail if there are existing NULL values in that column.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `license_renew` DROP FOREIGN KEY `license_renew_activation_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `partner_account_quota_credit` DROP FOREIGN KEY `partner_account_quota_credit_allocation_id_fkey`;
|
||||
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `poses` DROP FOREIGN KEY `poses_account_id_fkey`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `business_activities_economic_code_key` ON `business_activities`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `license_renew_activation_id_fkey` ON `license_renew`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `partner_account_quota_credit_allocation_id_key` ON `partner_account_quota_credit`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `license_account_allocation` ADD COLUMN `credit_id` VARCHAR(191) NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `license_renew` MODIFY `activation_id` VARCHAR(191) NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `partner_account_quota_credit` DROP COLUMN `allocation_id`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `poses` MODIFY `account_id` VARCHAR(191) NOT NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `business_activities_economic_code_consumer_id_key` ON `business_activities`(`economic_code`, `consumer_id`);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `license_account_allocation_credit_id_key` ON `license_account_allocation`(`credit_id`);
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `poses` ADD CONSTRAINT `poses_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_renew` ADD CONSTRAINT `license_renew_activation_id_fkey` FOREIGN KEY (`activation_id`) REFERENCES `licenses_activated`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_account_allocation` ADD CONSTRAINT `license_account_allocation_credit_id_fkey` FOREIGN KEY (`credit_id`) REFERENCES `partner_account_quota_credit`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
+492
-184
@@ -37,76 +37,6 @@ CREATE TABLE `accounts` (
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `consumer_accounts` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`role` ENUM('OWNER', 'MANAGER', 'OPERATOR') NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `consumer_accounts_account_id_key`(`account_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `consumers` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`mobile_number` VARCHAR(191) NOT NULL,
|
||||
`first_name` VARCHAR(191) NOT NULL,
|
||||
`last_name` VARCHAR(191) NOT NULL,
|
||||
`status` ENUM('ACTIVE', 'SUSPENDED') NOT NULL DEFAULT 'ACTIVE',
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `consumers_mobile_number_key`(`mobile_number`),
|
||||
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` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`guild_id` VARCHAR(191) NOT NULL,
|
||||
`consumer_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,
|
||||
`tax_id` VARCHAR(191) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT 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,
|
||||
`name` 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', 'WEB', 'API') NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`complex_id` VARCHAR(191) NOT NULL,
|
||||
`device_id` VARCHAR(191) 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,
|
||||
@@ -126,21 +56,120 @@ CREATE TABLE `devices` (
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`brand_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `devices_brand_id_idx`(`brand_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `license_charged_transactions` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`activation_expires_at` DATETIME(3) NOT NULL,
|
||||
`tracking_code` VARCHAR(191) NOT NULL,
|
||||
`purchased_count` INTEGER NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `license_charged_transactions_tracking_code_key`(`tracking_code`),
|
||||
INDEX `license_charged_transactions_partner_id_idx`(`partner_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `licenses` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`starts_at` DATETIME(3) NOT NULL,
|
||||
`expires_at` DATETIME(3) NOT NULL,
|
||||
`status` ENUM('ACTIVE', 'EXPIRED', 'SUSPENDED') NOT NULL,
|
||||
`accounts_limit` INTEGER NOT NULL DEFAULT 2,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
`charge_transaction_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `licenses_consumer_id_key`(`consumer_id`),
|
||||
INDEX `licenses_charge_transaction_id_idx`(`charge_transaction_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `licenses_activated` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`starts_at` DATETIME(3) NOT NULL,
|
||||
`expires_at` DATETIME(3) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`license_id` VARCHAR(191) NOT NULL,
|
||||
`business_activity_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `licenses_activated_id_key`(`id`),
|
||||
UNIQUE INDEX `licenses_activated_license_id_key`(`license_id`),
|
||||
UNIQUE INDEX `licenses_activated_business_activity_id_key`(`business_activity_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `license_renew_charge_transaction` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`activation_expires_at` DATETIME(3) NOT NULL,
|
||||
`tracking_code` VARCHAR(191) NOT NULL,
|
||||
`purchased_count` INTEGER NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `license_renew_charge_transaction_tracking_code_key`(`tracking_code`),
|
||||
INDEX `license_renew_charge_transaction_partner_id_idx`(`partner_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `license_renew` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`expires_at` DATETIME(3) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`charge_transaction_id` VARCHAR(191) NOT NULL,
|
||||
`activation_id` VARCHAR(191) NULL,
|
||||
|
||||
INDEX `license_renew_activation_id_idx`(`activation_id`),
|
||||
INDEX `license_renew_charge_transaction_id_idx`(`charge_transaction_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `partner_account_quota_charge_transaction` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`activation_expires_at` DATETIME(3) NOT NULL,
|
||||
`tracking_code` VARCHAR(191) NOT NULL,
|
||||
`purchased_count` INTEGER NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `partner_account_quota_charge_transaction_tracking_code_key`(`tracking_code`),
|
||||
INDEX `partner_account_quota_charge_transaction_partner_id_idx`(`partner_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `partner_account_quota_credit` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`charge_transaction_id` VARCHAR(191) NULL,
|
||||
|
||||
INDEX `partner_account_quota_credit_charge_transaction_id_idx`(`charge_transaction_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `license_account_allocation` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`license_activation_id` VARCHAR(191) NULL,
|
||||
`account_id` VARCHAR(191) NULL,
|
||||
`credit_id` VARCHAR(191) NULL,
|
||||
|
||||
UNIQUE INDEX `license_account_allocation_account_id_key`(`account_id`),
|
||||
UNIQUE INDEX `license_account_allocation_credit_id_key`(`credit_id`),
|
||||
INDEX `license_account_allocation_license_activation_id_idx`(`license_activation_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -154,6 +183,7 @@ CREATE TABLE `partner_accounts` (
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `partner_accounts_account_id_key`(`account_id`),
|
||||
INDEX `partner_accounts_partner_id_fkey`(`partner_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -162,10 +192,11 @@ CREATE TABLE `partners` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`name` VARCHAR(191) NOT NULL,
|
||||
`code` VARCHAR(191) NOT NULL,
|
||||
`license_quota` INTEGER NULL DEFAULT 0,
|
||||
`status` ENUM('ACTIVE', 'SUSPENDED') NOT NULL DEFAULT 'ACTIVE',
|
||||
`logo_url` VARCHAR(191) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`tsp_provider` ENUM('NAMA', 'SUN') NOT NULL DEFAULT 'NAMA',
|
||||
|
||||
UNIQUE INDEX `partners_code_key`(`code`),
|
||||
PRIMARY KEY (`id`)
|
||||
@@ -187,6 +218,7 @@ CREATE TABLE `permission_poses` (
|
||||
`pos_id` VARCHAR(191) NOT NULL,
|
||||
`permission_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `permission_poses_pos_id_fkey`(`pos_id`),
|
||||
UNIQUE INDEX `permission_poses_permission_id_pos_id_key`(`permission_id`, `pos_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
@@ -198,6 +230,7 @@ CREATE TABLE `permission_complexes` (
|
||||
`complex_id` VARCHAR(191) NOT NULL,
|
||||
`permission_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `permission_complexes_complex_id_fkey`(`complex_id`),
|
||||
UNIQUE INDEX `permission_complexes_permission_id_complex_id_key`(`permission_id`, `complex_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
@@ -209,6 +242,7 @@ CREATE TABLE `permission_business_activities` (
|
||||
`business_id` VARCHAR(191) NOT NULL,
|
||||
`permission_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `permission_business_activities_business_id_fkey`(`business_id`),
|
||||
UNIQUE INDEX `permission_business_activities_permission_id_business_id_key`(`permission_id`, `business_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
@@ -223,6 +257,7 @@ CREATE TABLE `provider_accounts` (
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `provider_accounts_account_id_key`(`account_id`),
|
||||
INDEX `provider_accounts_provider_id_fkey`(`provider_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -240,75 +275,147 @@ CREATE TABLE `providers` (
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `trigger_logs` (
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`message` TEXT NOT NULL,
|
||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`name` TEXT NOT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `user_devices` (
|
||||
`account_id` VARCHAR(255) NULL,
|
||||
CREATE TABLE `consumer_devices` (
|
||||
`uuid` VARCHAR(255) NOT 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,
|
||||
`publisher` ENUM('DIRECT', 'CAFE_BAZAR', 'MAYKET') NOT NULL,
|
||||
`os_version` VARCHAR(20) NOT NULL,
|
||||
`sdk_version` VARCHAR(20) NOT NULL,
|
||||
`release_number` VARCHAR(20) NOT NULL,
|
||||
`user_agent` VARCHAR(100) NULL,
|
||||
`browser_name` VARCHAR(100) NULL,
|
||||
`fcm_token` VARCHAR(100) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `user_devices_uuid_key`(`uuid`),
|
||||
UNIQUE INDEX `consumer_devices_uuid_key`(`uuid`),
|
||||
INDEX `consumer_devices_consumer_id_fkey`(`consumer_id`),
|
||||
PRIMARY KEY (`uuid`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `customers` (
|
||||
CREATE TABLE `application_released_info` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`is_favorite` BOOLEAN NULL DEFAULT false,
|
||||
`version` VARCHAR(191) NOT NULL,
|
||||
`build_number` VARCHAR(191) NOT NULL,
|
||||
`is_minimum_supported` BOOLEAN NOT NULL DEFAULT false,
|
||||
`release_type` ENUM('STABLE', 'BETA', 'ALPHA') NOT NULL,
|
||||
`platform` ENUM('ANDROID', 'IOS') NOT NULL,
|
||||
`notes` JSON NULL,
|
||||
`release_date` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`deleted_at` TIMESTAMP(0) NULL,
|
||||
`type` ENUM('INDIVIDUAL', 'LEGAL', 'UNKNOWN') NOT NULL,
|
||||
`unknown_customer` JSON NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `customer_individuals` (
|
||||
`first_name` VARCHAR(255) NOT NULL,
|
||||
`last_name` VARCHAR(255) NOT NULL,
|
||||
`national_id` CHAR(10) NOT NULL,
|
||||
`postal_code` CHAR(10) NOT NULL,
|
||||
`economic_code` CHAR(10) NULL,
|
||||
`customer_id` VARCHAR(191) NOT NULL,
|
||||
`complex_id` VARCHAR(191) NOT NULL,
|
||||
CREATE TABLE `consumer_accounts` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`role` ENUM('OWNER', 'MANAGER', 'OPERATOR') NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `customer_individuals_complex_id_idx`(`complex_id`),
|
||||
UNIQUE INDEX `customer_individuals_complex_id_national_id_key`(`complex_id`, `national_id`),
|
||||
PRIMARY KEY (`customer_id`)
|
||||
UNIQUE INDEX `consumer_accounts_account_id_key`(`account_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `customer_legal` (
|
||||
`company_name` VARCHAR(255) NOT NULL,
|
||||
`economic_code` CHAR(10) NOT NULL,
|
||||
`registration_number` CHAR(20) NOT NULL,
|
||||
`postal_code` CHAR(10) NOT NULL,
|
||||
`customer_id` VARCHAR(191) NOT NULL,
|
||||
`complex_id` VARCHAR(191) NOT NULL,
|
||||
CREATE TABLE `consumers` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`type` ENUM('INDIVIDUAL', 'LEGAL') NOT NULL,
|
||||
`status` ENUM('ACTIVE', 'SUSPENDED') NOT NULL DEFAULT 'ACTIVE',
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
|
||||
INDEX `customer_legal_complex_id_idx`(`complex_id`),
|
||||
UNIQUE INDEX `customer_legal_complex_id_registration_number_key`(`complex_id`, `registration_number`),
|
||||
PRIMARY KEY (`customer_id`)
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `consumers_individual` (
|
||||
`first_name` VARCHAR(191) NOT NULL,
|
||||
`last_name` VARCHAR(191) NOT NULL,
|
||||
`mobile_number` VARCHAR(191) NOT NULL,
|
||||
`national_code` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NOT NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `consumers_individual_mobile_number_consumer_id_key`(`mobile_number`, `consumer_id`),
|
||||
UNIQUE INDEX `consumers_individual_partner_id_national_code_key`(`partner_id`, `national_code`),
|
||||
PRIMARY KEY (`consumer_id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `consumers_legal` (
|
||||
`name` VARCHAR(191) NOT NULL,
|
||||
`registration_code` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`partner_id` VARCHAR(191) NOT NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `consumers_legal_partner_id_registration_code_key`(`partner_id`, `registration_code`),
|
||||
PRIMARY KEY (`consumer_id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `business_activities` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`economic_code` VARCHAR(191) NOT NULL,
|
||||
`name` VARCHAR(191) NOT NULL,
|
||||
`fiscal_id` VARCHAR(191) NOT NULL,
|
||||
`partner_token` VARCHAR(191) NOT NULL,
|
||||
`invoice_number_sequence` DECIMAL(20, 0) NOT NULL DEFAULT 1,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`guild_id` VARCHAR(191) NOT NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `business_activities_economic_code_consumer_id_key`(`economic_code`, `consumer_id`),
|
||||
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,
|
||||
`branch_code` VARCHAR(191) NOT NULL,
|
||||
`address` VARCHAR(191) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT 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,
|
||||
`name` VARCHAR(191) NOT NULL,
|
||||
`model` VARCHAR(191) NULL,
|
||||
`serial_number` VARCHAR(191) NULL,
|
||||
`status` ENUM('ACTIVE', 'DISABLED') NOT NULL DEFAULT 'ACTIVE',
|
||||
`pos_type` ENUM('PSP', 'MOBILE', 'WEB', 'API') NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`complex_id` VARCHAR(191) NOT NULL,
|
||||
`device_id` VARCHAR(191) NULL,
|
||||
`provider_id` VARCHAR(191) NULL,
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `poses_serial_number_key`(`serial_number`),
|
||||
UNIQUE INDEX `poses_account_id_key`(`account_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
@@ -316,18 +423,19 @@ CREATE TABLE `goods` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`is_default_guild_good` BOOLEAN NOT NULL DEFAULT false,
|
||||
`sku` VARCHAR(100) NOT NULL,
|
||||
`unit_type` ENUM('COUNT', 'GRAM', 'KILOGRAM', 'MILLILITER', 'LITER', 'METER', 'HOUR') NOT NULL,
|
||||
`pricing_model` ENUM('STANDARD', 'GOLD') NOT NULL,
|
||||
`description` TEXT NULL,
|
||||
`local_sku` VARCHAR(100) NULL,
|
||||
`barcode` VARCHAR(100) NULL,
|
||||
`base_sale_price` DECIMAL(15, 0) NULL DEFAULT 0.00,
|
||||
`image_url` VARCHAR(255) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`deleted_at` TIMESTAMP(0) NULL,
|
||||
`complex_id` VARCHAR(191) NULL,
|
||||
`sku_id` VARCHAR(191) NOT NULL,
|
||||
`measure_unit_id` VARCHAR(191) NOT NULL,
|
||||
`category_id` VARCHAR(191) NULL,
|
||||
`business_activity_id` VARCHAR(191) NULL,
|
||||
|
||||
UNIQUE INDEX `goods_local_sku_key`(`local_sku`),
|
||||
UNIQUE INDEX `goods_barcode_key`(`barcode`),
|
||||
@@ -355,6 +463,7 @@ CREATE TABLE `good_categories` (
|
||||
CREATE TABLE `guilds` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`name` VARCHAR(191) NOT NULL,
|
||||
`invoice_template` ENUM('SALE', 'FX_SALE', 'GOLD_JEWELRY', 'CONTRACT', 'UTILITY', 'AIR_TICKET', 'EXPORT', 'BILL_OF_LADING', 'PETROCHEMICAL', 'COMMODITY_EXCHANGE', 'INSURANCE') NOT NULL,
|
||||
`code` VARCHAR(191) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
@@ -362,21 +471,113 @@ CREATE TABLE `guilds` (
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `measure_units` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`code` VARCHAR(191) NOT NULL,
|
||||
`name` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
|
||||
UNIQUE INDEX `measure_units_code_key`(`code`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `stock_keeping_units` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`code` VARCHAR(191) NOT NULL,
|
||||
`name` VARCHAR(191) NOT NULL,
|
||||
`VAT` DECIMAL(5, 2) NOT NULL,
|
||||
`type` ENUM('GOLD') NOT NULL,
|
||||
`is_public` BOOLEAN NOT NULL DEFAULT true,
|
||||
`is_domestic` BOOLEAN NOT NULL DEFAULT false,
|
||||
`guild_id` VARCHAR(191) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `stock_keeping_units_code_key`(`code`),
|
||||
INDEX `stock_keeping_units_code_idx`(`code`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `trigger_logs` (
|
||||
`id` INTEGER NOT NULL AUTO_INCREMENT,
|
||||
`message` TEXT NOT NULL,
|
||||
`createdAt` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`name` TEXT NOT NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `customers` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`is_favorite` BOOLEAN NULL DEFAULT false,
|
||||
`type` ENUM('INDIVIDUAL', 'LEGAL', 'UNKNOWN') NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`deleted_at` TIMESTAMP(0) NULL,
|
||||
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `customer_individuals` (
|
||||
`first_name` VARCHAR(255) NOT NULL,
|
||||
`last_name` VARCHAR(255) NOT NULL,
|
||||
`national_id` CHAR(10) NOT NULL,
|
||||
`mobile_number` CHAR(15) NOT NULL,
|
||||
`postal_code` CHAR(10) NOT NULL,
|
||||
`economic_code` CHAR(10) NULL,
|
||||
`customer_id` VARCHAR(191) NOT NULL,
|
||||
`business_activity_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `customer_individuals_business_activity_id_idx`(`business_activity_id`),
|
||||
UNIQUE INDEX `customer_individuals_business_activity_id_national_id_key`(`business_activity_id`, `national_id`),
|
||||
PRIMARY KEY (`customer_id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `customer_legal` (
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
`economic_code` CHAR(10) NOT NULL,
|
||||
`registration_number` CHAR(20) NULL,
|
||||
`postal_code` CHAR(10) NOT NULL,
|
||||
`customer_id` VARCHAR(191) NOT NULL,
|
||||
`business_activity_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `customer_legal_business_activity_id_idx`(`business_activity_id`),
|
||||
UNIQUE INDEX `customer_legal_business_activity_id_economic_code_key`(`business_activity_id`, `economic_code`),
|
||||
PRIMARY KEY (`customer_id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `sales_invoices` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`code` VARCHAR(100) NOT NULL,
|
||||
`total_amount` DECIMAL(15, 2) NOT NULL,
|
||||
`invoice_number` INTEGER NOT NULL,
|
||||
`invoice_date` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`type` ENUM('ORIGINAL', 'CORRECTION', 'REVOKE', 'RETURN') NOT NULL,
|
||||
`tax_id` VARCHAR(32) NULL,
|
||||
`notes` TEXT NULL,
|
||||
`unknown_customer` JSON NULL,
|
||||
`invoice_date` TIMESTAMP(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`main_id` VARCHAR(50) NULL,
|
||||
`ref_id` VARCHAR(50) NULL,
|
||||
`customer_id` VARCHAR(191) NULL,
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
`consumer_account_id` VARCHAR(191) NOT NULL,
|
||||
`pos_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `sales_invoices_code_key`(`code`),
|
||||
UNIQUE INDEX `sales_invoices_tax_id_key`(`tax_id`),
|
||||
UNIQUE INDEX `sales_invoices_ref_id_key`(`ref_id`),
|
||||
INDEX `sales_invoices_ref_id_idx`(`ref_id`),
|
||||
INDEX `sales_invoices_tax_id_idx`(`tax_id`),
|
||||
UNIQUE INDEX `sales_invoices_invoice_number_pos_id_key`(`invoice_number`, `pos_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -384,34 +585,75 @@ CREATE TABLE `sales_invoices` (
|
||||
CREATE TABLE `sales_invoice_items` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`quantity` DECIMAL(10, 0) NOT NULL,
|
||||
`unit_type` ENUM('COUNT', 'GRAM', 'KILOGRAM', 'MILLILITER', 'LITER', 'METER', 'HOUR') NOT NULL,
|
||||
`measure_unit_text` VARCHAR(50) NOT NULL,
|
||||
`measure_unit_code` VARCHAR(50) NOT NULL,
|
||||
`sku_code` VARCHAR(50) NOT NULL,
|
||||
`sku_vat` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
||||
`unit_price` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
||||
`total_amount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`discount` DECIMAL(15, 2) NOT NULL DEFAULT 0.00,
|
||||
`notes` TEXT NULL,
|
||||
`invoice_id` VARCHAR(191) NOT NULL,
|
||||
`good_id` VARCHAR(191) NULL,
|
||||
`service_id` VARCHAR(191) NULL,
|
||||
`payload` JSON NULL,
|
||||
`good_snapshot` JSON NOT NULL,
|
||||
`invoice_id` VARCHAR(191) NOT NULL,
|
||||
`good_id` VARCHAR(191) NOT NULL,
|
||||
`service_id` VARCHAR(191) NULL,
|
||||
|
||||
INDEX `sales_invoice_items_invoice_id_good_id_idx`(`invoice_id`, `good_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `sale_invoice_tsp_attempts` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`attempt_no` INTEGER NOT NULL,
|
||||
`status` ENUM('SUCCESS', 'FAILURE', 'NOT_SEND', 'QUEUED') NOT NULL,
|
||||
`request_payload` JSON NULL,
|
||||
`response_payload` JSON NULL,
|
||||
`message` TEXT NOT NULL,
|
||||
`sent_at` TIMESTAMP(0) NULL,
|
||||
`received_at` TIMESTAMP(0) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`invoice_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `sale_invoice_tsp_attempts_invoice_id_key`(`invoice_id`),
|
||||
INDEX `sale_invoice_tsp_attempts_status_idx`(`status`),
|
||||
INDEX `sale_invoice_tsp_attempts_invoice_id_idx`(`invoice_id`),
|
||||
UNIQUE INDEX `sale_invoice_tsp_attempts_invoice_id_attempt_no_key`(`invoice_id`, `attempt_no`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `sales_invoice_payments` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`invoice_id` VARCHAR(191) NOT NULL,
|
||||
`amount` DECIMAL(15, 2) NOT NULL,
|
||||
`payment_method` ENUM('TERMINAL', 'CASH', 'SET_OFF', 'CARD', 'BANK', 'CHECK', 'OTHER') NOT NULL,
|
||||
`paid_at` DATETIME(3) NOT NULL,
|
||||
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
`payment_method` ENUM('CHEQUE', 'SET_OFF', 'CASH', 'TERMINAL', 'PAYMENT_GATEWAY', 'CARD', 'BANK', 'OTHER') NOT NULL,
|
||||
`paid_at` TIMESTAMP(0) NOT NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`invoice_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `sales_invoice_payments_invoice_id_idx`(`invoice_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `sales_invoice_payment_terminal_info` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`terminal_id` VARCHAR(191) NOT NULL,
|
||||
`stan` VARCHAR(191) NOT NULL,
|
||||
`rrn` VARCHAR(191) NOT NULL,
|
||||
`transaction_date_time` DATETIME(3) NOT NULL,
|
||||
`customer_card_no` VARCHAR(191) NULL,
|
||||
`description` VARCHAR(191) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`payment_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `sales_invoice_payment_terminal_info_payment_id_key`(`payment_id`),
|
||||
UNIQUE INDEX `sales_invoice_payment_terminal_info_terminal_id_stan_rrn_pay_key`(`terminal_id`, `stan`, `rrn`, `payment_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `services` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
@@ -454,7 +696,82 @@ CREATE TABLE `service_categories` (
|
||||
ALTER TABLE `admin_accounts` ADD CONSTRAINT `admin_accounts_admin_id_fkey` FOREIGN KEY (`admin_id`) REFERENCES `admins`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `admin_accounts` ADD CONSTRAINT `admin_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE `admin_accounts` ADD CONSTRAINT `admin_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE 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 `license_charged_transactions` ADD CONSTRAINT `license_charged_transactions_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `licenses` ADD CONSTRAINT `licenses_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `license_charged_transactions`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `licenses_activated` ADD CONSTRAINT `licenses_activated_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `licenses_activated` ADD CONSTRAINT `licenses_activated_license_id_fkey` FOREIGN KEY (`license_id`) REFERENCES `licenses`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_renew_charge_transaction` ADD CONSTRAINT `license_renew_charge_transaction_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_renew` ADD CONSTRAINT `license_renew_activation_id_fkey` FOREIGN KEY (`activation_id`) REFERENCES `licenses_activated`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_renew` ADD CONSTRAINT `license_renew_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `license_renew_charge_transaction`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_account_quota_charge_transaction` ADD CONSTRAINT `partner_account_quota_charge_transaction_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_account_quota_credit` ADD CONSTRAINT `partner_account_quota_credit_charge_transaction_id_fkey` FOREIGN KEY (`charge_transaction_id`) REFERENCES `partner_account_quota_charge_transaction`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_account_allocation` ADD CONSTRAINT `license_account_allocation_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_account_allocation` ADD CONSTRAINT `license_account_allocation_credit_id_fkey` FOREIGN KEY (`credit_id`) REFERENCES `partner_account_quota_credit`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `license_account_allocation` ADD CONSTRAINT `license_account_allocation_license_activation_id_fkey` FOREIGN KEY (`license_activation_id`) REFERENCES `licenses_activated`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_accounts` ADD CONSTRAINT `partner_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_accounts` ADD CONSTRAINT `partner_accounts_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_consumers` ADD CONSTRAINT `permission_consumers_consumer_account_id_fkey` FOREIGN KEY (`consumer_account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_poses` ADD CONSTRAINT `permission_poses_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_poses` ADD CONSTRAINT `permission_poses_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_complexes` ADD CONSTRAINT `permission_complexes_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_complexes` ADD CONSTRAINT `permission_complexes_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_business_activities` ADD CONSTRAINT `permission_business_activities_business_id_fkey` FOREIGN KEY (`business_id`) REFERENCES `business_activities`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_business_activities` ADD CONSTRAINT `permission_business_activities_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `provider_accounts` ADD CONSTRAINT `provider_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `provider_accounts` ADD CONSTRAINT `provider_accounts_provider_id_fkey` FOREIGN KEY (`provider_id`) REFERENCES `providers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumer_devices` ADD CONSTRAINT `consumer_devices_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumer_accounts` ADD CONSTRAINT `consumer_accounts_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@@ -462,6 +779,18 @@ ALTER TABLE `consumer_accounts` ADD CONSTRAINT `consumer_accounts_consumer_id_fk
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumer_accounts` ADD CONSTRAINT `consumer_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumers_individual` ADD CONSTRAINT `consumers_individual_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumers_individual` ADD CONSTRAINT `consumers_individual_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumers_legal` ADD CONSTRAINT `consumers_legal_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumers_legal` ADD CONSTRAINT `consumers_legal_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers`(`id`) ON DELETE CASCADE 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;
|
||||
|
||||
@@ -481,64 +810,19 @@ ALTER TABLE `poses` ADD CONSTRAINT `poses_device_id_fkey` FOREIGN KEY (`device_i
|
||||
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;
|
||||
ALTER TABLE `poses` ADD CONSTRAINT `poses_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`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 SET NULL ON UPDATE CASCADE;
|
||||
ALTER TABLE `goods` ADD CONSTRAINT `goods_sku_id_fkey` FOREIGN KEY (`sku_id`) REFERENCES `stock_keeping_units`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `licenses` ADD CONSTRAINT `licenses_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_accounts` ADD CONSTRAINT `partner_accounts_partner_id_fkey` FOREIGN KEY (`partner_id`) REFERENCES `partners`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `partner_accounts` ADD CONSTRAINT `partner_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_consumers` ADD CONSTRAINT `permission_consumers_consumer_account_id_fkey` FOREIGN KEY (`consumer_account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_poses` ADD CONSTRAINT `permission_poses_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_poses` ADD CONSTRAINT `permission_poses_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_complexes` ADD CONSTRAINT `permission_complexes_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_complexes` ADD CONSTRAINT `permission_complexes_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_business_activities` ADD CONSTRAINT `permission_business_activities_business_id_fkey` FOREIGN KEY (`business_id`) REFERENCES `business_activities`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `permission_business_activities` ADD CONSTRAINT `permission_business_activities_permission_id_fkey` FOREIGN KEY (`permission_id`) REFERENCES `permission_consumers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `provider_accounts` ADD CONSTRAINT `provider_accounts_provider_id_fkey` FOREIGN KEY (`provider_id`) REFERENCES `providers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `provider_accounts` ADD CONSTRAINT `provider_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_individuals` ADD CONSTRAINT `customer_individuals_customer_id_fkey` FOREIGN KEY (`customer_id`) REFERENCES `customers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_individuals` ADD CONSTRAINT `customer_individuals_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_legal` ADD CONSTRAINT `customer_legal_customer_id_fkey` FOREIGN KEY (`customer_id`) REFERENCES `customers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_legal` ADD CONSTRAINT `customer_legal_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE `goods` ADD CONSTRAINT `goods_measure_unit_id_fkey` FOREIGN KEY (`measure_unit_id`) REFERENCES `measure_units`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `goods` ADD CONSTRAINT `goods_category_id_fkey` FOREIGN KEY (`category_id`) REFERENCES `good_categories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `goods` ADD CONSTRAINT `goods_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
ALTER TABLE `goods` ADD CONSTRAINT `goods_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities`(`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;
|
||||
@@ -546,26 +830,50 @@ ALTER TABLE `good_categories` ADD CONSTRAINT `good_categories_guild_id_fkey` FOR
|
||||
-- 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;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `stock_keeping_units` ADD CONSTRAINT `stock_keeping_units_guild_id_fkey` FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_individuals` ADD CONSTRAINT `customer_individuals_customer_id_fkey` FOREIGN KEY (`customer_id`) REFERENCES `customers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_individuals` ADD CONSTRAINT `customer_individuals_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_legal` ADD CONSTRAINT `customer_legal_customer_id_fkey` FOREIGN KEY (`customer_id`) REFERENCES `customers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_legal` ADD CONSTRAINT `customer_legal_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoices` ADD CONSTRAINT `sales_invoices_ref_id_fkey` FOREIGN KEY (`ref_id`) REFERENCES `sales_invoices`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoices` ADD CONSTRAINT `sales_invoices_customer_id_fkey` FOREIGN KEY (`customer_id`) REFERENCES `customers`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoices` ADD CONSTRAINT `sales_invoices_consumer_account_id_fkey` FOREIGN KEY (`consumer_account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoices` ADD CONSTRAINT `sales_invoices_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoices` ADD CONSTRAINT `sales_invoices_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoice_items` ADD CONSTRAINT `sales_invoice_items_invoice_id_fkey` FOREIGN KEY (`invoice_id`) REFERENCES `sales_invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoice_items` ADD CONSTRAINT `sales_invoice_items_good_id_fkey` FOREIGN KEY (`good_id`) REFERENCES `goods`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
ALTER TABLE `sales_invoice_items` ADD CONSTRAINT `sales_invoice_items_good_id_fkey` FOREIGN KEY (`good_id`) REFERENCES `goods`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoice_items` ADD CONSTRAINT `sales_invoice_items_service_id_fkey` FOREIGN KEY (`service_id`) REFERENCES `services`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sale_invoice_tsp_attempts` ADD CONSTRAINT `sale_invoice_tsp_attempts_invoice_id_fkey` FOREIGN KEY (`invoice_id`) REFERENCES `sales_invoices`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoice_payments` ADD CONSTRAINT `sales_invoice_payments_invoice_id_fkey` FOREIGN KEY (`invoice_id`) REFERENCES `sales_invoices`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `sales_invoice_payment_terminal_info` ADD CONSTRAINT `sales_invoice_payment_terminal_info_payment_id_fkey` FOREIGN KEY (`payment_id`) REFERENCES `sales_invoice_payments`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `services` ADD CONSTRAINT `services_category_id_fkey` FOREIGN KEY (`category_id`) REFERENCES `service_categories`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
@@ -0,0 +1,8 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `type` on the `stock_keeping_units` table. All the data in the column will be lost.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE `stock_keeping_units` DROP COLUMN `type`;
|
||||
@@ -0,0 +1,48 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the column `request_payload` on the `sale_invoice_tsp_attempts` table. All the data in the column will be lost.
|
||||
- You are about to drop the column `response_payload` on the `sale_invoice_tsp_attempts` table. All the data in the column will be lost.
|
||||
- Added the required column `raw_request_payload` to the `sale_invoice_tsp_attempts` table without a default value. This is not possible if the table is not empty.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `sale_invoice_tsp_attempts` DROP FOREIGN KEY `sale_invoice_tsp_attempts_invoice_id_fkey`;
|
||||
|
||||
-- DropIndex
|
||||
DROP INDEX `sale_invoice_tsp_attempts_invoice_id_key` ON `sale_invoice_tsp_attempts`;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `sale_invoice_tsp_attempts`
|
||||
ADD COLUMN `provider_request_payload` JSON NULL,
|
||||
ADD COLUMN `provider_response_payload` JSON NULL,
|
||||
ADD COLUMN `raw_request_payload` JSON NOT NULL;
|
||||
|
||||
UPDATE `sale_invoice_tsp_attempts`
|
||||
SET `provider_response_payload` = `response_payload`;
|
||||
UPDATE `sale_invoice_tsp_attempts`
|
||||
SET `raw_request_payload` = `request_payload`;
|
||||
|
||||
ALTER TABLE `sale_invoice_tsp_attempts`
|
||||
DROP COLUMN `response_payload`,
|
||||
DROP COLUMN `request_payload`;
|
||||
|
||||
-- AddForeignKey
|
||||
-- Check if the foreign key constraint already exists before adding it
|
||||
SET @constraint_exists = (
|
||||
SELECT COUNT(*)
|
||||
FROM information_schema.TABLE_CONSTRAINTS
|
||||
WHERE CONSTRAINT_SCHEMA = DATABASE()
|
||||
AND TABLE_NAME = 'customer_legal'
|
||||
AND CONSTRAINT_NAME = 'customer_legal_business_activity_id_fkey'
|
||||
AND CONSTRAINT_TYPE = 'FOREIGN KEY'
|
||||
);
|
||||
|
||||
SET @sql = IF(@constraint_exists = 0,
|
||||
'ALTER TABLE `customer_legal` ADD CONSTRAINT `customer_legal_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;',
|
||||
'SELECT "Foreign key constraint customer_legal_business_activity_id_fkey already exists" as message;'
|
||||
);
|
||||
|
||||
PREPARE stmt FROM @sql;
|
||||
EXECUTE stmt;
|
||||
DEALLOCATE PREPARE stmt;
|
||||
@@ -8,46 +8,20 @@ model AdminAccount {
|
||||
admin Admin @relation(fields: [admin_id], references: [id])
|
||||
|
||||
account_id String @unique
|
||||
account Account @relation(fields: [account_id], references: [id])
|
||||
account Account @relation(fields: [account_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@map("admin_accounts")
|
||||
}
|
||||
|
||||
model Admin {
|
||||
id String @id @default(ulid())
|
||||
mobile_number String @unique()
|
||||
national_code String? @unique()
|
||||
mobile_number String @unique
|
||||
national_code String? @unique
|
||||
first_name String
|
||||
last_name String
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
adminAccounts AdminAccount[]
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
accounts AdminAccount[]
|
||||
|
||||
@@map("admins")
|
||||
}
|
||||
|
||||
// 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")
|
||||
// }
|
||||
|
||||
@@ -1,44 +1,13 @@
|
||||
model Account {
|
||||
id String @id @default(ulid())
|
||||
username String @unique()
|
||||
username String @unique
|
||||
password String
|
||||
status AccountStatus
|
||||
type AccountType
|
||||
|
||||
admin_account AdminAccount?
|
||||
provider_account ProviderAccount?
|
||||
partner_account PartnerAccount?
|
||||
consumer_account ConsumerAccount?
|
||||
|
||||
// tokens Token[]
|
||||
// refresh_tokens RefreshToken[]
|
||||
partner_account PartnerAccount?
|
||||
provider_account ProviderAccount?
|
||||
|
||||
@@map("accounts")
|
||||
}
|
||||
|
||||
// model Token {
|
||||
// id String @id @d @uniqueefault(ulid())
|
||||
// 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(ulid())
|
||||
// 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")
|
||||
// }
|
||||
|
||||
@@ -1,10 +1,8 @@
|
||||
model DeviceBrand {
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
devices Device[]
|
||||
|
||||
@@map("device_brands")
|
||||
@@ -14,14 +12,12 @@ model Device {
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
os_version String?
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
brand_id String
|
||||
|
||||
brand DeviceBrand @relation(fields: [brand_id], references: [id])
|
||||
poses Pos[]
|
||||
|
||||
@@index([brand_id])
|
||||
@@map("devices")
|
||||
}
|
||||
|
||||
@@ -1,51 +1,43 @@
|
||||
model LicenseChargeTransaction {
|
||||
id String @id @default(ulid())
|
||||
activation_expires_at DateTime
|
||||
tracking_code String @unique()
|
||||
tracking_code String @unique
|
||||
purchased_count Int
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
partner_id String
|
||||
partner Partner @relation(fields: [partner_id], references: [id])
|
||||
|
||||
licenses License[]
|
||||
|
||||
@@index([partner_id])
|
||||
@@map("license_charged_transactions")
|
||||
}
|
||||
|
||||
model License {
|
||||
id String @id @default(ulid())
|
||||
accounts_limit Int @default(2)
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
charge_transaction_id String
|
||||
charge_transaction LicenseChargeTransaction @relation(fields: [charge_transaction_id], references: [id])
|
||||
|
||||
activation LicenseActivation?
|
||||
|
||||
@@index([charge_transaction_id])
|
||||
@@map("licenses")
|
||||
}
|
||||
|
||||
model LicenseActivation {
|
||||
id String @id @unique() @default(ulid())
|
||||
id String @id @unique @default(ulid())
|
||||
starts_at DateTime
|
||||
expires_at DateTime
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
license_id String @unique
|
||||
license License @relation(fields: [license_id], references: [id])
|
||||
|
||||
business_activity_id String @unique
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: [id])
|
||||
|
||||
license_renews LicenseRenew[]
|
||||
account_allocations LicenseAccountAllocation[]
|
||||
license_renews LicenseRenew[]
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: [id])
|
||||
license License @relation(fields: [license_id], references: [id])
|
||||
|
||||
@@map("licenses_activated")
|
||||
}
|
||||
@@ -53,81 +45,71 @@ model LicenseActivation {
|
||||
model LicenseRenewChargeTransaction {
|
||||
id String @id @default(ulid())
|
||||
activation_expires_at DateTime
|
||||
tracking_code String @unique()
|
||||
tracking_code String @unique
|
||||
purchased_count Int
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
partner_id String
|
||||
license_renews LicenseRenew[]
|
||||
partner Partner @relation(fields: [partner_id], references: [id])
|
||||
|
||||
license_renews LicenseRenew[]
|
||||
|
||||
@@index([partner_id])
|
||||
@@map("license_renew_charge_transaction")
|
||||
}
|
||||
|
||||
model LicenseRenew {
|
||||
id String @id @default(ulid())
|
||||
expires_at DateTime
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
charge_transaction_id String
|
||||
charge_transaction LicenseRenewChargeTransaction @relation(fields: [charge_transaction_id], references: [id])
|
||||
|
||||
activation_id String?
|
||||
activation LicenseActivation? @relation(fields: [activation_id], references: [id])
|
||||
charge_transaction LicenseRenewChargeTransaction @relation(fields: [charge_transaction_id], references: [id])
|
||||
|
||||
@@index([activation_id])
|
||||
@@index([charge_transaction_id])
|
||||
@@map("license_renew")
|
||||
}
|
||||
|
||||
model PartnerAccountQuotaChargeTransaction {
|
||||
id String @id @default(ulid())
|
||||
activation_expires_at DateTime
|
||||
tracking_code String @unique()
|
||||
tracking_code String @unique
|
||||
purchased_count Int
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
partner_id String
|
||||
partner Partner @relation(fields: [partner_id], references: [id])
|
||||
|
||||
credits PartnerAccountQuotaCredit[]
|
||||
|
||||
@@index([partner_id])
|
||||
@@map("partner_account_quota_charge_transaction")
|
||||
}
|
||||
|
||||
model PartnerAccountQuotaCredit {
|
||||
id String @id @default(ulid())
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
charge_transaction_id String?
|
||||
allocation LicenseAccountAllocation?
|
||||
charge_transaction PartnerAccountQuotaChargeTransaction? @relation(fields: [charge_transaction_id], references: [id])
|
||||
|
||||
allocation LicenseAccountAllocation?
|
||||
|
||||
@@index([charge_transaction_id])
|
||||
@@map("partner_account_quota_credit")
|
||||
}
|
||||
|
||||
model LicenseAccountAllocation {
|
||||
id String @id @default(ulid())
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
license_activation_id String?
|
||||
account_id String? @unique
|
||||
credit_id String? @unique
|
||||
account ConsumerAccount? @relation(fields: [account_id], references: [id])
|
||||
credit PartnerAccountQuotaCredit? @relation(fields: [credit_id], references: [id])
|
||||
license_activation LicenseActivation? @relation(fields: [license_activation_id], references: [id])
|
||||
|
||||
account_id String? @unique
|
||||
account ConsumerAccount? @relation(fields: [account_id], references: [id])
|
||||
|
||||
credit_id String? @unique
|
||||
credit PartnerAccountQuotaCredit? @relation(fields: [credit_id], references: [id])
|
||||
|
||||
@@index([license_activation_id])
|
||||
@@map("license_account_allocation")
|
||||
}
|
||||
|
||||
@@ -1,34 +1,32 @@
|
||||
model PartnerAccount {
|
||||
id String @id @default(ulid())
|
||||
role PartnerRole
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @default(now()) @updatedAt @db.Timestamp(0)
|
||||
|
||||
partner_id String
|
||||
account_id String @unique
|
||||
account Account @relation(fields: [account_id], references: [id], onDelete: Cascade)
|
||||
partner Partner @relation(fields: [partner_id], references: [id])
|
||||
|
||||
account_id String @unique
|
||||
account Account @relation(fields: [account_id], references: [id])
|
||||
|
||||
@@index([partner_id], map: "partner_accounts_partner_id_fkey")
|
||||
@@map("partner_accounts")
|
||||
}
|
||||
|
||||
model Partner {
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
code String @unique()
|
||||
code String @unique
|
||||
status PartnerStatus @default(ACTIVE)
|
||||
logo_url String?
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @default(now()) @updatedAt @db.Timestamp(0)
|
||||
|
||||
consumers Consumer[]
|
||||
partner_accounts PartnerAccount[]
|
||||
tsp_provider TspProviderType @default(NAMA)
|
||||
consumers_individual ConsumerIndividual[]
|
||||
consumers_legal ConsumerLegal[]
|
||||
license_charge_transactions LicenseChargeTransaction[]
|
||||
account_quota_charge_transactions PartnerAccountQuotaChargeTransaction[]
|
||||
license_renew_charge_transactions LicenseRenewChargeTransaction[]
|
||||
account_quota_charge_transactions PartnerAccountQuotaChargeTransaction[]
|
||||
accounts PartnerAccount[]
|
||||
|
||||
@@map("partners")
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
model PermissionConsumer {
|
||||
id String @id @default(ulid())
|
||||
|
||||
consumer_account_id String @unique
|
||||
consumer_account ConsumerAccount @relation(fields: [consumer_account_id], references: [id], onDelete: Cascade)
|
||||
|
||||
pos_permissions PermissionPos[]
|
||||
complex_permissions PermissionComplex[]
|
||||
business_permissions PermissionBusiness[]
|
||||
complex_permissions PermissionComplex[]
|
||||
consumer_account ConsumerAccount @relation(fields: [consumer_account_id], references: [id], onDelete: Cascade)
|
||||
pos_permissions PermissionPos[]
|
||||
|
||||
@@map("permission_consumers")
|
||||
}
|
||||
@@ -14,41 +12,38 @@ model PermissionConsumer {
|
||||
model PermissionPos {
|
||||
id String @id @default(ulid())
|
||||
role POSRole
|
||||
|
||||
pos_id String
|
||||
permission_id String
|
||||
|
||||
pos Pos @relation(fields: [pos_id], references: [id], onDelete: Cascade)
|
||||
permission PermissionConsumer @relation(fields: [permission_id], references: [id], onDelete: Cascade)
|
||||
pos Pos @relation(fields: [pos_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([permission_id, pos_id])
|
||||
@@index([pos_id], map: "permission_poses_pos_id_fkey")
|
||||
@@map("permission_poses")
|
||||
}
|
||||
|
||||
model PermissionComplex {
|
||||
id String @id @default(ulid())
|
||||
role ComplexRole
|
||||
|
||||
complex_id String
|
||||
permission_id String
|
||||
|
||||
complex Complex @relation(fields: [complex_id], references: [id], onDelete: Cascade)
|
||||
permission PermissionConsumer @relation(fields: [permission_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([permission_id, complex_id])
|
||||
@@index([complex_id], map: "permission_complexes_complex_id_fkey")
|
||||
@@map("permission_complexes")
|
||||
}
|
||||
|
||||
model PermissionBusiness {
|
||||
id String @id @default(ulid())
|
||||
role BusinessRole
|
||||
|
||||
business_id String
|
||||
permission_id String
|
||||
|
||||
business BusinessActivity @relation(fields: [business_id], references: [id], onDelete: Cascade)
|
||||
permission PermissionConsumer @relation(fields: [permission_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([permission_id, business_id])
|
||||
@@index([business_id], map: "permission_business_activities_business_id_fkey")
|
||||
@@map("permission_business_activities")
|
||||
}
|
||||
|
||||
@@ -1,30 +1,26 @@
|
||||
model ProviderAccount {
|
||||
id String @id @default(ulid())
|
||||
role ProviderRole
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
provider_id String
|
||||
account_id String @unique
|
||||
account Account @relation(fields: [account_id], references: [id], onDelete: Cascade)
|
||||
provider Provider @relation(fields: [provider_id], references: [id])
|
||||
|
||||
account_id String @unique
|
||||
account Account @relation(fields: [account_id], references: [id])
|
||||
|
||||
@@index([provider_id], map: "provider_accounts_provider_id_fkey")
|
||||
@@map("provider_accounts")
|
||||
}
|
||||
|
||||
model Provider {
|
||||
id String @id @default(ulid())
|
||||
code String @unique()
|
||||
code String @unique
|
||||
status PartnerStatus @default(ACTIVE)
|
||||
name String
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
|
||||
pos_list Pos[]
|
||||
provider_accounts ProviderAccount[]
|
||||
accounts ProviderAccount[]
|
||||
|
||||
@@map("providers")
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
model ConsumerDevices {
|
||||
uuid String @id @unique() @db.VarChar(255)
|
||||
uuid String @id @unique @db.VarChar(255)
|
||||
app_version String @db.VarChar(20)
|
||||
build_number String @db.VarChar(20)
|
||||
platform String @db.VarChar(100)
|
||||
@@ -13,12 +13,11 @@ model ConsumerDevices {
|
||||
user_agent String? @db.VarChar(100)
|
||||
browser_name String? @db.VarChar(100)
|
||||
fcm_token String? @db.VarChar(100)
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
consumer_id String
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id])
|
||||
|
||||
@@index([consumer_id], map: "consumer_devices_consumer_id_fkey")
|
||||
@@map("consumer_devices")
|
||||
}
|
||||
|
||||
@@ -6,11 +6,9 @@ model ApplicationReleasedInfo {
|
||||
release_type ApplicationReleaseType
|
||||
platform ApplicationPlatform
|
||||
notes Json?
|
||||
|
||||
release_date DateTime @default(now()) @db.Timestamp(0)
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
|
||||
@@map("application_released_info")
|
||||
}
|
||||
|
||||
@@ -21,11 +21,26 @@ model ConsumerAccount {
|
||||
|
||||
model Consumer {
|
||||
id String @id @default(ulid())
|
||||
mobile_number String
|
||||
national_code String
|
||||
type ConsumerType
|
||||
status ConsumerStatus @default(ACTIVE)
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
accounts ConsumerAccount[]
|
||||
business_activities BusinessActivity[]
|
||||
devices ConsumerDevices[]
|
||||
individual ConsumerIndividual?
|
||||
legal ConsumerLegal?
|
||||
|
||||
@@map("consumers")
|
||||
}
|
||||
|
||||
model ConsumerIndividual {
|
||||
first_name String
|
||||
last_name String
|
||||
status ConsumerStatus @default(ACTIVE)
|
||||
mobile_number String
|
||||
national_code String
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
@@ -33,19 +48,38 @@ model Consumer {
|
||||
partner_id String
|
||||
partner Partner @relation(fields: [partner_id], references: [id])
|
||||
|
||||
consumer_accounts ConsumerAccount[]
|
||||
business_activities BusinessActivity[]
|
||||
consumer_devices ConsumerDevices[]
|
||||
consumer_id String @id
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([mobile_number, partner_id])
|
||||
@@unique([national_code, partner_id])
|
||||
@@map("consumers")
|
||||
@@unique([mobile_number, consumer_id])
|
||||
@@unique([partner_id, national_code])
|
||||
@@map("consumers_individual")
|
||||
}
|
||||
|
||||
model ConsumerLegal {
|
||||
name String
|
||||
registration_code String
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
partner_id String
|
||||
partner Partner @relation(fields: [partner_id], references: [id])
|
||||
|
||||
consumer_id String @id
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([partner_id, registration_code])
|
||||
@@map("consumers_legal")
|
||||
}
|
||||
|
||||
model BusinessActivity {
|
||||
id String @id @default(ulid())
|
||||
economic_code String
|
||||
name String
|
||||
fiscal_id String
|
||||
partner_token String
|
||||
invoice_number_sequence Decimal @default(1) @db.Decimal(20, 0)
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
@@ -56,9 +90,12 @@ model BusinessActivity {
|
||||
consumer_id String
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id])
|
||||
|
||||
license_activation LicenseActivation?
|
||||
complexes Complex[]
|
||||
permission_businesses PermissionBusiness[]
|
||||
license_activation LicenseActivation?
|
||||
goods Good[]
|
||||
customer_individuals CustomerIndividual[]
|
||||
customer_legals CustomerLegal[]
|
||||
|
||||
@@unique([economic_code, consumer_id])
|
||||
@@map("business_activities")
|
||||
@@ -78,11 +115,8 @@ model Complex {
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: [id])
|
||||
|
||||
pos_list Pos[]
|
||||
goods Good[]
|
||||
good_categories GoodCategory[]
|
||||
permission_complexes PermissionComplex[]
|
||||
customer_individuals CustomerIndividual[]
|
||||
customer_legals CustomerLegal[]
|
||||
|
||||
@@map("complexes")
|
||||
}
|
||||
@@ -2,8 +2,6 @@ model Good {
|
||||
id String @id @default(ulid())
|
||||
name String @db.VarChar(255)
|
||||
is_default_guild_good Boolean @default(false)
|
||||
sku String @db.VarChar(100)
|
||||
unit_type UnitType
|
||||
pricing_model GoodPricingModel
|
||||
description String? @db.Text
|
||||
local_sku String? @unique() @db.VarChar(100)
|
||||
@@ -15,11 +13,18 @@ model Good {
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
|
||||
complex_id String?
|
||||
category_id String?
|
||||
sku_id String
|
||||
sku StockKeepingUnits @relation(fields: [sku_id], references: [id])
|
||||
|
||||
measure_unit_id String
|
||||
measure_unit MeasureUnits @relation(fields: [measure_unit_id], references: [id])
|
||||
|
||||
category_id String?
|
||||
category GoodCategory? @relation(fields: [category_id], references: [id])
|
||||
complex Complex? @relation(fields: [complex_id], references: [id])
|
||||
|
||||
business_activity_id String?
|
||||
business_activity BusinessActivity? @relation(fields: [business_activity_id], references: [id])
|
||||
|
||||
sales_invoice_items SalesInvoiceItem[]
|
||||
|
||||
@@index([category_id])
|
||||
@@ -1,6 +1,7 @@
|
||||
model Guild {
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
invoice_template InvoiceTemplateType
|
||||
code String?
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
@@ -8,6 +9,7 @@ model Guild {
|
||||
|
||||
business_activities BusinessActivity[]
|
||||
good_categories GoodCategory[]
|
||||
stockKeepingUnits StockKeepingUnits[]
|
||||
|
||||
@@map("guilds")
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
model MeasureUnits {
|
||||
id String @id @default(ulid())
|
||||
code String @unique
|
||||
name String
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @default(now()) @updatedAt @db.Timestamp(0)
|
||||
|
||||
goods Good[]
|
||||
|
||||
@@map("measure_units")
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
model StockKeepingUnits {
|
||||
id String @id @default(ulid())
|
||||
code String @unique
|
||||
name String
|
||||
VAT Decimal @db.Decimal(5, 2)
|
||||
is_public Boolean @default(true)
|
||||
is_domestic Boolean @default(false)
|
||||
|
||||
guild_id String
|
||||
guild Guild @relation(fields: [guild_id], references: [id])
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
goods Good[]
|
||||
|
||||
@@index([code])
|
||||
@@map("stock_keeping_units")
|
||||
}
|
||||
@@ -1,19 +1,8 @@
|
||||
// generator client {
|
||||
// provider = "prisma-client-js"
|
||||
// // output = "../../src/generated/prisma"
|
||||
// // moduleFormat = "cjs"
|
||||
// previewFeatures = ["views"]
|
||||
// }
|
||||
|
||||
// datasource db {
|
||||
// provider = "mysql"
|
||||
// }
|
||||
|
||||
generator client {
|
||||
provider = "prisma-client"
|
||||
output = "../../src/generated/prisma"
|
||||
moduleFormat = "cjs"
|
||||
previewFeatures = ["views"]
|
||||
moduleFormat = "cjs"
|
||||
}
|
||||
|
||||
datasource db {
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
model Customer {
|
||||
id String @id @default(ulid())
|
||||
is_favorite Boolean? @default(false)
|
||||
type CustomerType
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
|
||||
type CustomerType
|
||||
unknown_customer Json?
|
||||
customer_individual CustomerIndividual?
|
||||
customer_legal CustomerLegal?
|
||||
individual CustomerIndividual?
|
||||
legal CustomerLegal?
|
||||
|
||||
sales_invoices SalesInvoice[]
|
||||
|
||||
@@map("customers")
|
||||
@@ -19,33 +19,35 @@ model CustomerIndividual {
|
||||
first_name String @db.VarChar(255)
|
||||
last_name String @db.VarChar(255)
|
||||
national_id String @db.Char(10)
|
||||
mobile_number String @db.Char(15)
|
||||
|
||||
postal_code String @db.Char(10)
|
||||
economic_code String? @db.Char(10)
|
||||
|
||||
customer_id String @id
|
||||
customer Customer @relation(fields: [customer_id], references: [id], onDelete: Cascade)
|
||||
|
||||
complex_id String
|
||||
complex Complex @relation(fields: [complex_id], references: [id])
|
||||
business_activity_id String
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: id)
|
||||
|
||||
@@unique([complex_id, national_id])
|
||||
@@index([complex_id])
|
||||
@@unique([business_activity_id, national_id])
|
||||
@@index([business_activity_id])
|
||||
@@map("customer_individuals")
|
||||
}
|
||||
|
||||
model CustomerLegal {
|
||||
company_name String @db.VarChar(255)
|
||||
name String @db.VarChar(255)
|
||||
economic_code String @db.Char(10)
|
||||
registration_number String @db.Char(20)
|
||||
registration_number String? @db.Char(20)
|
||||
postal_code String @db.Char(10)
|
||||
|
||||
customer_id String @id
|
||||
customer Customer @relation(fields: [customer_id], references: [id], onDelete: Cascade)
|
||||
|
||||
complex_id String
|
||||
complex Complex @relation(fields: [complex_id], references: [id])
|
||||
business_activity_id String
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: id)
|
||||
|
||||
@@unique([complex_id, registration_number])
|
||||
@@index([complex_id])
|
||||
@@unique([business_activity_id, economic_code])
|
||||
@@index([business_activity_id])
|
||||
@@map("customer_legal")
|
||||
}
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
enum PaymentMethodType {
|
||||
TERMINAL
|
||||
CASH
|
||||
CHEQUE
|
||||
SET_OFF
|
||||
CASH
|
||||
TERMINAL
|
||||
PAYMENT_GATEWAY
|
||||
CARD
|
||||
BANK
|
||||
CHECK
|
||||
OTHER
|
||||
}
|
||||
|
||||
@@ -150,3 +151,50 @@ enum ApplicationPublisher {
|
||||
CAFE_BAZAR
|
||||
MAYKET
|
||||
}
|
||||
|
||||
enum ConsumerType {
|
||||
INDIVIDUAL
|
||||
LEGAL
|
||||
}
|
||||
|
||||
enum TspProviderType {
|
||||
NAMA
|
||||
SUN
|
||||
}
|
||||
|
||||
enum TspProviderResponseStatus {
|
||||
SUCCESS
|
||||
FAILURE
|
||||
NOT_SEND
|
||||
QUEUED
|
||||
}
|
||||
|
||||
enum TspProviderRequestType {
|
||||
ORIGINAL
|
||||
CORRECTION
|
||||
REVOKE
|
||||
RETURN
|
||||
}
|
||||
|
||||
enum TspProviderCustomerType {
|
||||
Unknown
|
||||
Known
|
||||
}
|
||||
|
||||
enum SKUGuildType {
|
||||
GOLD
|
||||
}
|
||||
|
||||
enum InvoiceTemplateType {
|
||||
SALE
|
||||
FX_SALE
|
||||
GOLD_JEWELRY
|
||||
CONTRACT
|
||||
UTILITY
|
||||
AIR_TICKET
|
||||
EXPORT
|
||||
BILL_OF_LADING
|
||||
PETROCHEMICAL
|
||||
COMMODITY_EXCHANGE
|
||||
INSURANCE
|
||||
}
|
||||
|
||||
@@ -1,60 +1,126 @@
|
||||
model SalesInvoice {
|
||||
id String @id @default(ulid())
|
||||
id String @id @default(uuid())
|
||||
code String @unique @db.VarChar(100)
|
||||
total_amount Decimal @db.Decimal(15, 2)
|
||||
invoice_number Int @db.Int()
|
||||
invoice_date DateTime @default(now()) @db.Timestamp(0)
|
||||
type TspProviderRequestType
|
||||
tax_id String? @unique @db.VarChar(32)
|
||||
|
||||
notes String? @db.Text
|
||||
unknown_customer Json? @db.Json
|
||||
invoice_date DateTime? @default(now()) @db.Timestamp(0)
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
|
||||
customer_id String?
|
||||
account_id String
|
||||
pos_id String
|
||||
main_id String? @db.VarChar(50)
|
||||
ref_id String? @unique @db.VarChar(50)
|
||||
reference_invoice SalesInvoice? @relation("SalesInvoiceReference", fields: [ref_id], references: [id])
|
||||
|
||||
customer_id String?
|
||||
customer Customer? @relation(fields: [customer_id], references: [id])
|
||||
|
||||
consumer_account_id String
|
||||
consumer_account ConsumerAccount @relation(fields: [consumer_account_id], references: [id])
|
||||
|
||||
pos_id String
|
||||
pos Pos @relation(fields: [pos_id], references: [id])
|
||||
consumer_account ConsumerAccount @relation(fields: [account_id], references: [id])
|
||||
|
||||
referenced_by SalesInvoice? @relation("SalesInvoiceReference")
|
||||
items SalesInvoiceItem[]
|
||||
payments SalesInvoicePayment[]
|
||||
tsp_attempts SaleInvoiceTspAttempts[]
|
||||
|
||||
@@unique([invoice_number, pos_id])
|
||||
@@index([ref_id])
|
||||
@@index([tax_id])
|
||||
@@map("sales_invoices")
|
||||
}
|
||||
|
||||
model SalesInvoiceItem {
|
||||
id String @id @default(ulid())
|
||||
quantity Decimal @db.Decimal(10, 0)
|
||||
unit_type UnitType
|
||||
measure_unit_text String @db.VarChar(50)
|
||||
measure_unit_code String @db.VarChar(50)
|
||||
sku_code String @db.VarChar(50)
|
||||
sku_vat Decimal @default(0.00) @db.Decimal(15, 2)
|
||||
unit_price Decimal @default(0.00) @db.Decimal(15, 2)
|
||||
total_amount Decimal @default(0.00) @db.Decimal(15, 2)
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
discount Decimal @default(0.00) @db.Decimal(15, 2)
|
||||
notes String? @db.Text
|
||||
|
||||
invoice_id String
|
||||
good_id String?
|
||||
service_id String?
|
||||
|
||||
payload Json?
|
||||
good_snapshot Json
|
||||
|
||||
invoice_id String
|
||||
invoice SalesInvoice @relation(fields: [invoice_id], references: [id])
|
||||
good Good? @relation(fields: [good_id], references: [id])
|
||||
|
||||
good_id String
|
||||
good Good @relation(fields: [good_id], references: [id])
|
||||
|
||||
service_id String?
|
||||
service Service? @relation(fields: [service_id], references: [id])
|
||||
|
||||
@@index([invoice_id, good_id])
|
||||
@@map("sales_invoice_items")
|
||||
}
|
||||
|
||||
model SaleInvoiceTspAttempts {
|
||||
id String @id @default(ulid())
|
||||
|
||||
attempt_no Int
|
||||
status TspProviderResponseStatus
|
||||
|
||||
raw_request_payload Json
|
||||
provider_request_payload Json?
|
||||
provider_response_payload Json?
|
||||
message String @db.Text
|
||||
|
||||
sent_at DateTime? @db.Timestamp(0)
|
||||
received_at DateTime? @db.Timestamp(0)
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
|
||||
invoice_id String
|
||||
invoice SalesInvoice @relation(fields: [invoice_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([invoice_id, attempt_no])
|
||||
@@index([status])
|
||||
@@index([invoice_id])
|
||||
@@map("sale_invoice_tsp_attempts")
|
||||
}
|
||||
|
||||
model SalesInvoicePayment {
|
||||
id String @id @default(ulid())
|
||||
invoice_id String
|
||||
amount Decimal @db.Decimal(15, 2)
|
||||
payment_method PaymentMethodType
|
||||
paid_at DateTime
|
||||
created_at DateTime @default(now())
|
||||
paid_at DateTime @db.Timestamp(0)
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
|
||||
invoice_id String
|
||||
invoice SalesInvoice @relation(fields: [invoice_id], references: [id])
|
||||
|
||||
terminal_info SalesInvoicePaymentTerminalInfo?
|
||||
|
||||
@@index([invoice_id])
|
||||
@@map("sales_invoice_payments")
|
||||
}
|
||||
|
||||
model SalesInvoicePaymentTerminalInfo {
|
||||
id String @id @default(ulid())
|
||||
terminal_id String
|
||||
stan String
|
||||
rrn String
|
||||
transaction_date_time DateTime
|
||||
customer_card_no String?
|
||||
description String?
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
|
||||
payment_id String @unique
|
||||
payment SalesInvoicePayment @relation(fields: [payment_id], references: [id])
|
||||
|
||||
@@unique([terminal_id, stan, rrn, payment_id])
|
||||
@@map("sales_invoice_payment_terminal_info")
|
||||
}
|
||||
|
||||
+452
-290
@@ -1,12 +1,12 @@
|
||||
import { PasswordUtil } from '@/common/utils/password.util'
|
||||
import { generateTrackingCode } from '@/common/utils/tracking-code-generator.util'
|
||||
import { GoodPricingModel, UnitType } from '@/generated/prisma/enums'
|
||||
import { GoodCreateInput, GoodCreateManyInput } from '@/generated/prisma/models'
|
||||
import { GoodPricingModel } from '@/generated/prisma/enums'
|
||||
import { GoodCreateManyInput } from '@/generated/prisma/models'
|
||||
import { prisma } from '../src/lib/prisma'
|
||||
|
||||
async function main() {
|
||||
const password = await PasswordUtil.hash('123456')
|
||||
const adminUser = await prisma.admin.upsert({
|
||||
await prisma.$transaction(async tx => {
|
||||
const adminUser = await tx.admin.upsert({
|
||||
where: {
|
||||
mobile_number: '09120258156',
|
||||
},
|
||||
@@ -16,7 +16,7 @@ async function main() {
|
||||
last_name: 'حسنی',
|
||||
national_code: '0016022289',
|
||||
mobile_number: '09120258156',
|
||||
adminAccounts: {
|
||||
accounts: {
|
||||
create: {
|
||||
account: {
|
||||
create: {
|
||||
@@ -31,33 +31,128 @@ async function main() {
|
||||
},
|
||||
})
|
||||
|
||||
const measureUnits = await tx.measureUnits.createMany({
|
||||
data: [
|
||||
{ code: '1', name: 'لنگه' },
|
||||
{ code: '2', name: 'ثوب' },
|
||||
{ code: '3', name: 'عدل' },
|
||||
{ code: '4', name: 'نیم دوجین' },
|
||||
{ code: '5', name: 'جعبه' },
|
||||
{ code: '6', name: 'قرقره' },
|
||||
{ code: '7', name: 'توپ' },
|
||||
{ code: '8', name: 'کیلوگرم' },
|
||||
{ code: '9', name: 'ست' },
|
||||
{ code: '10', name: 'بطری' },
|
||||
{ code: '11', name: 'دست' },
|
||||
{ code: '12', name: 'برگ' },
|
||||
{ code: '13', name: 'کارتن' },
|
||||
{ code: '14', name: 'سطل' },
|
||||
{ code: '15', name: 'عدد' },
|
||||
{ code: '16', name: 'ورق' },
|
||||
{ code: '17', name: 'بسته' },
|
||||
{ code: '18', name: 'شاخه' },
|
||||
{ code: '19', name: 'پاکت' },
|
||||
{ code: '20', name: 'قوطی' },
|
||||
{ code: '21', name: 'دستگاه' },
|
||||
{ code: '22', name: 'جلد' },
|
||||
{ code: '23', name: 'تخته' },
|
||||
{ code: '24', name: 'تیوب' },
|
||||
{ code: '25', name: 'رول' },
|
||||
{ code: '26', name: 'متر' },
|
||||
{ code: '27', name: 'طاقه' },
|
||||
{ code: '28', name: 'کلاف' },
|
||||
{ code: '29', name: 'جفت' },
|
||||
{ code: '30', name: 'کیسه' },
|
||||
{ code: '31', name: 'متر مربع' },
|
||||
{ code: '32', name: 'طغرا' },
|
||||
{ code: '33', name: 'پالت' },
|
||||
{ code: '34', name: 'بشکه' },
|
||||
{ code: '35', name: 'دوجین' },
|
||||
{ code: '36', name: 'گالن' },
|
||||
{ code: '37', name: '(رینگ)حلقه' },
|
||||
{ code: '38', name: 'فاقد بسته بندی' },
|
||||
{ code: '39', name: 'قراص' },
|
||||
{ code: '40', name: 'کارتن' },
|
||||
{ code: '41', name: 'قراصه' },
|
||||
{ code: '42', name: 'صفحه' },
|
||||
{ code: '43', name: 'لیتر' },
|
||||
{ code: '44', name: 'مخزن' },
|
||||
{ code: '45', name: 'ساشه' },
|
||||
{ code: '46', name: 'تانکر' },
|
||||
{ code: '47', name: 'کپسول' },
|
||||
{ code: '48', name: 'دبه' },
|
||||
{ code: '49', name: 'بندیل' },
|
||||
{ code: '50', name: 'سبد' },
|
||||
{ code: '51', name: '(رول)حلقه' },
|
||||
{ code: '52', name: 'تن' },
|
||||
{ code: '53', name: 'قالب' },
|
||||
{ code: '54', name: 'بانکه' },
|
||||
{ code: '55', name: 'شانه' },
|
||||
{ code: '56', name: 'سیلندر' },
|
||||
{ code: '57', name: 'متر مکعب' },
|
||||
{ code: '58', name: 'فوت مربع' },
|
||||
{ code: '59', name: 'حلب' },
|
||||
{ code: '60', name: 'شیت' },
|
||||
{ code: '61', name: 'چلیک' },
|
||||
{ code: '62', name: 'جام' },
|
||||
{ code: '63', name: 'گرم' },
|
||||
{ code: '64', name: 'نخ' },
|
||||
{ code: '65', name: 'شعله' },
|
||||
{ code: '66', name: 'قیراط' },
|
||||
{ code: '67', name: 'میلی لیتر' },
|
||||
{ code: '68', name: 'میلی متر' },
|
||||
{ code: '69', name: 'میلی گرم' },
|
||||
{ code: '70', name: 'ساعت' },
|
||||
{ code: '71', name: 'روز' },
|
||||
{ code: '72', name: 'تن کیلومتر' },
|
||||
{ code: '73', name: 'کیلووات ساعت' },
|
||||
{ code: '74', name: 'نفر' },
|
||||
{ code: '75', name: 'ثانیه' },
|
||||
{ code: '76', name: 'دقیقه' },
|
||||
{ code: '77', name: 'ماه' },
|
||||
{ code: '78', name: 'سال' },
|
||||
{ code: '79', name: 'قطعه' },
|
||||
{ code: '80', name: 'سانتی متر' },
|
||||
{ code: '81', name: 'سانتی متر مربع' },
|
||||
{ code: '82', name: 'فروند' },
|
||||
{ code: '83', name: 'واحد' },
|
||||
{ code: '84', name: 'لیوان' },
|
||||
{ code: '85', name: 'نوبت)`,' },
|
||||
],
|
||||
skipDuplicates: true,
|
||||
})
|
||||
|
||||
const geramMeasureUnit = await tx.measureUnits.findFirst({
|
||||
where: {
|
||||
code: '63',
|
||||
},
|
||||
})
|
||||
|
||||
// ****************** GUILD Start ****************** //
|
||||
const guilds = await prisma.guild.findMany()
|
||||
let guilds = await tx.guild.findMany()
|
||||
if (!guilds.length) {
|
||||
await prisma.guild.createMany({
|
||||
await tx.guild.createMany({
|
||||
data: [
|
||||
{
|
||||
name: 'طلا',
|
||||
code: 'Gold',
|
||||
},
|
||||
{
|
||||
name: 'میوه و ترهبار',
|
||||
code: 'Fruit',
|
||||
invoice_template: 'GOLD_JEWELRY',
|
||||
},
|
||||
],
|
||||
})
|
||||
guilds = await tx.guild.findMany()
|
||||
}
|
||||
|
||||
// ****************** GUILD Good Categories Start ****************** //
|
||||
|
||||
const goldGuild = await prisma.guild.findFirst({
|
||||
const goldGuild = await tx.guild.findFirst({
|
||||
where: {
|
||||
name: 'طلا',
|
||||
code: 'Gold',
|
||||
},
|
||||
})
|
||||
|
||||
const goldGuildId = goldGuild?.id
|
||||
const goldGuildGoodCategories = await prisma.goodCategory.findMany({
|
||||
const goldGuildGoodCategories = await tx.goodCategory.findMany({
|
||||
where: {
|
||||
guild_id: goldGuildId,
|
||||
is_default_guild_good: true,
|
||||
@@ -71,40 +166,61 @@ async function main() {
|
||||
is_default_guild_good: true,
|
||||
})
|
||||
|
||||
await prisma.goodCategory.createMany({
|
||||
await tx.goodCategory.createMany({
|
||||
data: [
|
||||
categoryFactory('زیورآلات'),
|
||||
categoryFactory('طلا'),
|
||||
categoryFactory('سایر'),
|
||||
categoryFactory('سکه'),
|
||||
categoryFactory('شمش'),
|
||||
categoryFactory('شمش'),
|
||||
// categoryFactory('طلا'),
|
||||
// categoryFactory('سایر'),
|
||||
// categoryFactory('سکه'),
|
||||
// categoryFactory('شمش'),
|
||||
// categoryFactory('شمش'),
|
||||
],
|
||||
})
|
||||
}
|
||||
|
||||
const measureUnit = await tx.measureUnits.findFirst({
|
||||
where: {
|
||||
code: '63',
|
||||
},
|
||||
})
|
||||
|
||||
if (measureUnit) {
|
||||
// ****************** GUILD Good Start ****************** //
|
||||
const goodFactory = (
|
||||
async function goodFactory(
|
||||
name: string,
|
||||
categoryId: string,
|
||||
pricingModel: GoodPricingModel,
|
||||
unitType: UnitType,
|
||||
): GoodCreateManyInput => ({
|
||||
sku_code: string,
|
||||
measure_unit_code: string,
|
||||
): Promise<GoodCreateManyInput | null> {
|
||||
const sku = await tx.stockKeepingUnits.findUnique({
|
||||
where: {
|
||||
code: sku_code,
|
||||
},
|
||||
})
|
||||
console.log(name)
|
||||
console.log(sku?.id)
|
||||
|
||||
if (sku) {
|
||||
return {
|
||||
name,
|
||||
category_id: categoryId,
|
||||
pricing_model: pricingModel,
|
||||
sku: '',
|
||||
unit_type: unitType,
|
||||
sku_id: sku.id,
|
||||
measure_unit_id: measureUnit!.id,
|
||||
is_default_guild_good: true,
|
||||
})
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
const zivarCategory = await prisma.goodCategory.findFirst({
|
||||
const zivarCategory = await tx.goodCategory.findFirst({
|
||||
where: {
|
||||
name: 'زیورآلات',
|
||||
},
|
||||
})
|
||||
if (zivarCategory) {
|
||||
const zivarGoods = await prisma.good.count({
|
||||
const zivarGoods = await tx.good.count({
|
||||
where: {
|
||||
category_id: zivarCategory?.id,
|
||||
},
|
||||
@@ -112,311 +228,356 @@ async function main() {
|
||||
if (!zivarGoods) {
|
||||
const goodItems: GoodCreateManyInput[] = []
|
||||
|
||||
goodItems.push(
|
||||
...[
|
||||
goodFactory(
|
||||
const preparedGoodItems = [
|
||||
await goodFactory(
|
||||
'آویز گردنبند طلا',
|
||||
zivarCategory.id,
|
||||
GoodPricingModel.GOLD,
|
||||
UnitType.GRAM,
|
||||
'2720000044696',
|
||||
geramMeasureUnit!.id,
|
||||
),
|
||||
goodFactory('النگو', zivarCategory.id, GoodPricingModel.GOLD, UnitType.GRAM),
|
||||
goodFactory('انگشتر', zivarCategory.id, GoodPricingModel.GOLD, UnitType.GRAM),
|
||||
goodFactory('دستبند', zivarCategory.id, GoodPricingModel.GOLD, UnitType.GRAM),
|
||||
goodFactory('زنجیر', zivarCategory.id, GoodPricingModel.GOLD, UnitType.GRAM),
|
||||
goodFactory('سرویس', zivarCategory.id, GoodPricingModel.GOLD, UnitType.GRAM),
|
||||
goodFactory('گوشواره', zivarCategory.id, GoodPricingModel.GOLD, UnitType.GRAM),
|
||||
],
|
||||
)
|
||||
|
||||
await prisma.good.createMany({ data: goodItems })
|
||||
}
|
||||
}
|
||||
|
||||
const goldCategory = await prisma.goodCategory.findFirst({
|
||||
where: {
|
||||
name: 'طلا',
|
||||
},
|
||||
})
|
||||
if (goldCategory) {
|
||||
const goldGoods = await prisma.good.count({
|
||||
where: {
|
||||
category_id: goldCategory?.id,
|
||||
},
|
||||
})
|
||||
if (!goldGoods) {
|
||||
const goodItems: GoodCreateInput[] = []
|
||||
goodItems.push(
|
||||
...[
|
||||
goodFactory(
|
||||
'طلای آب شده',
|
||||
goldCategory.id,
|
||||
await goodFactory(
|
||||
'النگو',
|
||||
zivarCategory.id,
|
||||
GoodPricingModel.GOLD,
|
||||
UnitType.GRAM,
|
||||
'2720000044665',
|
||||
geramMeasureUnit!.id,
|
||||
),
|
||||
goodFactory(
|
||||
'طلای شکسته',
|
||||
goldCategory.id,
|
||||
await goodFactory(
|
||||
'انگشتر',
|
||||
zivarCategory.id,
|
||||
GoodPricingModel.GOLD,
|
||||
UnitType.GRAM,
|
||||
'2720000044672',
|
||||
geramMeasureUnit!.id,
|
||||
),
|
||||
goodFactory(
|
||||
'طلای مستعمل',
|
||||
goldCategory.id,
|
||||
await goodFactory(
|
||||
'دستبند',
|
||||
zivarCategory.id,
|
||||
GoodPricingModel.GOLD,
|
||||
UnitType.GRAM,
|
||||
'2720000044689',
|
||||
geramMeasureUnit!.id,
|
||||
),
|
||||
],
|
||||
)
|
||||
await prisma.good.createMany({ data: goodItems })
|
||||
await goodFactory(
|
||||
'زنجیر',
|
||||
zivarCategory.id,
|
||||
GoodPricingModel.GOLD,
|
||||
'2720000044702',
|
||||
geramMeasureUnit!.id,
|
||||
),
|
||||
await goodFactory(
|
||||
'سرویس',
|
||||
zivarCategory.id,
|
||||
GoodPricingModel.GOLD,
|
||||
'2720000044733',
|
||||
geramMeasureUnit!.id,
|
||||
),
|
||||
await goodFactory(
|
||||
'گوشواره',
|
||||
zivarCategory.id,
|
||||
GoodPricingModel.GOLD,
|
||||
'2720000044726',
|
||||
geramMeasureUnit!.id,
|
||||
),
|
||||
].filter((item): item is GoodCreateManyInput => item !== null)
|
||||
goodItems.push(...preparedGoodItems)
|
||||
|
||||
await tx.good.createMany({ data: goodItems })
|
||||
}
|
||||
}
|
||||
|
||||
const coinCategory = await prisma.goodCategory.findFirst({
|
||||
where: {
|
||||
name: 'سکه',
|
||||
},
|
||||
})
|
||||
if (coinCategory) {
|
||||
const coinGoods = await prisma.good.count({
|
||||
where: {
|
||||
category_id: coinCategory?.id,
|
||||
},
|
||||
})
|
||||
if (!coinGoods) {
|
||||
const goodItems: GoodCreateInput[] = []
|
||||
goodItems.push(
|
||||
...[
|
||||
goodFactory(
|
||||
'مسکوکات خارجی',
|
||||
coinCategory.id,
|
||||
GoodPricingModel.STANDARD,
|
||||
UnitType.COUNT,
|
||||
),
|
||||
goodFactory(
|
||||
'مسکوکات داخلی (پارسیان)',
|
||||
coinCategory.id,
|
||||
GoodPricingModel.STANDARD,
|
||||
UnitType.COUNT,
|
||||
),
|
||||
goodFactory(
|
||||
'تمام بهار آزادی (طرح جدید)',
|
||||
coinCategory.id,
|
||||
GoodPricingModel.STANDARD,
|
||||
UnitType.COUNT,
|
||||
),
|
||||
goodFactory(
|
||||
'تمام بهار آزادی (طرح قدیم)',
|
||||
coinCategory.id,
|
||||
GoodPricingModel.STANDARD,
|
||||
UnitType.COUNT,
|
||||
),
|
||||
],
|
||||
)
|
||||
await prisma.good.createMany({ data: goodItems })
|
||||
}
|
||||
}
|
||||
// const goldCategory = await tx.goodCategory.findFirst({
|
||||
// where: {
|
||||
// name: 'طلا',
|
||||
// },
|
||||
// })
|
||||
// if (goldCategory) {
|
||||
// const goldGoods = await tx.good.count({
|
||||
// where: {
|
||||
// category_id: goldCategory?.id,
|
||||
// },
|
||||
// })
|
||||
// if (!goldGoods) {
|
||||
// const goodItems: GoodCreateInput[] = []
|
||||
// goodItems.push(
|
||||
// ...[
|
||||
// goodFactory(
|
||||
// 'طلای آب شده',
|
||||
// goldCategory.id,
|
||||
// GoodPricingModel.GOLD,
|
||||
// UnitType.GRAM,
|
||||
// ),
|
||||
// goodFactory(
|
||||
// 'طلای شکسته',
|
||||
// goldCategory.id,
|
||||
// GoodPricingModel.GOLD,
|
||||
// UnitType.GRAM,
|
||||
// ),
|
||||
// goodFactory(
|
||||
// 'طلای مستعمل',
|
||||
// goldCategory.id,
|
||||
// GoodPricingModel.GOLD,
|
||||
// UnitType.GRAM,
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// await tx.good.createMany({ data: goodItems })
|
||||
// }
|
||||
// }
|
||||
|
||||
const shemshCategory = await prisma.goodCategory.findFirst({
|
||||
where: {
|
||||
name: 'شمش',
|
||||
},
|
||||
})
|
||||
// const coinCategory = await tx.goodCategory.findFirst({
|
||||
// where: {
|
||||
// name: 'سکه',
|
||||
// },
|
||||
// })
|
||||
// if (coinCategory) {
|
||||
// const coinGoods = await tx.good.count({
|
||||
// where: {
|
||||
// category_id: coinCategory?.id,
|
||||
// },
|
||||
// })
|
||||
// if (!coinGoods) {
|
||||
// const goodItems: GoodCreateInput[] = []
|
||||
// goodItems.push(
|
||||
// ...[
|
||||
// goodFactory(
|
||||
// 'مسکوکات خارجی',
|
||||
// coinCategory.id,
|
||||
// GoodPricingModel.STANDARD,
|
||||
// UnitType.COUNT,
|
||||
// ),
|
||||
// goodFactory(
|
||||
// 'مسکوکات داخلی (پارسیان)',
|
||||
// coinCategory.id,
|
||||
// GoodPricingModel.STANDARD,
|
||||
// UnitType.COUNT,
|
||||
// ),
|
||||
// goodFactory(
|
||||
// 'تمام بهار آزادی (طرح جدید)',
|
||||
// coinCategory.id,
|
||||
// GoodPricingModel.STANDARD,
|
||||
// UnitType.COUNT,
|
||||
// ),
|
||||
// goodFactory(
|
||||
// 'تمام بهار آزادی (طرح قدیم)',
|
||||
// coinCategory.id,
|
||||
// GoodPricingModel.STANDARD,
|
||||
// UnitType.COUNT,
|
||||
// ),
|
||||
// ],
|
||||
// )
|
||||
// await tx.good.createMany({ data: goodItems })
|
||||
// }
|
||||
// }
|
||||
|
||||
if (shemshCategory) {
|
||||
const shemshGoods = await prisma.good.count({
|
||||
where: {
|
||||
category_id: shemshCategory?.id,
|
||||
},
|
||||
})
|
||||
if (!shemshGoods) {
|
||||
await prisma.good.create({
|
||||
data: goodFactory(
|
||||
'شمش استاندارد',
|
||||
shemshCategory.id,
|
||||
GoodPricingModel.GOLD,
|
||||
UnitType.GRAM,
|
||||
),
|
||||
})
|
||||
}
|
||||
// const shemshCategory = await tx.goodCategory.findFirst({
|
||||
// where: {
|
||||
// name: 'شمش',
|
||||
// },
|
||||
// })
|
||||
|
||||
// if (shemshCategory) {
|
||||
// const shemshGoods = await tx.good.count({
|
||||
// where: {
|
||||
// category_id: shemshCategory?.id,
|
||||
// },
|
||||
// })
|
||||
// if (!shemshGoods) {
|
||||
// await tx.good.create({
|
||||
// data: goodFactory(
|
||||
// 'شمش استاندارد',
|
||||
// shemshCategory.id,
|
||||
// GoodPricingModel.GOLD,
|
||||
// UnitType.GRAM,
|
||||
// ),
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
}
|
||||
|
||||
// ****************** partner Start ****************** //
|
||||
let partner = await prisma.partner.findFirst()
|
||||
let license = await prisma.license.findFirst()
|
||||
if (!partner) {
|
||||
partner = await prisma.partner.create({
|
||||
data: {
|
||||
name: 'تیس',
|
||||
code: 'TIS',
|
||||
status: 'ACTIVE',
|
||||
partner_accounts: {
|
||||
create: {
|
||||
role: 'OWNER',
|
||||
account: {
|
||||
create: {
|
||||
username: 'tis',
|
||||
password: await PasswordUtil.hash('123456'),
|
||||
status: 'ACTIVE',
|
||||
type: 'PARTNER',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
if (partner && !license) {
|
||||
await prisma.$transaction(async tx => {
|
||||
const startOfToday = new Date()
|
||||
startOfToday.setHours(0, 0, 0, 0)
|
||||
// let partner = await tx.partner.findFirst()
|
||||
// let license = await tx.license.findFirst()
|
||||
// if (!partner) {
|
||||
// partner = await tx.partner.create({
|
||||
// data: {
|
||||
// name: 'تیس',
|
||||
// code: 'TIS',
|
||||
// status: 'ACTIVE',
|
||||
// tsp_provider: TspProviderType.NAMA,
|
||||
// accounts: {
|
||||
// create: {
|
||||
// role: 'OWNER',
|
||||
// account: {
|
||||
// create: {
|
||||
// username: 'tis',
|
||||
// password: await PasswordUtil.hash('123456'),
|
||||
// status: 'ACTIVE',
|
||||
// type: 'PARTNER',
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// })
|
||||
// }
|
||||
// if (partner && !license) {
|
||||
// await tx.$transaction(async tx => {
|
||||
// const startOfToday = new Date()
|
||||
// startOfToday.setHours(0, 0, 0, 0)
|
||||
|
||||
const month = startOfToday.getMonth()
|
||||
let year = startOfToday.getFullYear()
|
||||
let expMonth = month + 3
|
||||
if (expMonth > 11) {
|
||||
expMonth = expMonth - 11
|
||||
year = year + 1
|
||||
}
|
||||
|
||||
startOfToday.setFullYear(year)
|
||||
startOfToday.setMonth(expMonth)
|
||||
|
||||
const transaction = await tx.licenseChargeTransaction.create({
|
||||
data: {
|
||||
activation_expires_at: startOfToday,
|
||||
purchased_count: 1,
|
||||
tracking_code: generateTrackingCode('LIC', 6),
|
||||
partner: {
|
||||
connect: {
|
||||
id: partner.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
},
|
||||
})
|
||||
if (transaction)
|
||||
license = await tx.license.create({
|
||||
data: {
|
||||
charge_transaction: {
|
||||
connect: {
|
||||
id: transaction.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
// ****************** BA Start ****************** //
|
||||
const ba = await prisma.businessActivity.count()
|
||||
|
||||
if (!ba && license) {
|
||||
const startOfToday = new Date()
|
||||
startOfToday.setHours(0, 0, 0, 0)
|
||||
|
||||
let year = startOfToday.getFullYear()
|
||||
let expYear = year + 1
|
||||
// const month = startOfToday.getMonth()
|
||||
// let year = startOfToday.getFullYear()
|
||||
// let expMonth = month + 3
|
||||
// if (expMonth > 11) {
|
||||
// expMonth = expMonth - 11
|
||||
// year = year + 1
|
||||
// }
|
||||
|
||||
startOfToday.setFullYear(expYear)
|
||||
|
||||
await prisma.businessActivity.create({
|
||||
data: {
|
||||
name: 'طلا فروشی',
|
||||
economic_code: '0111111111',
|
||||
license_activation: {
|
||||
create: {
|
||||
expires_at: startOfToday,
|
||||
starts_at: new Date(),
|
||||
license: {
|
||||
connect: {
|
||||
id: license.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
consumer: {
|
||||
create: {
|
||||
first_name: 'محمد',
|
||||
last_name: 'زرگر',
|
||||
mobile_number: '09120258155',
|
||||
national_code: '1234567890',
|
||||
consumer_accounts: {
|
||||
create: {
|
||||
role: 'OWNER',
|
||||
account: {
|
||||
create: {
|
||||
username: 'zargar',
|
||||
password: await PasswordUtil.hash('123456'),
|
||||
status: 'ACTIVE',
|
||||
type: 'CONSUMER',
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
partner: {
|
||||
connect: {
|
||||
id: partner.id,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
guild: {
|
||||
connect: {
|
||||
id: guilds[0].id,
|
||||
},
|
||||
},
|
||||
complexes: {
|
||||
create: {
|
||||
name: 'فروشگاه طلای مرکزی',
|
||||
address: 'تهران، خیابان جمهوری',
|
||||
branch_code: '12332',
|
||||
|
||||
// pos_list: {
|
||||
// create: {
|
||||
// name: 'لاین ۱',
|
||||
// pos_type: POSType.WEB,
|
||||
// status: 'ACTIVE',
|
||||
// account: {
|
||||
// create: {
|
||||
// role: 'OPERATOR',
|
||||
// account_allocation: {
|
||||
// startOfToday.setFullYear(year)
|
||||
// startOfToday.setMonth(expMonth)
|
||||
|
||||
// const transaction = await tx.licenseChargeTransaction.create({
|
||||
// data: {
|
||||
// activation_expires_at: startOfToday,
|
||||
// purchased_count: 1,
|
||||
// tracking_code: generateTrackingCode('LIC', 6),
|
||||
// partner: {
|
||||
// connect: {
|
||||
// id: partner.id,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// select: {
|
||||
// id: true,
|
||||
// },
|
||||
// })
|
||||
// if (transaction)
|
||||
// license = await tx.license.create({
|
||||
// data: {
|
||||
// charge_transaction: {
|
||||
// connect: {
|
||||
// id: transaction.id,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// })
|
||||
// })
|
||||
// }
|
||||
|
||||
// // ****************** BA Start ****************** //
|
||||
// const ba = await tx.businessActivity.count()
|
||||
|
||||
// if (!ba && license) {
|
||||
// const startOfToday = new Date()
|
||||
// startOfToday.setHours(0, 0, 0, 0)
|
||||
|
||||
// let year = startOfToday.getFullYear()
|
||||
// let expYear = year + 1
|
||||
// // if (expMonth > 11) {
|
||||
// // expMonth = expMonth - 11
|
||||
// // year = year + 1
|
||||
// // }
|
||||
|
||||
// startOfToday.setFullYear(expYear)
|
||||
|
||||
// await tx.businessActivity.create({
|
||||
// data: {
|
||||
// name: 'طلا فروشی',
|
||||
// economic_code: '0111111111',
|
||||
// fiscal_id: '0111111111',
|
||||
// partner_token: 'TIS-BA-001',
|
||||
// license_activation: {
|
||||
// create: {
|
||||
// expires_at: startOfToday,
|
||||
// starts_at: new Date(),
|
||||
// license: {
|
||||
// connect: {
|
||||
// id: license.id,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// consumer: {
|
||||
// create: {
|
||||
// type: ConsumerType.INDIVIDUAL,
|
||||
// individual: {
|
||||
// create: {
|
||||
// first_name: 'محمد',
|
||||
// last_name: 'زرگر',
|
||||
// mobile_number: '09120258155',
|
||||
// national_code: '1234567890',
|
||||
// partner: {
|
||||
// connect: {
|
||||
// id: partner.id,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// accounts: {
|
||||
// create: {
|
||||
// role: 'OWNER',
|
||||
// account: {
|
||||
// create: {
|
||||
// username: 'line1',
|
||||
// username: 'zargar',
|
||||
// password: await PasswordUtil.hash('123456'),
|
||||
// status: 'ACTIVE',
|
||||
// type: 'CONSUMER',
|
||||
// },
|
||||
// },
|
||||
// }
|
||||
// }
|
||||
// },
|
||||
// },
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
}
|
||||
// },
|
||||
// },
|
||||
// guild: {
|
||||
// connect: {
|
||||
// id: guilds[0].id,
|
||||
// },
|
||||
// },
|
||||
// complexes: {
|
||||
// create: {
|
||||
// name: 'فروشگاه طلای مرکزی',
|
||||
// address: 'تهران، خیابان جمهوری',
|
||||
// branch_code: '12332',
|
||||
|
||||
// // pos_list: {
|
||||
// // create: {
|
||||
// // name: 'لاین ۱',
|
||||
// // pos_type: POSType.WEB,
|
||||
// // status: 'ACTIVE',
|
||||
// // account: {
|
||||
// // create: {
|
||||
// // role: 'OPERATOR',
|
||||
// // account_allocation: {
|
||||
|
||||
// // },
|
||||
// // account: {
|
||||
// // create: {
|
||||
// // username: 'line1',
|
||||
// // password: await PasswordUtil.hash('123456'),
|
||||
// // status: 'ACTIVE',
|
||||
// // type: 'CONSUMER',
|
||||
// // },
|
||||
// // },
|
||||
// // }
|
||||
// // }
|
||||
// // },
|
||||
// // },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// })
|
||||
// }
|
||||
// ****************** BA Start ****************** //
|
||||
|
||||
// ****************** provider Start ****************** //
|
||||
const provider = await prisma.provider.count()
|
||||
const provider = await tx.provider.count()
|
||||
if (!provider) {
|
||||
await prisma.provider.create({
|
||||
await tx.provider.create({
|
||||
data: {
|
||||
name: 'توسن',
|
||||
code: 'Tosan',
|
||||
status: 'ACTIVE',
|
||||
provider_accounts: {
|
||||
accounts: {
|
||||
create: {
|
||||
role: 'OWNER',
|
||||
account: {
|
||||
@@ -432,6 +593,7 @@ async function main() {
|
||||
},
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
main()
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,3 +1,5 @@
|
||||
/// <reference types="multer" />
|
||||
|
||||
import { AccessTokenPayload, IConsumerPayload, IPosPayload } from '@/common/models'
|
||||
import { IPartnerPayload } from '@/common/models/partnerPayload.model'
|
||||
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
import fs from 'node:fs'
|
||||
import path from 'node:path'
|
||||
import { prisma } from '../src/lib/prisma'
|
||||
|
||||
type CsvRow = {
|
||||
ID?: string
|
||||
DescriptionOfID?: string
|
||||
Vat?: string
|
||||
Type?: string
|
||||
}
|
||||
|
||||
function parseCsvLine(line: string): string[] {
|
||||
const result: string[] = []
|
||||
let current = ''
|
||||
let inQuotes = false
|
||||
|
||||
for (let index = 0; index < line.length; index++) {
|
||||
const char = line[index]
|
||||
|
||||
if (char === '"') {
|
||||
if (inQuotes && line[index + 1] === '"') {
|
||||
current += '"'
|
||||
index++
|
||||
} else {
|
||||
inQuotes = !inQuotes
|
||||
}
|
||||
continue
|
||||
}
|
||||
|
||||
if (char === ',' && !inQuotes) {
|
||||
result.push(current)
|
||||
current = ''
|
||||
continue
|
||||
}
|
||||
|
||||
current += char
|
||||
}
|
||||
|
||||
result.push(current)
|
||||
return result.map(value => value.trim())
|
||||
}
|
||||
|
||||
function parseCsv(content: string): CsvRow[] {
|
||||
const lines = content
|
||||
.split(/\r?\n/)
|
||||
.map(line => line.trim())
|
||||
.filter(Boolean)
|
||||
|
||||
if (!lines.length) return []
|
||||
|
||||
const headers = parseCsvLine(lines[0])
|
||||
return lines.slice(1).map(line => {
|
||||
const cols = parseCsvLine(line)
|
||||
const row: Record<string, string> = {}
|
||||
for (let index = 0; index < headers.length; index++) {
|
||||
row[headers[index]] = cols[index] || ''
|
||||
}
|
||||
return row
|
||||
})
|
||||
}
|
||||
|
||||
function toBooleanFlags(typeValue: string) {
|
||||
const normalized = typeValue || ''
|
||||
const isPublic = normalized.includes('شناسه عمومی')
|
||||
const isImported = normalized.includes('وارداتی')
|
||||
const isDomestic = !isImported
|
||||
|
||||
return { isPublic, isDomestic }
|
||||
}
|
||||
|
||||
function parseVat(vatValue: string) {
|
||||
const parsed = Number(vatValue || '0')
|
||||
if (!Number.isFinite(parsed)) return 0
|
||||
return parsed
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const defaultPath =
|
||||
'/Users/ahasani/Desktop/product_good_2026-05-01T11-35-57_part_1_28812448-0dd9-411c-99e1-334c28d781fe.csv'
|
||||
const csvPath = process.argv[2] || defaultPath
|
||||
const absolutePath = path.resolve(csvPath)
|
||||
|
||||
if (!fs.existsSync(absolutePath)) {
|
||||
throw new Error(`CSV file not found: ${absolutePath}`)
|
||||
}
|
||||
|
||||
const raw = fs.readFileSync(absolutePath, 'utf8').replace(/^\uFEFF/, '')
|
||||
const rows = parseCsv(raw)
|
||||
|
||||
let upserted = 0
|
||||
let skipped = 0
|
||||
|
||||
const guild = await prisma.guild.findFirst({})
|
||||
|
||||
for (const row of rows) {
|
||||
const code = (row.ID || '').trim()
|
||||
const name = (row.DescriptionOfID || '').trim()
|
||||
const vat = parseVat((row.Vat || '').trim())
|
||||
const type = (row.Type || '').trim()
|
||||
const { isPublic, isDomestic } = toBooleanFlags(type)
|
||||
|
||||
if (!code || !name) {
|
||||
skipped++
|
||||
continue
|
||||
}
|
||||
|
||||
await prisma.stockKeepingUnits.upsert({
|
||||
where: { code },
|
||||
create: {
|
||||
code,
|
||||
name,
|
||||
VAT: vat,
|
||||
guild: {
|
||||
connect: {
|
||||
id: guild?.id,
|
||||
},
|
||||
},
|
||||
is_public: isPublic,
|
||||
is_domestic: isDomestic,
|
||||
},
|
||||
update: {
|
||||
name,
|
||||
VAT: vat,
|
||||
guild: {
|
||||
connect: {
|
||||
id: guild?.id,
|
||||
},
|
||||
},
|
||||
is_public: isPublic,
|
||||
is_domestic: isDomestic,
|
||||
},
|
||||
})
|
||||
upserted++
|
||||
}
|
||||
|
||||
console.log(
|
||||
JSON.stringify(
|
||||
{
|
||||
csvPath: absolutePath,
|
||||
totalRows: rows.length,
|
||||
upserted,
|
||||
skipped,
|
||||
},
|
||||
null,
|
||||
2,
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
main()
|
||||
.catch(error => {
|
||||
console.error(error)
|
||||
process.exit(1)
|
||||
})
|
||||
.finally(async () => {
|
||||
await prisma.$disconnect()
|
||||
})
|
||||
+1
-3
@@ -9,7 +9,6 @@ import { ConsumerModule } from './modules/consumer/consumer.module'
|
||||
import { EnumsModule } from './modules/enums/enums.module'
|
||||
import { PartnerModule } from './modules/partners/partners.module'
|
||||
import { PosModule } from './modules/pos/pos.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 { TriggerLogsModule } from './modules/trigger-logs/trigger-logs.module'
|
||||
import { UploaderModule } from './modules/uploader/uploader.module'
|
||||
@@ -20,12 +19,11 @@ import { PrismaModule } from './prisma/prisma.module'
|
||||
PrismaModule,
|
||||
EnumsModule,
|
||||
AdminModule,
|
||||
AuthModule,
|
||||
CatalogModule,
|
||||
ConsumerModule,
|
||||
PosModule,
|
||||
PartnerModule,
|
||||
AuthModule,
|
||||
SalesInvoiceItemsModule,
|
||||
SalesInvoicePaymentsModule,
|
||||
TriggerLogsModule,
|
||||
UploaderModule,
|
||||
|
||||
@@ -1,14 +1,176 @@
|
||||
import { TspProviderResponseStatus } from '@/generated/prisma/enums'
|
||||
|
||||
export default {
|
||||
PaymentMethodType: {
|
||||
TERMINAL: 'ترمینال',
|
||||
CASH: 'نقدی',
|
||||
SET_OFF: 'تهاتر',
|
||||
CARD: 'کارت',
|
||||
BANK: 'بانکی',
|
||||
CHECK: 'چک',
|
||||
OTHER: 'سایر',
|
||||
},
|
||||
UnitType: {
|
||||
COUNT: 'تعداد',
|
||||
GRAM: 'گرم',
|
||||
KILO_GRAM: 'کیلوگرم',
|
||||
KILOGRAM: 'کیلوگرم',
|
||||
LITER: 'لیتر',
|
||||
MILLILITER: 'میلیلیتر',
|
||||
STANDARD: 'استاندارد',
|
||||
METER: 'متر',
|
||||
HOUR: 'ساعت',
|
||||
},
|
||||
GoodPricingModel: {
|
||||
STANDARD: 'عمومی',
|
||||
GOLD: 'طلا',
|
||||
},
|
||||
CustomerType: {
|
||||
INDIVIDUAL: 'حقیقی',
|
||||
LEGAL: 'حقوقی',
|
||||
UNKNOWN: 'نامشخص',
|
||||
},
|
||||
POSStatus: {
|
||||
ACTIVE: 'فعال',
|
||||
DISABLED: 'غیرفعال',
|
||||
},
|
||||
POSRole: {
|
||||
MANAGER: 'مدیریت',
|
||||
OPERATOR: 'اپراتور',
|
||||
},
|
||||
LicenseType: {
|
||||
BASIC: 'پایه',
|
||||
PRO: 'حرفهای',
|
||||
ENTERPRISE: 'سازمانی',
|
||||
},
|
||||
LicenseStatus: {
|
||||
ACTIVE: 'فعال',
|
||||
EXPIRED: 'منقضی',
|
||||
SUSPENDED: 'غیرفعال',
|
||||
},
|
||||
POSType: {
|
||||
PSP: 'PSP',
|
||||
MOBILE: 'موبایل',
|
||||
WEB: 'وب',
|
||||
API: 'API',
|
||||
},
|
||||
UserType: {
|
||||
LEGAL: 'حقوقی',
|
||||
INDIVIDUAL: 'حقیقی',
|
||||
},
|
||||
AccountType: {
|
||||
ADMIN: 'مدیر سیستم',
|
||||
PROVIDER: 'ارائهدهنده خدمات',
|
||||
PARTNER: 'شریک تجاری',
|
||||
CONSUMER: 'مصرفکننده',
|
||||
},
|
||||
UserStatus: {
|
||||
ACTIVE: 'فعال',
|
||||
INACTIVE: 'غیرفعال',
|
||||
},
|
||||
AccountRole: {
|
||||
OWNER: 'مدیر اصلی',
|
||||
OPERATOR: 'اپراتور',
|
||||
ACCOUNTANT: 'حسابدار',
|
||||
},
|
||||
AccountStatus: {
|
||||
ACTIVE: 'فعال',
|
||||
SUSPENDED: 'غیرفعال',
|
||||
},
|
||||
PartnerRole: {
|
||||
OWNER: 'مدیر اصلی',
|
||||
MANAGER: 'مدیریت',
|
||||
OPERATOR: 'اپراتور',
|
||||
},
|
||||
PartnerStatus: {
|
||||
ACTIVE: 'فعال',
|
||||
SUSPENDED: 'غیرفعال',
|
||||
},
|
||||
ProviderRole: {
|
||||
OWNER: 'مدیر اصلی',
|
||||
MANAGER: 'مدیریت',
|
||||
OPERATOR: 'اپراتور',
|
||||
},
|
||||
ProviderStatus: {
|
||||
ACTIVE: 'فعال',
|
||||
SUSPENDED: 'غیرفعال',
|
||||
},
|
||||
BusinessRole: {
|
||||
MANAGER: 'مدیریت',
|
||||
OPERATOR: 'اپراتور',
|
||||
},
|
||||
ComplexRole: {
|
||||
MANAGER: 'مدیریت',
|
||||
OPERATOR: 'اپراتور',
|
||||
},
|
||||
ConsumerRole: {
|
||||
OWNER: 'مدیر اصلی',
|
||||
MANAGER: 'مدیریت',
|
||||
OPERATOR: 'اپراتور',
|
||||
},
|
||||
ConsumerStatus: {
|
||||
ACTIVE: 'فعال',
|
||||
SUSPENDED: 'غیرفعال',
|
||||
},
|
||||
ConsumerType: {
|
||||
INDIVIDUAL: 'حقیقی',
|
||||
LEGAL: 'حقوقی',
|
||||
},
|
||||
TokenType: {
|
||||
ACCESS: 'دسترسی',
|
||||
REFRESH: 'نوسازی',
|
||||
},
|
||||
ApplicationPlatform: {
|
||||
ANDROID: 'اندروید',
|
||||
IOS: 'iOS',
|
||||
},
|
||||
ApplicationReleaseType: {
|
||||
STABLE: 'پایدار',
|
||||
BETA: 'بتا',
|
||||
ALPHA: 'آلفا',
|
||||
},
|
||||
ApplicationPublisher: {
|
||||
DIRECT: 'مستقیم',
|
||||
CAFE_BAZAR: 'کافه بازار',
|
||||
MAYKET: 'مایکت',
|
||||
},
|
||||
TspProviderType: {
|
||||
NAMA: 'نما',
|
||||
SUN: 'سان',
|
||||
},
|
||||
TspProviderResponseStatus: {
|
||||
SUCCESS: 'موفق',
|
||||
FAILURE: 'ناموفق',
|
||||
NOT_SEND: 'ارسال نشده',
|
||||
[TspProviderResponseStatus.QUEUED]: 'در صف ارسال',
|
||||
},
|
||||
TspProviderRequestType: {
|
||||
ORIGINAL: 'اصلی',
|
||||
CORRECTION: 'اصلاح',
|
||||
REVOKE: 'ابطال',
|
||||
REMOVE: 'حذف',
|
||||
},
|
||||
TspProviderCustomerType: {
|
||||
Unknown: 'ناشناس',
|
||||
Known: 'شناسایی شده',
|
||||
},
|
||||
SKUGuildType: {
|
||||
GOLD: 'طلا',
|
||||
},
|
||||
GoldKarat: {
|
||||
KARAT_18: '۱۸ عیار',
|
||||
KARAT_21: '۲۱ عیار',
|
||||
KARAT_24: '۲۴ عیار',
|
||||
},
|
||||
InvoiceTemplateType: {
|
||||
SALE: 'فروش',
|
||||
FX_SALE: 'فروش ارزی',
|
||||
GOLD_JEWELRY: 'طلا و جواهر',
|
||||
CONTRACT: 'پیمانکاری',
|
||||
UTILITY: 'قبوض خدماتی',
|
||||
AIR_TICKET: 'بلیط هواپیما',
|
||||
EXPORT: 'صادرات',
|
||||
BILL_OF_LADING: 'بارنامه',
|
||||
PETROCHEMICAL: 'پتروشیمی',
|
||||
COMMODITY_EXCHANGE: 'بورس کالا',
|
||||
INSURANCE: 'بیمه',
|
||||
},
|
||||
}
|
||||
|
||||
+20
-13
@@ -1,25 +1,32 @@
|
||||
export enum TokenType {
|
||||
ACCESS = 'ACCESS',
|
||||
REFRESH = 'REFRESH',
|
||||
}
|
||||
|
||||
export enum AccountType {
|
||||
PARTNER = 'PARTNER',
|
||||
BUSINESS = 'BUSINESS',
|
||||
ADMIN = 'ADMIN',
|
||||
PROVIDER = 'PROVIDER',
|
||||
POS = 'POS',
|
||||
}
|
||||
|
||||
export enum GoldKarat {
|
||||
KARAT_18 = '18',
|
||||
KARAT_21 = '21',
|
||||
KARAT_24 = '24',
|
||||
}
|
||||
|
||||
export enum TspProviderRequestType {
|
||||
ORIGINAL = 'ORIGINAL',
|
||||
CORRECTION = 'CORRECTION',
|
||||
REVOKE = 'REVOKE',
|
||||
REMOVE = 'REMOVE',
|
||||
}
|
||||
|
||||
export enum SKUGuildType {
|
||||
GOLD = 'GOLD',
|
||||
}
|
||||
|
||||
export const UploadedFileTypes = {
|
||||
GOOD: 'good',
|
||||
SERVICE: 'service',
|
||||
PROFILE_AVATAR: 'profile_avatar',
|
||||
PARTNER_LOGO: 'partner_logo',
|
||||
}
|
||||
export type UploadedFileTypes = (typeof UploadedFileTypes)[keyof typeof UploadedFileTypes]
|
||||
|
||||
export const TspProviderCustomerType = {
|
||||
UNKNOWN: 'Unknown',
|
||||
KNOWN: 'Known',
|
||||
}
|
||||
|
||||
export type TspProviderCustomerType =
|
||||
(typeof TspProviderCustomerType)[keyof typeof TspProviderCustomerType]
|
||||
|
||||
@@ -27,14 +27,14 @@ export class ConsumerGuard {
|
||||
|
||||
const consumer = await this.prisma.consumer.findFirst({
|
||||
where: {
|
||||
consumer_accounts: {
|
||||
accounts: {
|
||||
some: {
|
||||
id: tokenPayload.account_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
select: {
|
||||
consumer_accounts: {
|
||||
accounts: {
|
||||
select: {
|
||||
role: true,
|
||||
},
|
||||
|
||||
@@ -23,14 +23,14 @@ export class PartnerGuard {
|
||||
|
||||
const partner = await this.prisma.partner.findFirst({
|
||||
where: {
|
||||
partner_accounts: {
|
||||
accounts: {
|
||||
some: {
|
||||
id: tokenPayload.account_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
select: {
|
||||
partner_accounts: {
|
||||
accounts: {
|
||||
select: {
|
||||
role: true,
|
||||
},
|
||||
|
||||
@@ -3,6 +3,7 @@ import { ITokenPayload } from '@/modules/auth/auth.utils'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { ExecutionContext, ForbiddenException, Injectable } from '@nestjs/common'
|
||||
import { Request as ExpressRequest } from 'express'
|
||||
import { QUERY_CONSTANTS } from '../queryConstants'
|
||||
|
||||
@Injectable()
|
||||
export class PosGuard {
|
||||
@@ -18,7 +19,6 @@ export class PosGuard {
|
||||
throw new ForbiddenException('شما دسترسی لازم را ندارید.')
|
||||
}
|
||||
|
||||
const now = new Date()
|
||||
const cookie = req.cookies
|
||||
const { posId } = cookie
|
||||
|
||||
@@ -40,22 +40,7 @@ export class PosGuard {
|
||||
},
|
||||
],
|
||||
license_activation: {
|
||||
OR: [
|
||||
{
|
||||
expires_at: {
|
||||
gte: now,
|
||||
},
|
||||
},
|
||||
{
|
||||
license_renews: {
|
||||
some: {
|
||||
expires_at: {
|
||||
gte: now,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
...QUERY_CONSTANTS.LICENSE_ACTIVATION.activeOnDate(),
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
export interface FetchRequestContext {
|
||||
url: string
|
||||
init: RequestInit
|
||||
}
|
||||
|
||||
export interface FetchRequestInterceptor {
|
||||
onRequest?(
|
||||
context: FetchRequestContext,
|
||||
): Promise<FetchRequestContext> | FetchRequestContext
|
||||
onResponse?(
|
||||
context: FetchRequestContext,
|
||||
response: Response,
|
||||
): Promise<Response> | Response
|
||||
onError?(context: FetchRequestContext, error: unknown): Promise<void> | void
|
||||
}
|
||||
|
||||
function mergeHeaders(
|
||||
currentHeaders: HeadersInit | undefined,
|
||||
newHeaders: HeadersInit,
|
||||
): Headers {
|
||||
const mergedHeaders = new Headers(currentHeaders)
|
||||
const incomingHeaders = new Headers(newHeaders)
|
||||
|
||||
incomingHeaders.forEach((value, key) => {
|
||||
mergedHeaders.set(key, value)
|
||||
})
|
||||
|
||||
return mergedHeaders
|
||||
}
|
||||
|
||||
export function createHeaderRequestInterceptor(
|
||||
headers: HeadersInit,
|
||||
): FetchRequestInterceptor {
|
||||
return {
|
||||
onRequest(context) {
|
||||
return {
|
||||
...context,
|
||||
init: {
|
||||
...context.init,
|
||||
headers: mergeHeaders(context.init.headers, headers),
|
||||
},
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
export function createEnsureSuccessResponseInterceptor(): FetchRequestInterceptor {
|
||||
return {
|
||||
async onResponse(_, response) {
|
||||
if (response.ok) {
|
||||
return response
|
||||
}
|
||||
|
||||
const errorBody = await response.text().catch(() => '')
|
||||
const normalizedBody = errorBody
|
||||
return Promise.reject({
|
||||
status: response.status,
|
||||
statusText: response.statusText,
|
||||
body: normalizedBody,
|
||||
})
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -85,7 +85,6 @@ export class ResponseMappingInterceptor implements NestInterceptor {
|
||||
break
|
||||
case 'paginate': {
|
||||
const { items: a, ...rest } = wrapped
|
||||
console.log(rest)
|
||||
|
||||
const items = Array.isArray(wrapped.items) ? wrapped.items : []
|
||||
const total =
|
||||
|
||||
@@ -4,6 +4,7 @@ export interface SaleInvoiceGoldTypePayload {
|
||||
karat: keyof typeof GoldKarat
|
||||
wages: number
|
||||
profit: number
|
||||
commission: number
|
||||
}
|
||||
export interface SaleInvoiceStandardPayload {}
|
||||
|
||||
|
||||
@@ -0,0 +1,83 @@
|
||||
import { ConsumerSelect, ConsumerWhereInput } from '@/generated/prisma/models'
|
||||
|
||||
const now = new Date()
|
||||
|
||||
export const infoSelect: ConsumerSelect = {
|
||||
type: true,
|
||||
legal: {
|
||||
select: {
|
||||
name: true,
|
||||
registration_code: true,
|
||||
partner: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
code: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
individual: {
|
||||
select: {
|
||||
first_name: true,
|
||||
last_name: true,
|
||||
mobile_number: true,
|
||||
national_code: true,
|
||||
partner: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
code: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export const activeBusinessCount: ConsumerSelect = {
|
||||
_count: {
|
||||
select: {
|
||||
business_activities: {
|
||||
where: {
|
||||
license_activation: {
|
||||
OR: [
|
||||
{
|
||||
expires_at: {
|
||||
gt: now,
|
||||
},
|
||||
},
|
||||
{
|
||||
license_renews: {
|
||||
some: {
|
||||
expires_at: {
|
||||
gt: now,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export const consumerRelatedPartner = (partner_id: string): ConsumerWhereInput => ({
|
||||
OR: [
|
||||
{
|
||||
legal: {
|
||||
is: {
|
||||
partner_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
individual: {
|
||||
is: {
|
||||
partner_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
@@ -1,5 +1,11 @@
|
||||
import * as pos from './pos'
|
||||
import * as CONSUMER from './consumer'
|
||||
import * as LICENSE_ACTIVATION from './licenseActivation'
|
||||
import * as POS from './pos'
|
||||
import * as SALE_INVOICE from './saleInvoice'
|
||||
|
||||
export const QUERY_CONSTANTS = {
|
||||
pos,
|
||||
POS,
|
||||
CONSUMER,
|
||||
LICENSE_ACTIVATION,
|
||||
SALE_INVOICE,
|
||||
}
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
export const activeOnDate = (expires_at: Date = new Date()) => ({
|
||||
OR: [
|
||||
{
|
||||
expires_at: {
|
||||
gte: expires_at,
|
||||
},
|
||||
},
|
||||
{
|
||||
license_renews: {
|
||||
some: {
|
||||
expires_at: {
|
||||
gte: expires_at,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
],
|
||||
})
|
||||
@@ -0,0 +1,72 @@
|
||||
import { SalesInvoiceSelect } from '@/generated/prisma/models'
|
||||
|
||||
export const summarySelect: SalesInvoiceSelect = {
|
||||
id: true,
|
||||
code: true,
|
||||
invoice_date: true,
|
||||
invoice_number: true,
|
||||
main_id: true,
|
||||
total_amount: true,
|
||||
tax_id: true,
|
||||
type: true,
|
||||
notes: true,
|
||||
tsp_attempts: {
|
||||
select: {
|
||||
status: true,
|
||||
sent_at: true,
|
||||
message: true,
|
||||
},
|
||||
orderBy: {
|
||||
attempt_no: 'desc',
|
||||
},
|
||||
take: 1,
|
||||
},
|
||||
reference_invoice: {
|
||||
select: {
|
||||
id: true,
|
||||
invoice_number: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
export const select: SalesInvoiceSelect = {
|
||||
...summarySelect,
|
||||
payments: {
|
||||
select: {
|
||||
amount: true,
|
||||
paid_at: true,
|
||||
payment_method: true,
|
||||
terminal_info: {
|
||||
select: {
|
||||
customer_card_no: true,
|
||||
terminal_id: true,
|
||||
rrn: true,
|
||||
stan: true,
|
||||
transaction_date_time: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
unknown_customer: true,
|
||||
customer: {
|
||||
select: {
|
||||
type: true,
|
||||
legal: true,
|
||||
individual: true,
|
||||
},
|
||||
},
|
||||
items: {
|
||||
select: {
|
||||
quantity: true,
|
||||
unit_price: true,
|
||||
discount: true,
|
||||
total_amount: true,
|
||||
payload: true,
|
||||
measure_unit_code: true,
|
||||
measure_unit_text: true,
|
||||
sku_code: true,
|
||||
sku_vat: true,
|
||||
good_snapshot: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
import { BusinessActivitySelect } from '@/generated/prisma/models'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
|
||||
@Injectable()
|
||||
export class BusinessActivitiesQueryService {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
readonly baseSelect: BusinessActivitySelect = {
|
||||
id: true,
|
||||
name: true,
|
||||
economic_code: true,
|
||||
created_at: true,
|
||||
partner_token: true,
|
||||
fiscal_id: true,
|
||||
guild: {
|
||||
select: {
|
||||
id: true,
|
||||
code: true,
|
||||
name: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
findAllByConsumer(consumer_id: string, select: BusinessActivitySelect) {
|
||||
return this.prisma.businessActivity.findMany({
|
||||
where: { consumer_id },
|
||||
select,
|
||||
})
|
||||
}
|
||||
|
||||
findOneByConsumer(
|
||||
consumer_id: string,
|
||||
id: string,
|
||||
select: BusinessActivitySelect,
|
||||
orThrow = false,
|
||||
) {
|
||||
if (orThrow) {
|
||||
return this.prisma.businessActivity.findUniqueOrThrow({
|
||||
where: { consumer_id, id },
|
||||
select,
|
||||
})
|
||||
}
|
||||
|
||||
return this.prisma.businessActivity.findUnique({
|
||||
where: { consumer_id, id },
|
||||
select,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
import { UploadedFileTypes } from '@/common/enums/enums'
|
||||
import { GoodPricingModel } from '@/generated/prisma/enums'
|
||||
import { GoodSelect } from '@/generated/prisma/models'
|
||||
import { UploaderService } from '@/modules/uploader/uploader.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
|
||||
export interface CreateGoodDto {
|
||||
name: string
|
||||
sku_id: string
|
||||
category_id: string
|
||||
measure_unit_id: string
|
||||
pricing_model: GoodPricingModel
|
||||
description?: string
|
||||
is_default_guild_good?: boolean
|
||||
}
|
||||
|
||||
export interface UpdateGoodDto extends Partial<CreateGoodDto> {}
|
||||
|
||||
@Injectable()
|
||||
export class GoodsSharedService {
|
||||
constructor(private readonly uploaderService: UploaderService) {}
|
||||
|
||||
readonly defaultSelect: GoodSelect = {
|
||||
id: true,
|
||||
name: true,
|
||||
pricing_model: true,
|
||||
image_url: true,
|
||||
description: true,
|
||||
sku: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
},
|
||||
},
|
||||
measure_unit: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
},
|
||||
},
|
||||
category: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
async prepareCreateData(data: CreateGoodDto, file?: Express.Multer.File) {
|
||||
const { category_id, measure_unit_id, sku_id, ...rest } = data
|
||||
|
||||
let image_url = ''
|
||||
if (file) {
|
||||
const uploadedUrl = await this.uploaderService.uploadFile(
|
||||
file,
|
||||
UploadedFileTypes.GOOD,
|
||||
)
|
||||
image_url = uploadedUrl || ''
|
||||
}
|
||||
|
||||
return {
|
||||
...rest,
|
||||
image_url,
|
||||
sku: {
|
||||
connect: {
|
||||
id: sku_id,
|
||||
},
|
||||
},
|
||||
measure_unit: {
|
||||
connect: {
|
||||
id: measure_unit_id,
|
||||
},
|
||||
},
|
||||
category: {
|
||||
connect: {
|
||||
id: category_id,
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
async prepareUpdateData(id: string, data: UpdateGoodDto, file?: Express.Multer.File) {
|
||||
const { category_id, measure_unit_id, sku_id, ...rest } = data
|
||||
|
||||
let image_url = ''
|
||||
if (file) {
|
||||
const uploadedUrl = await this.uploaderService.uploadFile(
|
||||
file,
|
||||
UploadedFileTypes.GOOD,
|
||||
)
|
||||
image_url = uploadedUrl || ''
|
||||
}
|
||||
|
||||
const updateData: any = {
|
||||
...rest,
|
||||
image_url,
|
||||
}
|
||||
|
||||
if (sku_id) {
|
||||
updateData.sku = { connect: { id: sku_id } }
|
||||
}
|
||||
if (measure_unit_id) {
|
||||
updateData.measure_unit = { connect: { id: measure_unit_id } }
|
||||
}
|
||||
if (category_id) {
|
||||
updateData.category = { connect: { id: category_id } }
|
||||
}
|
||||
|
||||
return updateData
|
||||
}
|
||||
|
||||
async handleImageUpdate(id: string, prisma: any, image_url: string) {
|
||||
if (image_url) {
|
||||
const prevImage = await prisma.good.findUnique({
|
||||
where: { id },
|
||||
select: { image_url: true },
|
||||
})
|
||||
|
||||
if (prevImage?.image_url) {
|
||||
this.uploaderService.deleteFile(prevImage.image_url, UploadedFileTypes.GOOD)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,209 @@
|
||||
import type { SaleInvoiceType } from '@/common/interfaces/sale-invoice-payload'
|
||||
import { ApiProperty } from '@nestjs/swagger'
|
||||
import { Type } from 'class-transformer'
|
||||
import {
|
||||
ArrayMinSize,
|
||||
IsBoolean,
|
||||
IsDate,
|
||||
IsDateString,
|
||||
IsEnum,
|
||||
IsNotEmpty,
|
||||
IsNumber,
|
||||
IsObject,
|
||||
IsOptional,
|
||||
IsString,
|
||||
Min,
|
||||
ValidateNested,
|
||||
} from 'class-validator'
|
||||
import type { CustomerIndividual, CustomerLegal } from 'generated/prisma/client'
|
||||
import { CustomerType } from 'generated/prisma/enums'
|
||||
|
||||
export class SharedCreateSalesInvoiceItemDto {
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true })
|
||||
unit_price: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true, default: 1 })
|
||||
quantity: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true })
|
||||
total_amount: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true })
|
||||
discount_amount: number
|
||||
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
invoice_id: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: false })
|
||||
good_id?: string
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: false })
|
||||
service_id?: string
|
||||
|
||||
// @IsEnum(SalesInvoiceItemPricingModel)
|
||||
// @ApiProperty({ enum: Object.values(SalesInvoiceItemPricingModel) })
|
||||
// @IsOptional()
|
||||
// pricingModel: SalesInvoiceItemPricingModel
|
||||
|
||||
@IsOptional()
|
||||
@IsObject()
|
||||
@ApiProperty({ required: false, default: {} })
|
||||
payload: SaleInvoiceType
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: false, default: '' })
|
||||
notes: string
|
||||
}
|
||||
|
||||
export class SharedCreateTerminalPayment {
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@ApiProperty({ required: false, default: 0 })
|
||||
amount?: number
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@ApiProperty({ required: true })
|
||||
terminalId: string
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@ApiProperty({ required: true })
|
||||
stan: string
|
||||
|
||||
@IsString()
|
||||
@IsNotEmpty()
|
||||
@ApiProperty({ required: true })
|
||||
rrn: string
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@ApiProperty({ required: true })
|
||||
response_code?: string
|
||||
|
||||
@IsString()
|
||||
@IsOptional()
|
||||
@ApiProperty({ required: true })
|
||||
customer_card_no?: string
|
||||
|
||||
@Type(() => Date)
|
||||
@IsDate()
|
||||
@ApiProperty({ required: true })
|
||||
transaction_date_time: Date
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: false })
|
||||
description?: string
|
||||
}
|
||||
|
||||
export class SharedCreateSalesInvoicePaymentsDto {
|
||||
@IsOptional()
|
||||
@ValidateNested()
|
||||
@Type(() => SharedCreateTerminalPayment)
|
||||
@ApiProperty({ required: false, type: () => SharedCreateTerminalPayment })
|
||||
terminals?: SharedCreateTerminalPayment
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@ApiProperty({ required: false, default: 0 })
|
||||
cash?: number
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@ApiProperty({ required: false, default: 0 })
|
||||
set_off?: number
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@ApiProperty({ required: false, default: 0 })
|
||||
card?: number
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@ApiProperty({ required: false, default: 0 })
|
||||
bank?: number
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@ApiProperty({ required: false, default: 0 })
|
||||
check?: number
|
||||
|
||||
@IsOptional()
|
||||
@IsNumber()
|
||||
@Min(0)
|
||||
@ApiProperty({ required: false, default: 0 })
|
||||
other?: number
|
||||
}
|
||||
|
||||
export class SharedCreateSalesInvoiceDto {
|
||||
// @TODO: totalAmount must calculated instead of get from api
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true, default: 0 })
|
||||
total_amount: number
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsDateString(
|
||||
{ strict: true },
|
||||
{ message: 'invoice_date must be a valid ISO-8601 string' },
|
||||
)
|
||||
invoice_date: Date
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsObject()
|
||||
@ValidateNested({ each: true })
|
||||
@Type(() => SharedCreateSalesInvoicePaymentsDto)
|
||||
payments: SharedCreateSalesInvoicePaymentsDto
|
||||
|
||||
@ApiProperty()
|
||||
@ArrayMinSize(1)
|
||||
@ValidateNested({ each: true })
|
||||
items: SharedCreateSalesInvoiceItemDto[]
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
notes?: string
|
||||
|
||||
@ApiProperty({ required: false, default: false })
|
||||
@IsOptional()
|
||||
@IsBoolean()
|
||||
send_to_tsp?: boolean
|
||||
|
||||
@ApiProperty({ required: true, default: CustomerType.UNKNOWN })
|
||||
@IsEnum(CustomerType)
|
||||
customer_type: CustomerType
|
||||
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
@ApiProperty({ required: false })
|
||||
customer_id?: string
|
||||
|
||||
@ApiProperty({ required: false })
|
||||
@IsOptional()
|
||||
@IsObject()
|
||||
customer?: {
|
||||
customer_individual?: Omit<CustomerIndividual, 'business_activity_id' | 'customer_id'>
|
||||
customer_legal?: Omit<CustomerLegal, 'business_activity_id' | 'customer_id'>
|
||||
customer_unknown?: {
|
||||
first_name: string
|
||||
last_name: string
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,531 @@
|
||||
import { QUERY_CONSTANTS } from '@/common/queryConstants'
|
||||
import { SalesInvoiceCreateInput } from '@/generated/prisma/models'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { BadRequestException, Injectable } from '@nestjs/common'
|
||||
import { Prisma } from 'generated/prisma/client'
|
||||
import {
|
||||
CustomerType,
|
||||
PaymentMethodType,
|
||||
TspProviderRequestType,
|
||||
} from 'generated/prisma/enums'
|
||||
import { SharedCreateSalesInvoiceDto } from './sale-invoice-create.dto'
|
||||
|
||||
interface TerminalPaymentInfo {
|
||||
terminalId: string
|
||||
stan: string
|
||||
rrn: string
|
||||
transactionDateTime: string | Date
|
||||
customerCardNO?: string
|
||||
description?: string
|
||||
amount?: number
|
||||
}
|
||||
|
||||
interface NormalizedPayment {
|
||||
method: PaymentMethodType
|
||||
amount: number
|
||||
}
|
||||
|
||||
interface CreateSharedSaleInvoiceInput {
|
||||
tx?: Prisma.TransactionClient
|
||||
data: SharedCreateSalesInvoiceDto
|
||||
businessId: string
|
||||
complexId: string
|
||||
posId: string
|
||||
consumerAccountId: string
|
||||
type: TspProviderRequestType
|
||||
main_invoice_id?: string
|
||||
ref_invoice_id?: string
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class SharedSaleInvoiceCreateService {
|
||||
private readonly createInvoiceRetries = 3
|
||||
|
||||
constructor(private prisma: PrismaService) {}
|
||||
|
||||
async create(input: CreateSharedSaleInvoiceInput) {
|
||||
const {
|
||||
tx = this.prisma,
|
||||
data,
|
||||
businessId,
|
||||
complexId,
|
||||
posId,
|
||||
consumerAccountId,
|
||||
type,
|
||||
main_invoice_id,
|
||||
ref_invoice_id,
|
||||
} = input
|
||||
|
||||
const normalizedInvoiceDate = this.normalizeInvoiceDate(data.invoice_date)
|
||||
const { payments, terminalInfo } = this.buildPaymentsData(
|
||||
data.payments,
|
||||
data.total_amount,
|
||||
)
|
||||
|
||||
for (let attempt = 1; attempt <= this.createInvoiceRetries; attempt++) {
|
||||
try {
|
||||
return await tx.$transaction(async $tx => {
|
||||
const invoiceNumber = await this.getNextInvoiceNumber($tx, businessId)
|
||||
const customerId = await this.resolveCustomerId($tx, data, businessId)
|
||||
const goodsById = await this.getGoodsById($tx, data)
|
||||
const salesInvoiceData = this.buildSalesInvoiceData({
|
||||
data,
|
||||
normalizedInvoiceDate,
|
||||
invoiceNumber,
|
||||
consumerAccountId,
|
||||
businessId,
|
||||
complexId,
|
||||
posId,
|
||||
goodsById,
|
||||
customerId,
|
||||
type,
|
||||
main_invoice_id,
|
||||
ref_invoice_id,
|
||||
})
|
||||
|
||||
const salesInvoice = await $tx.salesInvoice.create({
|
||||
data: salesInvoiceData,
|
||||
select: { ...QUERY_CONSTANTS.SALE_INVOICE.select },
|
||||
})
|
||||
|
||||
await this.createPayments(
|
||||
$tx,
|
||||
salesInvoice.id,
|
||||
payments,
|
||||
terminalInfo,
|
||||
normalizedInvoiceDate,
|
||||
)
|
||||
|
||||
return salesInvoice
|
||||
})
|
||||
} catch (error) {
|
||||
if (
|
||||
this.isRetryableInvoiceConflict(error) &&
|
||||
attempt < this.createInvoiceRetries
|
||||
) {
|
||||
continue
|
||||
}
|
||||
throw error
|
||||
}
|
||||
}
|
||||
|
||||
throw new BadRequestException('ایجاد فاکتور با خطا مواجه شد.')
|
||||
}
|
||||
|
||||
private isRetryableInvoiceConflict(error: unknown) {
|
||||
if (!(error instanceof Prisma.PrismaClientKnownRequestError)) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (error.code !== 'P2002') {
|
||||
return false
|
||||
}
|
||||
|
||||
const target = (error.meta?.target as string[]) || []
|
||||
return (
|
||||
target.includes('invoice_number') ||
|
||||
target.includes('sales_invoices_invoice_number_pos_id_key')
|
||||
)
|
||||
}
|
||||
|
||||
private normalizeInvoiceDate(invoiceDate: Date | string) {
|
||||
return new Date(invoiceDate).toISOString() as any
|
||||
}
|
||||
|
||||
private buildPaymentsData(
|
||||
paymentsData: SharedCreateSalesInvoiceDto['payments'],
|
||||
totalAmount: number,
|
||||
) {
|
||||
const paymentMethodMap: Record<string, PaymentMethodType> = {
|
||||
cash: PaymentMethodType.CASH,
|
||||
set_off: PaymentMethodType.SET_OFF,
|
||||
card: PaymentMethodType.CARD,
|
||||
payment_gateway: PaymentMethodType.PAYMENT_GATEWAY,
|
||||
bank: PaymentMethodType.BANK,
|
||||
check: PaymentMethodType.CHEQUE,
|
||||
other: PaymentMethodType.OTHER,
|
||||
terminal: PaymentMethodType.TERMINAL,
|
||||
}
|
||||
|
||||
const rawPayments = (paymentsData || {}) as Record<string, unknown>
|
||||
const terminalInfo = rawPayments.terminals as TerminalPaymentInfo | undefined
|
||||
|
||||
const payments: NormalizedPayment[] = Object.entries(rawPayments)
|
||||
.filter(([key]) => key !== 'terminals')
|
||||
.map(([key, value]) => ({
|
||||
method: paymentMethodMap[key.toLowerCase()],
|
||||
amount: typeof value === 'number' ? value : Number(value || 0),
|
||||
}))
|
||||
.filter(payment => payment.method && payment.amount > 0) as NormalizedPayment[]
|
||||
|
||||
const hasTerminalPayment = payments.some(
|
||||
payment => payment.method === PaymentMethodType.TERMINAL,
|
||||
)
|
||||
const nonTerminalTotal = payments
|
||||
.filter(payment => payment.method !== PaymentMethodType.TERMINAL)
|
||||
.reduce((sum, payment) => sum + payment.amount, 0)
|
||||
|
||||
if (!hasTerminalPayment && terminalInfo) {
|
||||
const terminalAmount =
|
||||
typeof terminalInfo.amount === 'number'
|
||||
? terminalInfo.amount
|
||||
: Math.max(0, Number(totalAmount) - nonTerminalTotal)
|
||||
|
||||
if (terminalAmount > 0) {
|
||||
payments.push({
|
||||
method: PaymentMethodType.TERMINAL,
|
||||
amount: terminalAmount,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
this.validatePayments(payments, totalAmount, terminalInfo)
|
||||
|
||||
return {
|
||||
payments,
|
||||
terminalInfo,
|
||||
}
|
||||
}
|
||||
|
||||
private validatePayments(
|
||||
payments: NormalizedPayment[],
|
||||
totalAmount: number,
|
||||
terminalInfo?: TerminalPaymentInfo,
|
||||
) {
|
||||
const totalPayments = payments.reduce((sum, payment) => sum + payment.amount, 0)
|
||||
const roundedTotalPayments = Number(totalPayments.toFixed(2))
|
||||
const roundedTotalAmount = Number(Number(totalAmount).toFixed(2))
|
||||
|
||||
if (roundedTotalPayments !== roundedTotalAmount) {
|
||||
throw new BadRequestException('مبلغ پرداختی باید برابر با مبلغ کل فاکتور باشد.')
|
||||
}
|
||||
|
||||
const terminalPayments = payments.filter(
|
||||
payment => payment.method === PaymentMethodType.TERMINAL,
|
||||
)
|
||||
|
||||
if (terminalPayments.length > 0 && !terminalInfo) {
|
||||
throw new BadRequestException('برای پرداخت ترمینال اطلاعات ترمینال الزامی است.')
|
||||
}
|
||||
}
|
||||
|
||||
private async resolveCustomerId(
|
||||
tx: Prisma.TransactionClient,
|
||||
data: SharedCreateSalesInvoiceDto,
|
||||
businessId: string,
|
||||
) {
|
||||
if (data.customer_id) {
|
||||
return data.customer_id
|
||||
}
|
||||
|
||||
if (
|
||||
data.customer_type === CustomerType.INDIVIDUAL &&
|
||||
data.customer?.customer_individual
|
||||
) {
|
||||
const { national_id, mobile_number, ...rest } = data.customer.customer_individual
|
||||
|
||||
const customerIndividual = await tx.customerIndividual.upsert({
|
||||
where: {
|
||||
business_activity_id_national_id: {
|
||||
business_activity_id: businessId,
|
||||
national_id: data.customer.customer_individual.national_id,
|
||||
},
|
||||
},
|
||||
create: {
|
||||
...data.customer.customer_individual,
|
||||
customer: {
|
||||
create: {
|
||||
type: CustomerType.INDIVIDUAL,
|
||||
},
|
||||
},
|
||||
business_activity: {
|
||||
connect: {
|
||||
id: businessId,
|
||||
},
|
||||
},
|
||||
},
|
||||
update: { ...rest },
|
||||
select: {
|
||||
customer_id: true,
|
||||
},
|
||||
})
|
||||
|
||||
if (!customerIndividual) {
|
||||
throw new BadRequestException('متاسفانه مشکلی در اطلاعات مشتری وجود دارد.')
|
||||
}
|
||||
|
||||
return customerIndividual.customer_id
|
||||
}
|
||||
|
||||
if (data.customer_type === CustomerType.LEGAL && data.customer?.customer_legal) {
|
||||
const { registration_number, ...rest } = data.customer.customer_legal
|
||||
const customerLegal = await tx.customerLegal.upsert({
|
||||
where: {
|
||||
business_activity_id_economic_code: {
|
||||
business_activity_id: businessId,
|
||||
economic_code: data.customer.customer_legal.economic_code,
|
||||
},
|
||||
},
|
||||
create: {
|
||||
...data.customer.customer_legal,
|
||||
customer: {
|
||||
create: {
|
||||
type: CustomerType.LEGAL,
|
||||
},
|
||||
},
|
||||
business_activity: {
|
||||
connect: {
|
||||
id: businessId,
|
||||
},
|
||||
},
|
||||
},
|
||||
update: {
|
||||
...rest,
|
||||
},
|
||||
select: {
|
||||
customer_id: true,
|
||||
},
|
||||
})
|
||||
|
||||
if (!customerLegal) {
|
||||
throw new BadRequestException('متاسفانه مشکلی در اطلاعات مشتری وجود دارد.')
|
||||
}
|
||||
|
||||
return customerLegal.customer_id
|
||||
}
|
||||
|
||||
return null
|
||||
}
|
||||
|
||||
private async getGoodsById(
|
||||
tx: Prisma.TransactionClient,
|
||||
data: SharedCreateSalesInvoiceDto,
|
||||
) {
|
||||
const itemGoodIds = data.items
|
||||
.map(item => item.good_id)
|
||||
.filter((goodId): goodId is string => Boolean(goodId))
|
||||
|
||||
const goods = itemGoodIds.length
|
||||
? await tx.good.findMany({
|
||||
where: {
|
||||
id: {
|
||||
in: itemGoodIds,
|
||||
},
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
sku: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
code: true,
|
||||
VAT: true,
|
||||
},
|
||||
},
|
||||
local_sku: true,
|
||||
barcode: true,
|
||||
pricing_model: true,
|
||||
measure_unit: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
code: true,
|
||||
},
|
||||
},
|
||||
base_sale_price: true,
|
||||
image_url: true,
|
||||
category: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
: []
|
||||
|
||||
return new Map(goods.map(good => [good.id, good]))
|
||||
}
|
||||
|
||||
private buildSalesInvoiceData(params: {
|
||||
data: SharedCreateSalesInvoiceDto
|
||||
normalizedInvoiceDate: Date
|
||||
invoiceNumber: number
|
||||
consumerAccountId: string
|
||||
businessId: string
|
||||
complexId: string
|
||||
posId: string
|
||||
goodsById: Map<string, any>
|
||||
customerId: string | null
|
||||
type: TspProviderRequestType
|
||||
main_invoice_id?: string
|
||||
ref_invoice_id?: string
|
||||
}) {
|
||||
const {
|
||||
data,
|
||||
normalizedInvoiceDate,
|
||||
invoiceNumber,
|
||||
consumerAccountId,
|
||||
posId,
|
||||
goodsById,
|
||||
customerId,
|
||||
businessId,
|
||||
complexId,
|
||||
type,
|
||||
main_invoice_id,
|
||||
ref_invoice_id,
|
||||
} = params
|
||||
const { customer_id, customer_type, customer, payments, ...invoiceData } = data
|
||||
|
||||
if (
|
||||
type !== TspProviderRequestType.ORIGINAL &&
|
||||
!(main_invoice_id || ref_invoice_id)
|
||||
) {
|
||||
throw new BadRequestException('متاسفانه مشکلی در اطلاعات فاکتور وجود دارد.')
|
||||
}
|
||||
|
||||
const salesInvoiceData: SalesInvoiceCreateInput = {
|
||||
...invoiceData,
|
||||
invoice_date: normalizedInvoiceDate,
|
||||
invoice_number: invoiceNumber,
|
||||
total_amount: data.total_amount,
|
||||
code: this.generateInvoiceCode(businessId, complexId, posId, invoiceNumber),
|
||||
type,
|
||||
items: {
|
||||
createMany: {
|
||||
data: data.items.map(item => ({
|
||||
good_id: item.good_id!,
|
||||
quantity: item.quantity,
|
||||
unit_price: item.unit_price,
|
||||
total_amount: item.total_amount,
|
||||
measure_unit_text: goodsById.get(item.good_id!)?.measure_unit.name || null,
|
||||
measure_unit_code: goodsById.get(item.good_id!)?.measure_unit.code || null,
|
||||
sku_code: goodsById.get(item.good_id!)?.sku.code || null,
|
||||
sku_vat: goodsById.get(item.good_id!)?.sku.VAT || null,
|
||||
payload: item.payload ? JSON.parse(JSON.stringify(item.payload)) : undefined,
|
||||
good_snapshot: item.good_id
|
||||
? JSON.parse(
|
||||
JSON.stringify({
|
||||
good: goodsById.get(item.good_id) || null,
|
||||
}),
|
||||
)
|
||||
: undefined,
|
||||
})),
|
||||
},
|
||||
},
|
||||
unknown_customer: {},
|
||||
consumer_account: {
|
||||
connect: {
|
||||
id: consumerAccountId,
|
||||
},
|
||||
},
|
||||
pos: {
|
||||
connect: {
|
||||
id: posId,
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
if (customerId) {
|
||||
salesInvoiceData.customer = {
|
||||
connect: {
|
||||
id: customerId,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
if (type !== TspProviderRequestType.ORIGINAL) {
|
||||
salesInvoiceData.main_id = main_invoice_id
|
||||
salesInvoiceData.reference_invoice = {
|
||||
connect: {
|
||||
id: ref_invoice_id,
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
return salesInvoiceData
|
||||
}
|
||||
|
||||
private async getNextInvoiceNumber(tx: Prisma.TransactionClient, businessId: string) {
|
||||
const latestInvoice = await tx.salesInvoice.findFirst({
|
||||
where: {
|
||||
pos: {
|
||||
complex: {
|
||||
business_activity_id: businessId,
|
||||
},
|
||||
},
|
||||
},
|
||||
orderBy: {
|
||||
invoice_number: 'desc',
|
||||
},
|
||||
select: {
|
||||
invoice_number: true,
|
||||
pos: {
|
||||
select: {
|
||||
complex: {
|
||||
select: {
|
||||
business_activity: {
|
||||
select: {
|
||||
invoice_number_sequence: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
const latestSequence =
|
||||
latestInvoice?.pos?.complex?.business_activity?.invoice_number_sequence.toNumber() ||
|
||||
0
|
||||
|
||||
return Math.max(latestInvoice?.invoice_number || 0, latestSequence) + 1
|
||||
}
|
||||
|
||||
private async createPayments(
|
||||
tx: Prisma.TransactionClient,
|
||||
invoiceId: string,
|
||||
payments: NormalizedPayment[],
|
||||
terminalInfo: TerminalPaymentInfo | undefined,
|
||||
paidAt: Date,
|
||||
) {
|
||||
for (const payment of payments) {
|
||||
if (payment.amount <= 0) {
|
||||
continue
|
||||
}
|
||||
const createdPayment = await tx.salesInvoicePayment.create({
|
||||
data: {
|
||||
invoice_id: invoiceId,
|
||||
amount: payment.amount,
|
||||
payment_method: payment.method,
|
||||
paid_at: paidAt,
|
||||
},
|
||||
})
|
||||
|
||||
if (payment.method === PaymentMethodType.TERMINAL && terminalInfo) {
|
||||
await tx.salesInvoicePaymentTerminalInfo.create({
|
||||
data: {
|
||||
payment_id: createdPayment.id,
|
||||
terminal_id: terminalInfo.terminalId,
|
||||
stan: terminalInfo.stan,
|
||||
rrn: terminalInfo.rrn,
|
||||
transaction_date_time: new Date(terminalInfo.transactionDateTime || ''),
|
||||
customer_card_no: terminalInfo.customerCardNO || null,
|
||||
description: terminalInfo.description || null,
|
||||
},
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private generateInvoiceCode(
|
||||
businessId: string,
|
||||
complexId: string,
|
||||
posId: string,
|
||||
invoiceNumber: number,
|
||||
) {
|
||||
return `${businessId.substring(businessId.length - 2, businessId.length)}${complexId.substring(complexId.length - 2, complexId.length)}${posId.substring(posId.length - 2, posId.length)}${invoiceNumber.toString()}`
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import translates from '@/common/constants/translates/translates'
|
||||
|
||||
type EnumTranslateMap = Record<string, string>
|
||||
type EnumsRegistry = Record<string, EnumTranslateMap>
|
||||
|
||||
export interface EnumTranslatedValue {
|
||||
value: string | null | undefined
|
||||
translate: string | null
|
||||
}
|
||||
|
||||
export function translateEnumValue(
|
||||
enumKey: keyof typeof translates.enums,
|
||||
value: string | null | undefined,
|
||||
): EnumTranslatedValue {
|
||||
const enumsRegistry = translates.enums as EnumsRegistry
|
||||
const enumMap = enumsRegistry[String(enumKey)]
|
||||
|
||||
if (!value) {
|
||||
return {
|
||||
value,
|
||||
translate: null,
|
||||
}
|
||||
}
|
||||
|
||||
return {
|
||||
value,
|
||||
translate: enumMap?.[value] ?? null,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
import {
|
||||
FetchRequestContext,
|
||||
FetchRequestInterceptor,
|
||||
} from '@/common/interceptors/fetch-request.interceptor'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
|
||||
@Injectable()
|
||||
export class HttpClientUtil {
|
||||
async request(
|
||||
url: string,
|
||||
init: RequestInit = {},
|
||||
interceptors: FetchRequestInterceptor[] = [],
|
||||
): Promise<Response> {
|
||||
let context: FetchRequestContext = { url, init }
|
||||
|
||||
for (const interceptor of interceptors) {
|
||||
if (!interceptor.onRequest) {
|
||||
continue
|
||||
}
|
||||
|
||||
context = await interceptor.onRequest(context)
|
||||
}
|
||||
|
||||
try {
|
||||
let response = await fetch(context.url, context.init)
|
||||
|
||||
for (const interceptor of interceptors) {
|
||||
if (!interceptor.onResponse) {
|
||||
continue
|
||||
}
|
||||
response = await interceptor.onResponse(context, response)
|
||||
console.log('response')
|
||||
console.log(response)
|
||||
}
|
||||
|
||||
return response
|
||||
} catch (error: any) {
|
||||
for (const interceptor of interceptors) {
|
||||
if (!interceptor.onError) {
|
||||
continue
|
||||
}
|
||||
await interceptor.onError(context, error)
|
||||
}
|
||||
throw error
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
export * from './jwt-user.util'
|
||||
export * from './enum-translator.util'
|
||||
export * from './mappers/consumer_mappers.util'
|
||||
export * from './password.util'
|
||||
export * from './tracking-code-generator.util'
|
||||
export * from './http-client.util'
|
||||
@@ -0,0 +1,33 @@
|
||||
import { translateEnumValue } from '../enum-translator.util'
|
||||
|
||||
export default (consumer: any) => {
|
||||
const { legal, individual, activation, type, status, _count, ...rest } = consumer
|
||||
|
||||
const { business_activities: business_counts } = _count || { business_activities: 0 }
|
||||
const partner = legal?.partner || individual?.partner
|
||||
delete legal?.partner
|
||||
delete individual?.partner
|
||||
|
||||
return {
|
||||
...rest,
|
||||
partner,
|
||||
type: translateEnumValue('ConsumerType', type),
|
||||
status: translateEnumValue('ConsumerStatus', consumer.status),
|
||||
legal: legal ? { ...legal } : null,
|
||||
individual: individual
|
||||
? { ...individual, fullname: `${individual?.first_name} ${individual?.last_name}` }
|
||||
: null,
|
||||
name: legal ? legal.name : `${individual?.first_name} ${individual?.last_name}`,
|
||||
business_counts,
|
||||
// license_info: prepareLicenseInfo(activation),
|
||||
}
|
||||
}
|
||||
|
||||
function prepareLicenseInfo(latestLicense: any) {
|
||||
if (!latestLicense) return null
|
||||
const { license, ...rest } = latestLicense
|
||||
|
||||
return {
|
||||
...rest,
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
import { BadRequestException, ConflictException } from '@nestjs/common'
|
||||
import { Prisma } from 'generated/prisma/client'
|
||||
|
||||
type UniqueMessageMap = Record<string, string>
|
||||
|
||||
export class PrismaErrorUtil {
|
||||
static isKnownError(error: unknown): error is Prisma.PrismaClientKnownRequestError {
|
||||
return error instanceof Prisma.PrismaClientKnownRequestError
|
||||
}
|
||||
|
||||
static isCode(error: unknown, code: string): boolean {
|
||||
return this.isKnownError(error) && error.code === code
|
||||
}
|
||||
|
||||
static hasTarget(error: unknown, targetKey: string): boolean {
|
||||
if (!this.isKnownError(error)) {
|
||||
return false
|
||||
}
|
||||
const target = error.meta?.target as string[] | string | undefined
|
||||
if (Array.isArray(target)) {
|
||||
return target.includes(targetKey)
|
||||
}
|
||||
if (typeof target === 'string') {
|
||||
return target.includes(targetKey)
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
static throwIfKnown(error: unknown, uniqueMap: UniqueMessageMap = {}) {
|
||||
if (!(error instanceof Prisma.PrismaClientKnownRequestError)) {
|
||||
throw error
|
||||
}
|
||||
|
||||
if (error.code === 'P2002') {
|
||||
const target = (error.meta?.target as string[]) || []
|
||||
for (const key of Object.keys(uniqueMap)) {
|
||||
if (target.includes(key)) {
|
||||
throw new BadRequestException(uniqueMap[key])
|
||||
}
|
||||
}
|
||||
throw new ConflictException('رکورد تکراری است.')
|
||||
}
|
||||
|
||||
if (error.code === 'P2003') {
|
||||
throw new BadRequestException('ارتباط دادهای نامعتبر است.')
|
||||
}
|
||||
|
||||
if (error.code === 'P2025') {
|
||||
throw new BadRequestException('رکورد مورد نظر یافت نشد.')
|
||||
}
|
||||
|
||||
throw error
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
import { randomBytes } from 'crypto'
|
||||
import { PrismaErrorUtil } from './prisma-error.util'
|
||||
|
||||
export function generateTrackingCode(prefix: string, suffixLength: number) {
|
||||
const chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'
|
||||
@@ -13,23 +14,8 @@ export function generateTrackingCode(prefix: string, suffixLength: number) {
|
||||
}
|
||||
|
||||
export function isTrackingCodeUniqueViolation(error: unknown) {
|
||||
const prismaError = error as {
|
||||
code?: string
|
||||
meta?: { target?: string[] | string }
|
||||
}
|
||||
|
||||
if (prismaError?.code !== 'P2002') {
|
||||
if (!PrismaErrorUtil.isCode(error, 'P2002')) {
|
||||
return false
|
||||
}
|
||||
|
||||
const target = prismaError.meta?.target
|
||||
if (Array.isArray(target)) {
|
||||
return target.includes('tracking_code')
|
||||
}
|
||||
|
||||
if (typeof target === 'string') {
|
||||
return target.includes('tracking_code')
|
||||
}
|
||||
|
||||
return true
|
||||
return PrismaErrorUtil.hasTarget(error, 'tracking_code')
|
||||
}
|
||||
|
||||
@@ -32,31 +32,6 @@ export type Admin = Prisma.AdminModel
|
||||
*
|
||||
*/
|
||||
export type Account = Prisma.AccountModel
|
||||
/**
|
||||
* Model ConsumerAccount
|
||||
*
|
||||
*/
|
||||
export type ConsumerAccount = Prisma.ConsumerAccountModel
|
||||
/**
|
||||
* Model Consumer
|
||||
*
|
||||
*/
|
||||
export type Consumer = Prisma.ConsumerModel
|
||||
/**
|
||||
* Model BusinessActivity
|
||||
*
|
||||
*/
|
||||
export type BusinessActivity = Prisma.BusinessActivityModel
|
||||
/**
|
||||
* Model Complex
|
||||
*
|
||||
*/
|
||||
export type Complex = Prisma.ComplexModel
|
||||
/**
|
||||
* Model Pos
|
||||
*
|
||||
*/
|
||||
export type Pos = Prisma.PosModel
|
||||
/**
|
||||
* Model DeviceBrand
|
||||
*
|
||||
@@ -157,6 +132,66 @@ export type ConsumerDevices = Prisma.ConsumerDevicesModel
|
||||
*
|
||||
*/
|
||||
export type ApplicationReleasedInfo = Prisma.ApplicationReleasedInfoModel
|
||||
/**
|
||||
* Model ConsumerAccount
|
||||
*
|
||||
*/
|
||||
export type ConsumerAccount = Prisma.ConsumerAccountModel
|
||||
/**
|
||||
* Model Consumer
|
||||
*
|
||||
*/
|
||||
export type Consumer = Prisma.ConsumerModel
|
||||
/**
|
||||
* Model ConsumerIndividual
|
||||
*
|
||||
*/
|
||||
export type ConsumerIndividual = Prisma.ConsumerIndividualModel
|
||||
/**
|
||||
* Model ConsumerLegal
|
||||
*
|
||||
*/
|
||||
export type ConsumerLegal = Prisma.ConsumerLegalModel
|
||||
/**
|
||||
* Model BusinessActivity
|
||||
*
|
||||
*/
|
||||
export type BusinessActivity = Prisma.BusinessActivityModel
|
||||
/**
|
||||
* Model Complex
|
||||
*
|
||||
*/
|
||||
export type Complex = Prisma.ComplexModel
|
||||
/**
|
||||
* Model Pos
|
||||
*
|
||||
*/
|
||||
export type Pos = Prisma.PosModel
|
||||
/**
|
||||
* Model Good
|
||||
*
|
||||
*/
|
||||
export type Good = Prisma.GoodModel
|
||||
/**
|
||||
* Model GoodCategory
|
||||
*
|
||||
*/
|
||||
export type GoodCategory = Prisma.GoodCategoryModel
|
||||
/**
|
||||
* Model Guild
|
||||
*
|
||||
*/
|
||||
export type Guild = Prisma.GuildModel
|
||||
/**
|
||||
* Model MeasureUnits
|
||||
*
|
||||
*/
|
||||
export type MeasureUnits = Prisma.MeasureUnitsModel
|
||||
/**
|
||||
* Model StockKeepingUnits
|
||||
*
|
||||
*/
|
||||
export type StockKeepingUnits = Prisma.StockKeepingUnitsModel
|
||||
/**
|
||||
* Model TriggerLog
|
||||
*
|
||||
@@ -177,21 +212,6 @@ export type CustomerIndividual = Prisma.CustomerIndividualModel
|
||||
*
|
||||
*/
|
||||
export type CustomerLegal = Prisma.CustomerLegalModel
|
||||
/**
|
||||
* Model Good
|
||||
*
|
||||
*/
|
||||
export type Good = Prisma.GoodModel
|
||||
/**
|
||||
* Model GoodCategory
|
||||
*
|
||||
*/
|
||||
export type GoodCategory = Prisma.GoodCategoryModel
|
||||
/**
|
||||
* Model Guild
|
||||
*
|
||||
*/
|
||||
export type Guild = Prisma.GuildModel
|
||||
/**
|
||||
* Model SalesInvoice
|
||||
*
|
||||
@@ -202,11 +222,21 @@ export type SalesInvoice = Prisma.SalesInvoiceModel
|
||||
*
|
||||
*/
|
||||
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
||||
/**
|
||||
* Model SaleInvoiceTspAttempts
|
||||
*
|
||||
*/
|
||||
export type SaleInvoiceTspAttempts = Prisma.SaleInvoiceTspAttemptsModel
|
||||
/**
|
||||
* Model SalesInvoicePayment
|
||||
*
|
||||
*/
|
||||
export type SalesInvoicePayment = Prisma.SalesInvoicePaymentModel
|
||||
/**
|
||||
* Model SalesInvoicePaymentTerminalInfo
|
||||
*
|
||||
*/
|
||||
export type SalesInvoicePaymentTerminalInfo = Prisma.SalesInvoicePaymentTerminalInfoModel
|
||||
/**
|
||||
* Model Service
|
||||
*
|
||||
|
||||
@@ -54,31 +54,6 @@ export type Admin = Prisma.AdminModel
|
||||
*
|
||||
*/
|
||||
export type Account = Prisma.AccountModel
|
||||
/**
|
||||
* Model ConsumerAccount
|
||||
*
|
||||
*/
|
||||
export type ConsumerAccount = Prisma.ConsumerAccountModel
|
||||
/**
|
||||
* Model Consumer
|
||||
*
|
||||
*/
|
||||
export type Consumer = Prisma.ConsumerModel
|
||||
/**
|
||||
* Model BusinessActivity
|
||||
*
|
||||
*/
|
||||
export type BusinessActivity = Prisma.BusinessActivityModel
|
||||
/**
|
||||
* Model Complex
|
||||
*
|
||||
*/
|
||||
export type Complex = Prisma.ComplexModel
|
||||
/**
|
||||
* Model Pos
|
||||
*
|
||||
*/
|
||||
export type Pos = Prisma.PosModel
|
||||
/**
|
||||
* Model DeviceBrand
|
||||
*
|
||||
@@ -179,6 +154,66 @@ export type ConsumerDevices = Prisma.ConsumerDevicesModel
|
||||
*
|
||||
*/
|
||||
export type ApplicationReleasedInfo = Prisma.ApplicationReleasedInfoModel
|
||||
/**
|
||||
* Model ConsumerAccount
|
||||
*
|
||||
*/
|
||||
export type ConsumerAccount = Prisma.ConsumerAccountModel
|
||||
/**
|
||||
* Model Consumer
|
||||
*
|
||||
*/
|
||||
export type Consumer = Prisma.ConsumerModel
|
||||
/**
|
||||
* Model ConsumerIndividual
|
||||
*
|
||||
*/
|
||||
export type ConsumerIndividual = Prisma.ConsumerIndividualModel
|
||||
/**
|
||||
* Model ConsumerLegal
|
||||
*
|
||||
*/
|
||||
export type ConsumerLegal = Prisma.ConsumerLegalModel
|
||||
/**
|
||||
* Model BusinessActivity
|
||||
*
|
||||
*/
|
||||
export type BusinessActivity = Prisma.BusinessActivityModel
|
||||
/**
|
||||
* Model Complex
|
||||
*
|
||||
*/
|
||||
export type Complex = Prisma.ComplexModel
|
||||
/**
|
||||
* Model Pos
|
||||
*
|
||||
*/
|
||||
export type Pos = Prisma.PosModel
|
||||
/**
|
||||
* Model Good
|
||||
*
|
||||
*/
|
||||
export type Good = Prisma.GoodModel
|
||||
/**
|
||||
* Model GoodCategory
|
||||
*
|
||||
*/
|
||||
export type GoodCategory = Prisma.GoodCategoryModel
|
||||
/**
|
||||
* Model Guild
|
||||
*
|
||||
*/
|
||||
export type Guild = Prisma.GuildModel
|
||||
/**
|
||||
* Model MeasureUnits
|
||||
*
|
||||
*/
|
||||
export type MeasureUnits = Prisma.MeasureUnitsModel
|
||||
/**
|
||||
* Model StockKeepingUnits
|
||||
*
|
||||
*/
|
||||
export type StockKeepingUnits = Prisma.StockKeepingUnitsModel
|
||||
/**
|
||||
* Model TriggerLog
|
||||
*
|
||||
@@ -199,21 +234,6 @@ export type CustomerIndividual = Prisma.CustomerIndividualModel
|
||||
*
|
||||
*/
|
||||
export type CustomerLegal = Prisma.CustomerLegalModel
|
||||
/**
|
||||
* Model Good
|
||||
*
|
||||
*/
|
||||
export type Good = Prisma.GoodModel
|
||||
/**
|
||||
* Model GoodCategory
|
||||
*
|
||||
*/
|
||||
export type GoodCategory = Prisma.GoodCategoryModel
|
||||
/**
|
||||
* Model Guild
|
||||
*
|
||||
*/
|
||||
export type Guild = Prisma.GuildModel
|
||||
/**
|
||||
* Model SalesInvoice
|
||||
*
|
||||
@@ -224,11 +244,21 @@ export type SalesInvoice = Prisma.SalesInvoiceModel
|
||||
*
|
||||
*/
|
||||
export type SalesInvoiceItem = Prisma.SalesInvoiceItemModel
|
||||
/**
|
||||
* Model SaleInvoiceTspAttempts
|
||||
*
|
||||
*/
|
||||
export type SaleInvoiceTspAttempts = Prisma.SaleInvoiceTspAttemptsModel
|
||||
/**
|
||||
* Model SalesInvoicePayment
|
||||
*
|
||||
*/
|
||||
export type SalesInvoicePayment = Prisma.SalesInvoicePaymentModel
|
||||
/**
|
||||
* Model SalesInvoicePaymentTerminalInfo
|
||||
*
|
||||
*/
|
||||
export type SalesInvoicePaymentTerminalInfo = Prisma.SalesInvoicePaymentTerminalInfoModel
|
||||
/**
|
||||
* Model Service
|
||||
*
|
||||
|
||||
@@ -144,74 +144,6 @@ export type EnumAccountTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumConsumerRoleFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerRole | Prisma.EnumConsumerRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerRole[]
|
||||
notIn?: $Enums.ConsumerRole[]
|
||||
not?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel> | $Enums.ConsumerRole
|
||||
}
|
||||
|
||||
export type EnumConsumerRoleWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerRole | Prisma.EnumConsumerRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerRole[]
|
||||
notIn?: $Enums.ConsumerRole[]
|
||||
not?: Prisma.NestedEnumConsumerRoleWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerRole
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumConsumerStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerStatus | Prisma.EnumConsumerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerStatus[]
|
||||
notIn?: $Enums.ConsumerStatus[]
|
||||
not?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel> | $Enums.ConsumerStatus
|
||||
}
|
||||
|
||||
export type EnumConsumerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerStatus | Prisma.EnumConsumerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerStatus[]
|
||||
notIn?: $Enums.ConsumerStatus[]
|
||||
not?: Prisma.NestedEnumConsumerStatusWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerStatusFilter<$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 IntFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
@@ -263,6 +195,13 @@ export type EnumPartnerStatusFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel> | $Enums.PartnerStatus
|
||||
}
|
||||
|
||||
export type EnumTspProviderTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderType | Prisma.EnumTspProviderTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderType[]
|
||||
notIn?: $Enums.TspProviderType[]
|
||||
not?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel> | $Enums.TspProviderType
|
||||
}
|
||||
|
||||
export type EnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.PartnerStatus | Prisma.EnumPartnerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.PartnerStatus[]
|
||||
@@ -273,6 +212,16 @@ export type EnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumTspProviderTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderType | Prisma.EnumTspProviderTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderType[]
|
||||
notIn?: $Enums.TspProviderType[]
|
||||
not?: Prisma.NestedEnumTspProviderTypeWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumPOSRoleFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSRole | Prisma.EnumPOSRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSRole[]
|
||||
@@ -456,66 +405,116 @@ export type JsonNullableWithAggregatesFilterBase<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedJsonNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type BoolNullableFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||
export type EnumConsumerRoleFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerRole | Prisma.EnumConsumerRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerRole[]
|
||||
notIn?: $Enums.ConsumerRole[]
|
||||
not?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel> | $Enums.ConsumerRole
|
||||
}
|
||||
|
||||
export type DateTimeNullableFilter<$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 EnumCustomerTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CustomerType[]
|
||||
notIn?: $Enums.CustomerType[]
|
||||
not?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel> | $Enums.CustomerType
|
||||
}
|
||||
|
||||
export type BoolNullableWithAggregatesFilter<$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 DateTimeNullableWithAggregatesFilter<$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 EnumCustomerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CustomerType[]
|
||||
notIn?: $Enums.CustomerType[]
|
||||
not?: Prisma.NestedEnumCustomerTypeWithAggregatesFilter<$PrismaModel> | $Enums.CustomerType
|
||||
export type EnumConsumerRoleWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerRole | Prisma.EnumConsumerRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerRole[]
|
||||
notIn?: $Enums.ConsumerRole[]
|
||||
not?: Prisma.NestedEnumConsumerRoleWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerRole
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumUnitTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UnitType[]
|
||||
notIn?: $Enums.UnitType[]
|
||||
not?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel> | $Enums.UnitType
|
||||
export type EnumConsumerTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerType | Prisma.EnumConsumerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerType[]
|
||||
notIn?: $Enums.ConsumerType[]
|
||||
not?: Prisma.NestedEnumConsumerTypeFilter<$PrismaModel> | $Enums.ConsumerType
|
||||
}
|
||||
|
||||
export type EnumConsumerStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerStatus | Prisma.EnumConsumerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerStatus[]
|
||||
notIn?: $Enums.ConsumerStatus[]
|
||||
not?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel> | $Enums.ConsumerStatus
|
||||
}
|
||||
|
||||
export type EnumConsumerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerType | Prisma.EnumConsumerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerType[]
|
||||
notIn?: $Enums.ConsumerType[]
|
||||
not?: Prisma.NestedEnumConsumerTypeWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumConsumerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerStatus | Prisma.EnumConsumerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerStatus[]
|
||||
notIn?: $Enums.ConsumerStatus[]
|
||||
not?: Prisma.NestedEnumConsumerStatusWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DecimalFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
}
|
||||
|
||||
export type DecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type 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 EnumGoodPricingModelFilter<$PrismaModel = never> = {
|
||||
@@ -536,14 +535,15 @@ export type DecimalNullableFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedDecimalNullableFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type EnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UnitType[]
|
||||
notIn?: $Enums.UnitType[]
|
||||
not?: Prisma.NestedEnumUnitTypeWithAggregatesFilter<$PrismaModel> | $Enums.UnitType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
||||
export type DateTimeNullableFilter<$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 EnumGoodPricingModelWithAggregatesFilter<$PrismaModel = never> = {
|
||||
@@ -572,31 +572,150 @@ export type DecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type DecimalFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[]
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
export type DateTimeNullableWithAggregatesFilter<$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 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
|
||||
export type EnumInvoiceTemplateTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.InvoiceTemplateType | Prisma.EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.InvoiceTemplateType[]
|
||||
notIn?: $Enums.InvoiceTemplateType[]
|
||||
not?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel> | $Enums.InvoiceTemplateType
|
||||
}
|
||||
|
||||
export type EnumInvoiceTemplateTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.InvoiceTemplateType | Prisma.EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.InvoiceTemplateType[]
|
||||
notIn?: $Enums.InvoiceTemplateType[]
|
||||
not?: Prisma.NestedEnumInvoiceTemplateTypeWithAggregatesFilter<$PrismaModel> | $Enums.InvoiceTemplateType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type BoolNullableFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||
}
|
||||
|
||||
export type EnumCustomerTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.CustomerType | Prisma.EnumCustomerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.CustomerType[]
|
||||
notIn?: $Enums.CustomerType[]
|
||||
not?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel> | $Enums.CustomerType
|
||||
}
|
||||
|
||||
export type BoolNullableWithAggregatesFilter<$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 EnumCustomerTypeWithAggregatesFilter<$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 EnumTspProviderRequestTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderRequestType[]
|
||||
notIn?: $Enums.TspProviderRequestType[]
|
||||
not?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||
}
|
||||
|
||||
export type EnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderRequestType[]
|
||||
notIn?: $Enums.TspProviderRequestType[]
|
||||
not?: Prisma.NestedEnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type JsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
lt?: runtime.InputJsonValue
|
||||
lte?: runtime.InputJsonValue
|
||||
gt?: runtime.InputJsonValue
|
||||
gte?: runtime.InputJsonValue
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type JsonWithAggregatesFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<JsonWithAggregatesFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<JsonWithAggregatesFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type JsonWithAggregatesFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
lt?: runtime.InputJsonValue
|
||||
lte?: runtime.InputJsonValue
|
||||
gt?: runtime.InputJsonValue
|
||||
gte?: runtime.InputJsonValue
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedJsonFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumTspProviderResponseStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderResponseStatus[]
|
||||
notIn?: $Enums.TspProviderResponseStatus[]
|
||||
not?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel> | $Enums.TspProviderResponseStatus
|
||||
}
|
||||
|
||||
export type EnumTspProviderResponseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderResponseStatus[]
|
||||
notIn?: $Enums.TspProviderResponseStatus[]
|
||||
not?: Prisma.NestedEnumTspProviderResponseStatusWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderResponseStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||
@@ -763,74 +882,6 @@ export type NestedEnumAccountTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedEnumAccountTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumConsumerRoleFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerRole | Prisma.EnumConsumerRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerRole[]
|
||||
notIn?: $Enums.ConsumerRole[]
|
||||
not?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel> | $Enums.ConsumerRole
|
||||
}
|
||||
|
||||
export type NestedEnumConsumerRoleWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerRole | Prisma.EnumConsumerRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerRole[]
|
||||
notIn?: $Enums.ConsumerRole[]
|
||||
not?: Prisma.NestedEnumConsumerRoleWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerRole
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumConsumerStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerStatus | Prisma.EnumConsumerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerStatus[]
|
||||
notIn?: $Enums.ConsumerStatus[]
|
||||
not?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel> | $Enums.ConsumerStatus
|
||||
}
|
||||
|
||||
export type NestedEnumConsumerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerStatus | Prisma.EnumConsumerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerStatus[]
|
||||
notIn?: $Enums.ConsumerStatus[]
|
||||
not?: Prisma.NestedEnumConsumerStatusWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumPOSStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSStatus[]
|
||||
notIn?: $Enums.POSStatus[]
|
||||
not?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel> | $Enums.POSStatus
|
||||
}
|
||||
|
||||
export type NestedEnumPOSTypeFilter<$PrismaModel = never> = {
|
||||
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>
|
||||
_min?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumPOSStatusFilter<$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 NestedIntWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
in?: number[]
|
||||
@@ -882,6 +933,13 @@ export type NestedEnumPartnerStatusFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel> | $Enums.PartnerStatus
|
||||
}
|
||||
|
||||
export type NestedEnumTspProviderTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderType | Prisma.EnumTspProviderTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderType[]
|
||||
notIn?: $Enums.TspProviderType[]
|
||||
not?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel> | $Enums.TspProviderType
|
||||
}
|
||||
|
||||
export type NestedEnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.PartnerStatus | Prisma.EnumPartnerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.PartnerStatus[]
|
||||
@@ -892,6 +950,16 @@ export type NestedEnumPartnerStatusWithAggregatesFilter<$PrismaModel = never> =
|
||||
_max?: Prisma.NestedEnumPartnerStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumTspProviderTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderType | Prisma.EnumTspProviderTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderType[]
|
||||
notIn?: $Enums.TspProviderType[]
|
||||
not?: Prisma.NestedEnumTspProviderTypeWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTspProviderTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumPOSRoleFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSRole | Prisma.EnumPOSRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSRole[]
|
||||
@@ -1048,120 +1116,55 @@ export type NestedJsonNullableFilterBase<$PrismaModel = never> = {
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type NestedBoolNullableFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | null
|
||||
export type NestedEnumConsumerRoleFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerRole | Prisma.EnumConsumerRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerRole[]
|
||||
notIn?: $Enums.ConsumerRole[]
|
||||
not?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel> | $Enums.ConsumerRole
|
||||
}
|
||||
|
||||
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 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 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
|
||||
export type NestedEnumConsumerRoleWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerRole | Prisma.EnumConsumerRoleFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerRole[]
|
||||
notIn?: $Enums.ConsumerRole[]
|
||||
not?: Prisma.NestedEnumConsumerRoleWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerRole
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumCustomerTypeFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerRoleFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumUnitTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UnitType[]
|
||||
notIn?: $Enums.UnitType[]
|
||||
not?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel> | $Enums.UnitType
|
||||
export type NestedEnumConsumerTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerType | Prisma.EnumConsumerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerType[]
|
||||
notIn?: $Enums.ConsumerType[]
|
||||
not?: Prisma.NestedEnumConsumerTypeFilter<$PrismaModel> | $Enums.ConsumerType
|
||||
}
|
||||
|
||||
export type NestedEnumGoodPricingModelFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.GoodPricingModel | Prisma.EnumGoodPricingModelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.GoodPricingModel[]
|
||||
notIn?: $Enums.GoodPricingModel[]
|
||||
not?: Prisma.NestedEnumGoodPricingModelFilter<$PrismaModel> | $Enums.GoodPricingModel
|
||||
export type NestedEnumConsumerStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerStatus | Prisma.EnumConsumerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerStatus[]
|
||||
notIn?: $Enums.ConsumerStatus[]
|
||||
not?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel> | $Enums.ConsumerStatus
|
||||
}
|
||||
|
||||
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 NestedEnumUnitTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.UnitType | Prisma.EnumUnitTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.UnitType[]
|
||||
notIn?: $Enums.UnitType[]
|
||||
not?: Prisma.NestedEnumUnitTypeWithAggregatesFilter<$PrismaModel> | $Enums.UnitType
|
||||
export type NestedEnumConsumerTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerType | Prisma.EnumConsumerTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerType[]
|
||||
notIn?: $Enums.ConsumerType[]
|
||||
not?: Prisma.NestedEnumConsumerTypeWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumUnitTypeFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumGoodPricingModelWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.GoodPricingModel | Prisma.EnumGoodPricingModelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.GoodPricingModel[]
|
||||
notIn?: $Enums.GoodPricingModel[]
|
||||
not?: Prisma.NestedEnumGoodPricingModelWithAggregatesFilter<$PrismaModel> | $Enums.GoodPricingModel
|
||||
export type NestedEnumConsumerStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.ConsumerStatus | Prisma.EnumConsumerStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.ConsumerStatus[]
|
||||
notIn?: $Enums.ConsumerStatus[]
|
||||
not?: Prisma.NestedEnumConsumerStatusWithAggregatesFilter<$PrismaModel> | $Enums.ConsumerStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumGoodPricingModelFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumGoodPricingModelFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumConsumerStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedDecimalFilter<$PrismaModel = never> = {
|
||||
@@ -1191,6 +1194,214 @@ export type NestedDecimalWithAggregatesFilter<$PrismaModel = never> = {
|
||||
_max?: Prisma.NestedDecimalFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumPOSStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.POSStatus | Prisma.EnumPOSStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.POSStatus[]
|
||||
notIn?: $Enums.POSStatus[]
|
||||
not?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel> | $Enums.POSStatus
|
||||
}
|
||||
|
||||
export type NestedEnumPOSTypeFilter<$PrismaModel = never> = {
|
||||
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>
|
||||
_min?: Prisma.NestedEnumPOSStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumPOSStatusFilter<$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 NestedEnumGoodPricingModelFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.GoodPricingModel | Prisma.EnumGoodPricingModelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.GoodPricingModel[]
|
||||
notIn?: $Enums.GoodPricingModel[]
|
||||
not?: Prisma.NestedEnumGoodPricingModelFilter<$PrismaModel> | $Enums.GoodPricingModel
|
||||
}
|
||||
|
||||
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 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 NestedEnumGoodPricingModelWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.GoodPricingModel | Prisma.EnumGoodPricingModelFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.GoodPricingModel[]
|
||||
notIn?: $Enums.GoodPricingModel[]
|
||||
not?: Prisma.NestedEnumGoodPricingModelWithAggregatesFilter<$PrismaModel> | $Enums.GoodPricingModel
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumGoodPricingModelFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumGoodPricingModelFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedDecimalNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel> | null
|
||||
in?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
notIn?: runtime.Decimal[] | runtime.DecimalJsLike[] | number[] | string[] | null
|
||||
lt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
lte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gt?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
gte?: runtime.Decimal | runtime.DecimalJsLike | number | string | Prisma.DecimalFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedDecimalNullableWithAggregatesFilter<$PrismaModel> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedDecimalNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type 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 NestedEnumInvoiceTemplateTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.InvoiceTemplateType | Prisma.EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.InvoiceTemplateType[]
|
||||
notIn?: $Enums.InvoiceTemplateType[]
|
||||
not?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel> | $Enums.InvoiceTemplateType
|
||||
}
|
||||
|
||||
export type NestedEnumInvoiceTemplateTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.InvoiceTemplateType | Prisma.EnumInvoiceTemplateTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.InvoiceTemplateType[]
|
||||
notIn?: $Enums.InvoiceTemplateType[]
|
||||
not?: Prisma.NestedEnumInvoiceTemplateTypeWithAggregatesFilter<$PrismaModel> | $Enums.InvoiceTemplateType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumInvoiceTemplateTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedBoolNullableFilter<$PrismaModel = never> = {
|
||||
equals?: boolean | Prisma.BooleanFieldRefInput<$PrismaModel> | null
|
||||
not?: Prisma.NestedBoolNullableFilter<$PrismaModel> | boolean | 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 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 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 NestedEnumTspProviderRequestTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderRequestType[]
|
||||
notIn?: $Enums.TspProviderRequestType[]
|
||||
not?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||
}
|
||||
|
||||
export type NestedEnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderRequestType[]
|
||||
notIn?: $Enums.TspProviderRequestType[]
|
||||
not?: Prisma.NestedEnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedJsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
Required<NestedJsonFilterBase<$PrismaModel>>
|
||||
>
|
||||
| Prisma.OptionalFlat<Omit<Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>
|
||||
|
||||
export type NestedJsonFilterBase<$PrismaModel = never> = {
|
||||
equals?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
path?: string
|
||||
mode?: Prisma.QueryMode | Prisma.EnumQueryModeFieldRefInput<$PrismaModel>
|
||||
string_contains?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_starts_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
string_ends_with?: string | Prisma.StringFieldRefInput<$PrismaModel>
|
||||
array_starts_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_ends_with?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
array_contains?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | null
|
||||
lt?: runtime.InputJsonValue
|
||||
lte?: runtime.InputJsonValue
|
||||
gt?: runtime.InputJsonValue
|
||||
gte?: runtime.InputJsonValue
|
||||
not?: runtime.InputJsonValue | Prisma.JsonFieldRefInput<$PrismaModel> | Prisma.JsonNullValueFilter
|
||||
}
|
||||
|
||||
export type NestedEnumTspProviderResponseStatusFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderResponseStatus[]
|
||||
notIn?: $Enums.TspProviderResponseStatus[]
|
||||
not?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel> | $Enums.TspProviderResponseStatus
|
||||
}
|
||||
|
||||
export type NestedEnumTspProviderResponseStatusWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderResponseStatus[]
|
||||
notIn?: $Enums.TspProviderResponseStatus[]
|
||||
not?: Prisma.NestedEnumTspProviderResponseStatusWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderResponseStatus
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTspProviderResponseStatusFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumPaymentMethodTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.PaymentMethodType | Prisma.EnumPaymentMethodTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.PaymentMethodType[]
|
||||
|
||||
@@ -10,12 +10,13 @@
|
||||
*/
|
||||
|
||||
export const PaymentMethodType = {
|
||||
TERMINAL: 'TERMINAL',
|
||||
CASH: 'CASH',
|
||||
CHEQUE: 'CHEQUE',
|
||||
SET_OFF: 'SET_OFF',
|
||||
CASH: 'CASH',
|
||||
TERMINAL: 'TERMINAL',
|
||||
PAYMENT_GATEWAY: 'PAYMENT_GATEWAY',
|
||||
CARD: 'CARD',
|
||||
BANK: 'BANK',
|
||||
CHECK: 'CHECK',
|
||||
OTHER: 'OTHER'
|
||||
} as const
|
||||
|
||||
@@ -238,3 +239,71 @@ export const ApplicationPublisher = {
|
||||
} as const
|
||||
|
||||
export type ApplicationPublisher = (typeof ApplicationPublisher)[keyof typeof ApplicationPublisher]
|
||||
|
||||
|
||||
export const ConsumerType = {
|
||||
INDIVIDUAL: 'INDIVIDUAL',
|
||||
LEGAL: 'LEGAL'
|
||||
} as const
|
||||
|
||||
export type ConsumerType = (typeof ConsumerType)[keyof typeof ConsumerType]
|
||||
|
||||
|
||||
export const TspProviderType = {
|
||||
NAMA: 'NAMA',
|
||||
SUN: 'SUN'
|
||||
} as const
|
||||
|
||||
export type TspProviderType = (typeof TspProviderType)[keyof typeof TspProviderType]
|
||||
|
||||
|
||||
export const TspProviderResponseStatus = {
|
||||
SUCCESS: 'SUCCESS',
|
||||
FAILURE: 'FAILURE',
|
||||
NOT_SEND: 'NOT_SEND',
|
||||
QUEUED: 'QUEUED'
|
||||
} as const
|
||||
|
||||
export type TspProviderResponseStatus = (typeof TspProviderResponseStatus)[keyof typeof TspProviderResponseStatus]
|
||||
|
||||
|
||||
export const TspProviderRequestType = {
|
||||
ORIGINAL: 'ORIGINAL',
|
||||
CORRECTION: 'CORRECTION',
|
||||
REVOKE: 'REVOKE',
|
||||
RETURN: 'RETURN'
|
||||
} as const
|
||||
|
||||
export type TspProviderRequestType = (typeof TspProviderRequestType)[keyof typeof TspProviderRequestType]
|
||||
|
||||
|
||||
export const TspProviderCustomerType = {
|
||||
Unknown: 'Unknown',
|
||||
Known: 'Known'
|
||||
} as const
|
||||
|
||||
export type TspProviderCustomerType = (typeof TspProviderCustomerType)[keyof typeof TspProviderCustomerType]
|
||||
|
||||
|
||||
export const SKUGuildType = {
|
||||
GOLD: 'GOLD'
|
||||
} as const
|
||||
|
||||
export type SKUGuildType = (typeof SKUGuildType)[keyof typeof SKUGuildType]
|
||||
|
||||
|
||||
export const InvoiceTemplateType = {
|
||||
SALE: 'SALE',
|
||||
FX_SALE: 'FX_SALE',
|
||||
GOLD_JEWELRY: 'GOLD_JEWELRY',
|
||||
CONTRACT: 'CONTRACT',
|
||||
UTILITY: 'UTILITY',
|
||||
AIR_TICKET: 'AIR_TICKET',
|
||||
EXPORT: 'EXPORT',
|
||||
BILL_OF_LADING: 'BILL_OF_LADING',
|
||||
PETROCHEMICAL: 'PETROCHEMICAL',
|
||||
COMMODITY_EXCHANGE: 'COMMODITY_EXCHANGE',
|
||||
INSURANCE: 'INSURANCE'
|
||||
} as const
|
||||
|
||||
export type InvoiceTemplateType = (typeof InvoiceTemplateType)[keyof typeof InvoiceTemplateType]
|
||||
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because it is too large
Load Diff
@@ -54,11 +54,6 @@ export const ModelName = {
|
||||
AdminAccount: 'AdminAccount',
|
||||
Admin: 'Admin',
|
||||
Account: 'Account',
|
||||
ConsumerAccount: 'ConsumerAccount',
|
||||
Consumer: 'Consumer',
|
||||
BusinessActivity: 'BusinessActivity',
|
||||
Complex: 'Complex',
|
||||
Pos: 'Pos',
|
||||
DeviceBrand: 'DeviceBrand',
|
||||
Device: 'Device',
|
||||
LicenseChargeTransaction: 'LicenseChargeTransaction',
|
||||
@@ -79,16 +74,27 @@ export const ModelName = {
|
||||
Provider: 'Provider',
|
||||
ConsumerDevices: 'ConsumerDevices',
|
||||
ApplicationReleasedInfo: 'ApplicationReleasedInfo',
|
||||
ConsumerAccount: 'ConsumerAccount',
|
||||
Consumer: 'Consumer',
|
||||
ConsumerIndividual: 'ConsumerIndividual',
|
||||
ConsumerLegal: 'ConsumerLegal',
|
||||
BusinessActivity: 'BusinessActivity',
|
||||
Complex: 'Complex',
|
||||
Pos: 'Pos',
|
||||
Good: 'Good',
|
||||
GoodCategory: 'GoodCategory',
|
||||
Guild: 'Guild',
|
||||
MeasureUnits: 'MeasureUnits',
|
||||
StockKeepingUnits: 'StockKeepingUnits',
|
||||
TriggerLog: 'TriggerLog',
|
||||
Customer: 'Customer',
|
||||
CustomerIndividual: 'CustomerIndividual',
|
||||
CustomerLegal: 'CustomerLegal',
|
||||
Good: 'Good',
|
||||
GoodCategory: 'GoodCategory',
|
||||
Guild: 'Guild',
|
||||
SalesInvoice: 'SalesInvoice',
|
||||
SalesInvoiceItem: 'SalesInvoiceItem',
|
||||
SaleInvoiceTspAttempts: 'SaleInvoiceTspAttempts',
|
||||
SalesInvoicePayment: 'SalesInvoicePayment',
|
||||
SalesInvoicePaymentTerminalInfo: 'SalesInvoicePaymentTerminalInfo',
|
||||
Service: 'Service',
|
||||
ServiceCategory: 'ServiceCategory'
|
||||
} as const
|
||||
@@ -144,77 +150,6 @@ export const AccountScalarFieldEnum = {
|
||||
export type AccountScalarFieldEnum = (typeof AccountScalarFieldEnum)[keyof typeof AccountScalarFieldEnum]
|
||||
|
||||
|
||||
export const ConsumerAccountScalarFieldEnum = {
|
||||
id: 'id',
|
||||
role: 'role',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
consumer_id: 'consumer_id',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type ConsumerAccountScalarFieldEnum = (typeof ConsumerAccountScalarFieldEnum)[keyof typeof ConsumerAccountScalarFieldEnum]
|
||||
|
||||
|
||||
export const ConsumerScalarFieldEnum = {
|
||||
id: 'id',
|
||||
mobile_number: 'mobile_number',
|
||||
national_code: 'national_code',
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
status: 'status',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
partner_id: 'partner_id'
|
||||
} as const
|
||||
|
||||
export type ConsumerScalarFieldEnum = (typeof ConsumerScalarFieldEnum)[keyof typeof ConsumerScalarFieldEnum]
|
||||
|
||||
|
||||
export const BusinessActivityScalarFieldEnum = {
|
||||
id: 'id',
|
||||
economic_code: 'economic_code',
|
||||
name: 'name',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
guild_id: 'guild_id',
|
||||
consumer_id: 'consumer_id'
|
||||
} as const
|
||||
|
||||
export type BusinessActivityScalarFieldEnum = (typeof BusinessActivityScalarFieldEnum)[keyof typeof BusinessActivityScalarFieldEnum]
|
||||
|
||||
|
||||
export const ComplexScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
branch_code: 'branch_code',
|
||||
address: 'address',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type ComplexScalarFieldEnum = (typeof ComplexScalarFieldEnum)[keyof typeof ComplexScalarFieldEnum]
|
||||
|
||||
|
||||
export const PosScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
model: 'model',
|
||||
serial_number: 'serial_number',
|
||||
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',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type PosScalarFieldEnum = (typeof PosScalarFieldEnum)[keyof typeof PosScalarFieldEnum]
|
||||
|
||||
|
||||
export const DeviceBrandScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -353,7 +288,8 @@ export const PartnerScalarFieldEnum = {
|
||||
status: 'status',
|
||||
logo_url: 'logo_url',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
updated_at: 'updated_at',
|
||||
tsp_provider: 'tsp_provider'
|
||||
} as const
|
||||
|
||||
export type PartnerScalarFieldEnum = (typeof PartnerScalarFieldEnum)[keyof typeof PartnerScalarFieldEnum]
|
||||
@@ -460,60 +396,106 @@ export const ApplicationReleasedInfoScalarFieldEnum = {
|
||||
export type ApplicationReleasedInfoScalarFieldEnum = (typeof ApplicationReleasedInfoScalarFieldEnum)[keyof typeof ApplicationReleasedInfoScalarFieldEnum]
|
||||
|
||||
|
||||
export const TriggerLogScalarFieldEnum = {
|
||||
export const ConsumerAccountScalarFieldEnum = {
|
||||
id: 'id',
|
||||
message: 'message',
|
||||
createdAt: 'createdAt',
|
||||
name: 'name'
|
||||
} as const
|
||||
|
||||
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerScalarFieldEnum = {
|
||||
id: 'id',
|
||||
is_favorite: 'is_favorite',
|
||||
role: 'role',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
deleted_at: 'deleted_at',
|
||||
type: 'type',
|
||||
unknown_customer: 'unknown_customer'
|
||||
consumer_id: 'consumer_id',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum]
|
||||
export type ConsumerAccountScalarFieldEnum = (typeof ConsumerAccountScalarFieldEnum)[keyof typeof ConsumerAccountScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerIndividualScalarFieldEnum = {
|
||||
export const ConsumerScalarFieldEnum = {
|
||||
id: 'id',
|
||||
type: 'type',
|
||||
status: 'status',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
} as const
|
||||
|
||||
export type ConsumerScalarFieldEnum = (typeof ConsumerScalarFieldEnum)[keyof typeof ConsumerScalarFieldEnum]
|
||||
|
||||
|
||||
export const ConsumerIndividualScalarFieldEnum = {
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
national_id: 'national_id',
|
||||
postal_code: 'postal_code',
|
||||
economic_code: 'economic_code',
|
||||
customer_id: 'customer_id',
|
||||
complex_id: 'complex_id'
|
||||
mobile_number: 'mobile_number',
|
||||
national_code: 'national_code',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
partner_id: 'partner_id',
|
||||
consumer_id: 'consumer_id'
|
||||
} as const
|
||||
|
||||
export type CustomerIndividualScalarFieldEnum = (typeof CustomerIndividualScalarFieldEnum)[keyof typeof CustomerIndividualScalarFieldEnum]
|
||||
export type ConsumerIndividualScalarFieldEnum = (typeof ConsumerIndividualScalarFieldEnum)[keyof typeof ConsumerIndividualScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerLegalScalarFieldEnum = {
|
||||
company_name: 'company_name',
|
||||
economic_code: 'economic_code',
|
||||
registration_number: 'registration_number',
|
||||
postal_code: 'postal_code',
|
||||
customer_id: 'customer_id',
|
||||
complex_id: 'complex_id'
|
||||
export const ConsumerLegalScalarFieldEnum = {
|
||||
name: 'name',
|
||||
registration_code: 'registration_code',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
partner_id: 'partner_id',
|
||||
consumer_id: 'consumer_id'
|
||||
} as const
|
||||
|
||||
export type CustomerLegalScalarFieldEnum = (typeof CustomerLegalScalarFieldEnum)[keyof typeof CustomerLegalScalarFieldEnum]
|
||||
export type ConsumerLegalScalarFieldEnum = (typeof ConsumerLegalScalarFieldEnum)[keyof typeof ConsumerLegalScalarFieldEnum]
|
||||
|
||||
|
||||
export const BusinessActivityScalarFieldEnum = {
|
||||
id: 'id',
|
||||
economic_code: 'economic_code',
|
||||
name: 'name',
|
||||
fiscal_id: 'fiscal_id',
|
||||
partner_token: 'partner_token',
|
||||
invoice_number_sequence: 'invoice_number_sequence',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
guild_id: 'guild_id',
|
||||
consumer_id: 'consumer_id'
|
||||
} as const
|
||||
|
||||
export type BusinessActivityScalarFieldEnum = (typeof BusinessActivityScalarFieldEnum)[keyof typeof BusinessActivityScalarFieldEnum]
|
||||
|
||||
|
||||
export const ComplexScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
branch_code: 'branch_code',
|
||||
address: 'address',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type ComplexScalarFieldEnum = (typeof ComplexScalarFieldEnum)[keyof typeof ComplexScalarFieldEnum]
|
||||
|
||||
|
||||
export const PosScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
model: 'model',
|
||||
serial_number: 'serial_number',
|
||||
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',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type PosScalarFieldEnum = (typeof PosScalarFieldEnum)[keyof typeof PosScalarFieldEnum]
|
||||
|
||||
|
||||
export const GoodScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
is_default_guild_good: 'is_default_guild_good',
|
||||
sku: 'sku',
|
||||
unit_type: 'unit_type',
|
||||
pricing_model: 'pricing_model',
|
||||
description: 'description',
|
||||
local_sku: 'local_sku',
|
||||
@@ -523,8 +505,10 @@ export const GoodScalarFieldEnum = {
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
deleted_at: 'deleted_at',
|
||||
complex_id: 'complex_id',
|
||||
category_id: 'category_id'
|
||||
sku_id: 'sku_id',
|
||||
measure_unit_id: 'measure_unit_id',
|
||||
category_id: 'category_id',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type GoodScalarFieldEnum = (typeof GoodScalarFieldEnum)[keyof typeof GoodScalarFieldEnum]
|
||||
@@ -549,6 +533,7 @@ export type GoodCategoryScalarFieldEnum = (typeof GoodCategoryScalarFieldEnum)[k
|
||||
export const GuildScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
invoice_template: 'invoice_template',
|
||||
code: 'code',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
@@ -557,17 +542,96 @@ export const GuildScalarFieldEnum = {
|
||||
export type GuildScalarFieldEnum = (typeof GuildScalarFieldEnum)[keyof typeof GuildScalarFieldEnum]
|
||||
|
||||
|
||||
export const MeasureUnitsScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
name: 'name',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
} as const
|
||||
|
||||
export type MeasureUnitsScalarFieldEnum = (typeof MeasureUnitsScalarFieldEnum)[keyof typeof MeasureUnitsScalarFieldEnum]
|
||||
|
||||
|
||||
export const StockKeepingUnitsScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
name: 'name',
|
||||
VAT: 'VAT',
|
||||
is_public: 'is_public',
|
||||
is_domestic: 'is_domestic',
|
||||
guild_id: 'guild_id',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at'
|
||||
} as const
|
||||
|
||||
export type StockKeepingUnitsScalarFieldEnum = (typeof StockKeepingUnitsScalarFieldEnum)[keyof typeof StockKeepingUnitsScalarFieldEnum]
|
||||
|
||||
|
||||
export const TriggerLogScalarFieldEnum = {
|
||||
id: 'id',
|
||||
message: 'message',
|
||||
createdAt: 'createdAt',
|
||||
name: 'name'
|
||||
} as const
|
||||
|
||||
export type TriggerLogScalarFieldEnum = (typeof TriggerLogScalarFieldEnum)[keyof typeof TriggerLogScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerScalarFieldEnum = {
|
||||
id: 'id',
|
||||
is_favorite: 'is_favorite',
|
||||
type: 'type',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
deleted_at: 'deleted_at'
|
||||
} as const
|
||||
|
||||
export type CustomerScalarFieldEnum = (typeof CustomerScalarFieldEnum)[keyof typeof CustomerScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerIndividualScalarFieldEnum = {
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
national_id: 'national_id',
|
||||
mobile_number: 'mobile_number',
|
||||
postal_code: 'postal_code',
|
||||
economic_code: 'economic_code',
|
||||
customer_id: 'customer_id',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type CustomerIndividualScalarFieldEnum = (typeof CustomerIndividualScalarFieldEnum)[keyof typeof CustomerIndividualScalarFieldEnum]
|
||||
|
||||
|
||||
export const CustomerLegalScalarFieldEnum = {
|
||||
name: 'name',
|
||||
economic_code: 'economic_code',
|
||||
registration_number: 'registration_number',
|
||||
postal_code: 'postal_code',
|
||||
customer_id: 'customer_id',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type CustomerLegalScalarFieldEnum = (typeof CustomerLegalScalarFieldEnum)[keyof typeof CustomerLegalScalarFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
total_amount: 'total_amount',
|
||||
invoice_number: 'invoice_number',
|
||||
invoice_date: 'invoice_date',
|
||||
type: 'type',
|
||||
tax_id: 'tax_id',
|
||||
notes: 'notes',
|
||||
unknown_customer: 'unknown_customer',
|
||||
invoice_date: 'invoice_date',
|
||||
created_at: 'created_at',
|
||||
updated_at: 'updated_at',
|
||||
main_id: 'main_id',
|
||||
ref_id: 'ref_id',
|
||||
customer_id: 'customer_id',
|
||||
account_id: 'account_id',
|
||||
consumer_account_id: 'consumer_account_id',
|
||||
pos_id: 'pos_id'
|
||||
} as const
|
||||
|
||||
@@ -577,33 +641,69 @@ export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[k
|
||||
export const SalesInvoiceItemScalarFieldEnum = {
|
||||
id: 'id',
|
||||
quantity: 'quantity',
|
||||
unit_type: 'unit_type',
|
||||
measure_unit_text: 'measure_unit_text',
|
||||
measure_unit_code: 'measure_unit_code',
|
||||
sku_code: 'sku_code',
|
||||
sku_vat: 'sku_vat',
|
||||
unit_price: 'unit_price',
|
||||
total_amount: 'total_amount',
|
||||
created_at: 'created_at',
|
||||
discount: 'discount',
|
||||
notes: 'notes',
|
||||
payload: 'payload',
|
||||
good_snapshot: 'good_snapshot',
|
||||
invoice_id: 'invoice_id',
|
||||
good_id: 'good_id',
|
||||
service_id: 'service_id',
|
||||
payload: 'payload'
|
||||
service_id: 'service_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
||||
|
||||
|
||||
export const SaleInvoiceTspAttemptsScalarFieldEnum = {
|
||||
id: 'id',
|
||||
attempt_no: 'attempt_no',
|
||||
status: 'status',
|
||||
raw_request_payload: 'raw_request_payload',
|
||||
provider_request_payload: 'provider_request_payload',
|
||||
provider_response_payload: 'provider_response_payload',
|
||||
message: 'message',
|
||||
sent_at: 'sent_at',
|
||||
received_at: 'received_at',
|
||||
created_at: 'created_at',
|
||||
invoice_id: 'invoice_id'
|
||||
} as const
|
||||
|
||||
export type SaleInvoiceTspAttemptsScalarFieldEnum = (typeof SaleInvoiceTspAttemptsScalarFieldEnum)[keyof typeof SaleInvoiceTspAttemptsScalarFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoicePaymentScalarFieldEnum = {
|
||||
id: 'id',
|
||||
invoice_id: 'invoice_id',
|
||||
amount: 'amount',
|
||||
payment_method: 'payment_method',
|
||||
paid_at: 'paid_at',
|
||||
created_at: 'created_at'
|
||||
created_at: 'created_at',
|
||||
invoice_id: 'invoice_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoicePaymentScalarFieldEnum = (typeof SalesInvoicePaymentScalarFieldEnum)[keyof typeof SalesInvoicePaymentScalarFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoicePaymentTerminalInfoScalarFieldEnum = {
|
||||
id: 'id',
|
||||
terminal_id: 'terminal_id',
|
||||
stan: 'stan',
|
||||
rrn: 'rrn',
|
||||
transaction_date_time: 'transaction_date_time',
|
||||
customer_card_no: 'customer_card_no',
|
||||
description: 'description',
|
||||
created_at: 'created_at',
|
||||
payment_id: 'payment_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoicePaymentTerminalInfoScalarFieldEnum = (typeof SalesInvoicePaymentTerminalInfoScalarFieldEnum)[keyof typeof SalesInvoicePaymentTerminalInfoScalarFieldEnum]
|
||||
|
||||
|
||||
export const ServiceScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -654,6 +754,13 @@ export const NullableJsonNullValueInput = {
|
||||
export type NullableJsonNullValueInput = (typeof NullableJsonNullValueInput)[keyof typeof NullableJsonNullValueInput]
|
||||
|
||||
|
||||
export const JsonNullValueInput = {
|
||||
JsonNull: JsonNull
|
||||
} as const
|
||||
|
||||
export type JsonNullValueInput = (typeof JsonNullValueInput)[keyof typeof JsonNullValueInput]
|
||||
|
||||
|
||||
export const AdminAccountOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
admin_id: 'admin_id',
|
||||
@@ -691,63 +798,6 @@ export const AccountOrderByRelevanceFieldEnum = {
|
||||
export type AccountOrderByRelevanceFieldEnum = (typeof AccountOrderByRelevanceFieldEnum)[keyof typeof AccountOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ConsumerAccountOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
consumer_id: 'consumer_id',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type ConsumerAccountOrderByRelevanceFieldEnum = (typeof ConsumerAccountOrderByRelevanceFieldEnum)[keyof typeof ConsumerAccountOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ConsumerOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
mobile_number: 'mobile_number',
|
||||
national_code: 'national_code',
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
partner_id: 'partner_id'
|
||||
} as const
|
||||
|
||||
export type ConsumerOrderByRelevanceFieldEnum = (typeof ConsumerOrderByRelevanceFieldEnum)[keyof typeof ConsumerOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const BusinessActivityOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
economic_code: 'economic_code',
|
||||
name: 'name',
|
||||
guild_id: 'guild_id',
|
||||
consumer_id: 'consumer_id'
|
||||
} as const
|
||||
|
||||
export type BusinessActivityOrderByRelevanceFieldEnum = (typeof BusinessActivityOrderByRelevanceFieldEnum)[keyof typeof BusinessActivityOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ComplexOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
branch_code: 'branch_code',
|
||||
address: 'address',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type ComplexOrderByRelevanceFieldEnum = (typeof ComplexOrderByRelevanceFieldEnum)[keyof typeof ComplexOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const PosOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
model: 'model',
|
||||
serial_number: 'serial_number',
|
||||
complex_id: 'complex_id',
|
||||
device_id: 'device_id',
|
||||
provider_id: 'provider_id',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type PosOrderByRelevanceFieldEnum = (typeof PosOrderByRelevanceFieldEnum)[keyof typeof PosOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const DeviceBrandOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name'
|
||||
@@ -955,56 +1005,93 @@ export const ApplicationReleasedInfoOrderByRelevanceFieldEnum = {
|
||||
export type ApplicationReleasedInfoOrderByRelevanceFieldEnum = (typeof ApplicationReleasedInfoOrderByRelevanceFieldEnum)[keyof typeof ApplicationReleasedInfoOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const TriggerLogOrderByRelevanceFieldEnum = {
|
||||
message: 'message',
|
||||
name: 'name'
|
||||
export const ConsumerAccountOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
consumer_id: 'consumer_id',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
||||
export type ConsumerAccountOrderByRelevanceFieldEnum = (typeof ConsumerAccountOrderByRelevanceFieldEnum)[keyof typeof ConsumerAccountOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerOrderByRelevanceFieldEnum = {
|
||||
export const ConsumerOrderByRelevanceFieldEnum = {
|
||||
id: 'id'
|
||||
} as const
|
||||
|
||||
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
||||
export type ConsumerOrderByRelevanceFieldEnum = (typeof ConsumerOrderByRelevanceFieldEnum)[keyof typeof ConsumerOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerIndividualOrderByRelevanceFieldEnum = {
|
||||
export const ConsumerIndividualOrderByRelevanceFieldEnum = {
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
national_id: 'national_id',
|
||||
postal_code: 'postal_code',
|
||||
economic_code: 'economic_code',
|
||||
customer_id: 'customer_id',
|
||||
complex_id: 'complex_id'
|
||||
mobile_number: 'mobile_number',
|
||||
national_code: 'national_code',
|
||||
partner_id: 'partner_id',
|
||||
consumer_id: 'consumer_id'
|
||||
} as const
|
||||
|
||||
export type CustomerIndividualOrderByRelevanceFieldEnum = (typeof CustomerIndividualOrderByRelevanceFieldEnum)[keyof typeof CustomerIndividualOrderByRelevanceFieldEnum]
|
||||
export type ConsumerIndividualOrderByRelevanceFieldEnum = (typeof ConsumerIndividualOrderByRelevanceFieldEnum)[keyof typeof ConsumerIndividualOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerLegalOrderByRelevanceFieldEnum = {
|
||||
company_name: 'company_name',
|
||||
economic_code: 'economic_code',
|
||||
registration_number: 'registration_number',
|
||||
postal_code: 'postal_code',
|
||||
customer_id: 'customer_id',
|
||||
complex_id: 'complex_id'
|
||||
export const ConsumerLegalOrderByRelevanceFieldEnum = {
|
||||
name: 'name',
|
||||
registration_code: 'registration_code',
|
||||
partner_id: 'partner_id',
|
||||
consumer_id: 'consumer_id'
|
||||
} as const
|
||||
|
||||
export type CustomerLegalOrderByRelevanceFieldEnum = (typeof CustomerLegalOrderByRelevanceFieldEnum)[keyof typeof CustomerLegalOrderByRelevanceFieldEnum]
|
||||
export type ConsumerLegalOrderByRelevanceFieldEnum = (typeof ConsumerLegalOrderByRelevanceFieldEnum)[keyof typeof ConsumerLegalOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const BusinessActivityOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
economic_code: 'economic_code',
|
||||
name: 'name',
|
||||
fiscal_id: 'fiscal_id',
|
||||
partner_token: 'partner_token',
|
||||
guild_id: 'guild_id',
|
||||
consumer_id: 'consumer_id'
|
||||
} as const
|
||||
|
||||
export type BusinessActivityOrderByRelevanceFieldEnum = (typeof BusinessActivityOrderByRelevanceFieldEnum)[keyof typeof BusinessActivityOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ComplexOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
branch_code: 'branch_code',
|
||||
address: 'address',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type ComplexOrderByRelevanceFieldEnum = (typeof ComplexOrderByRelevanceFieldEnum)[keyof typeof ComplexOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const PosOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
model: 'model',
|
||||
serial_number: 'serial_number',
|
||||
complex_id: 'complex_id',
|
||||
device_id: 'device_id',
|
||||
provider_id: 'provider_id',
|
||||
account_id: 'account_id'
|
||||
} as const
|
||||
|
||||
export type PosOrderByRelevanceFieldEnum = (typeof PosOrderByRelevanceFieldEnum)[keyof typeof PosOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const GoodOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
sku: 'sku',
|
||||
description: 'description',
|
||||
local_sku: 'local_sku',
|
||||
barcode: 'barcode',
|
||||
image_url: 'image_url',
|
||||
complex_id: 'complex_id',
|
||||
category_id: 'category_id'
|
||||
sku_id: 'sku_id',
|
||||
measure_unit_id: 'measure_unit_id',
|
||||
category_id: 'category_id',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type GoodOrderByRelevanceFieldEnum = (typeof GoodOrderByRelevanceFieldEnum)[keyof typeof GoodOrderByRelevanceFieldEnum]
|
||||
@@ -1031,12 +1118,75 @@ export const GuildOrderByRelevanceFieldEnum = {
|
||||
export type GuildOrderByRelevanceFieldEnum = (typeof GuildOrderByRelevanceFieldEnum)[keyof typeof GuildOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const MeasureUnitsOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
name: 'name'
|
||||
} as const
|
||||
|
||||
export type MeasureUnitsOrderByRelevanceFieldEnum = (typeof MeasureUnitsOrderByRelevanceFieldEnum)[keyof typeof MeasureUnitsOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const StockKeepingUnitsOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
name: 'name',
|
||||
guild_id: 'guild_id'
|
||||
} as const
|
||||
|
||||
export type StockKeepingUnitsOrderByRelevanceFieldEnum = (typeof StockKeepingUnitsOrderByRelevanceFieldEnum)[keyof typeof StockKeepingUnitsOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const TriggerLogOrderByRelevanceFieldEnum = {
|
||||
message: 'message',
|
||||
name: 'name'
|
||||
} as const
|
||||
|
||||
export type TriggerLogOrderByRelevanceFieldEnum = (typeof TriggerLogOrderByRelevanceFieldEnum)[keyof typeof TriggerLogOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerOrderByRelevanceFieldEnum = {
|
||||
id: 'id'
|
||||
} as const
|
||||
|
||||
export type CustomerOrderByRelevanceFieldEnum = (typeof CustomerOrderByRelevanceFieldEnum)[keyof typeof CustomerOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerIndividualOrderByRelevanceFieldEnum = {
|
||||
first_name: 'first_name',
|
||||
last_name: 'last_name',
|
||||
national_id: 'national_id',
|
||||
mobile_number: 'mobile_number',
|
||||
postal_code: 'postal_code',
|
||||
economic_code: 'economic_code',
|
||||
customer_id: 'customer_id',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type CustomerIndividualOrderByRelevanceFieldEnum = (typeof CustomerIndividualOrderByRelevanceFieldEnum)[keyof typeof CustomerIndividualOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const CustomerLegalOrderByRelevanceFieldEnum = {
|
||||
name: 'name',
|
||||
economic_code: 'economic_code',
|
||||
registration_number: 'registration_number',
|
||||
postal_code: 'postal_code',
|
||||
customer_id: 'customer_id',
|
||||
business_activity_id: 'business_activity_id'
|
||||
} as const
|
||||
|
||||
export type CustomerLegalOrderByRelevanceFieldEnum = (typeof CustomerLegalOrderByRelevanceFieldEnum)[keyof typeof CustomerLegalOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoiceOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
code: 'code',
|
||||
tax_id: 'tax_id',
|
||||
notes: 'notes',
|
||||
main_id: 'main_id',
|
||||
ref_id: 'ref_id',
|
||||
customer_id: 'customer_id',
|
||||
account_id: 'account_id',
|
||||
consumer_account_id: 'consumer_account_id',
|
||||
pos_id: 'pos_id'
|
||||
} as const
|
||||
|
||||
@@ -1045,6 +1195,9 @@ export type SalesInvoiceOrderByRelevanceFieldEnum = (typeof SalesInvoiceOrderByR
|
||||
|
||||
export const SalesInvoiceItemOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
measure_unit_text: 'measure_unit_text',
|
||||
measure_unit_code: 'measure_unit_code',
|
||||
sku_code: 'sku_code',
|
||||
notes: 'notes',
|
||||
invoice_id: 'invoice_id',
|
||||
good_id: 'good_id',
|
||||
@@ -1054,6 +1207,15 @@ export const SalesInvoiceItemOrderByRelevanceFieldEnum = {
|
||||
export type SalesInvoiceItemOrderByRelevanceFieldEnum = (typeof SalesInvoiceItemOrderByRelevanceFieldEnum)[keyof typeof SalesInvoiceItemOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
message: 'message',
|
||||
invoice_id: 'invoice_id'
|
||||
} as const
|
||||
|
||||
export type SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = (typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum)[keyof typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoicePaymentOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
invoice_id: 'invoice_id'
|
||||
@@ -1062,6 +1224,19 @@ export const SalesInvoicePaymentOrderByRelevanceFieldEnum = {
|
||||
export type SalesInvoicePaymentOrderByRelevanceFieldEnum = (typeof SalesInvoicePaymentOrderByRelevanceFieldEnum)[keyof typeof SalesInvoicePaymentOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const SalesInvoicePaymentTerminalInfoOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
terminal_id: 'terminal_id',
|
||||
stan: 'stan',
|
||||
rrn: 'rrn',
|
||||
customer_card_no: 'customer_card_no',
|
||||
description: 'description',
|
||||
payment_id: 'payment_id'
|
||||
} as const
|
||||
|
||||
export type SalesInvoicePaymentTerminalInfoOrderByRelevanceFieldEnum = (typeof SalesInvoicePaymentTerminalInfoOrderByRelevanceFieldEnum)[keyof typeof SalesInvoicePaymentTerminalInfoOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ServiceOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
|
||||
@@ -11,11 +11,6 @@
|
||||
export type * from './models/AdminAccount.js'
|
||||
export type * from './models/Admin.js'
|
||||
export type * from './models/Account.js'
|
||||
export type * from './models/ConsumerAccount.js'
|
||||
export type * from './models/Consumer.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/LicenseChargeTransaction.js'
|
||||
@@ -36,16 +31,27 @@ export type * from './models/ProviderAccount.js'
|
||||
export type * from './models/Provider.js'
|
||||
export type * from './models/ConsumerDevices.js'
|
||||
export type * from './models/ApplicationReleasedInfo.js'
|
||||
export type * from './models/ConsumerAccount.js'
|
||||
export type * from './models/Consumer.js'
|
||||
export type * from './models/ConsumerIndividual.js'
|
||||
export type * from './models/ConsumerLegal.js'
|
||||
export type * from './models/BusinessActivity.js'
|
||||
export type * from './models/Complex.js'
|
||||
export type * from './models/Pos.js'
|
||||
export type * from './models/Good.js'
|
||||
export type * from './models/GoodCategory.js'
|
||||
export type * from './models/Guild.js'
|
||||
export type * from './models/MeasureUnits.js'
|
||||
export type * from './models/StockKeepingUnits.js'
|
||||
export type * from './models/TriggerLog.js'
|
||||
export type * from './models/Customer.js'
|
||||
export type * from './models/CustomerIndividual.js'
|
||||
export type * from './models/CustomerLegal.js'
|
||||
export type * from './models/Good.js'
|
||||
export type * from './models/GoodCategory.js'
|
||||
export type * from './models/Guild.js'
|
||||
export type * from './models/SalesInvoice.js'
|
||||
export type * from './models/SalesInvoiceItem.js'
|
||||
export type * from './models/SaleInvoiceTspAttempts.js'
|
||||
export type * from './models/SalesInvoicePayment.js'
|
||||
export type * from './models/SalesInvoicePaymentTerminalInfo.js'
|
||||
export type * from './models/Service.js'
|
||||
export type * from './models/ServiceCategory.js'
|
||||
export type * from './commonInputTypes.js'
|
||||
@@ -183,9 +183,9 @@ export type AccountWhereInput = {
|
||||
status?: Prisma.EnumAccountStatusFilter<"Account"> | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFilter<"Account"> | $Enums.AccountType
|
||||
admin_account?: Prisma.XOR<Prisma.AdminAccountNullableScalarRelationFilter, Prisma.AdminAccountWhereInput> | null
|
||||
provider_account?: Prisma.XOR<Prisma.ProviderAccountNullableScalarRelationFilter, Prisma.ProviderAccountWhereInput> | null
|
||||
partner_account?: Prisma.XOR<Prisma.PartnerAccountNullableScalarRelationFilter, Prisma.PartnerAccountWhereInput> | null
|
||||
consumer_account?: Prisma.XOR<Prisma.ConsumerAccountNullableScalarRelationFilter, Prisma.ConsumerAccountWhereInput> | null
|
||||
partner_account?: Prisma.XOR<Prisma.PartnerAccountNullableScalarRelationFilter, Prisma.PartnerAccountWhereInput> | null
|
||||
provider_account?: Prisma.XOR<Prisma.ProviderAccountNullableScalarRelationFilter, Prisma.ProviderAccountWhereInput> | null
|
||||
}
|
||||
|
||||
export type AccountOrderByWithRelationInput = {
|
||||
@@ -195,9 +195,9 @@ export type AccountOrderByWithRelationInput = {
|
||||
status?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
admin_account?: Prisma.AdminAccountOrderByWithRelationInput
|
||||
provider_account?: Prisma.ProviderAccountOrderByWithRelationInput
|
||||
partner_account?: Prisma.PartnerAccountOrderByWithRelationInput
|
||||
consumer_account?: Prisma.ConsumerAccountOrderByWithRelationInput
|
||||
partner_account?: Prisma.PartnerAccountOrderByWithRelationInput
|
||||
provider_account?: Prisma.ProviderAccountOrderByWithRelationInput
|
||||
_relevance?: Prisma.AccountOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -211,9 +211,9 @@ export type AccountWhereUniqueInput = Prisma.AtLeast<{
|
||||
status?: Prisma.EnumAccountStatusFilter<"Account"> | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFilter<"Account"> | $Enums.AccountType
|
||||
admin_account?: Prisma.XOR<Prisma.AdminAccountNullableScalarRelationFilter, Prisma.AdminAccountWhereInput> | null
|
||||
provider_account?: Prisma.XOR<Prisma.ProviderAccountNullableScalarRelationFilter, Prisma.ProviderAccountWhereInput> | null
|
||||
partner_account?: Prisma.XOR<Prisma.PartnerAccountNullableScalarRelationFilter, Prisma.PartnerAccountWhereInput> | null
|
||||
consumer_account?: Prisma.XOR<Prisma.ConsumerAccountNullableScalarRelationFilter, Prisma.ConsumerAccountWhereInput> | null
|
||||
partner_account?: Prisma.XOR<Prisma.PartnerAccountNullableScalarRelationFilter, Prisma.PartnerAccountWhereInput> | null
|
||||
provider_account?: Prisma.XOR<Prisma.ProviderAccountNullableScalarRelationFilter, Prisma.ProviderAccountWhereInput> | null
|
||||
}, "id" | "username">
|
||||
|
||||
export type AccountOrderByWithAggregationInput = {
|
||||
@@ -245,9 +245,9 @@ export type AccountCreateInput = {
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountCreateNestedOneWithoutAccountInput
|
||||
consumer_account?: Prisma.ConsumerAccountCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedCreateInput = {
|
||||
@@ -257,9 +257,9 @@ export type AccountUncheckedCreateInput = {
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
consumer_account?: Prisma.ConsumerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountUpdateInput = {
|
||||
@@ -269,9 +269,9 @@ export type AccountUpdateInput = {
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUpdateOneWithoutAccountNestedInput
|
||||
consumer_account?: Prisma.ConsumerAccountUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedUpdateInput = {
|
||||
@@ -281,9 +281,9 @@ export type AccountUncheckedUpdateInput = {
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
consumer_account?: Prisma.ConsumerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountCreateManyInput = {
|
||||
@@ -367,20 +367,6 @@ export type EnumAccountTypeFieldUpdateOperationsInput = {
|
||||
set?: $Enums.AccountType
|
||||
}
|
||||
|
||||
export type AccountCreateNestedOneWithoutConsumer_accountInput = {
|
||||
create?: Prisma.XOR<Prisma.AccountCreateWithoutConsumer_accountInput, Prisma.AccountUncheckedCreateWithoutConsumer_accountInput>
|
||||
connectOrCreate?: Prisma.AccountCreateOrConnectWithoutConsumer_accountInput
|
||||
connect?: Prisma.AccountWhereUniqueInput
|
||||
}
|
||||
|
||||
export type AccountUpdateOneRequiredWithoutConsumer_accountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AccountCreateWithoutConsumer_accountInput, Prisma.AccountUncheckedCreateWithoutConsumer_accountInput>
|
||||
connectOrCreate?: Prisma.AccountCreateOrConnectWithoutConsumer_accountInput
|
||||
upsert?: Prisma.AccountUpsertWithoutConsumer_accountInput
|
||||
connect?: Prisma.AccountWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AccountUpdateToOneWithWhereWithoutConsumer_accountInput, Prisma.AccountUpdateWithoutConsumer_accountInput>, Prisma.AccountUncheckedUpdateWithoutConsumer_accountInput>
|
||||
}
|
||||
|
||||
export type AccountCreateNestedOneWithoutPartner_accountInput = {
|
||||
create?: Prisma.XOR<Prisma.AccountCreateWithoutPartner_accountInput, Prisma.AccountUncheckedCreateWithoutPartner_accountInput>
|
||||
connectOrCreate?: Prisma.AccountCreateOrConnectWithoutPartner_accountInput
|
||||
@@ -409,15 +395,29 @@ export type AccountUpdateOneRequiredWithoutProvider_accountNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AccountUpdateToOneWithWhereWithoutProvider_accountInput, Prisma.AccountUpdateWithoutProvider_accountInput>, Prisma.AccountUncheckedUpdateWithoutProvider_accountInput>
|
||||
}
|
||||
|
||||
export type AccountCreateNestedOneWithoutConsumer_accountInput = {
|
||||
create?: Prisma.XOR<Prisma.AccountCreateWithoutConsumer_accountInput, Prisma.AccountUncheckedCreateWithoutConsumer_accountInput>
|
||||
connectOrCreate?: Prisma.AccountCreateOrConnectWithoutConsumer_accountInput
|
||||
connect?: Prisma.AccountWhereUniqueInput
|
||||
}
|
||||
|
||||
export type AccountUpdateOneRequiredWithoutConsumer_accountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AccountCreateWithoutConsumer_accountInput, Prisma.AccountUncheckedCreateWithoutConsumer_accountInput>
|
||||
connectOrCreate?: Prisma.AccountCreateOrConnectWithoutConsumer_accountInput
|
||||
upsert?: Prisma.AccountUpsertWithoutConsumer_accountInput
|
||||
connect?: Prisma.AccountWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AccountUpdateToOneWithWhereWithoutConsumer_accountInput, Prisma.AccountUpdateWithoutConsumer_accountInput>, Prisma.AccountUncheckedUpdateWithoutConsumer_accountInput>
|
||||
}
|
||||
|
||||
export type AccountCreateWithoutAdmin_accountInput = {
|
||||
id?: string
|
||||
username: string
|
||||
password: string
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
provider_account?: Prisma.ProviderAccountCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountCreateNestedOneWithoutAccountInput
|
||||
consumer_account?: Prisma.ConsumerAccountCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedCreateWithoutAdmin_accountInput = {
|
||||
@@ -426,9 +426,9 @@ export type AccountUncheckedCreateWithoutAdmin_accountInput = {
|
||||
password: string
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
provider_account?: Prisma.ProviderAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
consumer_account?: Prisma.ConsumerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountCreateOrConnectWithoutAdmin_accountInput = {
|
||||
@@ -453,9 +453,9 @@ export type AccountUpdateWithoutAdmin_accountInput = {
|
||||
password?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
provider_account?: Prisma.ProviderAccountUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUpdateOneWithoutAccountNestedInput
|
||||
consumer_account?: Prisma.ConsumerAccountUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedUpdateWithoutAdmin_accountInput = {
|
||||
@@ -464,69 +464,9 @@ export type AccountUncheckedUpdateWithoutAdmin_accountInput = {
|
||||
password?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
provider_account?: Prisma.ProviderAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
consumer_account?: Prisma.ConsumerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountCreateWithoutConsumer_accountInput = {
|
||||
id?: string
|
||||
username: string
|
||||
password: string
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedCreateWithoutConsumer_accountInput = {
|
||||
id?: string
|
||||
username: string
|
||||
password: string
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountCreateOrConnectWithoutConsumer_accountInput = {
|
||||
where: Prisma.AccountWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.AccountCreateWithoutConsumer_accountInput, Prisma.AccountUncheckedCreateWithoutConsumer_accountInput>
|
||||
}
|
||||
|
||||
export type AccountUpsertWithoutConsumer_accountInput = {
|
||||
update: Prisma.XOR<Prisma.AccountUpdateWithoutConsumer_accountInput, Prisma.AccountUncheckedUpdateWithoutConsumer_accountInput>
|
||||
create: Prisma.XOR<Prisma.AccountCreateWithoutConsumer_accountInput, Prisma.AccountUncheckedCreateWithoutConsumer_accountInput>
|
||||
where?: Prisma.AccountWhereInput
|
||||
}
|
||||
|
||||
export type AccountUpdateToOneWithWhereWithoutConsumer_accountInput = {
|
||||
where?: Prisma.AccountWhereInput
|
||||
data: Prisma.XOR<Prisma.AccountUpdateWithoutConsumer_accountInput, Prisma.AccountUncheckedUpdateWithoutConsumer_accountInput>
|
||||
}
|
||||
|
||||
export type AccountUpdateWithoutConsumer_accountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
username?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
password?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedUpdateWithoutConsumer_accountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
username?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
password?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountCreateWithoutPartner_accountInput = {
|
||||
@@ -536,8 +476,8 @@ export type AccountCreateWithoutPartner_accountInput = {
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountCreateNestedOneWithoutAccountInput
|
||||
consumer_account?: Prisma.ConsumerAccountCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedCreateWithoutPartner_accountInput = {
|
||||
@@ -547,8 +487,8 @@ export type AccountUncheckedCreateWithoutPartner_accountInput = {
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
consumer_account?: Prisma.ConsumerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountCreateOrConnectWithoutPartner_accountInput = {
|
||||
@@ -574,8 +514,8 @@ export type AccountUpdateWithoutPartner_accountInput = {
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUpdateOneWithoutAccountNestedInput
|
||||
consumer_account?: Prisma.ConsumerAccountUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedUpdateWithoutPartner_accountInput = {
|
||||
@@ -585,8 +525,8 @@ export type AccountUncheckedUpdateWithoutPartner_accountInput = {
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
consumer_account?: Prisma.ConsumerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountCreateWithoutProvider_accountInput = {
|
||||
@@ -596,8 +536,8 @@ export type AccountCreateWithoutProvider_accountInput = {
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountCreateNestedOneWithoutAccountInput
|
||||
consumer_account?: Prisma.ConsumerAccountCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedCreateWithoutProvider_accountInput = {
|
||||
@@ -607,8 +547,8 @@ export type AccountUncheckedCreateWithoutProvider_accountInput = {
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
consumer_account?: Prisma.ConsumerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountCreateOrConnectWithoutProvider_accountInput = {
|
||||
@@ -634,8 +574,8 @@ export type AccountUpdateWithoutProvider_accountInput = {
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUpdateOneWithoutAccountNestedInput
|
||||
consumer_account?: Prisma.ConsumerAccountUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedUpdateWithoutProvider_accountInput = {
|
||||
@@ -645,8 +585,68 @@ export type AccountUncheckedUpdateWithoutProvider_accountInput = {
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
consumer_account?: Prisma.ConsumerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountCreateWithoutConsumer_accountInput = {
|
||||
id?: string
|
||||
username: string
|
||||
password: string
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedCreateWithoutConsumer_accountInput = {
|
||||
id?: string
|
||||
username: string
|
||||
password: string
|
||||
status: $Enums.AccountStatus
|
||||
type: $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type AccountCreateOrConnectWithoutConsumer_accountInput = {
|
||||
where: Prisma.AccountWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.AccountCreateWithoutConsumer_accountInput, Prisma.AccountUncheckedCreateWithoutConsumer_accountInput>
|
||||
}
|
||||
|
||||
export type AccountUpsertWithoutConsumer_accountInput = {
|
||||
update: Prisma.XOR<Prisma.AccountUpdateWithoutConsumer_accountInput, Prisma.AccountUncheckedUpdateWithoutConsumer_accountInput>
|
||||
create: Prisma.XOR<Prisma.AccountCreateWithoutConsumer_accountInput, Prisma.AccountUncheckedCreateWithoutConsumer_accountInput>
|
||||
where?: Prisma.AccountWhereInput
|
||||
}
|
||||
|
||||
export type AccountUpdateToOneWithWhereWithoutConsumer_accountInput = {
|
||||
where?: Prisma.AccountWhereInput
|
||||
data: Prisma.XOR<Prisma.AccountUpdateWithoutConsumer_accountInput, Prisma.AccountUncheckedUpdateWithoutConsumer_accountInput>
|
||||
}
|
||||
|
||||
export type AccountUpdateWithoutConsumer_accountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
username?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
password?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type AccountUncheckedUpdateWithoutConsumer_accountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
username?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
password?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
status?: Prisma.EnumAccountStatusFieldUpdateOperationsInput | $Enums.AccountStatus
|
||||
type?: Prisma.EnumAccountTypeFieldUpdateOperationsInput | $Enums.AccountType
|
||||
admin_account?: Prisma.AdminAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
partner_account?: Prisma.PartnerAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
provider_account?: Prisma.ProviderAccountUncheckedUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
|
||||
@@ -658,9 +658,9 @@ export type AccountSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
status?: boolean
|
||||
type?: boolean
|
||||
admin_account?: boolean | Prisma.Account$admin_accountArgs<ExtArgs>
|
||||
provider_account?: boolean | Prisma.Account$provider_accountArgs<ExtArgs>
|
||||
partner_account?: boolean | Prisma.Account$partner_accountArgs<ExtArgs>
|
||||
consumer_account?: boolean | Prisma.Account$consumer_accountArgs<ExtArgs>
|
||||
partner_account?: boolean | Prisma.Account$partner_accountArgs<ExtArgs>
|
||||
provider_account?: boolean | Prisma.Account$provider_accountArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["account"]>
|
||||
|
||||
|
||||
@@ -676,18 +676,18 @@ export type AccountSelectScalar = {
|
||||
export type AccountOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "username" | "password" | "status" | "type", ExtArgs["result"]["account"]>
|
||||
export type AccountInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
admin_account?: boolean | Prisma.Account$admin_accountArgs<ExtArgs>
|
||||
provider_account?: boolean | Prisma.Account$provider_accountArgs<ExtArgs>
|
||||
partner_account?: boolean | Prisma.Account$partner_accountArgs<ExtArgs>
|
||||
consumer_account?: boolean | Prisma.Account$consumer_accountArgs<ExtArgs>
|
||||
partner_account?: boolean | Prisma.Account$partner_accountArgs<ExtArgs>
|
||||
provider_account?: boolean | Prisma.Account$provider_accountArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $AccountPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "Account"
|
||||
objects: {
|
||||
admin_account: Prisma.$AdminAccountPayload<ExtArgs> | null
|
||||
provider_account: Prisma.$ProviderAccountPayload<ExtArgs> | null
|
||||
partner_account: Prisma.$PartnerAccountPayload<ExtArgs> | null
|
||||
consumer_account: Prisma.$ConsumerAccountPayload<ExtArgs> | null
|
||||
partner_account: Prisma.$PartnerAccountPayload<ExtArgs> | null
|
||||
provider_account: Prisma.$ProviderAccountPayload<ExtArgs> | null
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1036,9 +1036,9 @@ readonly fields: AccountFieldRefs;
|
||||
export interface Prisma__AccountClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
admin_account<T extends Prisma.Account$admin_accountArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Account$admin_accountArgs<ExtArgs>>): Prisma.Prisma__AdminAccountClient<runtime.Types.Result.GetResult<Prisma.$AdminAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
provider_account<T extends Prisma.Account$provider_accountArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Account$provider_accountArgs<ExtArgs>>): Prisma.Prisma__ProviderAccountClient<runtime.Types.Result.GetResult<Prisma.$ProviderAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
partner_account<T extends Prisma.Account$partner_accountArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Account$partner_accountArgs<ExtArgs>>): Prisma.Prisma__PartnerAccountClient<runtime.Types.Result.GetResult<Prisma.$PartnerAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
consumer_account<T extends Prisma.Account$consumer_accountArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Account$consumer_accountArgs<ExtArgs>>): Prisma.Prisma__ConsumerAccountClient<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
partner_account<T extends Prisma.Account$partner_accountArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Account$partner_accountArgs<ExtArgs>>): Prisma.Prisma__PartnerAccountClient<runtime.Types.Result.GetResult<Prisma.$PartnerAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
provider_account<T extends Prisma.Account$provider_accountArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Account$provider_accountArgs<ExtArgs>>): Prisma.Prisma__ProviderAccountClient<runtime.Types.Result.GetResult<Prisma.$ProviderAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1440,22 +1440,22 @@ export type Account$admin_accountArgs<ExtArgs extends runtime.Types.Extensions.I
|
||||
}
|
||||
|
||||
/**
|
||||
* Account.provider_account
|
||||
* Account.consumer_account
|
||||
*/
|
||||
export type Account$provider_accountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type Account$consumer_accountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the ProviderAccount
|
||||
* Select specific fields to fetch from the ConsumerAccount
|
||||
*/
|
||||
select?: Prisma.ProviderAccountSelect<ExtArgs> | null
|
||||
select?: Prisma.ConsumerAccountSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the ProviderAccount
|
||||
* Omit specific fields from the ConsumerAccount
|
||||
*/
|
||||
omit?: Prisma.ProviderAccountOmit<ExtArgs> | null
|
||||
omit?: Prisma.ConsumerAccountOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ProviderAccountInclude<ExtArgs> | null
|
||||
where?: Prisma.ProviderAccountWhereInput
|
||||
include?: Prisma.ConsumerAccountInclude<ExtArgs> | null
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1478,22 +1478,22 @@ export type Account$partner_accountArgs<ExtArgs extends runtime.Types.Extensions
|
||||
}
|
||||
|
||||
/**
|
||||
* Account.consumer_account
|
||||
* Account.provider_account
|
||||
*/
|
||||
export type Account$consumer_accountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type Account$provider_accountArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the ConsumerAccount
|
||||
* Select specific fields to fetch from the ProviderAccount
|
||||
*/
|
||||
select?: Prisma.ConsumerAccountSelect<ExtArgs> | null
|
||||
select?: Prisma.ProviderAccountSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the ConsumerAccount
|
||||
* Omit specific fields from the ProviderAccount
|
||||
*/
|
||||
omit?: Prisma.ConsumerAccountOmit<ExtArgs> | null
|
||||
omit?: Prisma.ProviderAccountOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ConsumerAccountInclude<ExtArgs> | null
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
include?: Prisma.ProviderAccountInclude<ExtArgs> | null
|
||||
where?: Prisma.ProviderAccountWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -198,7 +198,7 @@ export type AdminWhereInput = {
|
||||
last_name?: Prisma.StringFilter<"Admin"> | string
|
||||
created_at?: Prisma.DateTimeFilter<"Admin"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Admin"> | Date | string
|
||||
adminAccounts?: Prisma.AdminAccountListRelationFilter
|
||||
accounts?: Prisma.AdminAccountListRelationFilter
|
||||
}
|
||||
|
||||
export type AdminOrderByWithRelationInput = {
|
||||
@@ -209,7 +209,7 @@ export type AdminOrderByWithRelationInput = {
|
||||
last_name?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
adminAccounts?: Prisma.AdminAccountOrderByRelationAggregateInput
|
||||
accounts?: Prisma.AdminAccountOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.AdminOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -224,7 +224,7 @@ export type AdminWhereUniqueInput = Prisma.AtLeast<{
|
||||
last_name?: Prisma.StringFilter<"Admin"> | string
|
||||
created_at?: Prisma.DateTimeFilter<"Admin"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Admin"> | Date | string
|
||||
adminAccounts?: Prisma.AdminAccountListRelationFilter
|
||||
accounts?: Prisma.AdminAccountListRelationFilter
|
||||
}, "id" | "mobile_number" | "national_code">
|
||||
|
||||
export type AdminOrderByWithAggregationInput = {
|
||||
@@ -261,7 +261,7 @@ export type AdminCreateInput = {
|
||||
last_name: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
adminAccounts?: Prisma.AdminAccountCreateNestedManyWithoutAdminInput
|
||||
accounts?: Prisma.AdminAccountCreateNestedManyWithoutAdminInput
|
||||
}
|
||||
|
||||
export type AdminUncheckedCreateInput = {
|
||||
@@ -272,7 +272,7 @@ export type AdminUncheckedCreateInput = {
|
||||
last_name: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
adminAccounts?: Prisma.AdminAccountUncheckedCreateNestedManyWithoutAdminInput
|
||||
accounts?: Prisma.AdminAccountUncheckedCreateNestedManyWithoutAdminInput
|
||||
}
|
||||
|
||||
export type AdminUpdateInput = {
|
||||
@@ -283,7 +283,7 @@ export type AdminUpdateInput = {
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
adminAccounts?: Prisma.AdminAccountUpdateManyWithoutAdminNestedInput
|
||||
accounts?: Prisma.AdminAccountUpdateManyWithoutAdminNestedInput
|
||||
}
|
||||
|
||||
export type AdminUncheckedUpdateInput = {
|
||||
@@ -294,7 +294,7 @@ export type AdminUncheckedUpdateInput = {
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
adminAccounts?: Prisma.AdminAccountUncheckedUpdateManyWithoutAdminNestedInput
|
||||
accounts?: Prisma.AdminAccountUncheckedUpdateManyWithoutAdminNestedInput
|
||||
}
|
||||
|
||||
export type AdminCreateManyInput = {
|
||||
@@ -368,25 +368,25 @@ export type AdminMinOrderByAggregateInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type AdminCreateNestedOneWithoutAdminAccountsInput = {
|
||||
create?: Prisma.XOR<Prisma.AdminCreateWithoutAdminAccountsInput, Prisma.AdminUncheckedCreateWithoutAdminAccountsInput>
|
||||
connectOrCreate?: Prisma.AdminCreateOrConnectWithoutAdminAccountsInput
|
||||
export type AdminCreateNestedOneWithoutAccountsInput = {
|
||||
create?: Prisma.XOR<Prisma.AdminCreateWithoutAccountsInput, Prisma.AdminUncheckedCreateWithoutAccountsInput>
|
||||
connectOrCreate?: Prisma.AdminCreateOrConnectWithoutAccountsInput
|
||||
connect?: Prisma.AdminWhereUniqueInput
|
||||
}
|
||||
|
||||
export type AdminUpdateOneRequiredWithoutAdminAccountsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AdminCreateWithoutAdminAccountsInput, Prisma.AdminUncheckedCreateWithoutAdminAccountsInput>
|
||||
connectOrCreate?: Prisma.AdminCreateOrConnectWithoutAdminAccountsInput
|
||||
upsert?: Prisma.AdminUpsertWithoutAdminAccountsInput
|
||||
export type AdminUpdateOneRequiredWithoutAccountsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.AdminCreateWithoutAccountsInput, Prisma.AdminUncheckedCreateWithoutAccountsInput>
|
||||
connectOrCreate?: Prisma.AdminCreateOrConnectWithoutAccountsInput
|
||||
upsert?: Prisma.AdminUpsertWithoutAccountsInput
|
||||
connect?: Prisma.AdminWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AdminUpdateToOneWithWhereWithoutAdminAccountsInput, Prisma.AdminUpdateWithoutAdminAccountsInput>, Prisma.AdminUncheckedUpdateWithoutAdminAccountsInput>
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.AdminUpdateToOneWithWhereWithoutAccountsInput, Prisma.AdminUpdateWithoutAccountsInput>, Prisma.AdminUncheckedUpdateWithoutAccountsInput>
|
||||
}
|
||||
|
||||
export type NullableStringFieldUpdateOperationsInput = {
|
||||
set?: string | null
|
||||
}
|
||||
|
||||
export type AdminCreateWithoutAdminAccountsInput = {
|
||||
export type AdminCreateWithoutAccountsInput = {
|
||||
id?: string
|
||||
mobile_number: string
|
||||
national_code?: string | null
|
||||
@@ -396,7 +396,7 @@ export type AdminCreateWithoutAdminAccountsInput = {
|
||||
updated_at?: Date | string
|
||||
}
|
||||
|
||||
export type AdminUncheckedCreateWithoutAdminAccountsInput = {
|
||||
export type AdminUncheckedCreateWithoutAccountsInput = {
|
||||
id?: string
|
||||
mobile_number: string
|
||||
national_code?: string | null
|
||||
@@ -406,23 +406,23 @@ export type AdminUncheckedCreateWithoutAdminAccountsInput = {
|
||||
updated_at?: Date | string
|
||||
}
|
||||
|
||||
export type AdminCreateOrConnectWithoutAdminAccountsInput = {
|
||||
export type AdminCreateOrConnectWithoutAccountsInput = {
|
||||
where: Prisma.AdminWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.AdminCreateWithoutAdminAccountsInput, Prisma.AdminUncheckedCreateWithoutAdminAccountsInput>
|
||||
create: Prisma.XOR<Prisma.AdminCreateWithoutAccountsInput, Prisma.AdminUncheckedCreateWithoutAccountsInput>
|
||||
}
|
||||
|
||||
export type AdminUpsertWithoutAdminAccountsInput = {
|
||||
update: Prisma.XOR<Prisma.AdminUpdateWithoutAdminAccountsInput, Prisma.AdminUncheckedUpdateWithoutAdminAccountsInput>
|
||||
create: Prisma.XOR<Prisma.AdminCreateWithoutAdminAccountsInput, Prisma.AdminUncheckedCreateWithoutAdminAccountsInput>
|
||||
export type AdminUpsertWithoutAccountsInput = {
|
||||
update: Prisma.XOR<Prisma.AdminUpdateWithoutAccountsInput, Prisma.AdminUncheckedUpdateWithoutAccountsInput>
|
||||
create: Prisma.XOR<Prisma.AdminCreateWithoutAccountsInput, Prisma.AdminUncheckedCreateWithoutAccountsInput>
|
||||
where?: Prisma.AdminWhereInput
|
||||
}
|
||||
|
||||
export type AdminUpdateToOneWithWhereWithoutAdminAccountsInput = {
|
||||
export type AdminUpdateToOneWithWhereWithoutAccountsInput = {
|
||||
where?: Prisma.AdminWhereInput
|
||||
data: Prisma.XOR<Prisma.AdminUpdateWithoutAdminAccountsInput, Prisma.AdminUncheckedUpdateWithoutAdminAccountsInput>
|
||||
data: Prisma.XOR<Prisma.AdminUpdateWithoutAccountsInput, Prisma.AdminUncheckedUpdateWithoutAccountsInput>
|
||||
}
|
||||
|
||||
export type AdminUpdateWithoutAdminAccountsInput = {
|
||||
export type AdminUpdateWithoutAccountsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -432,7 +432,7 @@ export type AdminUpdateWithoutAdminAccountsInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
}
|
||||
|
||||
export type AdminUncheckedUpdateWithoutAdminAccountsInput = {
|
||||
export type AdminUncheckedUpdateWithoutAccountsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
@@ -448,11 +448,11 @@ export type AdminUncheckedUpdateWithoutAdminAccountsInput = {
|
||||
*/
|
||||
|
||||
export type AdminCountOutputType = {
|
||||
adminAccounts: number
|
||||
accounts: number
|
||||
}
|
||||
|
||||
export type AdminCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
adminAccounts?: boolean | AdminCountOutputTypeCountAdminAccountsArgs
|
||||
accounts?: boolean | AdminCountOutputTypeCountAccountsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -468,7 +468,7 @@ export type AdminCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extens
|
||||
/**
|
||||
* AdminCountOutputType without action
|
||||
*/
|
||||
export type AdminCountOutputTypeCountAdminAccountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type AdminCountOutputTypeCountAccountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.AdminAccountWhereInput
|
||||
}
|
||||
|
||||
@@ -481,7 +481,7 @@ export type AdminSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
last_name?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
adminAccounts?: boolean | Prisma.Admin$adminAccountsArgs<ExtArgs>
|
||||
accounts?: boolean | Prisma.Admin$accountsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.AdminCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["admin"]>
|
||||
|
||||
@@ -499,14 +499,14 @@ export type AdminSelectScalar = {
|
||||
|
||||
export type AdminOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "mobile_number" | "national_code" | "first_name" | "last_name" | "created_at" | "updated_at", ExtArgs["result"]["admin"]>
|
||||
export type AdminInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
adminAccounts?: boolean | Prisma.Admin$adminAccountsArgs<ExtArgs>
|
||||
accounts?: boolean | Prisma.Admin$accountsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.AdminCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $AdminPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "Admin"
|
||||
objects: {
|
||||
adminAccounts: Prisma.$AdminAccountPayload<ExtArgs>[]
|
||||
accounts: Prisma.$AdminAccountPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -856,7 +856,7 @@ readonly fields: AdminFieldRefs;
|
||||
*/
|
||||
export interface Prisma__AdminClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
adminAccounts<T extends Prisma.Admin$adminAccountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Admin$adminAccountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AdminAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
accounts<T extends Prisma.Admin$accountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Admin$accountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$AdminAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1241,9 +1241,9 @@ export type AdminDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
}
|
||||
|
||||
/**
|
||||
* Admin.adminAccounts
|
||||
* Admin.accounts
|
||||
*/
|
||||
export type Admin$adminAccountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type Admin$accountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the AdminAccount
|
||||
*/
|
||||
|
||||
@@ -236,7 +236,7 @@ export type AdminAccountCreateInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
admin: Prisma.AdminCreateNestedOneWithoutAdminAccountsInput
|
||||
admin: Prisma.AdminCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutAdmin_accountInput
|
||||
}
|
||||
|
||||
@@ -252,7 +252,7 @@ export type AdminAccountUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
admin?: Prisma.AdminUpdateOneRequiredWithoutAdminAccountsNestedInput
|
||||
admin?: Prisma.AdminUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutAdmin_accountNestedInput
|
||||
}
|
||||
|
||||
@@ -468,7 +468,7 @@ export type AdminAccountCreateWithoutAccountInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
admin: Prisma.AdminCreateNestedOneWithoutAdminAccountsInput
|
||||
admin: Prisma.AdminCreateNestedOneWithoutAccountsInput
|
||||
}
|
||||
|
||||
export type AdminAccountUncheckedCreateWithoutAccountInput = {
|
||||
@@ -498,7 +498,7 @@ export type AdminAccountUpdateWithoutAccountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
admin?: Prisma.AdminUpdateOneRequiredWithoutAdminAccountsNestedInput
|
||||
admin?: Prisma.AdminUpdateOneRequiredWithoutAccountsNestedInput
|
||||
}
|
||||
|
||||
export type AdminAccountUncheckedUpdateWithoutAccountInput = {
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -200,11 +200,8 @@ export type ComplexWhereInput = {
|
||||
business_activity_id?: Prisma.StringFilter<"Complex"> | string
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
pos_list?: Prisma.PosListRelationFilter
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
good_categories?: Prisma.GoodCategoryListRelationFilter
|
||||
permission_complexes?: Prisma.PermissionComplexListRelationFilter
|
||||
customer_individuals?: Prisma.CustomerIndividualListRelationFilter
|
||||
customer_legals?: Prisma.CustomerLegalListRelationFilter
|
||||
}
|
||||
|
||||
export type ComplexOrderByWithRelationInput = {
|
||||
@@ -217,11 +214,8 @@ export type ComplexOrderByWithRelationInput = {
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
business_activity?: Prisma.BusinessActivityOrderByWithRelationInput
|
||||
pos_list?: Prisma.PosOrderByRelationAggregateInput
|
||||
goods?: Prisma.GoodOrderByRelationAggregateInput
|
||||
good_categories?: Prisma.GoodCategoryOrderByRelationAggregateInput
|
||||
permission_complexes?: Prisma.PermissionComplexOrderByRelationAggregateInput
|
||||
customer_individuals?: Prisma.CustomerIndividualOrderByRelationAggregateInput
|
||||
customer_legals?: Prisma.CustomerLegalOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.ComplexOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -238,11 +232,8 @@ export type ComplexWhereUniqueInput = Prisma.AtLeast<{
|
||||
business_activity_id?: Prisma.StringFilter<"Complex"> | string
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
pos_list?: Prisma.PosListRelationFilter
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
good_categories?: Prisma.GoodCategoryListRelationFilter
|
||||
permission_complexes?: Prisma.PermissionComplexListRelationFilter
|
||||
customer_individuals?: Prisma.CustomerIndividualListRelationFilter
|
||||
customer_legals?: Prisma.CustomerLegalListRelationFilter
|
||||
}, "id">
|
||||
|
||||
export type ComplexOrderByWithAggregationInput = {
|
||||
@@ -280,11 +271,8 @@ export type ComplexCreateInput = {
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateInput = {
|
||||
@@ -296,11 +284,8 @@ export type ComplexUncheckedCreateInput = {
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateInput = {
|
||||
@@ -312,11 +297,8 @@ export type ComplexUpdateInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateInput = {
|
||||
@@ -328,11 +310,8 @@ export type ComplexUncheckedUpdateInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateManyInput = {
|
||||
@@ -364,6 +343,11 @@ export type ComplexUncheckedUpdateManyInput = {
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type ComplexScalarRelationFilter = {
|
||||
is?: Prisma.ComplexWhereInput
|
||||
isNot?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
export type ComplexListRelationFilter = {
|
||||
every?: Prisma.ComplexWhereInput
|
||||
some?: Prisma.ComplexWhereInput
|
||||
@@ -410,16 +394,25 @@ export type ComplexMinOrderByAggregateInput = {
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ComplexScalarRelationFilter = {
|
||||
is?: Prisma.ComplexWhereInput
|
||||
isNot?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
export type ComplexNullableScalarRelationFilter = {
|
||||
is?: Prisma.ComplexWhereInput | null
|
||||
isNot?: Prisma.ComplexWhereInput | null
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedOneWithoutPermission_complexesInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutPermission_complexesInput, Prisma.ComplexUncheckedCreateWithoutPermission_complexesInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutPermission_complexesInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateOneRequiredWithoutPermission_complexesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutPermission_complexesInput, Prisma.ComplexUncheckedCreateWithoutPermission_complexesInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutPermission_complexesInput
|
||||
upsert?: Prisma.ComplexUpsertWithoutPermission_complexesInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutPermission_complexesInput, Prisma.ComplexUpdateWithoutPermission_complexesInput>, Prisma.ComplexUncheckedUpdateWithoutPermission_complexesInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedManyWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutBusiness_activityInput, Prisma.ComplexUncheckedCreateWithoutBusiness_activityInput> | Prisma.ComplexCreateWithoutBusiness_activityInput[] | Prisma.ComplexUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutBusiness_activityInput | Prisma.ComplexCreateOrConnectWithoutBusiness_activityInput[]
|
||||
@@ -476,64 +469,6 @@ export type ComplexUpdateOneRequiredWithoutPos_listNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutPos_listInput, Prisma.ComplexUpdateWithoutPos_listInput>, Prisma.ComplexUncheckedUpdateWithoutPos_listInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedOneWithoutPermission_complexesInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutPermission_complexesInput, Prisma.ComplexUncheckedCreateWithoutPermission_complexesInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutPermission_complexesInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateOneRequiredWithoutPermission_complexesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutPermission_complexesInput, Prisma.ComplexUncheckedCreateWithoutPermission_complexesInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutPermission_complexesInput
|
||||
upsert?: Prisma.ComplexUpsertWithoutPermission_complexesInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutPermission_complexesInput, Prisma.ComplexUpdateWithoutPermission_complexesInput>, Prisma.ComplexUncheckedUpdateWithoutPermission_complexesInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedOneWithoutCustomer_individualsInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutCustomer_individualsInput, Prisma.ComplexUncheckedCreateWithoutCustomer_individualsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutCustomer_individualsInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateOneRequiredWithoutCustomer_individualsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutCustomer_individualsInput, Prisma.ComplexUncheckedCreateWithoutCustomer_individualsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutCustomer_individualsInput
|
||||
upsert?: Prisma.ComplexUpsertWithoutCustomer_individualsInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutCustomer_individualsInput, Prisma.ComplexUpdateWithoutCustomer_individualsInput>, Prisma.ComplexUncheckedUpdateWithoutCustomer_individualsInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedOneWithoutCustomer_legalsInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutCustomer_legalsInput, Prisma.ComplexUncheckedCreateWithoutCustomer_legalsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutCustomer_legalsInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateOneRequiredWithoutCustomer_legalsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutCustomer_legalsInput, Prisma.ComplexUncheckedCreateWithoutCustomer_legalsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutCustomer_legalsInput
|
||||
upsert?: Prisma.ComplexUpsertWithoutCustomer_legalsInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutCustomer_legalsInput, Prisma.ComplexUpdateWithoutCustomer_legalsInput>, Prisma.ComplexUncheckedUpdateWithoutCustomer_legalsInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedOneWithoutGoodsInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutGoodsInput, Prisma.ComplexUncheckedCreateWithoutGoodsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutGoodsInput
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateOneWithoutGoodsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutGoodsInput, Prisma.ComplexUncheckedCreateWithoutGoodsInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutGoodsInput
|
||||
upsert?: Prisma.ComplexUpsertWithoutGoodsInput
|
||||
disconnect?: Prisma.ComplexWhereInput | boolean
|
||||
delete?: Prisma.ComplexWhereInput | boolean
|
||||
connect?: Prisma.ComplexWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutGoodsInput, Prisma.ComplexUpdateWithoutGoodsInput>, Prisma.ComplexUncheckedUpdateWithoutGoodsInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateNestedOneWithoutGood_categoriesInput = {
|
||||
create?: Prisma.XOR<Prisma.ComplexCreateWithoutGood_categoriesInput, Prisma.ComplexUncheckedCreateWithoutGood_categoriesInput>
|
||||
connectOrCreate?: Prisma.ComplexCreateOrConnectWithoutGood_categoriesInput
|
||||
@@ -550,6 +485,70 @@ export type ComplexUpdateOneWithoutGood_categoriesNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ComplexUpdateToOneWithWhereWithoutGood_categoriesInput, Prisma.ComplexUpdateWithoutGood_categoriesInput>, Prisma.ComplexUncheckedUpdateWithoutGood_categoriesInput>
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutPermission_complexesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutPermission_complexesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutPermission_complexesInput = {
|
||||
where: Prisma.ComplexWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutPermission_complexesInput, Prisma.ComplexUncheckedCreateWithoutPermission_complexesInput>
|
||||
}
|
||||
|
||||
export type ComplexUpsertWithoutPermission_complexesInput = {
|
||||
update: Prisma.XOR<Prisma.ComplexUpdateWithoutPermission_complexesInput, Prisma.ComplexUncheckedUpdateWithoutPermission_complexesInput>
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutPermission_complexesInput, Prisma.ComplexUncheckedCreateWithoutPermission_complexesInput>
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateToOneWithWhereWithoutPermission_complexesInput = {
|
||||
where?: Prisma.ComplexWhereInput
|
||||
data: Prisma.XOR<Prisma.ComplexUpdateWithoutPermission_complexesInput, Prisma.ComplexUncheckedUpdateWithoutPermission_complexesInput>
|
||||
}
|
||||
|
||||
export type ComplexUpdateWithoutPermission_complexesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutPermission_complexesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutBusiness_activityInput = {
|
||||
id?: string
|
||||
name: string
|
||||
@@ -558,11 +557,8 @@ export type ComplexCreateWithoutBusiness_activityInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutBusiness_activityInput = {
|
||||
@@ -573,11 +569,8 @@ export type ComplexUncheckedCreateWithoutBusiness_activityInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutBusiness_activityInput = {
|
||||
@@ -627,11 +620,8 @@ export type ComplexCreateWithoutPos_listInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutPos_listInput = {
|
||||
@@ -642,11 +632,8 @@ export type ComplexUncheckedCreateWithoutPos_listInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutPos_listInput = {
|
||||
@@ -673,11 +660,8 @@ export type ComplexUpdateWithoutPos_listInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutPos_listInput = {
|
||||
@@ -688,315 +672,8 @@ export type ComplexUncheckedUpdateWithoutPos_listInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutPermission_complexesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutPermission_complexesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutPermission_complexesInput = {
|
||||
where: Prisma.ComplexWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutPermission_complexesInput, Prisma.ComplexUncheckedCreateWithoutPermission_complexesInput>
|
||||
}
|
||||
|
||||
export type ComplexUpsertWithoutPermission_complexesInput = {
|
||||
update: Prisma.XOR<Prisma.ComplexUpdateWithoutPermission_complexesInput, Prisma.ComplexUncheckedUpdateWithoutPermission_complexesInput>
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutPermission_complexesInput, Prisma.ComplexUncheckedCreateWithoutPermission_complexesInput>
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateToOneWithWhereWithoutPermission_complexesInput = {
|
||||
where?: Prisma.ComplexWhereInput
|
||||
data: Prisma.XOR<Prisma.ComplexUpdateWithoutPermission_complexesInput, Prisma.ComplexUncheckedUpdateWithoutPermission_complexesInput>
|
||||
}
|
||||
|
||||
export type ComplexUpdateWithoutPermission_complexesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutPermission_complexesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutCustomer_individualsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutCustomer_individualsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutCustomer_individualsInput = {
|
||||
where: Prisma.ComplexWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutCustomer_individualsInput, Prisma.ComplexUncheckedCreateWithoutCustomer_individualsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpsertWithoutCustomer_individualsInput = {
|
||||
update: Prisma.XOR<Prisma.ComplexUpdateWithoutCustomer_individualsInput, Prisma.ComplexUncheckedUpdateWithoutCustomer_individualsInput>
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutCustomer_individualsInput, Prisma.ComplexUncheckedCreateWithoutCustomer_individualsInput>
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateToOneWithWhereWithoutCustomer_individualsInput = {
|
||||
where?: Prisma.ComplexWhereInput
|
||||
data: Prisma.XOR<Prisma.ComplexUpdateWithoutCustomer_individualsInput, Prisma.ComplexUncheckedUpdateWithoutCustomer_individualsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpdateWithoutCustomer_individualsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutCustomer_individualsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutCustomer_legalsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutCustomer_legalsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutCustomer_legalsInput = {
|
||||
where: Prisma.ComplexWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutCustomer_legalsInput, Prisma.ComplexUncheckedCreateWithoutCustomer_legalsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpsertWithoutCustomer_legalsInput = {
|
||||
update: Prisma.XOR<Prisma.ComplexUpdateWithoutCustomer_legalsInput, Prisma.ComplexUncheckedUpdateWithoutCustomer_legalsInput>
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutCustomer_legalsInput, Prisma.ComplexUncheckedCreateWithoutCustomer_legalsInput>
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateToOneWithWhereWithoutCustomer_legalsInput = {
|
||||
where?: Prisma.ComplexWhereInput
|
||||
data: Prisma.XOR<Prisma.ComplexUpdateWithoutCustomer_legalsInput, Prisma.ComplexUncheckedUpdateWithoutCustomer_legalsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpdateWithoutCustomer_legalsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutCustomer_legalsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutGoodsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutGoodsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
branch_code: string
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutGoodsInput = {
|
||||
where: Prisma.ComplexWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutGoodsInput, Prisma.ComplexUncheckedCreateWithoutGoodsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpsertWithoutGoodsInput = {
|
||||
update: Prisma.XOR<Prisma.ComplexUpdateWithoutGoodsInput, Prisma.ComplexUncheckedUpdateWithoutGoodsInput>
|
||||
create: Prisma.XOR<Prisma.ComplexCreateWithoutGoodsInput, Prisma.ComplexUncheckedCreateWithoutGoodsInput>
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateToOneWithWhereWithoutGoodsInput = {
|
||||
where?: Prisma.ComplexWhereInput
|
||||
data: Prisma.XOR<Prisma.ComplexUpdateWithoutGoodsInput, Prisma.ComplexUncheckedUpdateWithoutGoodsInput>
|
||||
}
|
||||
|
||||
export type ComplexUpdateWithoutGoodsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutGoodsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
branch_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutGood_categoriesInput = {
|
||||
@@ -1008,10 +685,7 @@ export type ComplexCreateWithoutGood_categoriesInput = {
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutGood_categoriesInput = {
|
||||
@@ -1023,10 +697,7 @@ export type ComplexUncheckedCreateWithoutGood_categoriesInput = {
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutGood_categoriesInput = {
|
||||
@@ -1054,10 +725,7 @@ export type ComplexUpdateWithoutGood_categoriesInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutGood_categoriesInput = {
|
||||
@@ -1069,10 +737,7 @@ export type ComplexUncheckedUpdateWithoutGood_categoriesInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateManyBusiness_activityInput = {
|
||||
@@ -1092,11 +757,8 @@ export type ComplexUpdateWithoutBusiness_activityInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
@@ -1107,11 +769,8 @@ export type ComplexUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateManyWithoutBusiness_activityInput = {
|
||||
@@ -1130,20 +789,14 @@ export type ComplexUncheckedUpdateManyWithoutBusiness_activityInput = {
|
||||
|
||||
export type ComplexCountOutputType = {
|
||||
pos_list: number
|
||||
goods: number
|
||||
good_categories: number
|
||||
permission_complexes: number
|
||||
customer_individuals: number
|
||||
customer_legals: number
|
||||
}
|
||||
|
||||
export type ComplexCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
pos_list?: boolean | ComplexCountOutputTypeCountPos_listArgs
|
||||
goods?: boolean | ComplexCountOutputTypeCountGoodsArgs
|
||||
good_categories?: boolean | ComplexCountOutputTypeCountGood_categoriesArgs
|
||||
permission_complexes?: boolean | ComplexCountOutputTypeCountPermission_complexesArgs
|
||||
customer_individuals?: boolean | ComplexCountOutputTypeCountCustomer_individualsArgs
|
||||
customer_legals?: boolean | ComplexCountOutputTypeCountCustomer_legalsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1163,13 +816,6 @@ export type ComplexCountOutputTypeCountPos_listArgs<ExtArgs extends runtime.Type
|
||||
where?: Prisma.PosWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ComplexCountOutputType without action
|
||||
*/
|
||||
export type ComplexCountOutputTypeCountGoodsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.GoodWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ComplexCountOutputType without action
|
||||
*/
|
||||
@@ -1184,20 +830,6 @@ export type ComplexCountOutputTypeCountPermission_complexesArgs<ExtArgs extends
|
||||
where?: Prisma.PermissionComplexWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ComplexCountOutputType without action
|
||||
*/
|
||||
export type ComplexCountOutputTypeCountCustomer_individualsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.CustomerIndividualWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ComplexCountOutputType without action
|
||||
*/
|
||||
export type ComplexCountOutputTypeCountCustomer_legalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.CustomerLegalWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type ComplexSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -1209,11 +841,8 @@ export type ComplexSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
business_activity_id?: boolean
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
pos_list?: boolean | Prisma.Complex$pos_listArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.Complex$goodsArgs<ExtArgs>
|
||||
good_categories?: boolean | Prisma.Complex$good_categoriesArgs<ExtArgs>
|
||||
permission_complexes?: boolean | Prisma.Complex$permission_complexesArgs<ExtArgs>
|
||||
customer_individuals?: boolean | Prisma.Complex$customer_individualsArgs<ExtArgs>
|
||||
customer_legals?: boolean | Prisma.Complex$customer_legalsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ComplexCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["complex"]>
|
||||
|
||||
@@ -1233,11 +862,8 @@ export type ComplexOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
export type ComplexInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
pos_list?: boolean | Prisma.Complex$pos_listArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.Complex$goodsArgs<ExtArgs>
|
||||
good_categories?: boolean | Prisma.Complex$good_categoriesArgs<ExtArgs>
|
||||
permission_complexes?: boolean | Prisma.Complex$permission_complexesArgs<ExtArgs>
|
||||
customer_individuals?: boolean | Prisma.Complex$customer_individualsArgs<ExtArgs>
|
||||
customer_legals?: boolean | Prisma.Complex$customer_legalsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ComplexCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -1246,11 +872,8 @@ export type $ComplexPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
objects: {
|
||||
business_activity: Prisma.$BusinessActivityPayload<ExtArgs>
|
||||
pos_list: Prisma.$PosPayload<ExtArgs>[]
|
||||
goods: Prisma.$GoodPayload<ExtArgs>[]
|
||||
good_categories: Prisma.$GoodCategoryPayload<ExtArgs>[]
|
||||
permission_complexes: Prisma.$PermissionComplexPayload<ExtArgs>[]
|
||||
customer_individuals: Prisma.$CustomerIndividualPayload<ExtArgs>[]
|
||||
customer_legals: Prisma.$CustomerLegalPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1602,11 +1225,8 @@ export interface Prisma__ComplexClient<T, Null = never, ExtArgs extends runtime.
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
business_activity<T extends Prisma.BusinessActivityDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivityDefaultArgs<ExtArgs>>): Prisma.Prisma__BusinessActivityClient<runtime.Types.Result.GetResult<Prisma.$BusinessActivityPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
pos_list<T extends Prisma.Complex$pos_listArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$pos_listArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PosPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
goods<T extends Prisma.Complex$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
good_categories<T extends Prisma.Complex$good_categoriesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$good_categoriesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodCategoryPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
permission_complexes<T extends Prisma.Complex$permission_complexesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$permission_complexesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionComplexPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
customer_individuals<T extends Prisma.Complex$customer_individualsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$customer_individualsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomerIndividualPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
customer_legals<T extends Prisma.Complex$customer_legalsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Complex$customer_legalsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomerLegalPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -2014,30 +1634,6 @@ export type Complex$pos_listArgs<ExtArgs extends runtime.Types.Extensions.Intern
|
||||
distinct?: Prisma.PosScalarFieldEnum | Prisma.PosScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex.goods
|
||||
*/
|
||||
export type Complex$goodsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Good
|
||||
*/
|
||||
select?: Prisma.GoodSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Good
|
||||
*/
|
||||
omit?: Prisma.GoodOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.GoodInclude<ExtArgs> | null
|
||||
where?: Prisma.GoodWhereInput
|
||||
orderBy?: Prisma.GoodOrderByWithRelationInput | Prisma.GoodOrderByWithRelationInput[]
|
||||
cursor?: Prisma.GoodWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex.good_categories
|
||||
*/
|
||||
@@ -2086,54 +1682,6 @@ export type Complex$permission_complexesArgs<ExtArgs extends runtime.Types.Exten
|
||||
distinct?: Prisma.PermissionComplexScalarFieldEnum | Prisma.PermissionComplexScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex.customer_individuals
|
||||
*/
|
||||
export type Complex$customer_individualsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the CustomerIndividual
|
||||
*/
|
||||
select?: Prisma.CustomerIndividualSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the CustomerIndividual
|
||||
*/
|
||||
omit?: Prisma.CustomerIndividualOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.CustomerIndividualInclude<ExtArgs> | null
|
||||
where?: Prisma.CustomerIndividualWhereInput
|
||||
orderBy?: Prisma.CustomerIndividualOrderByWithRelationInput | Prisma.CustomerIndividualOrderByWithRelationInput[]
|
||||
cursor?: Prisma.CustomerIndividualWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.CustomerIndividualScalarFieldEnum | Prisma.CustomerIndividualScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex.customer_legals
|
||||
*/
|
||||
export type Complex$customer_legalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the CustomerLegal
|
||||
*/
|
||||
select?: Prisma.CustomerLegalSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the CustomerLegal
|
||||
*/
|
||||
omit?: Prisma.CustomerLegalOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.CustomerLegalInclude<ExtArgs> | null
|
||||
where?: Prisma.CustomerLegalWhereInput
|
||||
orderBy?: Prisma.CustomerLegalOrderByWithRelationInput | Prisma.CustomerLegalOrderByWithRelationInput[]
|
||||
cursor?: Prisma.CustomerLegalWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.CustomerLegalScalarFieldEnum | Prisma.CustomerLegalScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex without action
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -261,7 +261,7 @@ export type ConsumerAccountCreateInput = {
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
@@ -287,7 +287,7 @@ export type ConsumerAccountUpdateInput = {
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
@@ -338,6 +338,11 @@ export type ConsumerAccountNullableScalarRelationFilter = {
|
||||
isNot?: Prisma.ConsumerAccountWhereInput | null
|
||||
}
|
||||
|
||||
export type ConsumerAccountScalarRelationFilter = {
|
||||
is?: Prisma.ConsumerAccountWhereInput
|
||||
isNot?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountOrderByRelevanceInput = {
|
||||
fields: Prisma.ConsumerAccountOrderByRelevanceFieldEnum | Prisma.ConsumerAccountOrderByRelevanceFieldEnum[]
|
||||
sort: Prisma.SortOrder
|
||||
@@ -381,11 +386,6 @@ export type ConsumerAccountOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ConsumerAccountScalarRelationFilter = {
|
||||
is?: Prisma.ConsumerAccountWhereInput
|
||||
isNot?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateNestedOneWithoutAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccountInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccountInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutAccountInput
|
||||
@@ -418,6 +418,36 @@ export type ConsumerAccountUncheckedUpdateOneWithoutAccountNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutAccountInput, Prisma.ConsumerAccountUpdateWithoutAccountInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateNestedOneWithoutAccount_allocationInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutAccount_allocationInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateOneWithoutAccount_allocationNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutAccount_allocationInput
|
||||
upsert?: Prisma.ConsumerAccountUpsertWithoutAccount_allocationInput
|
||||
disconnect?: Prisma.ConsumerAccountWhereInput | boolean
|
||||
delete?: Prisma.ConsumerAccountWhereInput | boolean
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutAccount_allocationInput, Prisma.ConsumerAccountUpdateWithoutAccount_allocationInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateNestedOneWithoutPermissionInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedCreateWithoutPermissionInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutPermissionInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateOneRequiredWithoutPermissionNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedCreateWithoutPermissionInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutPermissionInput
|
||||
upsert?: Prisma.ConsumerAccountUpsertWithoutPermissionInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutPermissionInput, Prisma.ConsumerAccountUpdateWithoutPermissionInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutPermissionInput>
|
||||
}
|
||||
|
||||
export type EnumConsumerRoleFieldUpdateOperationsInput = {
|
||||
set?: $Enums.ConsumerRole
|
||||
}
|
||||
@@ -478,36 +508,6 @@ export type ConsumerAccountUpdateOneRequiredWithoutPosNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutPosInput, Prisma.ConsumerAccountUpdateWithoutPosInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutPosInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateNestedOneWithoutAccount_allocationInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutAccount_allocationInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateOneWithoutAccount_allocationNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutAccount_allocationInput
|
||||
upsert?: Prisma.ConsumerAccountUpsertWithoutAccount_allocationInput
|
||||
disconnect?: Prisma.ConsumerAccountWhereInput | boolean
|
||||
delete?: Prisma.ConsumerAccountWhereInput | boolean
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutAccount_allocationInput, Prisma.ConsumerAccountUpdateWithoutAccount_allocationInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateNestedOneWithoutPermissionInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedCreateWithoutPermissionInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutPermissionInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateOneRequiredWithoutPermissionNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedCreateWithoutPermissionInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutPermissionInput
|
||||
upsert?: Prisma.ConsumerAccountUpsertWithoutPermissionInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutPermissionInput, Prisma.ConsumerAccountUpdateWithoutPermissionInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutPermissionInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateNestedOneWithoutSales_invoicesInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutSales_invoicesInput, Prisma.ConsumerAccountUncheckedCreateWithoutSales_invoicesInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutSales_invoicesInput
|
||||
@@ -527,7 +527,7 @@ export type ConsumerAccountCreateWithoutAccountInput = {
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
@@ -567,7 +567,7 @@ export type ConsumerAccountUpdateWithoutAccountInput = {
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
@@ -586,6 +586,134 @@ export type ConsumerAccountUncheckedUpdateWithoutAccountInput = {
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutAccount_allocationInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutAccount_allocationInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutAccount_allocationInput = {
|
||||
where: Prisma.ConsumerAccountWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpsertWithoutAccount_allocationInput = {
|
||||
update: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput>
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateToOneWithWhereWithoutAccount_allocationInput = {
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
data: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateWithoutAccount_allocationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutPermissionInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutPermissionInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutPermissionInput = {
|
||||
where: Prisma.ConsumerAccountWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedCreateWithoutPermissionInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpsertWithoutPermissionInput = {
|
||||
update: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedUpdateWithoutPermissionInput>
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedCreateWithoutPermissionInput>
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateToOneWithWhereWithoutPermissionInput = {
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
data: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedUpdateWithoutPermissionInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateWithoutPermissionInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutPermissionInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutConsumerInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
@@ -653,7 +781,7 @@ export type ConsumerAccountCreateWithoutPosInput = {
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
@@ -693,7 +821,7 @@ export type ConsumerAccountUpdateWithoutPosInput = {
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
@@ -712,140 +840,12 @@ export type ConsumerAccountUncheckedUpdateWithoutPosInput = {
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutAccount_allocationInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutAccount_allocationInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutAccount_allocationInput = {
|
||||
where: Prisma.ConsumerAccountWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpsertWithoutAccount_allocationInput = {
|
||||
update: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput>
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedCreateWithoutAccount_allocationInput>
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateToOneWithWhereWithoutAccount_allocationInput = {
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
data: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutAccount_allocationInput, Prisma.ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateWithoutAccount_allocationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutPermissionInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutPermissionInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutPermissionInput = {
|
||||
where: Prisma.ConsumerAccountWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedCreateWithoutPermissionInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpsertWithoutPermissionInput = {
|
||||
update: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedUpdateWithoutPermissionInput>
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedCreateWithoutPermissionInput>
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateToOneWithWhereWithoutPermissionInput = {
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
data: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutPermissionInput, Prisma.ConsumerAccountUncheckedUpdateWithoutPermissionInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateWithoutPermissionInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutPermissionInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutSales_invoicesInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_accountsInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
@@ -885,7 +885,7 @@ export type ConsumerAccountUpdateWithoutSales_invoicesInput = {
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_accountsNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
|
||||
@@ -390,7 +390,7 @@ export type ConsumerDevicesCreateInput = {
|
||||
fcm_token?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutConsumer_devicesInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutDevicesInput
|
||||
}
|
||||
|
||||
export type ConsumerDevicesUncheckedCreateInput = {
|
||||
@@ -430,7 +430,7 @@ export type ConsumerDevicesUpdateInput = {
|
||||
fcm_token?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutConsumer_devicesNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutDevicesNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerDevicesUncheckedUpdateInput = {
|
||||
@@ -512,16 +512,6 @@ export type ConsumerDevicesUncheckedUpdateManyInput = {
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type ConsumerDevicesListRelationFilter = {
|
||||
every?: Prisma.ConsumerDevicesWhereInput
|
||||
some?: Prisma.ConsumerDevicesWhereInput
|
||||
none?: Prisma.ConsumerDevicesWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerDevicesOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ConsumerDevicesOrderByRelevanceInput = {
|
||||
fields: Prisma.ConsumerDevicesOrderByRelevanceFieldEnum | Prisma.ConsumerDevicesOrderByRelevanceFieldEnum[]
|
||||
sort: Prisma.SortOrder
|
||||
@@ -588,6 +578,20 @@ export type ConsumerDevicesMinOrderByAggregateInput = {
|
||||
consumer_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type ConsumerDevicesListRelationFilter = {
|
||||
every?: Prisma.ConsumerDevicesWhereInput
|
||||
some?: Prisma.ConsumerDevicesWhereInput
|
||||
none?: Prisma.ConsumerDevicesWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerDevicesOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type EnumApplicationPublisherFieldUpdateOperationsInput = {
|
||||
set?: $Enums.ApplicationPublisher
|
||||
}
|
||||
|
||||
export type ConsumerDevicesCreateNestedManyWithoutConsumerInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerDevicesCreateWithoutConsumerInput, Prisma.ConsumerDevicesUncheckedCreateWithoutConsumerInput> | Prisma.ConsumerDevicesCreateWithoutConsumerInput[] | Prisma.ConsumerDevicesUncheckedCreateWithoutConsumerInput[]
|
||||
connectOrCreate?: Prisma.ConsumerDevicesCreateOrConnectWithoutConsumerInput | Prisma.ConsumerDevicesCreateOrConnectWithoutConsumerInput[]
|
||||
@@ -630,10 +634,6 @@ export type ConsumerDevicesUncheckedUpdateManyWithoutConsumerNestedInput = {
|
||||
deleteMany?: Prisma.ConsumerDevicesScalarWhereInput | Prisma.ConsumerDevicesScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type EnumApplicationPublisherFieldUpdateOperationsInput = {
|
||||
set?: $Enums.ApplicationPublisher
|
||||
}
|
||||
|
||||
export type ConsumerDevicesCreateWithoutConsumerInput = {
|
||||
uuid: string
|
||||
app_version: string
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -27,29 +27,28 @@ export type AggregateCustomer = {
|
||||
export type CustomerMinAggregateOutputType = {
|
||||
id: string | null
|
||||
is_favorite: boolean | null
|
||||
type: $Enums.CustomerType | null
|
||||
created_at: Date | null
|
||||
updated_at: Date | null
|
||||
deleted_at: Date | null
|
||||
type: $Enums.CustomerType | null
|
||||
}
|
||||
|
||||
export type CustomerMaxAggregateOutputType = {
|
||||
id: string | null
|
||||
is_favorite: boolean | null
|
||||
type: $Enums.CustomerType | null
|
||||
created_at: Date | null
|
||||
updated_at: Date | null
|
||||
deleted_at: Date | null
|
||||
type: $Enums.CustomerType | null
|
||||
}
|
||||
|
||||
export type CustomerCountAggregateOutputType = {
|
||||
id: number
|
||||
is_favorite: number
|
||||
type: number
|
||||
created_at: number
|
||||
updated_at: number
|
||||
deleted_at: number
|
||||
type: number
|
||||
unknown_customer: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -57,29 +56,28 @@ export type CustomerCountAggregateOutputType = {
|
||||
export type CustomerMinAggregateInputType = {
|
||||
id?: true
|
||||
is_favorite?: true
|
||||
type?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
deleted_at?: true
|
||||
type?: true
|
||||
}
|
||||
|
||||
export type CustomerMaxAggregateInputType = {
|
||||
id?: true
|
||||
is_favorite?: true
|
||||
type?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
deleted_at?: true
|
||||
type?: true
|
||||
}
|
||||
|
||||
export type CustomerCountAggregateInputType = {
|
||||
id?: true
|
||||
is_favorite?: true
|
||||
type?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
deleted_at?: true
|
||||
type?: true
|
||||
unknown_customer?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -158,11 +156,10 @@ export type CustomerGroupByArgs<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
export type CustomerGroupByOutputType = {
|
||||
id: string
|
||||
is_favorite: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
deleted_at: Date | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer: runtime.JsonValue | null
|
||||
_count: CustomerCountAggregateOutputType | null
|
||||
_min: CustomerMinAggregateOutputType | null
|
||||
_max: CustomerMaxAggregateOutputType | null
|
||||
@@ -189,26 +186,24 @@ export type CustomerWhereInput = {
|
||||
NOT?: Prisma.CustomerWhereInput | Prisma.CustomerWhereInput[]
|
||||
id?: Prisma.StringFilter<"Customer"> | string
|
||||
is_favorite?: Prisma.BoolNullableFilter<"Customer"> | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFilter<"Customer"> | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFilter<"Customer"> | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.JsonNullableFilter<"Customer">
|
||||
customer_individual?: Prisma.XOR<Prisma.CustomerIndividualNullableScalarRelationFilter, Prisma.CustomerIndividualWhereInput> | null
|
||||
customer_legal?: Prisma.XOR<Prisma.CustomerLegalNullableScalarRelationFilter, Prisma.CustomerLegalWhereInput> | null
|
||||
individual?: Prisma.XOR<Prisma.CustomerIndividualNullableScalarRelationFilter, Prisma.CustomerIndividualWhereInput> | null
|
||||
legal?: Prisma.XOR<Prisma.CustomerLegalNullableScalarRelationFilter, Prisma.CustomerLegalWhereInput> | null
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}
|
||||
|
||||
export type CustomerOrderByWithRelationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
unknown_customer?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
customer_individual?: Prisma.CustomerIndividualOrderByWithRelationInput
|
||||
customer_legal?: Prisma.CustomerLegalOrderByWithRelationInput
|
||||
individual?: Prisma.CustomerIndividualOrderByWithRelationInput
|
||||
legal?: Prisma.CustomerLegalOrderByWithRelationInput
|
||||
sales_invoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.CustomerOrderByRelevanceInput
|
||||
}
|
||||
@@ -219,24 +214,22 @@ export type CustomerWhereUniqueInput = Prisma.AtLeast<{
|
||||
OR?: Prisma.CustomerWhereInput[]
|
||||
NOT?: Prisma.CustomerWhereInput | Prisma.CustomerWhereInput[]
|
||||
is_favorite?: Prisma.BoolNullableFilter<"Customer"> | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFilter<"Customer"> | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Customer"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableFilter<"Customer"> | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFilter<"Customer"> | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.JsonNullableFilter<"Customer">
|
||||
customer_individual?: Prisma.XOR<Prisma.CustomerIndividualNullableScalarRelationFilter, Prisma.CustomerIndividualWhereInput> | null
|
||||
customer_legal?: Prisma.XOR<Prisma.CustomerLegalNullableScalarRelationFilter, Prisma.CustomerLegalWhereInput> | null
|
||||
individual?: Prisma.XOR<Prisma.CustomerIndividualNullableScalarRelationFilter, Prisma.CustomerIndividualWhereInput> | null
|
||||
legal?: Prisma.XOR<Prisma.CustomerLegalNullableScalarRelationFilter, Prisma.CustomerLegalWhereInput> | null
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}, "id">
|
||||
|
||||
export type CustomerOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
unknown_customer?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
_count?: Prisma.CustomerCountOrderByAggregateInput
|
||||
_max?: Prisma.CustomerMaxOrderByAggregateInput
|
||||
_min?: Prisma.CustomerMinOrderByAggregateInput
|
||||
@@ -248,93 +241,85 @@ export type CustomerScalarWhereWithAggregatesInput = {
|
||||
NOT?: Prisma.CustomerScalarWhereWithAggregatesInput | Prisma.CustomerScalarWhereWithAggregatesInput[]
|
||||
id?: Prisma.StringWithAggregatesFilter<"Customer"> | string
|
||||
is_favorite?: Prisma.BoolNullableWithAggregatesFilter<"Customer"> | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeWithAggregatesFilter<"Customer"> | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string
|
||||
updated_at?: Prisma.DateTimeWithAggregatesFilter<"Customer"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableWithAggregatesFilter<"Customer"> | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeWithAggregatesFilter<"Customer"> | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.JsonNullableWithAggregatesFilter<"Customer">
|
||||
}
|
||||
|
||||
export type CustomerCreateInput = {
|
||||
id?: string
|
||||
is_favorite?: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
customer_legal?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
individual?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
legal?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateInput = {
|
||||
id?: string
|
||||
is_favorite?: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customer_legal?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
individual?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
legal?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
customer_legal?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
individual?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
legal?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customer_legal?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
individual?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
legal?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerCreateManyInput = {
|
||||
id?: string
|
||||
is_favorite?: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type CustomerUpdateManyMutationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateManyInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type CustomerOrderByRelevanceInput = {
|
||||
@@ -346,29 +331,28 @@ export type CustomerOrderByRelevanceInput = {
|
||||
export type CustomerCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
unknown_customer?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerMaxOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerMinOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
is_favorite?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrder
|
||||
type?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerScalarRelationFilter = {
|
||||
@@ -385,40 +369,36 @@ export type NullableBoolFieldUpdateOperationsInput = {
|
||||
set?: boolean | null
|
||||
}
|
||||
|
||||
export type NullableDateTimeFieldUpdateOperationsInput = {
|
||||
set?: Date | string | null
|
||||
}
|
||||
|
||||
export type EnumCustomerTypeFieldUpdateOperationsInput = {
|
||||
set?: $Enums.CustomerType
|
||||
}
|
||||
|
||||
export type CustomerCreateNestedOneWithoutCustomer_individualInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_individualInput, Prisma.CustomerUncheckedCreateWithoutCustomer_individualInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomer_individualInput
|
||||
export type CustomerCreateNestedOneWithoutIndividualInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutIndividualInput, Prisma.CustomerUncheckedCreateWithoutIndividualInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutIndividualInput
|
||||
connect?: Prisma.CustomerWhereUniqueInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateOneRequiredWithoutCustomer_individualNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_individualInput, Prisma.CustomerUncheckedCreateWithoutCustomer_individualInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomer_individualInput
|
||||
upsert?: Prisma.CustomerUpsertWithoutCustomer_individualInput
|
||||
export type CustomerUpdateOneRequiredWithoutIndividualNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutIndividualInput, Prisma.CustomerUncheckedCreateWithoutIndividualInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutIndividualInput
|
||||
upsert?: Prisma.CustomerUpsertWithoutIndividualInput
|
||||
connect?: Prisma.CustomerWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutCustomer_individualInput, Prisma.CustomerUpdateWithoutCustomer_individualInput>, Prisma.CustomerUncheckedUpdateWithoutCustomer_individualInput>
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutIndividualInput, Prisma.CustomerUpdateWithoutIndividualInput>, Prisma.CustomerUncheckedUpdateWithoutIndividualInput>
|
||||
}
|
||||
|
||||
export type CustomerCreateNestedOneWithoutCustomer_legalInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_legalInput, Prisma.CustomerUncheckedCreateWithoutCustomer_legalInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomer_legalInput
|
||||
export type CustomerCreateNestedOneWithoutLegalInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutLegalInput, Prisma.CustomerUncheckedCreateWithoutLegalInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutLegalInput
|
||||
connect?: Prisma.CustomerWhereUniqueInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateOneRequiredWithoutCustomer_legalNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_legalInput, Prisma.CustomerUncheckedCreateWithoutCustomer_legalInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutCustomer_legalInput
|
||||
upsert?: Prisma.CustomerUpsertWithoutCustomer_legalInput
|
||||
export type CustomerUpdateOneRequiredWithoutLegalNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerCreateWithoutLegalInput, Prisma.CustomerUncheckedCreateWithoutLegalInput>
|
||||
connectOrCreate?: Prisma.CustomerCreateOrConnectWithoutLegalInput
|
||||
upsert?: Prisma.CustomerUpsertWithoutLegalInput
|
||||
connect?: Prisma.CustomerWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutCustomer_legalInput, Prisma.CustomerUpdateWithoutCustomer_legalInput>, Prisma.CustomerUncheckedUpdateWithoutCustomer_legalInput>
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutLegalInput, Prisma.CustomerUpdateWithoutLegalInput>, Prisma.CustomerUncheckedUpdateWithoutLegalInput>
|
||||
}
|
||||
|
||||
export type CustomerCreateNestedOneWithoutSales_invoicesInput = {
|
||||
@@ -437,156 +417,146 @@ export type CustomerUpdateOneWithoutSales_invoicesNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerUpdateToOneWithWhereWithoutSales_invoicesInput, Prisma.CustomerUpdateWithoutSales_invoicesInput>, Prisma.CustomerUncheckedUpdateWithoutSales_invoicesInput>
|
||||
}
|
||||
|
||||
export type CustomerCreateWithoutCustomer_individualInput = {
|
||||
export type CustomerCreateWithoutIndividualInput = {
|
||||
id?: string
|
||||
is_favorite?: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_legal?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
legal?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateWithoutCustomer_individualInput = {
|
||||
export type CustomerUncheckedCreateWithoutIndividualInput = {
|
||||
id?: string
|
||||
is_favorite?: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_legal?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
legal?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerCreateOrConnectWithoutCustomer_individualInput = {
|
||||
export type CustomerCreateOrConnectWithoutIndividualInput = {
|
||||
where: Prisma.CustomerWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_individualInput, Prisma.CustomerUncheckedCreateWithoutCustomer_individualInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutIndividualInput, Prisma.CustomerUncheckedCreateWithoutIndividualInput>
|
||||
}
|
||||
|
||||
export type CustomerUpsertWithoutCustomer_individualInput = {
|
||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomer_individualInput, Prisma.CustomerUncheckedUpdateWithoutCustomer_individualInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_individualInput, Prisma.CustomerUncheckedCreateWithoutCustomer_individualInput>
|
||||
export type CustomerUpsertWithoutIndividualInput = {
|
||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutIndividualInput, Prisma.CustomerUncheckedUpdateWithoutIndividualInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutIndividualInput, Prisma.CustomerUncheckedCreateWithoutIndividualInput>
|
||||
where?: Prisma.CustomerWhereInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateToOneWithWhereWithoutCustomer_individualInput = {
|
||||
export type CustomerUpdateToOneWithWhereWithoutIndividualInput = {
|
||||
where?: Prisma.CustomerWhereInput
|
||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomer_individualInput, Prisma.CustomerUncheckedUpdateWithoutCustomer_individualInput>
|
||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutIndividualInput, Prisma.CustomerUncheckedUpdateWithoutIndividualInput>
|
||||
}
|
||||
|
||||
export type CustomerUpdateWithoutCustomer_individualInput = {
|
||||
export type CustomerUpdateWithoutIndividualInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_legal?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
legal?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateWithoutCustomer_individualInput = {
|
||||
export type CustomerUncheckedUpdateWithoutIndividualInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_legal?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
legal?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerCreateWithoutCustomer_legalInput = {
|
||||
export type CustomerCreateWithoutLegalInput = {
|
||||
id?: string
|
||||
is_favorite?: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
individual?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateWithoutCustomer_legalInput = {
|
||||
export type CustomerUncheckedCreateWithoutLegalInput = {
|
||||
id?: string
|
||||
is_favorite?: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
individual?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerCreateOrConnectWithoutCustomer_legalInput = {
|
||||
export type CustomerCreateOrConnectWithoutLegalInput = {
|
||||
where: Prisma.CustomerWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_legalInput, Prisma.CustomerUncheckedCreateWithoutCustomer_legalInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutLegalInput, Prisma.CustomerUncheckedCreateWithoutLegalInput>
|
||||
}
|
||||
|
||||
export type CustomerUpsertWithoutCustomer_legalInput = {
|
||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomer_legalInput, Prisma.CustomerUncheckedUpdateWithoutCustomer_legalInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutCustomer_legalInput, Prisma.CustomerUncheckedCreateWithoutCustomer_legalInput>
|
||||
export type CustomerUpsertWithoutLegalInput = {
|
||||
update: Prisma.XOR<Prisma.CustomerUpdateWithoutLegalInput, Prisma.CustomerUncheckedUpdateWithoutLegalInput>
|
||||
create: Prisma.XOR<Prisma.CustomerCreateWithoutLegalInput, Prisma.CustomerUncheckedCreateWithoutLegalInput>
|
||||
where?: Prisma.CustomerWhereInput
|
||||
}
|
||||
|
||||
export type CustomerUpdateToOneWithWhereWithoutCustomer_legalInput = {
|
||||
export type CustomerUpdateToOneWithWhereWithoutLegalInput = {
|
||||
where?: Prisma.CustomerWhereInput
|
||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutCustomer_legalInput, Prisma.CustomerUncheckedUpdateWithoutCustomer_legalInput>
|
||||
data: Prisma.XOR<Prisma.CustomerUpdateWithoutLegalInput, Prisma.CustomerUncheckedUpdateWithoutLegalInput>
|
||||
}
|
||||
|
||||
export type CustomerUpdateWithoutCustomer_legalInput = {
|
||||
export type CustomerUpdateWithoutLegalInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
individual?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateWithoutCustomer_legalInput = {
|
||||
export type CustomerUncheckedUpdateWithoutLegalInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
individual?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerCreateWithoutSales_invoicesInput = {
|
||||
id?: string
|
||||
is_favorite?: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
customer_legal?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
individual?: Prisma.CustomerIndividualCreateNestedOneWithoutCustomerInput
|
||||
legal?: Prisma.CustomerLegalCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedCreateWithoutSales_invoicesInput = {
|
||||
id?: string
|
||||
is_favorite?: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
customer_legal?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
individual?: Prisma.CustomerIndividualUncheckedCreateNestedOneWithoutCustomerInput
|
||||
legal?: Prisma.CustomerLegalUncheckedCreateNestedOneWithoutCustomerInput
|
||||
}
|
||||
|
||||
export type CustomerCreateOrConnectWithoutSales_invoicesInput = {
|
||||
@@ -608,25 +578,23 @@ export type CustomerUpdateToOneWithWhereWithoutSales_invoicesInput = {
|
||||
export type CustomerUpdateWithoutSales_invoicesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
customer_legal?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
individual?: Prisma.CustomerIndividualUpdateOneWithoutCustomerNestedInput
|
||||
legal?: Prisma.CustomerLegalUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
export type CustomerUncheckedUpdateWithoutSales_invoicesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_favorite?: Prisma.NullableBoolFieldUpdateOperationsInput | boolean | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
type?: Prisma.EnumCustomerTypeFieldUpdateOperationsInput | $Enums.CustomerType
|
||||
unknown_customer?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
customer_individual?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
customer_legal?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
individual?: Prisma.CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
legal?: Prisma.CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput
|
||||
}
|
||||
|
||||
|
||||
@@ -663,13 +631,12 @@ export type CustomerCountOutputTypeCountSales_invoicesArgs<ExtArgs extends runti
|
||||
export type CustomerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
is_favorite?: boolean
|
||||
type?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
deleted_at?: boolean
|
||||
type?: boolean
|
||||
unknown_customer?: boolean
|
||||
customer_individual?: boolean | Prisma.Customer$customer_individualArgs<ExtArgs>
|
||||
customer_legal?: boolean | Prisma.Customer$customer_legalArgs<ExtArgs>
|
||||
individual?: boolean | Prisma.Customer$individualArgs<ExtArgs>
|
||||
legal?: boolean | Prisma.Customer$legalArgs<ExtArgs>
|
||||
sales_invoices?: boolean | Prisma.Customer$sales_invoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["customer"]>
|
||||
@@ -679,17 +646,16 @@ export type CustomerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
export type CustomerSelectScalar = {
|
||||
id?: boolean
|
||||
is_favorite?: boolean
|
||||
type?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
deleted_at?: boolean
|
||||
type?: boolean
|
||||
unknown_customer?: boolean
|
||||
}
|
||||
|
||||
export type CustomerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "is_favorite" | "created_at" | "updated_at" | "deleted_at" | "type" | "unknown_customer", ExtArgs["result"]["customer"]>
|
||||
export type CustomerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "is_favorite" | "type" | "created_at" | "updated_at" | "deleted_at", ExtArgs["result"]["customer"]>
|
||||
export type CustomerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
customer_individual?: boolean | Prisma.Customer$customer_individualArgs<ExtArgs>
|
||||
customer_legal?: boolean | Prisma.Customer$customer_legalArgs<ExtArgs>
|
||||
individual?: boolean | Prisma.Customer$individualArgs<ExtArgs>
|
||||
legal?: boolean | Prisma.Customer$legalArgs<ExtArgs>
|
||||
sales_invoices?: boolean | Prisma.Customer$sales_invoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.CustomerCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
@@ -697,18 +663,17 @@ export type CustomerInclude<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
export type $CustomerPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "Customer"
|
||||
objects: {
|
||||
customer_individual: Prisma.$CustomerIndividualPayload<ExtArgs> | null
|
||||
customer_legal: Prisma.$CustomerLegalPayload<ExtArgs> | null
|
||||
individual: Prisma.$CustomerIndividualPayload<ExtArgs> | null
|
||||
legal: Prisma.$CustomerLegalPayload<ExtArgs> | null
|
||||
sales_invoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
is_favorite: boolean | null
|
||||
type: $Enums.CustomerType
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
deleted_at: Date | null
|
||||
type: $Enums.CustomerType
|
||||
unknown_customer: runtime.JsonValue | null
|
||||
}, ExtArgs["result"]["customer"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -1049,8 +1014,8 @@ readonly fields: CustomerFieldRefs;
|
||||
*/
|
||||
export interface Prisma__CustomerClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
customer_individual<T extends Prisma.Customer$customer_individualArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$customer_individualArgs<ExtArgs>>): Prisma.Prisma__CustomerIndividualClient<runtime.Types.Result.GetResult<Prisma.$CustomerIndividualPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
customer_legal<T extends Prisma.Customer$customer_legalArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$customer_legalArgs<ExtArgs>>): Prisma.Prisma__CustomerLegalClient<runtime.Types.Result.GetResult<Prisma.$CustomerLegalPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
individual<T extends Prisma.Customer$individualArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$individualArgs<ExtArgs>>): Prisma.Prisma__CustomerIndividualClient<runtime.Types.Result.GetResult<Prisma.$CustomerIndividualPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
legal<T extends Prisma.Customer$legalArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$legalArgs<ExtArgs>>): Prisma.Prisma__CustomerLegalClient<runtime.Types.Result.GetResult<Prisma.$CustomerLegalPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
sales_invoices<T extends Prisma.Customer$sales_invoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Customer$sales_invoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
@@ -1083,11 +1048,10 @@ export interface Prisma__CustomerClient<T, Null = never, ExtArgs extends runtime
|
||||
export interface CustomerFieldRefs {
|
||||
readonly id: Prisma.FieldRef<"Customer", 'String'>
|
||||
readonly is_favorite: Prisma.FieldRef<"Customer", 'Boolean'>
|
||||
readonly type: Prisma.FieldRef<"Customer", 'CustomerType'>
|
||||
readonly created_at: Prisma.FieldRef<"Customer", 'DateTime'>
|
||||
readonly updated_at: Prisma.FieldRef<"Customer", 'DateTime'>
|
||||
readonly deleted_at: Prisma.FieldRef<"Customer", 'DateTime'>
|
||||
readonly type: Prisma.FieldRef<"Customer", 'CustomerType'>
|
||||
readonly unknown_customer: Prisma.FieldRef<"Customer", 'Json'>
|
||||
}
|
||||
|
||||
|
||||
@@ -1436,9 +1400,9 @@ export type CustomerDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Inte
|
||||
}
|
||||
|
||||
/**
|
||||
* Customer.customer_individual
|
||||
* Customer.individual
|
||||
*/
|
||||
export type Customer$customer_individualArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type Customer$individualArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the CustomerIndividual
|
||||
*/
|
||||
@@ -1455,9 +1419,9 @@ export type Customer$customer_individualArgs<ExtArgs extends runtime.Types.Exten
|
||||
}
|
||||
|
||||
/**
|
||||
* Customer.customer_legal
|
||||
* Customer.legal
|
||||
*/
|
||||
export type Customer$customer_legalArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type Customer$legalArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the CustomerLegal
|
||||
*/
|
||||
|
||||
@@ -28,30 +28,33 @@ export type CustomerIndividualMinAggregateOutputType = {
|
||||
first_name: string | null
|
||||
last_name: string | null
|
||||
national_id: string | null
|
||||
mobile_number: string | null
|
||||
postal_code: string | null
|
||||
economic_code: string | null
|
||||
customer_id: string | null
|
||||
complex_id: string | null
|
||||
business_activity_id: string | null
|
||||
}
|
||||
|
||||
export type CustomerIndividualMaxAggregateOutputType = {
|
||||
first_name: string | null
|
||||
last_name: string | null
|
||||
national_id: string | null
|
||||
mobile_number: string | null
|
||||
postal_code: string | null
|
||||
economic_code: string | null
|
||||
customer_id: string | null
|
||||
complex_id: string | null
|
||||
business_activity_id: string | null
|
||||
}
|
||||
|
||||
export type CustomerIndividualCountAggregateOutputType = {
|
||||
first_name: number
|
||||
last_name: number
|
||||
national_id: number
|
||||
mobile_number: number
|
||||
postal_code: number
|
||||
economic_code: number
|
||||
customer_id: number
|
||||
complex_id: number
|
||||
business_activity_id: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -60,30 +63,33 @@ export type CustomerIndividualMinAggregateInputType = {
|
||||
first_name?: true
|
||||
last_name?: true
|
||||
national_id?: true
|
||||
mobile_number?: true
|
||||
postal_code?: true
|
||||
economic_code?: true
|
||||
customer_id?: true
|
||||
complex_id?: true
|
||||
business_activity_id?: true
|
||||
}
|
||||
|
||||
export type CustomerIndividualMaxAggregateInputType = {
|
||||
first_name?: true
|
||||
last_name?: true
|
||||
national_id?: true
|
||||
mobile_number?: true
|
||||
postal_code?: true
|
||||
economic_code?: true
|
||||
customer_id?: true
|
||||
complex_id?: true
|
||||
business_activity_id?: true
|
||||
}
|
||||
|
||||
export type CustomerIndividualCountAggregateInputType = {
|
||||
first_name?: true
|
||||
last_name?: true
|
||||
national_id?: true
|
||||
mobile_number?: true
|
||||
postal_code?: true
|
||||
economic_code?: true
|
||||
customer_id?: true
|
||||
complex_id?: true
|
||||
business_activity_id?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -163,10 +169,11 @@ export type CustomerIndividualGroupByOutputType = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code: string | null
|
||||
customer_id: string
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
_count: CustomerIndividualCountAggregateOutputType | null
|
||||
_min: CustomerIndividualMinAggregateOutputType | null
|
||||
_max: CustomerIndividualMaxAggregateOutputType | null
|
||||
@@ -194,51 +201,55 @@ export type CustomerIndividualWhereInput = {
|
||||
first_name?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
last_name?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
national_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
mobile_number?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
postal_code?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
customer_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
complex_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualOrderByWithRelationInput = {
|
||||
first_name?: Prisma.SortOrder
|
||||
last_name?: Prisma.SortOrder
|
||||
national_id?: Prisma.SortOrder
|
||||
mobile_number?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
complex?: Prisma.ComplexOrderByWithRelationInput
|
||||
business_activity?: Prisma.BusinessActivityOrderByWithRelationInput
|
||||
_relevance?: Prisma.CustomerIndividualOrderByRelevanceInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualWhereUniqueInput = Prisma.AtLeast<{
|
||||
customer_id?: string
|
||||
complex_id_national_id?: Prisma.CustomerIndividualComplex_idNational_idCompoundUniqueInput
|
||||
business_activity_id_national_id?: Prisma.CustomerIndividualBusiness_activity_idNational_idCompoundUniqueInput
|
||||
AND?: Prisma.CustomerIndividualWhereInput | Prisma.CustomerIndividualWhereInput[]
|
||||
OR?: Prisma.CustomerIndividualWhereInput[]
|
||||
NOT?: Prisma.CustomerIndividualWhereInput | Prisma.CustomerIndividualWhereInput[]
|
||||
first_name?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
last_name?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
national_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
mobile_number?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
postal_code?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
complex_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
}, "customer_id" | "complex_id_national_id">
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
}, "customer_id" | "business_activity_id_national_id">
|
||||
|
||||
export type CustomerIndividualOrderByWithAggregationInput = {
|
||||
first_name?: Prisma.SortOrder
|
||||
last_name?: Prisma.SortOrder
|
||||
national_id?: Prisma.SortOrder
|
||||
mobile_number?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
_count?: Prisma.CustomerIndividualCountOrderByAggregateInput
|
||||
_max?: Prisma.CustomerIndividualMaxOrderByAggregateInput
|
||||
_min?: Prisma.CustomerIndividualMinOrderByAggregateInput
|
||||
@@ -251,66 +262,73 @@ export type CustomerIndividualScalarWhereWithAggregatesInput = {
|
||||
first_name?: Prisma.StringWithAggregatesFilter<"CustomerIndividual"> | string
|
||||
last_name?: Prisma.StringWithAggregatesFilter<"CustomerIndividual"> | string
|
||||
national_id?: Prisma.StringWithAggregatesFilter<"CustomerIndividual"> | string
|
||||
mobile_number?: Prisma.StringWithAggregatesFilter<"CustomerIndividual"> | string
|
||||
postal_code?: Prisma.StringWithAggregatesFilter<"CustomerIndividual"> | string
|
||||
economic_code?: Prisma.StringNullableWithAggregatesFilter<"CustomerIndividual"> | string | null
|
||||
customer_id?: Prisma.StringWithAggregatesFilter<"CustomerIndividual"> | string
|
||||
complex_id?: Prisma.StringWithAggregatesFilter<"CustomerIndividual"> | string
|
||||
business_activity_id?: Prisma.StringWithAggregatesFilter<"CustomerIndividual"> | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomer_individualInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutCustomer_individualsInput
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutIndividualInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_individualsInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
customer_id: string
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomer_individualNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutCustomer_individualsNestedInput
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutIndividualNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutCustomer_individualsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateManyInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
customer_id: string
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateManyMutationInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
@@ -319,10 +337,11 @@ export type CustomerIndividualUncheckedUpdateManyInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualListRelationFilter = {
|
||||
@@ -346,8 +365,8 @@ export type CustomerIndividualOrderByRelevanceInput = {
|
||||
search: string
|
||||
}
|
||||
|
||||
export type CustomerIndividualComplex_idNational_idCompoundUniqueInput = {
|
||||
complex_id: string
|
||||
export type CustomerIndividualBusiness_activity_idNational_idCompoundUniqueInput = {
|
||||
business_activity_id: string
|
||||
national_id: string
|
||||
}
|
||||
|
||||
@@ -355,71 +374,74 @@ export type CustomerIndividualCountOrderByAggregateInput = {
|
||||
first_name?: Prisma.SortOrder
|
||||
last_name?: Prisma.SortOrder
|
||||
national_id?: Prisma.SortOrder
|
||||
mobile_number?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerIndividualMaxOrderByAggregateInput = {
|
||||
first_name?: Prisma.SortOrder
|
||||
last_name?: Prisma.SortOrder
|
||||
national_id?: Prisma.SortOrder
|
||||
mobile_number?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerIndividualMinOrderByAggregateInput = {
|
||||
first_name?: Prisma.SortOrder
|
||||
last_name?: Prisma.SortOrder
|
||||
national_id?: Prisma.SortOrder
|
||||
mobile_number?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput> | Prisma.CustomerIndividualCreateWithoutComplexInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput | Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyComplexInputEnvelope
|
||||
export type CustomerIndividualCreateNestedManyWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutBusiness_activityInput, Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput> | Prisma.CustomerIndividualCreateWithoutBusiness_activityInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerIndividualCreateOrConnectWithoutBusiness_activityInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyBusiness_activityInputEnvelope
|
||||
connect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput> | Prisma.CustomerIndividualCreateWithoutComplexInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput | Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyComplexInputEnvelope
|
||||
export type CustomerIndividualUncheckedCreateNestedManyWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutBusiness_activityInput, Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput> | Prisma.CustomerIndividualCreateWithoutBusiness_activityInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerIndividualCreateOrConnectWithoutBusiness_activityInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyBusiness_activityInputEnvelope
|
||||
connect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput> | Prisma.CustomerIndividualCreateWithoutComplexInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput | Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput | Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyComplexInputEnvelope
|
||||
export type CustomerIndividualUpdateManyWithoutBusiness_activityNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutBusiness_activityInput, Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput> | Prisma.CustomerIndividualCreateWithoutBusiness_activityInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerIndividualCreateOrConnectWithoutBusiness_activityInput[]
|
||||
upsert?: Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutBusiness_activityInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyBusiness_activityInputEnvelope
|
||||
set?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
disconnect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
delete?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
connect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
update?: Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput | Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.CustomerIndividualUpdateManyWithWhereWithoutComplexInput | Prisma.CustomerIndividualUpdateManyWithWhereWithoutComplexInput[]
|
||||
update?: Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutBusiness_activityInput[]
|
||||
updateMany?: Prisma.CustomerIndividualUpdateManyWithWhereWithoutBusiness_activityInput | Prisma.CustomerIndividualUpdateManyWithWhereWithoutBusiness_activityInput[]
|
||||
deleteMany?: Prisma.CustomerIndividualScalarWhereInput | Prisma.CustomerIndividualScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput> | Prisma.CustomerIndividualCreateWithoutComplexInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput | Prisma.CustomerIndividualCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput | Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyComplexInputEnvelope
|
||||
export type CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutBusiness_activityInput, Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput> | Prisma.CustomerIndividualCreateWithoutBusiness_activityInput[] | Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.CustomerIndividualCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerIndividualCreateOrConnectWithoutBusiness_activityInput[]
|
||||
upsert?: Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerIndividualUpsertWithWhereUniqueWithoutBusiness_activityInput[]
|
||||
createMany?: Prisma.CustomerIndividualCreateManyBusiness_activityInputEnvelope
|
||||
set?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
disconnect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
delete?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
connect?: Prisma.CustomerIndividualWhereUniqueInput | Prisma.CustomerIndividualWhereUniqueInput[]
|
||||
update?: Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput | Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.CustomerIndividualUpdateManyWithWhereWithoutComplexInput | Prisma.CustomerIndividualUpdateManyWithWhereWithoutComplexInput[]
|
||||
update?: Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerIndividualUpdateWithWhereUniqueWithoutBusiness_activityInput[]
|
||||
updateMany?: Prisma.CustomerIndividualUpdateManyWithWhereWithoutBusiness_activityInput | Prisma.CustomerIndividualUpdateManyWithWhereWithoutBusiness_activityInput[]
|
||||
deleteMany?: Prisma.CustomerIndividualScalarWhereInput | Prisma.CustomerIndividualScalarWhereInput[]
|
||||
}
|
||||
|
||||
@@ -455,48 +477,50 @@ export type CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerIndividualUpdateToOneWithWhereWithoutCustomerInput, Prisma.CustomerIndividualUpdateWithoutCustomerInput>, Prisma.CustomerIndividualUncheckedUpdateWithoutCustomerInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateWithoutComplexInput = {
|
||||
export type CustomerIndividualCreateWithoutBusiness_activityInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomer_individualInput
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutIndividualInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateWithoutComplexInput = {
|
||||
export type CustomerIndividualUncheckedCreateWithoutBusiness_activityInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
customer_id: string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateOrConnectWithoutComplexInput = {
|
||||
export type CustomerIndividualCreateOrConnectWithoutBusiness_activityInput = {
|
||||
where: Prisma.CustomerIndividualWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput>
|
||||
create: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutBusiness_activityInput, Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateManyComplexInputEnvelope = {
|
||||
data: Prisma.CustomerIndividualCreateManyComplexInput | Prisma.CustomerIndividualCreateManyComplexInput[]
|
||||
export type CustomerIndividualCreateManyBusiness_activityInputEnvelope = {
|
||||
data: Prisma.CustomerIndividualCreateManyBusiness_activityInput | Prisma.CustomerIndividualCreateManyBusiness_activityInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpsertWithWhereUniqueWithoutComplexInput = {
|
||||
export type CustomerIndividualUpsertWithWhereUniqueWithoutBusiness_activityInput = {
|
||||
where: Prisma.CustomerIndividualWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.CustomerIndividualUpdateWithoutComplexInput, Prisma.CustomerIndividualUncheckedUpdateWithoutComplexInput>
|
||||
create: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutComplexInput, Prisma.CustomerIndividualUncheckedCreateWithoutComplexInput>
|
||||
update: Prisma.XOR<Prisma.CustomerIndividualUpdateWithoutBusiness_activityInput, Prisma.CustomerIndividualUncheckedUpdateWithoutBusiness_activityInput>
|
||||
create: Prisma.XOR<Prisma.CustomerIndividualCreateWithoutBusiness_activityInput, Prisma.CustomerIndividualUncheckedCreateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateWithWhereUniqueWithoutComplexInput = {
|
||||
export type CustomerIndividualUpdateWithWhereUniqueWithoutBusiness_activityInput = {
|
||||
where: Prisma.CustomerIndividualWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.CustomerIndividualUpdateWithoutComplexInput, Prisma.CustomerIndividualUncheckedUpdateWithoutComplexInput>
|
||||
data: Prisma.XOR<Prisma.CustomerIndividualUpdateWithoutBusiness_activityInput, Prisma.CustomerIndividualUncheckedUpdateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateManyWithWhereWithoutComplexInput = {
|
||||
export type CustomerIndividualUpdateManyWithWhereWithoutBusiness_activityInput = {
|
||||
where: Prisma.CustomerIndividualScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.CustomerIndividualUpdateManyMutationInput, Prisma.CustomerIndividualUncheckedUpdateManyWithoutComplexInput>
|
||||
data: Prisma.XOR<Prisma.CustomerIndividualUpdateManyMutationInput, Prisma.CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualScalarWhereInput = {
|
||||
@@ -506,28 +530,31 @@ export type CustomerIndividualScalarWhereInput = {
|
||||
first_name?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
last_name?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
national_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
mobile_number?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
postal_code?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
customer_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
complex_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateWithoutCustomerInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutCustomer_individualsInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_individualsInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateWithoutCustomerInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateOrConnectWithoutCustomerInput = {
|
||||
@@ -550,51 +577,57 @@ export type CustomerIndividualUpdateWithoutCustomerInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutCustomer_individualsNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutCustomer_individualsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateWithoutCustomerInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateManyComplexInput = {
|
||||
export type CustomerIndividualCreateManyBusiness_activityInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code?: string | null
|
||||
customer_id: string
|
||||
}
|
||||
|
||||
export type CustomerIndividualUpdateWithoutComplexInput = {
|
||||
export type CustomerIndividualUpdateWithoutBusiness_activityInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomer_individualNestedInput
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutIndividualNestedInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateWithoutComplexInput = {
|
||||
export type CustomerIndividualUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedUpdateManyWithoutComplexInput = {
|
||||
export type CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityInput = {
|
||||
first_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
last_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
national_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
mobile_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -606,12 +639,13 @@ export type CustomerIndividualSelect<ExtArgs extends runtime.Types.Extensions.In
|
||||
first_name?: boolean
|
||||
last_name?: boolean
|
||||
national_id?: boolean
|
||||
mobile_number?: boolean
|
||||
postal_code?: boolean
|
||||
economic_code?: boolean
|
||||
customer_id?: boolean
|
||||
complex_id?: boolean
|
||||
business_activity_id?: boolean
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["customerIndividual"]>
|
||||
|
||||
|
||||
@@ -620,32 +654,34 @@ export type CustomerIndividualSelectScalar = {
|
||||
first_name?: boolean
|
||||
last_name?: boolean
|
||||
national_id?: boolean
|
||||
mobile_number?: boolean
|
||||
postal_code?: boolean
|
||||
economic_code?: boolean
|
||||
customer_id?: boolean
|
||||
complex_id?: boolean
|
||||
business_activity_id?: boolean
|
||||
}
|
||||
|
||||
export type CustomerIndividualOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"first_name" | "last_name" | "national_id" | "postal_code" | "economic_code" | "customer_id" | "complex_id", ExtArgs["result"]["customerIndividual"]>
|
||||
export type CustomerIndividualOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"first_name" | "last_name" | "national_id" | "mobile_number" | "postal_code" | "economic_code" | "customer_id" | "business_activity_id", ExtArgs["result"]["customerIndividual"]>
|
||||
export type CustomerIndividualInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $CustomerIndividualPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "CustomerIndividual"
|
||||
objects: {
|
||||
customer: Prisma.$CustomerPayload<ExtArgs>
|
||||
complex: Prisma.$ComplexPayload<ExtArgs>
|
||||
business_activity: Prisma.$BusinessActivityPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
economic_code: string | null
|
||||
customer_id: string
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
}, ExtArgs["result"]["customerIndividual"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -987,7 +1023,7 @@ readonly fields: CustomerIndividualFieldRefs;
|
||||
export interface Prisma__CustomerIndividualClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
customer<T extends Prisma.CustomerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.CustomerDefaultArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
complex<T extends Prisma.ComplexDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ComplexDefaultArgs<ExtArgs>>): Prisma.Prisma__ComplexClient<runtime.Types.Result.GetResult<Prisma.$ComplexPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
business_activity<T extends Prisma.BusinessActivityDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivityDefaultArgs<ExtArgs>>): Prisma.Prisma__BusinessActivityClient<runtime.Types.Result.GetResult<Prisma.$BusinessActivityPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1020,10 +1056,11 @@ export interface CustomerIndividualFieldRefs {
|
||||
readonly first_name: Prisma.FieldRef<"CustomerIndividual", 'String'>
|
||||
readonly last_name: Prisma.FieldRef<"CustomerIndividual", 'String'>
|
||||
readonly national_id: Prisma.FieldRef<"CustomerIndividual", 'String'>
|
||||
readonly mobile_number: Prisma.FieldRef<"CustomerIndividual", 'String'>
|
||||
readonly postal_code: Prisma.FieldRef<"CustomerIndividual", 'String'>
|
||||
readonly economic_code: Prisma.FieldRef<"CustomerIndividual", 'String'>
|
||||
readonly customer_id: Prisma.FieldRef<"CustomerIndividual", 'String'>
|
||||
readonly complex_id: Prisma.FieldRef<"CustomerIndividual", 'String'>
|
||||
readonly business_activity_id: Prisma.FieldRef<"CustomerIndividual", 'String'>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -25,59 +25,59 @@ export type AggregateCustomerLegal = {
|
||||
}
|
||||
|
||||
export type CustomerLegalMinAggregateOutputType = {
|
||||
company_name: string | null
|
||||
name: string | null
|
||||
economic_code: string | null
|
||||
registration_number: string | null
|
||||
postal_code: string | null
|
||||
customer_id: string | null
|
||||
complex_id: string | null
|
||||
business_activity_id: string | null
|
||||
}
|
||||
|
||||
export type CustomerLegalMaxAggregateOutputType = {
|
||||
company_name: string | null
|
||||
name: string | null
|
||||
economic_code: string | null
|
||||
registration_number: string | null
|
||||
postal_code: string | null
|
||||
customer_id: string | null
|
||||
complex_id: string | null
|
||||
business_activity_id: string | null
|
||||
}
|
||||
|
||||
export type CustomerLegalCountAggregateOutputType = {
|
||||
company_name: number
|
||||
name: number
|
||||
economic_code: number
|
||||
registration_number: number
|
||||
postal_code: number
|
||||
customer_id: number
|
||||
complex_id: number
|
||||
business_activity_id: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
|
||||
export type CustomerLegalMinAggregateInputType = {
|
||||
company_name?: true
|
||||
name?: true
|
||||
economic_code?: true
|
||||
registration_number?: true
|
||||
postal_code?: true
|
||||
customer_id?: true
|
||||
complex_id?: true
|
||||
business_activity_id?: true
|
||||
}
|
||||
|
||||
export type CustomerLegalMaxAggregateInputType = {
|
||||
company_name?: true
|
||||
name?: true
|
||||
economic_code?: true
|
||||
registration_number?: true
|
||||
postal_code?: true
|
||||
customer_id?: true
|
||||
complex_id?: true
|
||||
business_activity_id?: true
|
||||
}
|
||||
|
||||
export type CustomerLegalCountAggregateInputType = {
|
||||
company_name?: true
|
||||
name?: true
|
||||
economic_code?: true
|
||||
registration_number?: true
|
||||
postal_code?: true
|
||||
customer_id?: true
|
||||
complex_id?: true
|
||||
business_activity_id?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -154,12 +154,12 @@ export type CustomerLegalGroupByArgs<ExtArgs extends runtime.Types.Extensions.In
|
||||
}
|
||||
|
||||
export type CustomerLegalGroupByOutputType = {
|
||||
company_name: string
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number: string | null
|
||||
postal_code: string
|
||||
customer_id: string
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
_count: CustomerLegalCountAggregateOutputType | null
|
||||
_min: CustomerLegalMinAggregateOutputType | null
|
||||
_max: CustomerLegalMaxAggregateOutputType | null
|
||||
@@ -184,50 +184,50 @@ export type CustomerLegalWhereInput = {
|
||||
AND?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
OR?: Prisma.CustomerLegalWhereInput[]
|
||||
NOT?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
company_name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
economic_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
registration_number?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
registration_number?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
customer_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
complex_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalOrderByWithRelationInput = {
|
||||
company_name?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
registration_number?: Prisma.SortOrder
|
||||
registration_number?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
complex?: Prisma.ComplexOrderByWithRelationInput
|
||||
business_activity?: Prisma.BusinessActivityOrderByWithRelationInput
|
||||
_relevance?: Prisma.CustomerLegalOrderByRelevanceInput
|
||||
}
|
||||
|
||||
export type CustomerLegalWhereUniqueInput = Prisma.AtLeast<{
|
||||
customer_id?: string
|
||||
complex_id_registration_number?: Prisma.CustomerLegalComplex_idRegistration_numberCompoundUniqueInput
|
||||
business_activity_id_economic_code?: Prisma.CustomerLegalBusiness_activity_idEconomic_codeCompoundUniqueInput
|
||||
AND?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
OR?: Prisma.CustomerLegalWhereInput[]
|
||||
NOT?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
company_name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
economic_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
registration_number?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
registration_number?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
complex_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
}, "customer_id" | "complex_id_registration_number">
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
}, "customer_id" | "business_activity_id_economic_code">
|
||||
|
||||
export type CustomerLegalOrderByWithAggregationInput = {
|
||||
company_name?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
registration_number?: Prisma.SortOrder
|
||||
registration_number?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
_count?: Prisma.CustomerLegalCountOrderByAggregateInput
|
||||
_max?: Prisma.CustomerLegalMaxOrderByAggregateInput
|
||||
_min?: Prisma.CustomerLegalMinOrderByAggregateInput
|
||||
@@ -237,73 +237,73 @@ export type CustomerLegalScalarWhereWithAggregatesInput = {
|
||||
AND?: Prisma.CustomerLegalScalarWhereWithAggregatesInput | Prisma.CustomerLegalScalarWhereWithAggregatesInput[]
|
||||
OR?: Prisma.CustomerLegalScalarWhereWithAggregatesInput[]
|
||||
NOT?: Prisma.CustomerLegalScalarWhereWithAggregatesInput | Prisma.CustomerLegalScalarWhereWithAggregatesInput[]
|
||||
company_name?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
name?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
economic_code?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
registration_number?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
registration_number?: Prisma.StringNullableWithAggregatesFilter<"CustomerLegal"> | string | null
|
||||
postal_code?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
customer_id?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
complex_id?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
business_activity_id?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateInput = {
|
||||
company_name: string
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomer_legalInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutCustomer_legalsInput
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutLegalInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_legalsInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateInput = {
|
||||
company_name: string
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
customer_id: string
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomer_legalNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutCustomer_legalsNestedInput
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutLegalNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutCustomer_legalsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateManyInput = {
|
||||
company_name: string
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
customer_id: string
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateManyMutationInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateManyInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalListRelationFilter = {
|
||||
@@ -327,77 +327,77 @@ export type CustomerLegalOrderByRelevanceInput = {
|
||||
search: string
|
||||
}
|
||||
|
||||
export type CustomerLegalComplex_idRegistration_numberCompoundUniqueInput = {
|
||||
complex_id: string
|
||||
registration_number: string
|
||||
export type CustomerLegalBusiness_activity_idEconomic_codeCompoundUniqueInput = {
|
||||
business_activity_id: string
|
||||
economic_code: string
|
||||
}
|
||||
|
||||
export type CustomerLegalCountOrderByAggregateInput = {
|
||||
company_name?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
registration_number?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerLegalMaxOrderByAggregateInput = {
|
||||
company_name?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
registration_number?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerLegalMinOrderByAggregateInput = {
|
||||
company_name?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
registration_number?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput> | Prisma.CustomerLegalCreateWithoutComplexInput[] | Prisma.CustomerLegalUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutComplexInput | Prisma.CustomerLegalCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyComplexInputEnvelope
|
||||
export type CustomerLegalCreateNestedManyWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutBusiness_activityInput, Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput> | Prisma.CustomerLegalCreateWithoutBusiness_activityInput[] | Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyBusiness_activityInputEnvelope
|
||||
connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateNestedManyWithoutComplexInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput> | Prisma.CustomerLegalCreateWithoutComplexInput[] | Prisma.CustomerLegalUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutComplexInput | Prisma.CustomerLegalCreateOrConnectWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyComplexInputEnvelope
|
||||
export type CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutBusiness_activityInput, Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput> | Prisma.CustomerLegalCreateWithoutBusiness_activityInput[] | Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyBusiness_activityInputEnvelope
|
||||
connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput> | Prisma.CustomerLegalCreateWithoutComplexInput[] | Prisma.CustomerLegalUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutComplexInput | Prisma.CustomerLegalCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.CustomerLegalUpsertWithWhereUniqueWithoutComplexInput | Prisma.CustomerLegalUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyComplexInputEnvelope
|
||||
export type CustomerLegalUpdateManyWithoutBusiness_activityNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutBusiness_activityInput, Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput> | Prisma.CustomerLegalCreateWithoutBusiness_activityInput[] | Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput[]
|
||||
upsert?: Prisma.CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyBusiness_activityInputEnvelope
|
||||
set?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
disconnect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
delete?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
update?: Prisma.CustomerLegalUpdateWithWhereUniqueWithoutComplexInput | Prisma.CustomerLegalUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.CustomerLegalUpdateManyWithWhereWithoutComplexInput | Prisma.CustomerLegalUpdateManyWithWhereWithoutComplexInput[]
|
||||
update?: Prisma.CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput[]
|
||||
updateMany?: Prisma.CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput | Prisma.CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput[]
|
||||
deleteMany?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateManyWithoutComplexNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput> | Prisma.CustomerLegalCreateWithoutComplexInput[] | Prisma.CustomerLegalUncheckedCreateWithoutComplexInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutComplexInput | Prisma.CustomerLegalCreateOrConnectWithoutComplexInput[]
|
||||
upsert?: Prisma.CustomerLegalUpsertWithWhereUniqueWithoutComplexInput | Prisma.CustomerLegalUpsertWithWhereUniqueWithoutComplexInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyComplexInputEnvelope
|
||||
export type CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.CustomerLegalCreateWithoutBusiness_activityInput, Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput> | Prisma.CustomerLegalCreateWithoutBusiness_activityInput[] | Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput | Prisma.CustomerLegalCreateOrConnectWithoutBusiness_activityInput[]
|
||||
upsert?: Prisma.CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput[]
|
||||
createMany?: Prisma.CustomerLegalCreateManyBusiness_activityInputEnvelope
|
||||
set?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
disconnect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
delete?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
connect?: Prisma.CustomerLegalWhereUniqueInput | Prisma.CustomerLegalWhereUniqueInput[]
|
||||
update?: Prisma.CustomerLegalUpdateWithWhereUniqueWithoutComplexInput | Prisma.CustomerLegalUpdateWithWhereUniqueWithoutComplexInput[]
|
||||
updateMany?: Prisma.CustomerLegalUpdateManyWithWhereWithoutComplexInput | Prisma.CustomerLegalUpdateManyWithWhereWithoutComplexInput[]
|
||||
update?: Prisma.CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput | Prisma.CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput[]
|
||||
updateMany?: Prisma.CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput | Prisma.CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput[]
|
||||
deleteMany?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
}
|
||||
|
||||
@@ -433,74 +433,74 @@ export type CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.CustomerLegalUpdateToOneWithWhereWithoutCustomerInput, Prisma.CustomerLegalUpdateWithoutCustomerInput>, Prisma.CustomerLegalUncheckedUpdateWithoutCustomerInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateWithoutComplexInput = {
|
||||
company_name: string
|
||||
export type CustomerLegalCreateWithoutBusiness_activityInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutCustomer_legalInput
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutLegalInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateWithoutComplexInput = {
|
||||
company_name: string
|
||||
export type CustomerLegalUncheckedCreateWithoutBusiness_activityInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
customer_id: string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateOrConnectWithoutComplexInput = {
|
||||
export type CustomerLegalCreateOrConnectWithoutBusiness_activityInput = {
|
||||
where: Prisma.CustomerLegalWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput>
|
||||
create: Prisma.XOR<Prisma.CustomerLegalCreateWithoutBusiness_activityInput, Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateManyComplexInputEnvelope = {
|
||||
data: Prisma.CustomerLegalCreateManyComplexInput | Prisma.CustomerLegalCreateManyComplexInput[]
|
||||
export type CustomerLegalCreateManyBusiness_activityInputEnvelope = {
|
||||
data: Prisma.CustomerLegalCreateManyBusiness_activityInput | Prisma.CustomerLegalCreateManyBusiness_activityInput[]
|
||||
skipDuplicates?: boolean
|
||||
}
|
||||
|
||||
export type CustomerLegalUpsertWithWhereUniqueWithoutComplexInput = {
|
||||
export type CustomerLegalUpsertWithWhereUniqueWithoutBusiness_activityInput = {
|
||||
where: Prisma.CustomerLegalWhereUniqueInput
|
||||
update: Prisma.XOR<Prisma.CustomerLegalUpdateWithoutComplexInput, Prisma.CustomerLegalUncheckedUpdateWithoutComplexInput>
|
||||
create: Prisma.XOR<Prisma.CustomerLegalCreateWithoutComplexInput, Prisma.CustomerLegalUncheckedCreateWithoutComplexInput>
|
||||
update: Prisma.XOR<Prisma.CustomerLegalUpdateWithoutBusiness_activityInput, Prisma.CustomerLegalUncheckedUpdateWithoutBusiness_activityInput>
|
||||
create: Prisma.XOR<Prisma.CustomerLegalCreateWithoutBusiness_activityInput, Prisma.CustomerLegalUncheckedCreateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateWithWhereUniqueWithoutComplexInput = {
|
||||
export type CustomerLegalUpdateWithWhereUniqueWithoutBusiness_activityInput = {
|
||||
where: Prisma.CustomerLegalWhereUniqueInput
|
||||
data: Prisma.XOR<Prisma.CustomerLegalUpdateWithoutComplexInput, Prisma.CustomerLegalUncheckedUpdateWithoutComplexInput>
|
||||
data: Prisma.XOR<Prisma.CustomerLegalUpdateWithoutBusiness_activityInput, Prisma.CustomerLegalUncheckedUpdateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateManyWithWhereWithoutComplexInput = {
|
||||
export type CustomerLegalUpdateManyWithWhereWithoutBusiness_activityInput = {
|
||||
where: Prisma.CustomerLegalScalarWhereInput
|
||||
data: Prisma.XOR<Prisma.CustomerLegalUpdateManyMutationInput, Prisma.CustomerLegalUncheckedUpdateManyWithoutComplexInput>
|
||||
data: Prisma.XOR<Prisma.CustomerLegalUpdateManyMutationInput, Prisma.CustomerLegalUncheckedUpdateManyWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalScalarWhereInput = {
|
||||
AND?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
OR?: Prisma.CustomerLegalScalarWhereInput[]
|
||||
NOT?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
company_name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
economic_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
registration_number?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
registration_number?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
customer_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
complex_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateWithoutCustomerInput = {
|
||||
company_name: string
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutCustomer_legalsInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_legalsInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateWithoutCustomerInput = {
|
||||
company_name: string
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateOrConnectWithoutCustomerInput = {
|
||||
@@ -520,49 +520,49 @@ export type CustomerLegalUpdateToOneWithWhereWithoutCustomerInput = {
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateWithoutCustomerInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutCustomer_legalsNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutCustomer_legalsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateWithoutCustomerInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateManyComplexInput = {
|
||||
company_name: string
|
||||
export type CustomerLegalCreateManyBusiness_activityInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
customer_id: string
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateWithoutComplexInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
export type CustomerLegalUpdateWithoutBusiness_activityInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutCustomer_legalNestedInput
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutLegalNestedInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateWithoutComplexInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
export type CustomerLegalUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateManyWithoutComplexInput = {
|
||||
company_name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
export type CustomerLegalUncheckedUpdateManyWithoutBusiness_activityInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
@@ -570,46 +570,46 @@ export type CustomerLegalUncheckedUpdateManyWithoutComplexInput = {
|
||||
|
||||
|
||||
export type CustomerLegalSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
company_name?: boolean
|
||||
name?: boolean
|
||||
economic_code?: boolean
|
||||
registration_number?: boolean
|
||||
postal_code?: boolean
|
||||
customer_id?: boolean
|
||||
complex_id?: boolean
|
||||
business_activity_id?: boolean
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["customerLegal"]>
|
||||
|
||||
|
||||
|
||||
export type CustomerLegalSelectScalar = {
|
||||
company_name?: boolean
|
||||
name?: boolean
|
||||
economic_code?: boolean
|
||||
registration_number?: boolean
|
||||
postal_code?: boolean
|
||||
customer_id?: boolean
|
||||
complex_id?: boolean
|
||||
business_activity_id?: boolean
|
||||
}
|
||||
|
||||
export type CustomerLegalOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"company_name" | "economic_code" | "registration_number" | "postal_code" | "customer_id" | "complex_id", ExtArgs["result"]["customerLegal"]>
|
||||
export type CustomerLegalOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"name" | "economic_code" | "registration_number" | "postal_code" | "customer_id" | "business_activity_id", ExtArgs["result"]["customerLegal"]>
|
||||
export type CustomerLegalInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $CustomerLegalPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "CustomerLegal"
|
||||
objects: {
|
||||
customer: Prisma.$CustomerPayload<ExtArgs>
|
||||
complex: Prisma.$ComplexPayload<ExtArgs>
|
||||
business_activity: Prisma.$BusinessActivityPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
company_name: string
|
||||
name: string
|
||||
economic_code: string
|
||||
registration_number: string
|
||||
registration_number: string | null
|
||||
postal_code: string
|
||||
customer_id: string
|
||||
complex_id: string
|
||||
business_activity_id: string
|
||||
}, ExtArgs["result"]["customerLegal"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -693,8 +693,8 @@ export interface CustomerLegalDelegate<ExtArgs extends runtime.Types.Extensions.
|
||||
* // Get first 10 CustomerLegals
|
||||
* const customerLegals = await prisma.customerLegal.findMany({ take: 10 })
|
||||
*
|
||||
* // Only select the `company_name`
|
||||
* const customerLegalWithCompany_nameOnly = await prisma.customerLegal.findMany({ select: { company_name: true } })
|
||||
* // Only select the `name`
|
||||
* const customerLegalWithNameOnly = await prisma.customerLegal.findMany({ select: { name: true } })
|
||||
*
|
||||
*/
|
||||
findMany<T extends CustomerLegalFindManyArgs>(args?: Prisma.SelectSubset<T, CustomerLegalFindManyArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomerLegalPayload<ExtArgs>, T, "findMany", GlobalOmitOptions>>
|
||||
@@ -951,7 +951,7 @@ readonly fields: CustomerLegalFieldRefs;
|
||||
export interface Prisma__CustomerLegalClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
customer<T extends Prisma.CustomerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.CustomerDefaultArgs<ExtArgs>>): Prisma.Prisma__CustomerClient<runtime.Types.Result.GetResult<Prisma.$CustomerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
complex<T extends Prisma.ComplexDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ComplexDefaultArgs<ExtArgs>>): Prisma.Prisma__ComplexClient<runtime.Types.Result.GetResult<Prisma.$ComplexPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
business_activity<T extends Prisma.BusinessActivityDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivityDefaultArgs<ExtArgs>>): Prisma.Prisma__BusinessActivityClient<runtime.Types.Result.GetResult<Prisma.$BusinessActivityPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -981,12 +981,12 @@ export interface Prisma__CustomerLegalClient<T, Null = never, ExtArgs extends ru
|
||||
* Fields of the CustomerLegal model
|
||||
*/
|
||||
export interface CustomerLegalFieldRefs {
|
||||
readonly company_name: Prisma.FieldRef<"CustomerLegal", 'String'>
|
||||
readonly name: Prisma.FieldRef<"CustomerLegal", 'String'>
|
||||
readonly economic_code: Prisma.FieldRef<"CustomerLegal", 'String'>
|
||||
readonly registration_number: Prisma.FieldRef<"CustomerLegal", 'String'>
|
||||
readonly postal_code: Prisma.FieldRef<"CustomerLegal", 'String'>
|
||||
readonly customer_id: Prisma.FieldRef<"CustomerLegal", 'String'>
|
||||
readonly complex_id: Prisma.FieldRef<"CustomerLegal", 'String'>
|
||||
readonly business_activity_id: Prisma.FieldRef<"CustomerLegal", 'String'>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -310,11 +310,6 @@ export type DeviceUncheckedUpdateManyInput = {
|
||||
brand_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type DeviceNullableScalarRelationFilter = {
|
||||
is?: Prisma.DeviceWhereInput | null
|
||||
isNot?: Prisma.DeviceWhereInput | null
|
||||
}
|
||||
|
||||
export type DeviceListRelationFilter = {
|
||||
every?: Prisma.DeviceWhereInput
|
||||
some?: Prisma.DeviceWhereInput
|
||||
@@ -358,20 +353,9 @@ export type DeviceMinOrderByAggregateInput = {
|
||||
brand_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type DeviceCreateNestedOneWithoutPosesInput = {
|
||||
create?: Prisma.XOR<Prisma.DeviceCreateWithoutPosesInput, Prisma.DeviceUncheckedCreateWithoutPosesInput>
|
||||
connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutPosesInput
|
||||
connect?: Prisma.DeviceWhereUniqueInput
|
||||
}
|
||||
|
||||
export type DeviceUpdateOneWithoutPosesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.DeviceCreateWithoutPosesInput, Prisma.DeviceUncheckedCreateWithoutPosesInput>
|
||||
connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutPosesInput
|
||||
upsert?: Prisma.DeviceUpsertWithoutPosesInput
|
||||
disconnect?: Prisma.DeviceWhereInput | boolean
|
||||
delete?: Prisma.DeviceWhereInput | boolean
|
||||
connect?: Prisma.DeviceWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.DeviceUpdateToOneWithWhereWithoutPosesInput, Prisma.DeviceUpdateWithoutPosesInput>, Prisma.DeviceUncheckedUpdateWithoutPosesInput>
|
||||
export type DeviceNullableScalarRelationFilter = {
|
||||
is?: Prisma.DeviceWhereInput | null
|
||||
isNot?: Prisma.DeviceWhereInput | null
|
||||
}
|
||||
|
||||
export type DeviceCreateNestedManyWithoutBrandInput = {
|
||||
@@ -416,56 +400,20 @@ export type DeviceUncheckedUpdateManyWithoutBrandNestedInput = {
|
||||
deleteMany?: Prisma.DeviceScalarWhereInput | Prisma.DeviceScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type DeviceCreateWithoutPosesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
os_version?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
brand: Prisma.DeviceBrandCreateNestedOneWithoutDevicesInput
|
||||
export type DeviceCreateNestedOneWithoutPosesInput = {
|
||||
create?: Prisma.XOR<Prisma.DeviceCreateWithoutPosesInput, Prisma.DeviceUncheckedCreateWithoutPosesInput>
|
||||
connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutPosesInput
|
||||
connect?: Prisma.DeviceWhereUniqueInput
|
||||
}
|
||||
|
||||
export type DeviceUncheckedCreateWithoutPosesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
os_version?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
brand_id: string
|
||||
}
|
||||
|
||||
export type DeviceCreateOrConnectWithoutPosesInput = {
|
||||
where: Prisma.DeviceWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.DeviceCreateWithoutPosesInput, Prisma.DeviceUncheckedCreateWithoutPosesInput>
|
||||
}
|
||||
|
||||
export type DeviceUpsertWithoutPosesInput = {
|
||||
update: Prisma.XOR<Prisma.DeviceUpdateWithoutPosesInput, Prisma.DeviceUncheckedUpdateWithoutPosesInput>
|
||||
create: Prisma.XOR<Prisma.DeviceCreateWithoutPosesInput, Prisma.DeviceUncheckedCreateWithoutPosesInput>
|
||||
where?: Prisma.DeviceWhereInput
|
||||
}
|
||||
|
||||
export type DeviceUpdateToOneWithWhereWithoutPosesInput = {
|
||||
where?: Prisma.DeviceWhereInput
|
||||
data: Prisma.XOR<Prisma.DeviceUpdateWithoutPosesInput, Prisma.DeviceUncheckedUpdateWithoutPosesInput>
|
||||
}
|
||||
|
||||
export type DeviceUpdateWithoutPosesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
os_version?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
brand?: Prisma.DeviceBrandUpdateOneRequiredWithoutDevicesNestedInput
|
||||
}
|
||||
|
||||
export type DeviceUncheckedUpdateWithoutPosesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
os_version?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
brand_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
export type DeviceUpdateOneWithoutPosesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.DeviceCreateWithoutPosesInput, Prisma.DeviceUncheckedCreateWithoutPosesInput>
|
||||
connectOrCreate?: Prisma.DeviceCreateOrConnectWithoutPosesInput
|
||||
upsert?: Prisma.DeviceUpsertWithoutPosesInput
|
||||
disconnect?: Prisma.DeviceWhereInput | boolean
|
||||
delete?: Prisma.DeviceWhereInput | boolean
|
||||
connect?: Prisma.DeviceWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.DeviceUpdateToOneWithWhereWithoutPosesInput, Prisma.DeviceUpdateWithoutPosesInput>, Prisma.DeviceUncheckedUpdateWithoutPosesInput>
|
||||
}
|
||||
|
||||
export type DeviceCreateWithoutBrandInput = {
|
||||
@@ -524,6 +472,58 @@ export type DeviceScalarWhereInput = {
|
||||
brand_id?: Prisma.StringFilter<"Device"> | string
|
||||
}
|
||||
|
||||
export type DeviceCreateWithoutPosesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
os_version?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
brand: Prisma.DeviceBrandCreateNestedOneWithoutDevicesInput
|
||||
}
|
||||
|
||||
export type DeviceUncheckedCreateWithoutPosesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
os_version?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
brand_id: string
|
||||
}
|
||||
|
||||
export type DeviceCreateOrConnectWithoutPosesInput = {
|
||||
where: Prisma.DeviceWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.DeviceCreateWithoutPosesInput, Prisma.DeviceUncheckedCreateWithoutPosesInput>
|
||||
}
|
||||
|
||||
export type DeviceUpsertWithoutPosesInput = {
|
||||
update: Prisma.XOR<Prisma.DeviceUpdateWithoutPosesInput, Prisma.DeviceUncheckedUpdateWithoutPosesInput>
|
||||
create: Prisma.XOR<Prisma.DeviceCreateWithoutPosesInput, Prisma.DeviceUncheckedCreateWithoutPosesInput>
|
||||
where?: Prisma.DeviceWhereInput
|
||||
}
|
||||
|
||||
export type DeviceUpdateToOneWithWhereWithoutPosesInput = {
|
||||
where?: Prisma.DeviceWhereInput
|
||||
data: Prisma.XOR<Prisma.DeviceUpdateWithoutPosesInput, Prisma.DeviceUncheckedUpdateWithoutPosesInput>
|
||||
}
|
||||
|
||||
export type DeviceUpdateWithoutPosesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
os_version?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
brand?: Prisma.DeviceBrandUpdateOneRequiredWithoutDevicesNestedInput
|
||||
}
|
||||
|
||||
export type DeviceUncheckedUpdateWithoutPosesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
os_version?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
brand_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type DeviceCreateManyBrandInput = {
|
||||
id?: string
|
||||
name: string
|
||||
|
||||
+558
-188
File diff suppressed because it is too large
Load Diff
@@ -27,6 +27,7 @@ export type AggregateGuild = {
|
||||
export type GuildMinAggregateOutputType = {
|
||||
id: string | null
|
||||
name: string | null
|
||||
invoice_template: $Enums.InvoiceTemplateType | null
|
||||
code: string | null
|
||||
created_at: Date | null
|
||||
updated_at: Date | null
|
||||
@@ -35,6 +36,7 @@ export type GuildMinAggregateOutputType = {
|
||||
export type GuildMaxAggregateOutputType = {
|
||||
id: string | null
|
||||
name: string | null
|
||||
invoice_template: $Enums.InvoiceTemplateType | null
|
||||
code: string | null
|
||||
created_at: Date | null
|
||||
updated_at: Date | null
|
||||
@@ -43,6 +45,7 @@ export type GuildMaxAggregateOutputType = {
|
||||
export type GuildCountAggregateOutputType = {
|
||||
id: number
|
||||
name: number
|
||||
invoice_template: number
|
||||
code: number
|
||||
created_at: number
|
||||
updated_at: number
|
||||
@@ -53,6 +56,7 @@ export type GuildCountAggregateOutputType = {
|
||||
export type GuildMinAggregateInputType = {
|
||||
id?: true
|
||||
name?: true
|
||||
invoice_template?: true
|
||||
code?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
@@ -61,6 +65,7 @@ export type GuildMinAggregateInputType = {
|
||||
export type GuildMaxAggregateInputType = {
|
||||
id?: true
|
||||
name?: true
|
||||
invoice_template?: true
|
||||
code?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
@@ -69,6 +74,7 @@ export type GuildMaxAggregateInputType = {
|
||||
export type GuildCountAggregateInputType = {
|
||||
id?: true
|
||||
name?: true
|
||||
invoice_template?: true
|
||||
code?: true
|
||||
created_at?: true
|
||||
updated_at?: true
|
||||
@@ -150,6 +156,7 @@ export type GuildGroupByArgs<ExtArgs extends runtime.Types.Extensions.InternalAr
|
||||
export type GuildGroupByOutputType = {
|
||||
id: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code: string | null
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
@@ -179,21 +186,25 @@ export type GuildWhereInput = {
|
||||
NOT?: Prisma.GuildWhereInput | Prisma.GuildWhereInput[]
|
||||
id?: Prisma.StringFilter<"Guild"> | string
|
||||
name?: Prisma.StringFilter<"Guild"> | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFilter<"Guild"> | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.StringNullableFilter<"Guild"> | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
||||
business_activities?: Prisma.BusinessActivityListRelationFilter
|
||||
good_categories?: Prisma.GoodCategoryListRelationFilter
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsListRelationFilter
|
||||
}
|
||||
|
||||
export type GuildOrderByWithRelationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
invoice_template?: Prisma.SortOrder
|
||||
code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
business_activities?: Prisma.BusinessActivityOrderByRelationAggregateInput
|
||||
good_categories?: Prisma.GoodCategoryOrderByRelationAggregateInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.GuildOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -203,16 +214,19 @@ export type GuildWhereUniqueInput = Prisma.AtLeast<{
|
||||
OR?: Prisma.GuildWhereInput[]
|
||||
NOT?: Prisma.GuildWhereInput | Prisma.GuildWhereInput[]
|
||||
name?: Prisma.StringFilter<"Guild"> | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFilter<"Guild"> | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.StringNullableFilter<"Guild"> | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Guild"> | Date | string
|
||||
business_activities?: Prisma.BusinessActivityListRelationFilter
|
||||
good_categories?: Prisma.GoodCategoryListRelationFilter
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsListRelationFilter
|
||||
}, "id">
|
||||
|
||||
export type GuildOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
invoice_template?: Prisma.SortOrder
|
||||
code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
@@ -227,6 +241,7 @@ export type GuildScalarWhereWithAggregatesInput = {
|
||||
NOT?: Prisma.GuildScalarWhereWithAggregatesInput | Prisma.GuildScalarWhereWithAggregatesInput[]
|
||||
id?: Prisma.StringWithAggregatesFilter<"Guild"> | string
|
||||
name?: Prisma.StringWithAggregatesFilter<"Guild"> | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeWithAggregatesFilter<"Guild"> | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.StringNullableWithAggregatesFilter<"Guild"> | string | null
|
||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"Guild"> | Date | string
|
||||
updated_at?: Prisma.DateTimeWithAggregatesFilter<"Guild"> | Date | string
|
||||
@@ -235,46 +250,55 @@ export type GuildScalarWhereWithAggregatesInput = {
|
||||
export type GuildCreateInput = {
|
||||
id?: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activities?: Prisma.BusinessActivityCreateNestedManyWithoutGuildInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutGuildInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsCreateNestedManyWithoutGuildInput
|
||||
}
|
||||
|
||||
export type GuildUncheckedCreateInput = {
|
||||
id?: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activities?: Prisma.BusinessActivityUncheckedCreateNestedManyWithoutGuildInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutGuildInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsUncheckedCreateNestedManyWithoutGuildInput
|
||||
}
|
||||
|
||||
export type GuildUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activities?: Prisma.BusinessActivityUpdateManyWithoutGuildNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutGuildNestedInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsUpdateManyWithoutGuildNestedInput
|
||||
}
|
||||
|
||||
export type GuildUncheckedUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activities?: Prisma.BusinessActivityUncheckedUpdateManyWithoutGuildNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutGuildNestedInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsUncheckedUpdateManyWithoutGuildNestedInput
|
||||
}
|
||||
|
||||
export type GuildCreateManyInput = {
|
||||
id?: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
@@ -283,6 +307,7 @@ export type GuildCreateManyInput = {
|
||||
export type GuildUpdateManyMutationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -291,6 +316,7 @@ export type GuildUpdateManyMutationInput = {
|
||||
export type GuildUncheckedUpdateManyInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
@@ -315,6 +341,7 @@ export type GuildOrderByRelevanceInput = {
|
||||
export type GuildCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
invoice_template?: Prisma.SortOrder
|
||||
code?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
@@ -323,6 +350,7 @@ export type GuildCountOrderByAggregateInput = {
|
||||
export type GuildMaxOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
invoice_template?: Prisma.SortOrder
|
||||
code?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
@@ -331,6 +359,7 @@ export type GuildMaxOrderByAggregateInput = {
|
||||
export type GuildMinOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrder
|
||||
invoice_template?: Prisma.SortOrder
|
||||
code?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
@@ -366,22 +395,44 @@ export type GuildUpdateOneWithoutGood_categoriesNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.GuildUpdateToOneWithWhereWithoutGood_categoriesInput, Prisma.GuildUpdateWithoutGood_categoriesInput>, Prisma.GuildUncheckedUpdateWithoutGood_categoriesInput>
|
||||
}
|
||||
|
||||
export type EnumInvoiceTemplateTypeFieldUpdateOperationsInput = {
|
||||
set?: $Enums.InvoiceTemplateType
|
||||
}
|
||||
|
||||
export type GuildCreateNestedOneWithoutStockKeepingUnitsInput = {
|
||||
create?: Prisma.XOR<Prisma.GuildCreateWithoutStockKeepingUnitsInput, Prisma.GuildUncheckedCreateWithoutStockKeepingUnitsInput>
|
||||
connectOrCreate?: Prisma.GuildCreateOrConnectWithoutStockKeepingUnitsInput
|
||||
connect?: Prisma.GuildWhereUniqueInput
|
||||
}
|
||||
|
||||
export type GuildUpdateOneRequiredWithoutStockKeepingUnitsNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.GuildCreateWithoutStockKeepingUnitsInput, Prisma.GuildUncheckedCreateWithoutStockKeepingUnitsInput>
|
||||
connectOrCreate?: Prisma.GuildCreateOrConnectWithoutStockKeepingUnitsInput
|
||||
upsert?: Prisma.GuildUpsertWithoutStockKeepingUnitsInput
|
||||
connect?: Prisma.GuildWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.GuildUpdateToOneWithWhereWithoutStockKeepingUnitsInput, Prisma.GuildUpdateWithoutStockKeepingUnitsInput>, Prisma.GuildUncheckedUpdateWithoutStockKeepingUnitsInput>
|
||||
}
|
||||
|
||||
export type GuildCreateWithoutBusiness_activitiesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutGuildInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsCreateNestedManyWithoutGuildInput
|
||||
}
|
||||
|
||||
export type GuildUncheckedCreateWithoutBusiness_activitiesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutGuildInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsUncheckedCreateNestedManyWithoutGuildInput
|
||||
}
|
||||
|
||||
export type GuildCreateOrConnectWithoutBusiness_activitiesInput = {
|
||||
@@ -403,37 +454,45 @@ export type GuildUpdateToOneWithWhereWithoutBusiness_activitiesInput = {
|
||||
export type GuildUpdateWithoutBusiness_activitiesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutGuildNestedInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsUpdateManyWithoutGuildNestedInput
|
||||
}
|
||||
|
||||
export type GuildUncheckedUpdateWithoutBusiness_activitiesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutGuildNestedInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsUncheckedUpdateManyWithoutGuildNestedInput
|
||||
}
|
||||
|
||||
export type GuildCreateWithoutGood_categoriesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activities?: Prisma.BusinessActivityCreateNestedManyWithoutGuildInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsCreateNestedManyWithoutGuildInput
|
||||
}
|
||||
|
||||
export type GuildUncheckedCreateWithoutGood_categoriesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activities?: Prisma.BusinessActivityUncheckedCreateNestedManyWithoutGuildInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsUncheckedCreateNestedManyWithoutGuildInput
|
||||
}
|
||||
|
||||
export type GuildCreateOrConnectWithoutGood_categoriesInput = {
|
||||
@@ -455,19 +514,83 @@ export type GuildUpdateToOneWithWhereWithoutGood_categoriesInput = {
|
||||
export type GuildUpdateWithoutGood_categoriesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activities?: Prisma.BusinessActivityUpdateManyWithoutGuildNestedInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsUpdateManyWithoutGuildNestedInput
|
||||
}
|
||||
|
||||
export type GuildUncheckedUpdateWithoutGood_categoriesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activities?: Prisma.BusinessActivityUncheckedUpdateManyWithoutGuildNestedInput
|
||||
stockKeepingUnits?: Prisma.StockKeepingUnitsUncheckedUpdateManyWithoutGuildNestedInput
|
||||
}
|
||||
|
||||
export type GuildCreateWithoutStockKeepingUnitsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activities?: Prisma.BusinessActivityCreateNestedManyWithoutGuildInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutGuildInput
|
||||
}
|
||||
|
||||
export type GuildUncheckedCreateWithoutStockKeepingUnitsInput = {
|
||||
id?: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activities?: Prisma.BusinessActivityUncheckedCreateNestedManyWithoutGuildInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutGuildInput
|
||||
}
|
||||
|
||||
export type GuildCreateOrConnectWithoutStockKeepingUnitsInput = {
|
||||
where: Prisma.GuildWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.GuildCreateWithoutStockKeepingUnitsInput, Prisma.GuildUncheckedCreateWithoutStockKeepingUnitsInput>
|
||||
}
|
||||
|
||||
export type GuildUpsertWithoutStockKeepingUnitsInput = {
|
||||
update: Prisma.XOR<Prisma.GuildUpdateWithoutStockKeepingUnitsInput, Prisma.GuildUncheckedUpdateWithoutStockKeepingUnitsInput>
|
||||
create: Prisma.XOR<Prisma.GuildCreateWithoutStockKeepingUnitsInput, Prisma.GuildUncheckedCreateWithoutStockKeepingUnitsInput>
|
||||
where?: Prisma.GuildWhereInput
|
||||
}
|
||||
|
||||
export type GuildUpdateToOneWithWhereWithoutStockKeepingUnitsInput = {
|
||||
where?: Prisma.GuildWhereInput
|
||||
data: Prisma.XOR<Prisma.GuildUpdateWithoutStockKeepingUnitsInput, Prisma.GuildUncheckedUpdateWithoutStockKeepingUnitsInput>
|
||||
}
|
||||
|
||||
export type GuildUpdateWithoutStockKeepingUnitsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activities?: Prisma.BusinessActivityUpdateManyWithoutGuildNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutGuildNestedInput
|
||||
}
|
||||
|
||||
export type GuildUncheckedUpdateWithoutStockKeepingUnitsInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
invoice_template?: Prisma.EnumInvoiceTemplateTypeFieldUpdateOperationsInput | $Enums.InvoiceTemplateType
|
||||
code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activities?: Prisma.BusinessActivityUncheckedUpdateManyWithoutGuildNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutGuildNestedInput
|
||||
}
|
||||
|
||||
|
||||
@@ -478,11 +601,13 @@ export type GuildUncheckedUpdateWithoutGood_categoriesInput = {
|
||||
export type GuildCountOutputType = {
|
||||
business_activities: number
|
||||
good_categories: number
|
||||
stockKeepingUnits: number
|
||||
}
|
||||
|
||||
export type GuildCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
business_activities?: boolean | GuildCountOutputTypeCountBusiness_activitiesArgs
|
||||
good_categories?: boolean | GuildCountOutputTypeCountGood_categoriesArgs
|
||||
stockKeepingUnits?: boolean | GuildCountOutputTypeCountStockKeepingUnitsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -509,15 +634,24 @@ export type GuildCountOutputTypeCountGood_categoriesArgs<ExtArgs extends runtime
|
||||
where?: Prisma.GoodCategoryWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* GuildCountOutputType without action
|
||||
*/
|
||||
export type GuildCountOutputTypeCountStockKeepingUnitsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.StockKeepingUnitsWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type GuildSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
name?: boolean
|
||||
invoice_template?: boolean
|
||||
code?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
business_activities?: boolean | Prisma.Guild$business_activitiesArgs<ExtArgs>
|
||||
good_categories?: boolean | Prisma.Guild$good_categoriesArgs<ExtArgs>
|
||||
stockKeepingUnits?: boolean | Prisma.Guild$stockKeepingUnitsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.GuildCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["guild"]>
|
||||
|
||||
@@ -526,15 +660,17 @@ export type GuildSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
export type GuildSelectScalar = {
|
||||
id?: boolean
|
||||
name?: boolean
|
||||
invoice_template?: boolean
|
||||
code?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
}
|
||||
|
||||
export type GuildOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "code" | "created_at" | "updated_at", ExtArgs["result"]["guild"]>
|
||||
export type GuildOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "invoice_template" | "code" | "created_at" | "updated_at", ExtArgs["result"]["guild"]>
|
||||
export type GuildInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
business_activities?: boolean | Prisma.Guild$business_activitiesArgs<ExtArgs>
|
||||
good_categories?: boolean | Prisma.Guild$good_categoriesArgs<ExtArgs>
|
||||
stockKeepingUnits?: boolean | Prisma.Guild$stockKeepingUnitsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.GuildCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -543,10 +679,12 @@ export type $GuildPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
objects: {
|
||||
business_activities: Prisma.$BusinessActivityPayload<ExtArgs>[]
|
||||
good_categories: Prisma.$GoodCategoryPayload<ExtArgs>[]
|
||||
stockKeepingUnits: Prisma.$StockKeepingUnitsPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
name: string
|
||||
invoice_template: $Enums.InvoiceTemplateType
|
||||
code: string | null
|
||||
created_at: Date
|
||||
updated_at: Date
|
||||
@@ -892,6 +1030,7 @@ export interface Prisma__GuildClient<T, Null = never, ExtArgs extends runtime.Ty
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
business_activities<T extends Prisma.Guild$business_activitiesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Guild$business_activitiesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BusinessActivityPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
good_categories<T extends Prisma.Guild$good_categoriesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Guild$good_categoriesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodCategoryPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
stockKeepingUnits<T extends Prisma.Guild$stockKeepingUnitsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Guild$stockKeepingUnitsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$StockKeepingUnitsPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -923,6 +1062,7 @@ export interface Prisma__GuildClient<T, Null = never, ExtArgs extends runtime.Ty
|
||||
export interface GuildFieldRefs {
|
||||
readonly id: Prisma.FieldRef<"Guild", 'String'>
|
||||
readonly name: Prisma.FieldRef<"Guild", 'String'>
|
||||
readonly invoice_template: Prisma.FieldRef<"Guild", 'InvoiceTemplateType'>
|
||||
readonly code: Prisma.FieldRef<"Guild", 'String'>
|
||||
readonly created_at: Prisma.FieldRef<"Guild", 'DateTime'>
|
||||
readonly updated_at: Prisma.FieldRef<"Guild", 'DateTime'>
|
||||
@@ -1321,6 +1461,30 @@ export type Guild$good_categoriesArgs<ExtArgs extends runtime.Types.Extensions.I
|
||||
distinct?: Prisma.GoodCategoryScalarFieldEnum | Prisma.GoodCategoryScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Guild.stockKeepingUnits
|
||||
*/
|
||||
export type Guild$stockKeepingUnitsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the StockKeepingUnits
|
||||
*/
|
||||
select?: Prisma.StockKeepingUnitsSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the StockKeepingUnits
|
||||
*/
|
||||
omit?: Prisma.StockKeepingUnitsOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.StockKeepingUnitsInclude<ExtArgs> | null
|
||||
where?: Prisma.StockKeepingUnitsWhereInput
|
||||
orderBy?: Prisma.StockKeepingUnitsOrderByWithRelationInput | Prisma.StockKeepingUnitsOrderByWithRelationInput[]
|
||||
cursor?: Prisma.StockKeepingUnitsWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.StockKeepingUnitsScalarFieldEnum | Prisma.StockKeepingUnitsScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Guild without action
|
||||
*/
|
||||
|
||||
@@ -190,9 +190,9 @@ export type LicenseAccountAllocationWhereInput = {
|
||||
license_activation_id?: Prisma.StringNullableFilter<"LicenseAccountAllocation"> | string | null
|
||||
account_id?: Prisma.StringNullableFilter<"LicenseAccountAllocation"> | string | null
|
||||
credit_id?: Prisma.StringNullableFilter<"LicenseAccountAllocation"> | string | null
|
||||
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
account?: Prisma.XOR<Prisma.ConsumerAccountNullableScalarRelationFilter, Prisma.ConsumerAccountWhereInput> | null
|
||||
credit?: Prisma.XOR<Prisma.PartnerAccountQuotaCreditNullableScalarRelationFilter, Prisma.PartnerAccountQuotaCreditWhereInput> | null
|
||||
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationOrderByWithRelationInput = {
|
||||
@@ -202,9 +202,9 @@ export type LicenseAccountAllocationOrderByWithRelationInput = {
|
||||
license_activation_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
credit_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
license_activation?: Prisma.LicenseActivationOrderByWithRelationInput
|
||||
account?: Prisma.ConsumerAccountOrderByWithRelationInput
|
||||
credit?: Prisma.PartnerAccountQuotaCreditOrderByWithRelationInput
|
||||
license_activation?: Prisma.LicenseActivationOrderByWithRelationInput
|
||||
_relevance?: Prisma.LicenseAccountAllocationOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -218,9 +218,9 @@ export type LicenseAccountAllocationWhereUniqueInput = Prisma.AtLeast<{
|
||||
created_at?: Prisma.DateTimeFilter<"LicenseAccountAllocation"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"LicenseAccountAllocation"> | Date | string
|
||||
license_activation_id?: Prisma.StringNullableFilter<"LicenseAccountAllocation"> | string | null
|
||||
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
account?: Prisma.XOR<Prisma.ConsumerAccountNullableScalarRelationFilter, Prisma.ConsumerAccountWhereInput> | null
|
||||
credit?: Prisma.XOR<Prisma.PartnerAccountQuotaCreditNullableScalarRelationFilter, Prisma.PartnerAccountQuotaCreditWhereInput> | null
|
||||
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
}, "id" | "account_id" | "credit_id">
|
||||
|
||||
export type LicenseAccountAllocationOrderByWithAggregationInput = {
|
||||
@@ -251,9 +251,9 @@ export type LicenseAccountAllocationCreateInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
|
||||
account?: Prisma.ConsumerAccountCreateNestedOneWithoutAccount_allocationInput
|
||||
credit?: Prisma.PartnerAccountQuotaCreditCreateNestedOneWithoutAllocationInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedCreateInput = {
|
||||
@@ -269,9 +269,9 @@ export type LicenseAccountAllocationUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneWithoutAccount_allocationNestedInput
|
||||
credit?: Prisma.PartnerAccountQuotaCreditUpdateOneWithoutAllocationNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedUpdateInput = {
|
||||
@@ -307,11 +307,6 @@ export type LicenseAccountAllocationUncheckedUpdateManyInput = {
|
||||
credit_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationNullableScalarRelationFilter = {
|
||||
is?: Prisma.LicenseAccountAllocationWhereInput | null
|
||||
isNot?: Prisma.LicenseAccountAllocationWhereInput | null
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationListRelationFilter = {
|
||||
every?: Prisma.LicenseAccountAllocationWhereInput
|
||||
some?: Prisma.LicenseAccountAllocationWhereInput
|
||||
@@ -322,6 +317,11 @@ export type LicenseAccountAllocationOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationNullableScalarRelationFilter = {
|
||||
is?: Prisma.LicenseAccountAllocationWhereInput | null
|
||||
isNot?: Prisma.LicenseAccountAllocationWhereInput | null
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationOrderByRelevanceInput = {
|
||||
fields: Prisma.LicenseAccountAllocationOrderByRelevanceFieldEnum | Prisma.LicenseAccountAllocationOrderByRelevanceFieldEnum[]
|
||||
sort: Prisma.SortOrder
|
||||
@@ -355,38 +355,6 @@ export type LicenseAccountAllocationMinOrderByAggregateInput = {
|
||||
credit_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationCreateNestedOneWithoutAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
connectOrCreate?: Prisma.LicenseAccountAllocationCreateOrConnectWithoutAccountInput
|
||||
connect?: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
connectOrCreate?: Prisma.LicenseAccountAllocationCreateOrConnectWithoutAccountInput
|
||||
connect?: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUpdateOneWithoutAccountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
connectOrCreate?: Prisma.LicenseAccountAllocationCreateOrConnectWithoutAccountInput
|
||||
upsert?: Prisma.LicenseAccountAllocationUpsertWithoutAccountInput
|
||||
disconnect?: Prisma.LicenseAccountAllocationWhereInput | boolean
|
||||
delete?: Prisma.LicenseAccountAllocationWhereInput | boolean
|
||||
connect?: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseAccountAllocationUpdateToOneWithWhereWithoutAccountInput, Prisma.LicenseAccountAllocationUpdateWithoutAccountInput>, Prisma.LicenseAccountAllocationUncheckedUpdateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
connectOrCreate?: Prisma.LicenseAccountAllocationCreateOrConnectWithoutAccountInput
|
||||
upsert?: Prisma.LicenseAccountAllocationUpsertWithoutAccountInput
|
||||
disconnect?: Prisma.LicenseAccountAllocationWhereInput | boolean
|
||||
delete?: Prisma.LicenseAccountAllocationWhereInput | boolean
|
||||
connect?: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseAccountAllocationUpdateToOneWithWhereWithoutAccountInput, Prisma.LicenseAccountAllocationUpdateWithoutAccountInput>, Prisma.LicenseAccountAllocationUncheckedUpdateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationCreateNestedManyWithoutLicense_activationInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutLicense_activationInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutLicense_activationInput> | Prisma.LicenseAccountAllocationCreateWithoutLicense_activationInput[] | Prisma.LicenseAccountAllocationUncheckedCreateWithoutLicense_activationInput[]
|
||||
connectOrCreate?: Prisma.LicenseAccountAllocationCreateOrConnectWithoutLicense_activationInput | Prisma.LicenseAccountAllocationCreateOrConnectWithoutLicense_activationInput[]
|
||||
@@ -461,52 +429,36 @@ export type LicenseAccountAllocationUncheckedUpdateOneWithoutCreditNestedInput =
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseAccountAllocationUpdateToOneWithWhereWithoutCreditInput, Prisma.LicenseAccountAllocationUpdateWithoutCreditInput>, Prisma.LicenseAccountAllocationUncheckedUpdateWithoutCreditInput>
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationCreateWithoutAccountInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
|
||||
credit?: Prisma.PartnerAccountQuotaCreditCreateNestedOneWithoutAllocationInput
|
||||
export type LicenseAccountAllocationCreateNestedOneWithoutAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
connectOrCreate?: Prisma.LicenseAccountAllocationCreateOrConnectWithoutAccountInput
|
||||
connect?: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedCreateWithoutAccountInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license_activation_id?: string | null
|
||||
credit_id?: string | null
|
||||
export type LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
connectOrCreate?: Prisma.LicenseAccountAllocationCreateOrConnectWithoutAccountInput
|
||||
connect?: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationCreateOrConnectWithoutAccountInput = {
|
||||
where: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
export type LicenseAccountAllocationUpdateOneWithoutAccountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
connectOrCreate?: Prisma.LicenseAccountAllocationCreateOrConnectWithoutAccountInput
|
||||
upsert?: Prisma.LicenseAccountAllocationUpsertWithoutAccountInput
|
||||
disconnect?: Prisma.LicenseAccountAllocationWhereInput | boolean
|
||||
delete?: Prisma.LicenseAccountAllocationWhereInput | boolean
|
||||
connect?: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseAccountAllocationUpdateToOneWithWhereWithoutAccountInput, Prisma.LicenseAccountAllocationUpdateWithoutAccountInput>, Prisma.LicenseAccountAllocationUncheckedUpdateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUpsertWithoutAccountInput = {
|
||||
update: Prisma.XOR<Prisma.LicenseAccountAllocationUpdateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedUpdateWithoutAccountInput>
|
||||
create: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
where?: Prisma.LicenseAccountAllocationWhereInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUpdateToOneWithWhereWithoutAccountInput = {
|
||||
where?: Prisma.LicenseAccountAllocationWhereInput
|
||||
data: Prisma.XOR<Prisma.LicenseAccountAllocationUpdateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedUpdateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUpdateWithoutAccountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
|
||||
credit?: Prisma.PartnerAccountQuotaCreditUpdateOneWithoutAllocationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedUpdateWithoutAccountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license_activation_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
credit_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
export type LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
connectOrCreate?: Prisma.LicenseAccountAllocationCreateOrConnectWithoutAccountInput
|
||||
upsert?: Prisma.LicenseAccountAllocationUpsertWithoutAccountInput
|
||||
disconnect?: Prisma.LicenseAccountAllocationWhereInput | boolean
|
||||
delete?: Prisma.LicenseAccountAllocationWhereInput | boolean
|
||||
connect?: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseAccountAllocationUpdateToOneWithWhereWithoutAccountInput, Prisma.LicenseAccountAllocationUpdateWithoutAccountInput>, Prisma.LicenseAccountAllocationUncheckedUpdateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationCreateWithoutLicense_activationInput = {
|
||||
@@ -567,8 +519,8 @@ export type LicenseAccountAllocationCreateWithoutCreditInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
|
||||
account?: Prisma.ConsumerAccountCreateNestedOneWithoutAccount_allocationInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedCreateWithoutCreditInput = {
|
||||
@@ -599,8 +551,8 @@ export type LicenseAccountAllocationUpdateWithoutCreditInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneWithoutAccount_allocationNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedUpdateWithoutCreditInput = {
|
||||
@@ -611,6 +563,54 @@ export type LicenseAccountAllocationUncheckedUpdateWithoutCreditInput = {
|
||||
account_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationCreateWithoutAccountInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
credit?: Prisma.PartnerAccountQuotaCreditCreateNestedOneWithoutAllocationInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutAccount_allocationsInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedCreateWithoutAccountInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license_activation_id?: string | null
|
||||
credit_id?: string | null
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationCreateOrConnectWithoutAccountInput = {
|
||||
where: Prisma.LicenseAccountAllocationWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUpsertWithoutAccountInput = {
|
||||
update: Prisma.XOR<Prisma.LicenseAccountAllocationUpdateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedUpdateWithoutAccountInput>
|
||||
create: Prisma.XOR<Prisma.LicenseAccountAllocationCreateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedCreateWithoutAccountInput>
|
||||
where?: Prisma.LicenseAccountAllocationWhereInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUpdateToOneWithWhereWithoutAccountInput = {
|
||||
where?: Prisma.LicenseAccountAllocationWhereInput
|
||||
data: Prisma.XOR<Prisma.LicenseAccountAllocationUpdateWithoutAccountInput, Prisma.LicenseAccountAllocationUncheckedUpdateWithoutAccountInput>
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUpdateWithoutAccountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
credit?: Prisma.PartnerAccountQuotaCreditUpdateOneWithoutAllocationNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationUncheckedUpdateWithoutAccountInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license_activation_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
credit_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type LicenseAccountAllocationCreateManyLicense_activationInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
@@ -652,9 +652,9 @@ export type LicenseAccountAllocationSelect<ExtArgs extends runtime.Types.Extensi
|
||||
license_activation_id?: boolean
|
||||
account_id?: boolean
|
||||
credit_id?: boolean
|
||||
license_activation?: boolean | Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>
|
||||
account?: boolean | Prisma.LicenseAccountAllocation$accountArgs<ExtArgs>
|
||||
credit?: boolean | Prisma.LicenseAccountAllocation$creditArgs<ExtArgs>
|
||||
license_activation?: boolean | Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["licenseAccountAllocation"]>
|
||||
|
||||
|
||||
@@ -670,17 +670,17 @@ export type LicenseAccountAllocationSelectScalar = {
|
||||
|
||||
export type LicenseAccountAllocationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "created_at" | "updated_at" | "license_activation_id" | "account_id" | "credit_id", ExtArgs["result"]["licenseAccountAllocation"]>
|
||||
export type LicenseAccountAllocationInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
license_activation?: boolean | Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>
|
||||
account?: boolean | Prisma.LicenseAccountAllocation$accountArgs<ExtArgs>
|
||||
credit?: boolean | Prisma.LicenseAccountAllocation$creditArgs<ExtArgs>
|
||||
license_activation?: boolean | Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $LicenseAccountAllocationPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "LicenseAccountAllocation"
|
||||
objects: {
|
||||
license_activation: Prisma.$LicenseActivationPayload<ExtArgs> | null
|
||||
account: Prisma.$ConsumerAccountPayload<ExtArgs> | null
|
||||
credit: Prisma.$PartnerAccountQuotaCreditPayload<ExtArgs> | null
|
||||
license_activation: Prisma.$LicenseActivationPayload<ExtArgs> | null
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1029,9 +1029,9 @@ readonly fields: LicenseAccountAllocationFieldRefs;
|
||||
*/
|
||||
export interface Prisma__LicenseAccountAllocationClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
license_activation<T extends Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>>): Prisma.Prisma__LicenseActivationClient<runtime.Types.Result.GetResult<Prisma.$LicenseActivationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
account<T extends Prisma.LicenseAccountAllocation$accountArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseAccountAllocation$accountArgs<ExtArgs>>): Prisma.Prisma__ConsumerAccountClient<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
credit<T extends Prisma.LicenseAccountAllocation$creditArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseAccountAllocation$creditArgs<ExtArgs>>): Prisma.Prisma__PartnerAccountQuotaCreditClient<runtime.Types.Result.GetResult<Prisma.$PartnerAccountQuotaCreditPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
license_activation<T extends Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseAccountAllocation$license_activationArgs<ExtArgs>>): Prisma.Prisma__LicenseActivationClient<runtime.Types.Result.GetResult<Prisma.$LicenseActivationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1414,25 +1414,6 @@ export type LicenseAccountAllocationDeleteManyArgs<ExtArgs extends runtime.Types
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* LicenseAccountAllocation.license_activation
|
||||
*/
|
||||
export type LicenseAccountAllocation$license_activationArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the LicenseActivation
|
||||
*/
|
||||
select?: Prisma.LicenseActivationSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the LicenseActivation
|
||||
*/
|
||||
omit?: Prisma.LicenseActivationOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.LicenseActivationInclude<ExtArgs> | null
|
||||
where?: Prisma.LicenseActivationWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* LicenseAccountAllocation.account
|
||||
*/
|
||||
@@ -1471,6 +1452,25 @@ export type LicenseAccountAllocation$creditArgs<ExtArgs extends runtime.Types.Ex
|
||||
where?: Prisma.PartnerAccountQuotaCreditWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* LicenseAccountAllocation.license_activation
|
||||
*/
|
||||
export type LicenseAccountAllocation$license_activationArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the LicenseActivation
|
||||
*/
|
||||
select?: Prisma.LicenseActivationSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the LicenseActivation
|
||||
*/
|
||||
omit?: Prisma.LicenseActivationOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.LicenseActivationInclude<ExtArgs> | null
|
||||
where?: Prisma.LicenseActivationWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* LicenseAccountAllocation without action
|
||||
*/
|
||||
|
||||
@@ -198,10 +198,10 @@ export type LicenseActivationWhereInput = {
|
||||
updated_at?: Prisma.DateTimeFilter<"LicenseActivation"> | Date | string
|
||||
license_id?: Prisma.StringFilter<"LicenseActivation"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"LicenseActivation"> | string
|
||||
license?: Prisma.XOR<Prisma.LicenseScalarRelationFilter, Prisma.LicenseWhereInput>
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
license_renews?: Prisma.LicenseRenewListRelationFilter
|
||||
account_allocations?: Prisma.LicenseAccountAllocationListRelationFilter
|
||||
license_renews?: Prisma.LicenseRenewListRelationFilter
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
license?: Prisma.XOR<Prisma.LicenseScalarRelationFilter, Prisma.LicenseWhereInput>
|
||||
}
|
||||
|
||||
export type LicenseActivationOrderByWithRelationInput = {
|
||||
@@ -212,10 +212,10 @@ export type LicenseActivationOrderByWithRelationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
license_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
license?: Prisma.LicenseOrderByWithRelationInput
|
||||
business_activity?: Prisma.BusinessActivityOrderByWithRelationInput
|
||||
license_renews?: Prisma.LicenseRenewOrderByRelationAggregateInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationOrderByRelationAggregateInput
|
||||
license_renews?: Prisma.LicenseRenewOrderByRelationAggregateInput
|
||||
business_activity?: Prisma.BusinessActivityOrderByWithRelationInput
|
||||
license?: Prisma.LicenseOrderByWithRelationInput
|
||||
_relevance?: Prisma.LicenseActivationOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -230,10 +230,10 @@ export type LicenseActivationWhereUniqueInput = Prisma.AtLeast<{
|
||||
expires_at?: Prisma.DateTimeFilter<"LicenseActivation"> | Date | string
|
||||
created_at?: Prisma.DateTimeFilter<"LicenseActivation"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"LicenseActivation"> | Date | string
|
||||
license?: Prisma.XOR<Prisma.LicenseScalarRelationFilter, Prisma.LicenseWhereInput>
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
license_renews?: Prisma.LicenseRenewListRelationFilter
|
||||
account_allocations?: Prisma.LicenseAccountAllocationListRelationFilter
|
||||
license_renews?: Prisma.LicenseRenewListRelationFilter
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
license?: Prisma.XOR<Prisma.LicenseScalarRelationFilter, Prisma.LicenseWhereInput>
|
||||
}, "id" | "id" | "license_id" | "business_activity_id">
|
||||
|
||||
export type LicenseActivationOrderByWithAggregationInput = {
|
||||
@@ -268,10 +268,10 @@ export type LicenseActivationCreateInput = {
|
||||
expires_at: Date | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license: Prisma.LicenseCreateNestedOneWithoutActivationInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutLicense_activationInput
|
||||
license_renews?: Prisma.LicenseRenewCreateNestedManyWithoutActivationInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationCreateNestedManyWithoutLicense_activationInput
|
||||
license_renews?: Prisma.LicenseRenewCreateNestedManyWithoutActivationInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutLicense_activationInput
|
||||
license: Prisma.LicenseCreateNestedOneWithoutActivationInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedCreateInput = {
|
||||
@@ -282,8 +282,8 @@ export type LicenseActivationUncheckedCreateInput = {
|
||||
updated_at?: Date | string
|
||||
license_id: string
|
||||
business_activity_id: string
|
||||
license_renews?: Prisma.LicenseRenewUncheckedCreateNestedManyWithoutActivationInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUncheckedCreateNestedManyWithoutLicense_activationInput
|
||||
license_renews?: Prisma.LicenseRenewUncheckedCreateNestedManyWithoutActivationInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUpdateInput = {
|
||||
@@ -292,10 +292,10 @@ export type LicenseActivationUpdateInput = {
|
||||
expires_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license?: Prisma.LicenseUpdateOneRequiredWithoutActivationNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutLicense_activationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUpdateManyWithoutActivationNestedInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUpdateManyWithoutLicense_activationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUpdateManyWithoutActivationNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutLicense_activationNestedInput
|
||||
license?: Prisma.LicenseUpdateOneRequiredWithoutActivationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedUpdateInput = {
|
||||
@@ -306,8 +306,8 @@ export type LicenseActivationUncheckedUpdateInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_renews?: Prisma.LicenseRenewUncheckedUpdateManyWithoutActivationNestedInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUncheckedUpdateManyWithoutLicense_activationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUncheckedUpdateManyWithoutActivationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateManyInput = {
|
||||
@@ -379,38 +379,6 @@ export type LicenseActivationMinOrderByAggregateInput = {
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateNestedOneWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
connectOrCreate?: Prisma.LicenseActivationCreateOrConnectWithoutBusiness_activityInput
|
||||
connect?: Prisma.LicenseActivationWhereUniqueInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
connectOrCreate?: Prisma.LicenseActivationCreateOrConnectWithoutBusiness_activityInput
|
||||
connect?: Prisma.LicenseActivationWhereUniqueInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUpdateOneWithoutBusiness_activityNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
connectOrCreate?: Prisma.LicenseActivationCreateOrConnectWithoutBusiness_activityInput
|
||||
upsert?: Prisma.LicenseActivationUpsertWithoutBusiness_activityInput
|
||||
disconnect?: Prisma.LicenseActivationWhereInput | boolean
|
||||
delete?: Prisma.LicenseActivationWhereInput | boolean
|
||||
connect?: Prisma.LicenseActivationWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseActivationUpdateToOneWithWhereWithoutBusiness_activityInput, Prisma.LicenseActivationUpdateWithoutBusiness_activityInput>, Prisma.LicenseActivationUncheckedUpdateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
connectOrCreate?: Prisma.LicenseActivationCreateOrConnectWithoutBusiness_activityInput
|
||||
upsert?: Prisma.LicenseActivationUpsertWithoutBusiness_activityInput
|
||||
disconnect?: Prisma.LicenseActivationWhereInput | boolean
|
||||
delete?: Prisma.LicenseActivationWhereInput | boolean
|
||||
connect?: Prisma.LicenseActivationWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseActivationUpdateToOneWithWhereWithoutBusiness_activityInput, Prisma.LicenseActivationUpdateWithoutBusiness_activityInput>, Prisma.LicenseActivationUncheckedUpdateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateNestedOneWithoutLicenseInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseActivationCreateWithoutLicenseInput, Prisma.LicenseActivationUncheckedCreateWithoutLicenseInput>
|
||||
connectOrCreate?: Prisma.LicenseActivationCreateOrConnectWithoutLicenseInput
|
||||
@@ -475,64 +443,36 @@ export type LicenseActivationUpdateOneWithoutAccount_allocationsNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseActivationUpdateToOneWithWhereWithoutAccount_allocationsInput, Prisma.LicenseActivationUpdateWithoutAccount_allocationsInput>, Prisma.LicenseActivationUncheckedUpdateWithoutAccount_allocationsInput>
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateWithoutBusiness_activityInput = {
|
||||
id?: string
|
||||
starts_at: Date | string
|
||||
expires_at: Date | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license: Prisma.LicenseCreateNestedOneWithoutActivationInput
|
||||
license_renews?: Prisma.LicenseRenewCreateNestedManyWithoutActivationInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationCreateNestedManyWithoutLicense_activationInput
|
||||
export type LicenseActivationCreateNestedOneWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
connectOrCreate?: Prisma.LicenseActivationCreateOrConnectWithoutBusiness_activityInput
|
||||
connect?: Prisma.LicenseActivationWhereUniqueInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedCreateWithoutBusiness_activityInput = {
|
||||
id?: string
|
||||
starts_at: Date | string
|
||||
expires_at: Date | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license_id: string
|
||||
license_renews?: Prisma.LicenseRenewUncheckedCreateNestedManyWithoutActivationInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUncheckedCreateNestedManyWithoutLicense_activationInput
|
||||
export type LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
connectOrCreate?: Prisma.LicenseActivationCreateOrConnectWithoutBusiness_activityInput
|
||||
connect?: Prisma.LicenseActivationWhereUniqueInput
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateOrConnectWithoutBusiness_activityInput = {
|
||||
where: Prisma.LicenseActivationWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
export type LicenseActivationUpdateOneWithoutBusiness_activityNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
connectOrCreate?: Prisma.LicenseActivationCreateOrConnectWithoutBusiness_activityInput
|
||||
upsert?: Prisma.LicenseActivationUpsertWithoutBusiness_activityInput
|
||||
disconnect?: Prisma.LicenseActivationWhereInput | boolean
|
||||
delete?: Prisma.LicenseActivationWhereInput | boolean
|
||||
connect?: Prisma.LicenseActivationWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseActivationUpdateToOneWithWhereWithoutBusiness_activityInput, Prisma.LicenseActivationUpdateWithoutBusiness_activityInput>, Prisma.LicenseActivationUncheckedUpdateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type LicenseActivationUpsertWithoutBusiness_activityInput = {
|
||||
update: Prisma.XOR<Prisma.LicenseActivationUpdateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedUpdateWithoutBusiness_activityInput>
|
||||
create: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
where?: Prisma.LicenseActivationWhereInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUpdateToOneWithWhereWithoutBusiness_activityInput = {
|
||||
where?: Prisma.LicenseActivationWhereInput
|
||||
data: Prisma.XOR<Prisma.LicenseActivationUpdateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedUpdateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type LicenseActivationUpdateWithoutBusiness_activityInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
starts_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
expires_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license?: Prisma.LicenseUpdateOneRequiredWithoutActivationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUpdateManyWithoutActivationNestedInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUpdateManyWithoutLicense_activationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
starts_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
expires_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_renews?: Prisma.LicenseRenewUncheckedUpdateManyWithoutActivationNestedInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUncheckedUpdateManyWithoutLicense_activationNestedInput
|
||||
export type LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
connectOrCreate?: Prisma.LicenseActivationCreateOrConnectWithoutBusiness_activityInput
|
||||
upsert?: Prisma.LicenseActivationUpsertWithoutBusiness_activityInput
|
||||
disconnect?: Prisma.LicenseActivationWhereInput | boolean
|
||||
delete?: Prisma.LicenseActivationWhereInput | boolean
|
||||
connect?: Prisma.LicenseActivationWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.LicenseActivationUpdateToOneWithWhereWithoutBusiness_activityInput, Prisma.LicenseActivationUpdateWithoutBusiness_activityInput>, Prisma.LicenseActivationUncheckedUpdateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateWithoutLicenseInput = {
|
||||
@@ -541,9 +481,9 @@ export type LicenseActivationCreateWithoutLicenseInput = {
|
||||
expires_at: Date | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutLicense_activationInput
|
||||
license_renews?: Prisma.LicenseRenewCreateNestedManyWithoutActivationInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationCreateNestedManyWithoutLicense_activationInput
|
||||
license_renews?: Prisma.LicenseRenewCreateNestedManyWithoutActivationInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutLicense_activationInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedCreateWithoutLicenseInput = {
|
||||
@@ -553,8 +493,8 @@ export type LicenseActivationUncheckedCreateWithoutLicenseInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
license_renews?: Prisma.LicenseRenewUncheckedCreateNestedManyWithoutActivationInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUncheckedCreateNestedManyWithoutLicense_activationInput
|
||||
license_renews?: Prisma.LicenseRenewUncheckedCreateNestedManyWithoutActivationInput
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateOrConnectWithoutLicenseInput = {
|
||||
@@ -579,9 +519,9 @@ export type LicenseActivationUpdateWithoutLicenseInput = {
|
||||
expires_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutLicense_activationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUpdateManyWithoutActivationNestedInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUpdateManyWithoutLicense_activationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUpdateManyWithoutActivationNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutLicense_activationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedUpdateWithoutLicenseInput = {
|
||||
@@ -591,8 +531,8 @@ export type LicenseActivationUncheckedUpdateWithoutLicenseInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_renews?: Prisma.LicenseRenewUncheckedUpdateManyWithoutActivationNestedInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUncheckedUpdateManyWithoutLicense_activationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUncheckedUpdateManyWithoutActivationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateWithoutLicense_renewsInput = {
|
||||
@@ -601,9 +541,9 @@ export type LicenseActivationCreateWithoutLicense_renewsInput = {
|
||||
expires_at: Date | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license: Prisma.LicenseCreateNestedOneWithoutActivationInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutLicense_activationInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationCreateNestedManyWithoutLicense_activationInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutLicense_activationInput
|
||||
license: Prisma.LicenseCreateNestedOneWithoutActivationInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedCreateWithoutLicense_renewsInput = {
|
||||
@@ -639,9 +579,9 @@ export type LicenseActivationUpdateWithoutLicense_renewsInput = {
|
||||
expires_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license?: Prisma.LicenseUpdateOneRequiredWithoutActivationNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutLicense_activationNestedInput
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUpdateManyWithoutLicense_activationNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutLicense_activationNestedInput
|
||||
license?: Prisma.LicenseUpdateOneRequiredWithoutActivationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedUpdateWithoutLicense_renewsInput = {
|
||||
@@ -661,9 +601,9 @@ export type LicenseActivationCreateWithoutAccount_allocationsInput = {
|
||||
expires_at: Date | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license: Prisma.LicenseCreateNestedOneWithoutActivationInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutLicense_activationInput
|
||||
license_renews?: Prisma.LicenseRenewCreateNestedManyWithoutActivationInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutLicense_activationInput
|
||||
license: Prisma.LicenseCreateNestedOneWithoutActivationInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedCreateWithoutAccount_allocationsInput = {
|
||||
@@ -699,9 +639,9 @@ export type LicenseActivationUpdateWithoutAccount_allocationsInput = {
|
||||
expires_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license?: Prisma.LicenseUpdateOneRequiredWithoutActivationNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutLicense_activationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUpdateManyWithoutActivationNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutLicense_activationNestedInput
|
||||
license?: Prisma.LicenseUpdateOneRequiredWithoutActivationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedUpdateWithoutAccount_allocationsInput = {
|
||||
@@ -715,19 +655,79 @@ export type LicenseActivationUncheckedUpdateWithoutAccount_allocationsInput = {
|
||||
license_renews?: Prisma.LicenseRenewUncheckedUpdateManyWithoutActivationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateWithoutBusiness_activityInput = {
|
||||
id?: string
|
||||
starts_at: Date | string
|
||||
expires_at: Date | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account_allocations?: Prisma.LicenseAccountAllocationCreateNestedManyWithoutLicense_activationInput
|
||||
license_renews?: Prisma.LicenseRenewCreateNestedManyWithoutActivationInput
|
||||
license: Prisma.LicenseCreateNestedOneWithoutActivationInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedCreateWithoutBusiness_activityInput = {
|
||||
id?: string
|
||||
starts_at: Date | string
|
||||
expires_at: Date | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
license_id: string
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUncheckedCreateNestedManyWithoutLicense_activationInput
|
||||
license_renews?: Prisma.LicenseRenewUncheckedCreateNestedManyWithoutActivationInput
|
||||
}
|
||||
|
||||
export type LicenseActivationCreateOrConnectWithoutBusiness_activityInput = {
|
||||
where: Prisma.LicenseActivationWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type LicenseActivationUpsertWithoutBusiness_activityInput = {
|
||||
update: Prisma.XOR<Prisma.LicenseActivationUpdateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedUpdateWithoutBusiness_activityInput>
|
||||
create: Prisma.XOR<Prisma.LicenseActivationCreateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedCreateWithoutBusiness_activityInput>
|
||||
where?: Prisma.LicenseActivationWhereInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUpdateToOneWithWhereWithoutBusiness_activityInput = {
|
||||
where?: Prisma.LicenseActivationWhereInput
|
||||
data: Prisma.XOR<Prisma.LicenseActivationUpdateWithoutBusiness_activityInput, Prisma.LicenseActivationUncheckedUpdateWithoutBusiness_activityInput>
|
||||
}
|
||||
|
||||
export type LicenseActivationUpdateWithoutBusiness_activityInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
starts_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
expires_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUpdateManyWithoutLicense_activationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUpdateManyWithoutActivationNestedInput
|
||||
license?: Prisma.LicenseUpdateOneRequiredWithoutActivationNestedInput
|
||||
}
|
||||
|
||||
export type LicenseActivationUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
starts_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
expires_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
license_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_allocations?: Prisma.LicenseAccountAllocationUncheckedUpdateManyWithoutLicense_activationNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUncheckedUpdateManyWithoutActivationNestedInput
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Count Type LicenseActivationCountOutputType
|
||||
*/
|
||||
|
||||
export type LicenseActivationCountOutputType = {
|
||||
license_renews: number
|
||||
account_allocations: number
|
||||
license_renews: number
|
||||
}
|
||||
|
||||
export type LicenseActivationCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
license_renews?: boolean | LicenseActivationCountOutputTypeCountLicense_renewsArgs
|
||||
account_allocations?: boolean | LicenseActivationCountOutputTypeCountAccount_allocationsArgs
|
||||
license_renews?: boolean | LicenseActivationCountOutputTypeCountLicense_renewsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -743,15 +743,15 @@ export type LicenseActivationCountOutputTypeDefaultArgs<ExtArgs extends runtime.
|
||||
/**
|
||||
* LicenseActivationCountOutputType without action
|
||||
*/
|
||||
export type LicenseActivationCountOutputTypeCountLicense_renewsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.LicenseRenewWhereInput
|
||||
export type LicenseActivationCountOutputTypeCountAccount_allocationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.LicenseAccountAllocationWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* LicenseActivationCountOutputType without action
|
||||
*/
|
||||
export type LicenseActivationCountOutputTypeCountAccount_allocationsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.LicenseAccountAllocationWhereInput
|
||||
export type LicenseActivationCountOutputTypeCountLicense_renewsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.LicenseRenewWhereInput
|
||||
}
|
||||
|
||||
|
||||
@@ -763,10 +763,10 @@ export type LicenseActivationSelect<ExtArgs extends runtime.Types.Extensions.Int
|
||||
updated_at?: boolean
|
||||
license_id?: boolean
|
||||
business_activity_id?: boolean
|
||||
license?: boolean | Prisma.LicenseDefaultArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
license_renews?: boolean | Prisma.LicenseActivation$license_renewsArgs<ExtArgs>
|
||||
account_allocations?: boolean | Prisma.LicenseActivation$account_allocationsArgs<ExtArgs>
|
||||
license_renews?: boolean | Prisma.LicenseActivation$license_renewsArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
license?: boolean | Prisma.LicenseDefaultArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.LicenseActivationCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["licenseActivation"]>
|
||||
|
||||
@@ -784,20 +784,20 @@ export type LicenseActivationSelectScalar = {
|
||||
|
||||
export type LicenseActivationOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "starts_at" | "expires_at" | "created_at" | "updated_at" | "license_id" | "business_activity_id", ExtArgs["result"]["licenseActivation"]>
|
||||
export type LicenseActivationInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
license?: boolean | Prisma.LicenseDefaultArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
license_renews?: boolean | Prisma.LicenseActivation$license_renewsArgs<ExtArgs>
|
||||
account_allocations?: boolean | Prisma.LicenseActivation$account_allocationsArgs<ExtArgs>
|
||||
license_renews?: boolean | Prisma.LicenseActivation$license_renewsArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
license?: boolean | Prisma.LicenseDefaultArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.LicenseActivationCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $LicenseActivationPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "LicenseActivation"
|
||||
objects: {
|
||||
license: Prisma.$LicensePayload<ExtArgs>
|
||||
business_activity: Prisma.$BusinessActivityPayload<ExtArgs>
|
||||
license_renews: Prisma.$LicenseRenewPayload<ExtArgs>[]
|
||||
account_allocations: Prisma.$LicenseAccountAllocationPayload<ExtArgs>[]
|
||||
license_renews: Prisma.$LicenseRenewPayload<ExtArgs>[]
|
||||
business_activity: Prisma.$BusinessActivityPayload<ExtArgs>
|
||||
license: Prisma.$LicensePayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1147,10 +1147,10 @@ readonly fields: LicenseActivationFieldRefs;
|
||||
*/
|
||||
export interface Prisma__LicenseActivationClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
license<T extends Prisma.LicenseDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseDefaultArgs<ExtArgs>>): Prisma.Prisma__LicenseClient<runtime.Types.Result.GetResult<Prisma.$LicensePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
business_activity<T extends Prisma.BusinessActivityDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivityDefaultArgs<ExtArgs>>): Prisma.Prisma__BusinessActivityClient<runtime.Types.Result.GetResult<Prisma.$BusinessActivityPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
license_renews<T extends Prisma.LicenseActivation$license_renewsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseActivation$license_renewsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LicenseRenewPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
account_allocations<T extends Prisma.LicenseActivation$account_allocationsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseActivation$account_allocationsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LicenseAccountAllocationPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
license_renews<T extends Prisma.LicenseActivation$license_renewsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseActivation$license_renewsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LicenseRenewPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
business_activity<T extends Prisma.BusinessActivityDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivityDefaultArgs<ExtArgs>>): Prisma.Prisma__BusinessActivityClient<runtime.Types.Result.GetResult<Prisma.$BusinessActivityPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
license<T extends Prisma.LicenseDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseDefaultArgs<ExtArgs>>): Prisma.Prisma__LicenseClient<runtime.Types.Result.GetResult<Prisma.$LicensePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1534,30 +1534,6 @@ export type LicenseActivationDeleteManyArgs<ExtArgs extends runtime.Types.Extens
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* LicenseActivation.license_renews
|
||||
*/
|
||||
export type LicenseActivation$license_renewsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the LicenseRenew
|
||||
*/
|
||||
select?: Prisma.LicenseRenewSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the LicenseRenew
|
||||
*/
|
||||
omit?: Prisma.LicenseRenewOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.LicenseRenewInclude<ExtArgs> | null
|
||||
where?: Prisma.LicenseRenewWhereInput
|
||||
orderBy?: Prisma.LicenseRenewOrderByWithRelationInput | Prisma.LicenseRenewOrderByWithRelationInput[]
|
||||
cursor?: Prisma.LicenseRenewWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.LicenseRenewScalarFieldEnum | Prisma.LicenseRenewScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* LicenseActivation.account_allocations
|
||||
*/
|
||||
@@ -1582,6 +1558,30 @@ export type LicenseActivation$account_allocationsArgs<ExtArgs extends runtime.Ty
|
||||
distinct?: Prisma.LicenseAccountAllocationScalarFieldEnum | Prisma.LicenseAccountAllocationScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* LicenseActivation.license_renews
|
||||
*/
|
||||
export type LicenseActivation$license_renewsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the LicenseRenew
|
||||
*/
|
||||
select?: Prisma.LicenseRenewSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the LicenseRenew
|
||||
*/
|
||||
omit?: Prisma.LicenseRenewOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.LicenseRenewInclude<ExtArgs> | null
|
||||
where?: Prisma.LicenseRenewWhereInput
|
||||
orderBy?: Prisma.LicenseRenewOrderByWithRelationInput | Prisma.LicenseRenewOrderByWithRelationInput[]
|
||||
cursor?: Prisma.LicenseRenewWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.LicenseRenewScalarFieldEnum | Prisma.LicenseRenewScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* LicenseActivation without action
|
||||
*/
|
||||
|
||||
@@ -190,8 +190,8 @@ export type LicenseRenewWhereInput = {
|
||||
updated_at?: Prisma.DateTimeFilter<"LicenseRenew"> | Date | string
|
||||
charge_transaction_id?: Prisma.StringFilter<"LicenseRenew"> | string
|
||||
activation_id?: Prisma.StringNullableFilter<"LicenseRenew"> | string | null
|
||||
charge_transaction?: Prisma.XOR<Prisma.LicenseRenewChargeTransactionScalarRelationFilter, Prisma.LicenseRenewChargeTransactionWhereInput>
|
||||
activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
charge_transaction?: Prisma.XOR<Prisma.LicenseRenewChargeTransactionScalarRelationFilter, Prisma.LicenseRenewChargeTransactionWhereInput>
|
||||
}
|
||||
|
||||
export type LicenseRenewOrderByWithRelationInput = {
|
||||
@@ -201,8 +201,8 @@ export type LicenseRenewOrderByWithRelationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
charge_transaction_id?: Prisma.SortOrder
|
||||
activation_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
charge_transaction?: Prisma.LicenseRenewChargeTransactionOrderByWithRelationInput
|
||||
activation?: Prisma.LicenseActivationOrderByWithRelationInput
|
||||
charge_transaction?: Prisma.LicenseRenewChargeTransactionOrderByWithRelationInput
|
||||
_relevance?: Prisma.LicenseRenewOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -216,8 +216,8 @@ export type LicenseRenewWhereUniqueInput = Prisma.AtLeast<{
|
||||
updated_at?: Prisma.DateTimeFilter<"LicenseRenew"> | Date | string
|
||||
charge_transaction_id?: Prisma.StringFilter<"LicenseRenew"> | string
|
||||
activation_id?: Prisma.StringNullableFilter<"LicenseRenew"> | string | null
|
||||
charge_transaction?: Prisma.XOR<Prisma.LicenseRenewChargeTransactionScalarRelationFilter, Prisma.LicenseRenewChargeTransactionWhereInput>
|
||||
activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
charge_transaction?: Prisma.XOR<Prisma.LicenseRenewChargeTransactionScalarRelationFilter, Prisma.LicenseRenewChargeTransactionWhereInput>
|
||||
}, "id">
|
||||
|
||||
export type LicenseRenewOrderByWithAggregationInput = {
|
||||
@@ -249,8 +249,8 @@ export type LicenseRenewCreateInput = {
|
||||
expires_at: Date | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
charge_transaction: Prisma.LicenseRenewChargeTransactionCreateNestedOneWithoutLicense_renewsInput
|
||||
activation?: Prisma.LicenseActivationCreateNestedOneWithoutLicense_renewsInput
|
||||
charge_transaction: Prisma.LicenseRenewChargeTransactionCreateNestedOneWithoutLicense_renewsInput
|
||||
}
|
||||
|
||||
export type LicenseRenewUncheckedCreateInput = {
|
||||
@@ -267,8 +267,8 @@ export type LicenseRenewUpdateInput = {
|
||||
expires_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
charge_transaction?: Prisma.LicenseRenewChargeTransactionUpdateOneRequiredWithoutLicense_renewsNestedInput
|
||||
activation?: Prisma.LicenseActivationUpdateOneWithoutLicense_renewsNestedInput
|
||||
charge_transaction?: Prisma.LicenseRenewChargeTransactionUpdateOneRequiredWithoutLicense_renewsNestedInput
|
||||
}
|
||||
|
||||
export type LicenseRenewUncheckedUpdateInput = {
|
||||
@@ -601,8 +601,8 @@ export type LicenseRenewSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
updated_at?: boolean
|
||||
charge_transaction_id?: boolean
|
||||
activation_id?: boolean
|
||||
charge_transaction?: boolean | Prisma.LicenseRenewChargeTransactionDefaultArgs<ExtArgs>
|
||||
activation?: boolean | Prisma.LicenseRenew$activationArgs<ExtArgs>
|
||||
charge_transaction?: boolean | Prisma.LicenseRenewChargeTransactionDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["licenseRenew"]>
|
||||
|
||||
|
||||
@@ -618,15 +618,15 @@ export type LicenseRenewSelectScalar = {
|
||||
|
||||
export type LicenseRenewOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "expires_at" | "created_at" | "updated_at" | "charge_transaction_id" | "activation_id", ExtArgs["result"]["licenseRenew"]>
|
||||
export type LicenseRenewInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
charge_transaction?: boolean | Prisma.LicenseRenewChargeTransactionDefaultArgs<ExtArgs>
|
||||
activation?: boolean | Prisma.LicenseRenew$activationArgs<ExtArgs>
|
||||
charge_transaction?: boolean | Prisma.LicenseRenewChargeTransactionDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $LicenseRenewPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "LicenseRenew"
|
||||
objects: {
|
||||
charge_transaction: Prisma.$LicenseRenewChargeTransactionPayload<ExtArgs>
|
||||
activation: Prisma.$LicenseActivationPayload<ExtArgs> | null
|
||||
charge_transaction: Prisma.$LicenseRenewChargeTransactionPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -975,8 +975,8 @@ readonly fields: LicenseRenewFieldRefs;
|
||||
*/
|
||||
export interface Prisma__LicenseRenewClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
charge_transaction<T extends Prisma.LicenseRenewChargeTransactionDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseRenewChargeTransactionDefaultArgs<ExtArgs>>): Prisma.Prisma__LicenseRenewChargeTransactionClient<runtime.Types.Result.GetResult<Prisma.$LicenseRenewChargeTransactionPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
activation<T extends Prisma.LicenseRenew$activationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseRenew$activationArgs<ExtArgs>>): Prisma.Prisma__LicenseActivationClient<runtime.Types.Result.GetResult<Prisma.$LicenseActivationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
charge_transaction<T extends Prisma.LicenseRenewChargeTransactionDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseRenewChargeTransactionDefaultArgs<ExtArgs>>): Prisma.Prisma__LicenseRenewChargeTransactionClient<runtime.Types.Result.GetResult<Prisma.$LicenseRenewChargeTransactionPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
|
||||
@@ -232,8 +232,8 @@ export type LicenseRenewChargeTransactionWhereInput = {
|
||||
created_at?: Prisma.DateTimeFilter<"LicenseRenewChargeTransaction"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"LicenseRenewChargeTransaction"> | Date | string
|
||||
partner_id?: Prisma.StringFilter<"LicenseRenewChargeTransaction"> | string
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
license_renews?: Prisma.LicenseRenewListRelationFilter
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
}
|
||||
|
||||
export type LicenseRenewChargeTransactionOrderByWithRelationInput = {
|
||||
@@ -244,8 +244,8 @@ export type LicenseRenewChargeTransactionOrderByWithRelationInput = {
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
partner_id?: Prisma.SortOrder
|
||||
partner?: Prisma.PartnerOrderByWithRelationInput
|
||||
license_renews?: Prisma.LicenseRenewOrderByRelationAggregateInput
|
||||
partner?: Prisma.PartnerOrderByWithRelationInput
|
||||
_relevance?: Prisma.LicenseRenewChargeTransactionOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -260,8 +260,8 @@ export type LicenseRenewChargeTransactionWhereUniqueInput = Prisma.AtLeast<{
|
||||
created_at?: Prisma.DateTimeFilter<"LicenseRenewChargeTransaction"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"LicenseRenewChargeTransaction"> | Date | string
|
||||
partner_id?: Prisma.StringFilter<"LicenseRenewChargeTransaction"> | string
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
license_renews?: Prisma.LicenseRenewListRelationFilter
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
}, "id" | "tracking_code">
|
||||
|
||||
export type LicenseRenewChargeTransactionOrderByWithAggregationInput = {
|
||||
@@ -299,8 +299,8 @@ export type LicenseRenewChargeTransactionCreateInput = {
|
||||
purchased_count: number
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
partner: Prisma.PartnerCreateNestedOneWithoutLicense_renew_charge_transactionsInput
|
||||
license_renews?: Prisma.LicenseRenewCreateNestedManyWithoutCharge_transactionInput
|
||||
partner: Prisma.PartnerCreateNestedOneWithoutLicense_renew_charge_transactionsInput
|
||||
}
|
||||
|
||||
export type LicenseRenewChargeTransactionUncheckedCreateInput = {
|
||||
@@ -321,8 +321,8 @@ export type LicenseRenewChargeTransactionUpdateInput = {
|
||||
purchased_count?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
partner?: Prisma.PartnerUpdateOneRequiredWithoutLicense_renew_charge_transactionsNestedInput
|
||||
license_renews?: Prisma.LicenseRenewUpdateManyWithoutCharge_transactionNestedInput
|
||||
partner?: Prisma.PartnerUpdateOneRequiredWithoutLicense_renew_charge_transactionsNestedInput
|
||||
}
|
||||
|
||||
export type LicenseRenewChargeTransactionUncheckedUpdateInput = {
|
||||
@@ -672,8 +672,8 @@ export type LicenseRenewChargeTransactionSelect<ExtArgs extends runtime.Types.Ex
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
partner_id?: boolean
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
license_renews?: boolean | Prisma.LicenseRenewChargeTransaction$license_renewsArgs<ExtArgs>
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.LicenseRenewChargeTransactionCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["licenseRenewChargeTransaction"]>
|
||||
|
||||
@@ -691,16 +691,16 @@ export type LicenseRenewChargeTransactionSelectScalar = {
|
||||
|
||||
export type LicenseRenewChargeTransactionOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "activation_expires_at" | "tracking_code" | "purchased_count" | "created_at" | "updated_at" | "partner_id", ExtArgs["result"]["licenseRenewChargeTransaction"]>
|
||||
export type LicenseRenewChargeTransactionInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
license_renews?: boolean | Prisma.LicenseRenewChargeTransaction$license_renewsArgs<ExtArgs>
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.LicenseRenewChargeTransactionCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $LicenseRenewChargeTransactionPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "LicenseRenewChargeTransaction"
|
||||
objects: {
|
||||
partner: Prisma.$PartnerPayload<ExtArgs>
|
||||
license_renews: Prisma.$LicenseRenewPayload<ExtArgs>[]
|
||||
partner: Prisma.$PartnerPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1050,8 +1050,8 @@ readonly fields: LicenseRenewChargeTransactionFieldRefs;
|
||||
*/
|
||||
export interface Prisma__LicenseRenewChargeTransactionClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
partner<T extends Prisma.PartnerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PartnerDefaultArgs<ExtArgs>>): Prisma.Prisma__PartnerClient<runtime.Types.Result.GetResult<Prisma.$PartnerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
license_renews<T extends Prisma.LicenseRenewChargeTransaction$license_renewsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.LicenseRenewChargeTransaction$license_renewsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$LicenseRenewPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
partner<T extends Prisma.PartnerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.PartnerDefaultArgs<ExtArgs>>): Prisma.Prisma__PartnerClient<runtime.Types.Result.GetResult<Prisma.$PartnerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user