Compare commits
23 Commits
redis
...
5f70b95589
| Author | SHA1 | Date | |
|---|---|---|---|
| 5f70b95589 | |||
| d2bd576277 | |||
| 23bfe1ecbe | |||
| 47a27fb54f | |||
| f61100bf25 | |||
| 25e589551b | |||
| 5ce560ce97 | |||
| b2d8fdc8a0 | |||
| c11166b365 | |||
| 7ae027633b | |||
| a975f9d02a | |||
| cd3492d625 | |||
| 816c5ebb50 | |||
| 4836ee4d01 | |||
| ea6f1bfdd0 | |||
| b53b7d3ed3 | |||
| 6f65123816 | |||
| 2c97b7302d | |||
| 2dc9480170 | |||
| 9aa12184a1 | |||
| 1d47fb1a1d | |||
| fc27b9d616 | |||
| 98099e97e7 |
Vendored
+2
-2
@@ -11,7 +11,6 @@
|
||||
"[typescript]": {
|
||||
"editor.defaultFormatter": "esbenp.prettier-vscode"
|
||||
},
|
||||
"editor.formatOnSave": true,
|
||||
"cSpell.words": [
|
||||
"ARVANCLOUD",
|
||||
"autoincrement",
|
||||
@@ -27,5 +26,6 @@
|
||||
"setm",
|
||||
"spro",
|
||||
"sstid"
|
||||
]
|
||||
],
|
||||
"editor.formatOnSave": true
|
||||
}
|
||||
|
||||
@@ -1,131 +1,182 @@
|
||||
# AGENT.md
|
||||
# AGENTS.md
|
||||
|
||||
Operational guide for AI/coding agents working in `consumer_api`.
|
||||
## Stack
|
||||
|
||||
## Scope
|
||||
- Applies to the whole repository.
|
||||
- Stack: NestJS + Prisma + TypeScript.
|
||||
- NestJS
|
||||
- Prisma
|
||||
- TypeScript
|
||||
- pnpm
|
||||
- RTK enabled
|
||||
|
||||
## 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.
|
||||
# Core Rules
|
||||
|
||||
## 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.
|
||||
- Keep changes minimal.
|
||||
- Do not touch unrelated files.
|
||||
- Prefer existing patterns over new abstractions.
|
||||
- Preserve API behavior unless requested otherwise.
|
||||
- Prefer forward Prisma migrations.
|
||||
- Never edit applied migrations in shared environments.
|
||||
|
||||
## 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.
|
||||
# EXECUTION RULES
|
||||
|
||||
## 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.
|
||||
- Keep responses short.
|
||||
- Do not narrate thoughts.
|
||||
- Do not explain obvious steps.
|
||||
- Do not create plans for simple tasks.
|
||||
- Prefer implementation over exploration.
|
||||
|
||||
## 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`
|
||||
Avoid:
|
||||
|
||||
## Communication Style
|
||||
- Be concise and implementation-focused.
|
||||
- Call out assumptions/risk before risky steps.
|
||||
- Provide practical next actions after task completion.
|
||||
- “I think…”
|
||||
- “Let me check…”
|
||||
- “I should inspect…”
|
||||
- “I’m going to…”
|
||||
|
||||
## 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.
|
||||
# RTK Rules
|
||||
|
||||
### 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.
|
||||
Always prefer RTK commands.
|
||||
|
||||
### 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.
|
||||
Use:
|
||||
|
||||
## 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.
|
||||
- `rtk ls`
|
||||
- `rtk grep`
|
||||
- `rtk smart`
|
||||
- `rtk read`
|
||||
- `rtk git diff`
|
||||
- `rtk git status`
|
||||
|
||||
## 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.
|
||||
Avoid raw:
|
||||
|
||||
## Redis Cache Conventions (May 2026)
|
||||
- Use `RedisKeyMaker` in `src/common/utils/redis-key-maker.util.ts` for all cache keys and wildcard patterns; do not inline key strings in services.
|
||||
- Keep invalidation domain-based (for example `src/modules/admin/guilds/cache/*`, `src/modules/admin/partners/cache/*`, `src/modules/pos/cache/*`) and avoid duplicating delete logic across modules.
|
||||
- For list APIs that are expensive or frequently read, prefer read-through cache with TTL and invalidation on every related write path.
|
||||
- For entity endpoints, use list + detail split:
|
||||
- list key(s): invalidated broadly on writes,
|
||||
- detail key(s): invalidated per entity id.
|
||||
- Partner domain rules:
|
||||
- Shared partner cache namespace is `partners:*` (not admin-prefixed) because writes occur in both `admin/partners` and `partners` modules.
|
||||
- Use shared invalidation service `src/modules/partners/cache/partners-cache-invalidation.service.ts` from both admin and partner write paths.
|
||||
- Invalidate `partners:list` and `partners:{id}:detail` on partner create/update/delete and license-affecting writes.
|
||||
- Invalidate partner license caches (activated-licenses list, charge-transactions list/detail) via the shared invalidation service.
|
||||
- POS goods rules:
|
||||
- Cache key shape is BA + guild scoped (`pos:ba:{businessActivityId}:guild:{guildId}:goods:list`) because results combine guild-default and BA-owned goods.
|
||||
- Invalidate POS goods cache by guild when admin guild goods/category/sku changes.
|
||||
- Invalidate POS goods cache by business activity when consumer BA goods create/update/delete.
|
||||
- Consumer/Partner hierarchy rules:
|
||||
- Consumer profile cache key: `consumers:{consumerId}:info`.
|
||||
- Partner-consumer profile cache key: `partners:{partnerId}:consumers:{consumerId}:info`.
|
||||
- On partner-consumer single read, write both keys when practical to share warm cache across modules.
|
||||
- On consumer info update or partner-consumer update, invalidate both consumer and partner-consumer profile keys.
|
||||
- For business activities, invalidate both list and detail layers; child updates may invalidate parent single cache when parent aggregates depend on child state.
|
||||
- Wildcard invalidation implementation:
|
||||
- Use `RedisService.deleteByPattern` / `RedisService.deleteByPatterns` for all pattern deletes.
|
||||
- Do not implement ad-hoc scan/delete loops inside domain services.
|
||||
- Pattern deletion uses `SCAN` + pipelined `DEL`; multi-pattern deletes run in parallel.
|
||||
- `cat`
|
||||
- `grep`
|
||||
- `rg`
|
||||
- `git diff`
|
||||
- recursive repository scans
|
||||
|
||||
---
|
||||
|
||||
# Reading Strategy
|
||||
|
||||
1. `rtk grep`
|
||||
2. `rtk smart`
|
||||
3. `rtk read`
|
||||
|
||||
Rules:
|
||||
|
||||
- Read only necessary files.
|
||||
- Do not read sibling files unless needed.
|
||||
- Do not reread unchanged files.
|
||||
- Stop searching once target location is found.
|
||||
- Edit quickly after locating target.
|
||||
|
||||
Avoid:
|
||||
|
||||
- opening entire modules
|
||||
- multi-file chained reads
|
||||
- large diff dumps
|
||||
- exploratory scans
|
||||
|
||||
---
|
||||
|
||||
# Forbidden Paths
|
||||
|
||||
Do not inspect unless required:
|
||||
|
||||
- `node_modules/`
|
||||
- `dist/`
|
||||
- `coverage/`
|
||||
- `.prisma/`
|
||||
- `prisma/migrations/`
|
||||
|
||||
---
|
||||
|
||||
# Prisma Rules
|
||||
|
||||
- Use transactions for multi-step writes.
|
||||
- Prefer explicit `select/include`.
|
||||
- Normalize `Decimal` values with `Number(...)`.
|
||||
- Keep migrations forward-safe.
|
||||
- Use:
|
||||
- `pnpm prisma migrate dev --name <name>` for new local migrations
|
||||
- `pnpm prisma migrate deploy` for applying existing migrations
|
||||
|
||||
---
|
||||
|
||||
# NestJS Rules
|
||||
|
||||
- Keep layering:
|
||||
- controller
|
||||
- service
|
||||
- prisma/shared service
|
||||
|
||||
- Reuse shared services.
|
||||
- Keep DTO validation strict.
|
||||
- Avoid `any`.
|
||||
|
||||
---
|
||||
|
||||
# Validation
|
||||
|
||||
Typecheck before handoff:
|
||||
|
||||
```bash
|
||||
pnpm -s tsc --noEmit
|
||||
```
|
||||
|
||||
# INVESTIGATION LIMITS
|
||||
|
||||
For localized fixes:
|
||||
|
||||
- maximum 3 file reads before first edit
|
||||
- maximum 1 related-file read unless required
|
||||
- maximum 5 total file reads before implementation
|
||||
|
||||
Stop searching once the target service, controller, DTO, schema, or repository method is identified.
|
||||
|
||||
# TARGETED READ RULES
|
||||
|
||||
Do not read files larger than 300 lines unless required.
|
||||
|
||||
For known symbols:
|
||||
|
||||
1. rtk grep
|
||||
2. rtk smart
|
||||
3. read only the relevant section
|
||||
|
||||
Avoid opening entire services, modules, or controllers for localized changes.
|
||||
|
||||
Prefer symbol-level inspection.
|
||||
|
||||
# REVIEW MODE
|
||||
|
||||
During reviews:
|
||||
|
||||
- inspect changed files only
|
||||
- avoid repository-wide searches
|
||||
- avoid architecture exploration
|
||||
- avoid reading unrelated modules
|
||||
|
||||
Review only code affected by the diff.
|
||||
|
||||
# HARD TOKEN LIMITS
|
||||
|
||||
For localized fixes:
|
||||
|
||||
- Never read more than 5 files before the first edit.
|
||||
- Never read a file larger than 300 lines unless the target symbol cannot be isolated.
|
||||
- Never open an entire service, controller, or module when a symbol-level read is possible.
|
||||
- Never reread a file already summarized by `rtk smart` unless implementation details are required.
|
||||
|
||||
When a file exceeds 300 lines:
|
||||
|
||||
1. rtk grep
|
||||
2. rtk smart
|
||||
3. read only the required section
|
||||
|
||||
Avoid full-file reads.
|
||||
|
||||
+5
-3
@@ -8,8 +8,8 @@
|
||||
"@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",
|
||||
"@prisma/client": "^7.7.0",
|
||||
"@types/bcrypt": "^6.0.0",
|
||||
"@types/multer": "^2.1.0",
|
||||
"bcrypt": "^6.0.0",
|
||||
@@ -18,13 +18,13 @@
|
||||
"cookie-parser": "^1.4.7",
|
||||
"dayjs": "^1.11.20",
|
||||
"dotenv": "^17.4.2",
|
||||
"ioredis": "^5.8.2",
|
||||
"jalaliday": "^3.1.1",
|
||||
"jsonwebtoken": "^9.0.3",
|
||||
"multer": "^2.1.1",
|
||||
"mysql2": "^3.22.2",
|
||||
"prisma": "^7.7.0",
|
||||
"reflect-metadata": "^0.2.2",
|
||||
"ioredis": "^5.8.2",
|
||||
"rxjs": "^7.8.2",
|
||||
"uuid": "^13.0.0"
|
||||
},
|
||||
@@ -45,6 +45,7 @@
|
||||
"eslint-plugin-prettier": "^5.5.5",
|
||||
"globals": "^16.5.0",
|
||||
"jest": "^30.3.0",
|
||||
"plop": "^4.0.5",
|
||||
"prettier": "^3.8.3",
|
||||
"prettier-plugin-prisma": "^5.0.0",
|
||||
"source-map-support": "^0.5.21",
|
||||
@@ -82,9 +83,10 @@
|
||||
"db:reset": "tsx scripts/dump-triggers.ts && npx prisma migrate reset --force",
|
||||
"dump-triggers": "tsx scripts/dump-triggers.ts",
|
||||
"format": "prettier --write \"src/**/*.ts\" \"test/**/*.ts\"",
|
||||
"generate": "plop",
|
||||
"generate:permissions": "tsx scripts/generate-permissions.ts",
|
||||
"seed:sku": "tsx scripts/seedStockKeepingUnits.ts",
|
||||
"lint": "eslint \"{src,apps,libs,test}/**/*.ts\" --fix",
|
||||
"seed:sku": "tsx scripts/seedStockKeepingUnits.ts",
|
||||
"start": "nest start",
|
||||
"start:debug": "nest start --debug --watch",
|
||||
"start:dev": "nest start --watch",
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
import {
|
||||
Body,
|
||||
Controller,
|
||||
Delete,
|
||||
Get,
|
||||
Param,
|
||||
Patch,
|
||||
Post,
|
||||
} from '@nestjs/common';
|
||||
import { {{pascalCase name}}Service } from './{{kebabCase name}}.service';
|
||||
import { Create{{pascalCase name}}Dto } from './dto/create-{{kebabCase name}}.dto';
|
||||
import { Update{{pascalCase name}}Dto } from './dto/update-{{kebabCase name}}.dto';
|
||||
|
||||
@Controller('{{kebabCase name}}')
|
||||
export class {{pascalCase name}}Controller {
|
||||
constructor(private readonly service: {{pascalCase name}}Service) {}
|
||||
|
||||
|
||||
@Get()
|
||||
findAll() {
|
||||
return this.service.findAll();
|
||||
}
|
||||
|
||||
@Get(':id')
|
||||
findOne(@Param('id') id: string) {
|
||||
return this.service.findOne(id);
|
||||
}
|
||||
|
||||
@Post()
|
||||
create(@Body() dto: Create{{pascalCase name}}Dto) {
|
||||
return this.service.create(dto);
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
update(
|
||||
@Param('id') id: string,
|
||||
@Body() dto: Update{{pascalCase name}}Dto,
|
||||
) {
|
||||
return this.service.update(id, dto);
|
||||
}
|
||||
|
||||
@Delete(':id')
|
||||
remove(@Param('id') id: string) {
|
||||
return this.service.remove(id);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
import { IsString, IsNumber, IsBoolean, IsEmail } from 'class-validator';
|
||||
|
||||
export class Create{{pascalCase name}}Dto {
|
||||
{{#each parsedFields}}
|
||||
@{{validator}}()
|
||||
{{name}}: {{type}};
|
||||
|
||||
{{/each}}
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
import { Module } from '@nestjs/common';
|
||||
import { {{pascalCase name}}Service } from './{{kebabCase name}}.service';
|
||||
import { {{pascalCase name}}Controller } from './{{kebabCase name}}.controller';
|
||||
import { PrismaService } from '{{prismaImportPath modulePath name}}';
|
||||
|
||||
@Module({
|
||||
controllers: [{{pascalCase name}}Controller],
|
||||
providers: [{{pascalCase name}}Service, PrismaService],
|
||||
})
|
||||
export class {{pascalCase name}}Module {}
|
||||
@@ -0,0 +1,63 @@
|
||||
import { Injectable } from '@nestjs/common';
|
||||
import { PrismaService } from '@/prisma/prisma.service';
|
||||
import { ResponseMapper } from '@/common/response/response-mapper'
|
||||
import { Create{{pascalCase name}}Dto } from './dto/create-{{kebabCase name}}.dto';
|
||||
import { Update{{pascalCase name}}Dto } from './dto/update-{{kebabCase name}}.dto';
|
||||
|
||||
@Injectable()
|
||||
export class {{pascalCase name}}Service {
|
||||
constructor(private readonly prisma: PrismaService) {}
|
||||
|
||||
private readonly summarySelect = {
|
||||
id: true,
|
||||
}
|
||||
|
||||
private readonly select = {
|
||||
...this.summarySelect,
|
||||
}
|
||||
|
||||
private readonly where = () => ({})
|
||||
|
||||
|
||||
async findAll() {
|
||||
const items = await this.prisma.{{camelCase name}}.findMany({
|
||||
where: this.where(),
|
||||
select: this.summarySelect,
|
||||
});
|
||||
return ResponseMapper.list(items)
|
||||
}
|
||||
|
||||
async findOne(id: string) {
|
||||
const item = this.prisma.{{camelCase name}}.findUnique({
|
||||
where: {...this.where(), id },
|
||||
select: this.select,
|
||||
});
|
||||
|
||||
return ResponseMapper.single(item)
|
||||
}
|
||||
|
||||
async create(createDto: Create{{pascalCase name}}Dto) {
|
||||
const item = this.prisma.{{camelCase name}}.create({
|
||||
data: createDto,
|
||||
select: this.select,
|
||||
});
|
||||
|
||||
return ResponseMapper.create(item)
|
||||
}
|
||||
|
||||
async update(id: string, updateDto: Update{{pascalCase name}}Dto) {
|
||||
const item = this.prisma.{{camelCase name}}.update({
|
||||
where: { id },
|
||||
data: updateDto,
|
||||
select: this.select,
|
||||
});
|
||||
|
||||
return ResponseMapper.update(item)
|
||||
}
|
||||
|
||||
async remove(id: string) {
|
||||
return this.prisma.{{camelCase name}}.delete({
|
||||
where: { id },
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
import { PartialType } from '@nestjs/swagger'
|
||||
import { Create{{pascalCase name}}Dto } from './create-{{kebabCase name}}.dto';
|
||||
|
||||
export class Update{{pascalCase name}}Dto extends PartialType(Create{{pascalCase name}}Dto) {}
|
||||
+125
@@ -0,0 +1,125 @@
|
||||
const path = require('path')
|
||||
|
||||
module.exports = function (plop) {
|
||||
// -------------------------
|
||||
// Case helpers
|
||||
// -------------------------
|
||||
const toKebab = str =>
|
||||
str
|
||||
.replace(/([a-z])([A-Z])/g, '$1-$2')
|
||||
.replace(/\s+/g, '-')
|
||||
.toLowerCase()
|
||||
|
||||
const toPascal = str =>
|
||||
str
|
||||
.split(/[-_\s]+/)
|
||||
.map(part => part.charAt(0).toUpperCase() + part.slice(1))
|
||||
.join('')
|
||||
|
||||
const toCamel = str => {
|
||||
const pascal = toPascal(str)
|
||||
return pascal.charAt(0).toLowerCase() + pascal.slice(1)
|
||||
}
|
||||
|
||||
plop.setHelper('kebabCase', toKebab)
|
||||
plop.setHelper('pascalCase', toPascal)
|
||||
plop.setHelper('camelCase', toCamel)
|
||||
|
||||
// -------------------------
|
||||
// Dynamic relative import helper
|
||||
// -------------------------
|
||||
plop.setHelper('prismaImportPath', (modulePath, name) => {
|
||||
return '@/prisma/prisma.service'
|
||||
})
|
||||
|
||||
// -------------------------
|
||||
// Generator
|
||||
// -------------------------
|
||||
plop.setGenerator('resource', {
|
||||
description: 'Generate Nested NestJS Prisma Resource',
|
||||
prompts: [
|
||||
{
|
||||
type: 'input',
|
||||
name: 'name',
|
||||
message: 'Module name (e.g. user, blog-post):',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
name: 'modulePath',
|
||||
message: 'Nested path inside modules (e.g. admin/users) — leave empty for root:',
|
||||
default: '',
|
||||
},
|
||||
{
|
||||
type: 'input',
|
||||
name: 'fields',
|
||||
message:
|
||||
'DTO fields (comma-separated, e.g. name:string,email:email,age:number,isActive:boolean):',
|
||||
},
|
||||
],
|
||||
actions(data) {
|
||||
// sanitize path
|
||||
data.modulePath = data.modulePath.replace(/^\/+|\/+$/g, '')
|
||||
|
||||
// Parse fields
|
||||
const rawFields = data.fields || ''
|
||||
data.parsedFields = rawFields
|
||||
.split(',')
|
||||
.filter(Boolean)
|
||||
.map(field => {
|
||||
const [name, type] = field.split(':').map(v => v.trim())
|
||||
|
||||
let validator = 'IsString'
|
||||
let finalType = 'string'
|
||||
|
||||
if (type === 'number') {
|
||||
validator = 'IsNumber'
|
||||
finalType = 'number'
|
||||
}
|
||||
|
||||
if (type === 'boolean') {
|
||||
validator = 'IsBoolean'
|
||||
finalType = 'boolean'
|
||||
}
|
||||
|
||||
if (type === 'email') {
|
||||
validator = 'IsEmail'
|
||||
finalType = 'string'
|
||||
}
|
||||
|
||||
return { name, validator, type: finalType }
|
||||
})
|
||||
|
||||
const basePath = data.modulePath
|
||||
? `src/modules/${data.modulePath}/{{kebabCase name}}`
|
||||
: `src/modules/{{kebabCase name}}`
|
||||
|
||||
return [
|
||||
{
|
||||
type: 'add',
|
||||
path: `${basePath}/{{kebabCase name}}.module.ts`,
|
||||
templateFile: 'plop-templates/module.hbs',
|
||||
},
|
||||
{
|
||||
type: 'add',
|
||||
path: `${basePath}/{{kebabCase name}}.service.ts`,
|
||||
templateFile: 'plop-templates/service.hbs',
|
||||
},
|
||||
{
|
||||
type: 'add',
|
||||
path: `${basePath}/{{kebabCase name}}.controller.ts`,
|
||||
templateFile: 'plop-templates/controller.hbs',
|
||||
},
|
||||
{
|
||||
type: 'add',
|
||||
path: `${basePath}/dto/create-{{kebabCase name}}.dto.ts`,
|
||||
templateFile: 'plop-templates/create-dto.hbs',
|
||||
},
|
||||
{
|
||||
type: 'add',
|
||||
path: `${basePath}/dto/update-{{kebabCase name}}.dto.ts`,
|
||||
templateFile: 'plop-templates/update-dto.hbs',
|
||||
},
|
||||
]
|
||||
},
|
||||
})
|
||||
}
|
||||
Generated
+429
-1
@@ -132,6 +132,9 @@ importers:
|
||||
jest:
|
||||
specifier: ^30.3.0
|
||||
version: 30.3.0(@types/node@22.19.17)(ts-node@10.9.2(@types/node@22.19.17)(typescript@5.9.3))
|
||||
plop:
|
||||
specifier: ^4.0.5
|
||||
version: 4.0.5(@types/node@22.19.17)
|
||||
prettier:
|
||||
specifier: ^3.8.3
|
||||
version: 3.8.3
|
||||
@@ -1605,12 +1608,18 @@ packages:
|
||||
'@types/express@5.0.6':
|
||||
resolution: {integrity: sha512-sKYVuV7Sv9fbPIt/442koC7+IIwK5olP1KWeD88e/idgoJqDm3JV/YUiPwkoKK92ylff2MGxSz1CSjsXelx0YA==}
|
||||
|
||||
'@types/fined@1.1.5':
|
||||
resolution: {integrity: sha512-2N93vadEGDFhASTIRbizbl4bNqpMOId5zZfj6hHqYZfEzEfO9onnU4Im8xvzo8uudySDveDHBOOSlTWf38ErfQ==, tarball: https://hub.megan.ir/repository/npm/@types/fined/-/fined-1.1.5.tgz}
|
||||
|
||||
'@types/geojson@7946.0.16':
|
||||
resolution: {integrity: sha512-6C8nqWur3j98U6+lXDfTUWIfgvZU+EumvpHKcYjujKH7woYyLj2sUmff0tRhrqM7BohUw7Pz3ZB1jj2gW9Fvmg==}
|
||||
|
||||
'@types/http-errors@2.0.5':
|
||||
resolution: {integrity: sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==}
|
||||
|
||||
'@types/inquirer@9.0.9':
|
||||
resolution: {integrity: sha512-/mWx5136gts2Z2e5izdoRCo46lPp5TMs9R15GTSsgg/XnZyxDWVqoVU3R9lWnccKpqwsJLvRoxbCjoJtZB7DSw==, tarball: https://hub.megan.ir/repository/npm/@types/inquirer/-/inquirer-9.0.9.tgz}
|
||||
|
||||
'@types/istanbul-lib-coverage@2.0.6':
|
||||
resolution: {integrity: sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==}
|
||||
|
||||
@@ -1629,6 +1638,9 @@ packages:
|
||||
'@types/jsonwebtoken@9.0.10':
|
||||
resolution: {integrity: sha512-asx5hIG9Qmf/1oStypjanR7iKTv0gXQ1Ov/jfrX6kS/EO0OFni8orbmGCn0672NHR3kXHwpAwR+B368ZGN/2rA==}
|
||||
|
||||
'@types/liftoff@4.0.3':
|
||||
resolution: {integrity: sha512-UgbL2kR5pLrWICvr8+fuSg0u43LY250q7ZMkC+XKC3E+rs/YBDEnQIzsnhU5dYsLlwMi3R75UvCL87pObP1sxw==, tarball: https://hub.megan.ir/repository/npm/@types/liftoff/-/liftoff-4.0.3.tgz}
|
||||
|
||||
'@types/methods@1.1.4':
|
||||
resolution: {integrity: sha512-ymXWVrDiCxTBE3+RIrrP533E70eA+9qu7zdWoHuOmGujkYtzf4HQF96b8nwHLqhuf4ykX61IGRIB38CC6/sImQ==}
|
||||
|
||||
@@ -1644,6 +1656,9 @@ packages:
|
||||
'@types/node@24.12.2':
|
||||
resolution: {integrity: sha512-A1sre26ke7HDIuY/M23nd9gfB+nrmhtYyMINbjI1zHJxYteKR6qSMX56FsmjMcDb3SMcjJg5BiRRgOCC/yBD0g==}
|
||||
|
||||
'@types/picomatch@4.0.3':
|
||||
resolution: {integrity: sha512-iG0T6+nYJ9FAPmx9SsUlnwcq1ZVRuCXcVEvWnntoPlrOpwtSTKNDC9uVAxTsC3PUvJ+99n4RpAcNgBbHX3JSnQ==, tarball: https://hub.megan.ir/repository/npm/@types/picomatch/-/picomatch-4.0.3.tgz}
|
||||
|
||||
'@types/qs@6.15.0':
|
||||
resolution: {integrity: sha512-JawvT8iBVWpzTrz3EGw9BTQFg3BQNmwERdKE22vlTxawwtbyUSlMppvZYKLZzB5zgACXdXxbD3m1bXaMqP/9ow==}
|
||||
|
||||
@@ -1668,6 +1683,9 @@ packages:
|
||||
'@types/supertest@6.0.3':
|
||||
resolution: {integrity: sha512-8WzXq62EXFhJ7QsH3Ocb/iKQ/Ty9ZVWnVzoTKc9tyyFRRF3a74Tk2+TLFgaFFw364Ere+npzHKEJ6ga2LzIL7w==}
|
||||
|
||||
'@types/through@0.0.33':
|
||||
resolution: {integrity: sha512-HsJ+z3QuETzP3cswwtzt2vEIiHBk/dCcHGhbmG5X3ecnwFD/lPrMpliGXxSCg03L9AhrdwA4Oz/qfspkDW+xGQ==, tarball: https://hub.megan.ir/repository/npm/@types/through/-/through-0.0.33.tgz}
|
||||
|
||||
'@types/validator@13.15.10':
|
||||
resolution: {integrity: sha512-T8L6i7wCuyoK8A/ZeLYt1+q0ty3Zb9+qbSSvrIVitzT3YjZqkTZ40IbRsPanlB4h1QB3JVL1SYCdR6ngtFYcuA==}
|
||||
|
||||
@@ -1997,6 +2015,14 @@ packages:
|
||||
argparse@2.0.1:
|
||||
resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==}
|
||||
|
||||
array-each@1.0.1:
|
||||
resolution: {integrity: sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==, tarball: https://hub.megan.ir/repository/npm/array-each/-/array-each-1.0.1.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
array-slice@1.1.0:
|
||||
resolution: {integrity: sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==, tarball: https://hub.megan.ir/repository/npm/array-slice/-/array-slice-1.1.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
array-timsort@1.0.3:
|
||||
resolution: {integrity: sha512-/+3GRL7dDAGEfM6TseQk/U+mi18TU2Ms9I3UlLdUMhz2hbvGNTKdj9xniwXfUqgYhHxRx0+8UnKkvlNwVU+cWQ==}
|
||||
|
||||
@@ -2145,6 +2171,9 @@ packages:
|
||||
resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
change-case@5.4.4:
|
||||
resolution: {integrity: sha512-HRQyTk2/YPEkt9TnUPbOpr64Uw3KOicFWPVBb+xiHvd6eBx/qPr9xqfBFDT8P2vWsvvz4jbEkfDe71W3VyNu2w==, tarball: https://hub.megan.ir/repository/npm/change-case/-/change-case-5.4.4.tgz}
|
||||
|
||||
char-regex@1.0.2:
|
||||
resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==}
|
||||
engines: {node: '>=10'}
|
||||
@@ -2361,6 +2390,10 @@ packages:
|
||||
destr@2.0.5:
|
||||
resolution: {integrity: sha512-ugFTXCtDZunbzasqBxrK93Ik/DRYsO6S/fedkWEMKqt04xZ4csmnmwGDBAb07QWNaGMAmnTIemsYZCksjATwsA==}
|
||||
|
||||
detect-file@1.0.0:
|
||||
resolution: {integrity: sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==, tarball: https://hub.megan.ir/repository/npm/detect-file/-/detect-file-1.0.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
detect-newline@3.1.0:
|
||||
resolution: {integrity: sha512-TLz+x/vEXm/Y7P7wn1EJFNLxYpUD4TgMosxY6fAVJUnJMbupHBOncxyWUG9OpTaH9EBD7uFI5LfEgmMOc54DsA==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -2372,6 +2405,9 @@ packages:
|
||||
resolution: {integrity: sha512-X07nttJQkwkfKfvTPG/KSnE2OMdcUCao6+eXF3wmnIQRn2aPAHH3VxDbDOdegkd6JbPsXqShpvEOHfAT+nCNwQ==}
|
||||
engines: {node: '>=0.3.1'}
|
||||
|
||||
dlv@1.1.3:
|
||||
resolution: {integrity: sha512-+HlytyjlPKnIG8XuRG8WvmBP8xs8P71y+SKKS6ZXWoEgLuePxtDoUEiH7WkdePWrQ5JBpE6aoVqfZfJUQkjXwA==, tarball: https://hub.megan.ir/repository/npm/dlv/-/dlv-1.1.3.tgz}
|
||||
|
||||
dotenv-expand@12.0.3:
|
||||
resolution: {integrity: sha512-uc47g4b+4k/M/SeaW1y4OApx+mtLWl92l5LMPP0GNXctZqELk+YGgOPIIC5elYmUH4OuoK3JLhuRUYegeySiFA==}
|
||||
engines: {node: '>=12'}
|
||||
@@ -2570,6 +2606,10 @@ packages:
|
||||
resolution: {integrity: sha512-+I6B/IkJc1o/2tiURyz/ivu/O0nKNEArIUB5O7zBrlDVJr22SCLH3xTeEry428LvFhRzIA1g8izguxJ/gbNcVQ==}
|
||||
engines: {node: '>= 0.8.0'}
|
||||
|
||||
expand-tilde@2.0.2:
|
||||
resolution: {integrity: sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==, tarball: https://hub.megan.ir/repository/npm/expand-tilde/-/expand-tilde-2.0.2.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
expect@30.3.0:
|
||||
resolution: {integrity: sha512-1zQrciTiQfRdo7qJM1uG4navm8DayFa2TgCSRlzUyNkhcJ6XUZF3hjnpkyr3VhAqPH7i/9GkG7Tv5abz6fqz0Q==}
|
||||
engines: {node: ^18.14.0 || ^20.0.0 || ^22.0.0 || >=24.0.0}
|
||||
@@ -2581,6 +2621,9 @@ packages:
|
||||
exsolve@1.0.8:
|
||||
resolution: {integrity: sha512-LmDxfWXwcTArk8fUEnOfSZpHOJ6zOMUJKOtFLFqJLoKJetuQG874Uc7/Kki7zFLzYybmZhp1M7+98pfMqeX8yA==}
|
||||
|
||||
extend@3.0.2:
|
||||
resolution: {integrity: sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==, tarball: https://hub.megan.ir/repository/npm/extend/-/extend-3.0.2.tgz}
|
||||
|
||||
fast-check@3.23.2:
|
||||
resolution: {integrity: sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
@@ -2646,6 +2689,18 @@ packages:
|
||||
resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
findup-sync@5.0.0:
|
||||
resolution: {integrity: sha512-MzwXju70AuyflbgeOhzvQWAvvQdo1XL0A9bVvlXsYcFEBM87WR4OakL4OfZq+QRmr+duJubio+UtNQCPsVESzQ==, tarball: https://hub.megan.ir/repository/npm/findup-sync/-/findup-sync-5.0.0.tgz}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
|
||||
fined@2.0.0:
|
||||
resolution: {integrity: sha512-OFRzsL6ZMHz5s0JrsEr+TpdGNCtrVtnuG3x1yzGNiQHT0yaDnXAj8V/lWcpJVrnoDpcwXcASxAZYbuXda2Y82A==, tarball: https://hub.megan.ir/repository/npm/fined/-/fined-2.0.0.tgz}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
|
||||
flagged-respawn@2.0.0:
|
||||
resolution: {integrity: sha512-Gq/a6YCi8zexmGHMuJwahTGzXlAZAOsbCVKduWXC6TlLCjjFRlExMJc4GC2NYPYZ0r/brw9P7CpRgQmlPVeOoA==, tarball: https://hub.megan.ir/repository/npm/flagged-respawn/-/flagged-respawn-2.0.0.tgz}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
|
||||
flat-cache@4.0.1:
|
||||
resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==}
|
||||
engines: {node: '>=16'}
|
||||
@@ -2653,6 +2708,14 @@ packages:
|
||||
flatted@3.4.2:
|
||||
resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==}
|
||||
|
||||
for-in@1.0.2:
|
||||
resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==, tarball: https://hub.megan.ir/repository/npm/for-in/-/for-in-1.0.2.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
for-own@1.0.0:
|
||||
resolution: {integrity: sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==, tarball: https://hub.megan.ir/repository/npm/for-own/-/for-own-1.0.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
foreground-child@3.3.1:
|
||||
resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==}
|
||||
engines: {node: '>=14'}
|
||||
@@ -2755,6 +2818,14 @@ packages:
|
||||
resolution: {integrity: sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==}
|
||||
deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me
|
||||
|
||||
global-modules@1.0.0:
|
||||
resolution: {integrity: sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==, tarball: https://hub.megan.ir/repository/npm/global-modules/-/global-modules-1.0.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
global-prefix@1.0.2:
|
||||
resolution: {integrity: sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==, tarball: https://hub.megan.ir/repository/npm/global-prefix/-/global-prefix-1.0.2.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
globals@14.0.0:
|
||||
resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==}
|
||||
engines: {node: '>=18'}
|
||||
@@ -2797,6 +2868,10 @@ packages:
|
||||
resolution: {integrity: sha512-ej4AhfhfL2Q2zpMmLo7U1Uv9+PyhIZpgQLGT1F9miIGmiCJIoCgSmczFdrc97mWT4kVY72KA+WnnhJ5pghSvSg==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
homedir-polyfill@1.0.3:
|
||||
resolution: {integrity: sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==, tarball: https://hub.megan.ir/repository/npm/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
hono@4.12.14:
|
||||
resolution: {integrity: sha512-am5zfg3yu6sqn5yjKBNqhnTX7Cv+m00ox+7jbaKkrLMRJ4rAdldd1xPd/JzbBWspqaQv6RSTrgFN95EsfhC+7w==}
|
||||
engines: {node: '>=16.9.0'}
|
||||
@@ -2854,6 +2929,17 @@ packages:
|
||||
inherits@2.0.4:
|
||||
resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==}
|
||||
|
||||
ini@1.3.8:
|
||||
resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==, tarball: https://hub.megan.ir/repository/npm/ini/-/ini-1.3.8.tgz}
|
||||
|
||||
inquirer@9.3.8:
|
||||
resolution: {integrity: sha512-pFGGdaHrmRKMh4WoDDSowddgjT1Vkl90atobmTeSmcPGdYiwikch/m/Ef5wRaiamHejtw0cUUMMerzDUXCci2w==, tarball: https://hub.megan.ir/repository/npm/inquirer/-/inquirer-9.3.8.tgz}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
interpret@3.1.1:
|
||||
resolution: {integrity: sha512-6xwYfHbajpoF0xLW+iwLkhwgvLoZDfjYfoFNu8ftMoXINzwuymNLd9u/KmwtdT2GbR+/Cz66otEGEVVUHX9QLQ==, tarball: https://hub.megan.ir/repository/npm/interpret/-/interpret-3.1.1.tgz}
|
||||
engines: {node: '>=10.13.0'}
|
||||
|
||||
ioredis@5.10.1:
|
||||
resolution: {integrity: sha512-HuEDBTI70aYdx1v6U97SbNx9F1+svQKBDo30o0b9fw055LMepzpOOd0Ccg9Q6tbqmBSJaMuY0fB7yw9/vjBYCA==, tarball: https://hub.megan.ir/repository/npm/ioredis/-/ioredis-5.10.1.tgz}
|
||||
engines: {node: '>=12.22.0'}
|
||||
@@ -2862,9 +2948,17 @@ packages:
|
||||
resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==}
|
||||
engines: {node: '>= 0.10'}
|
||||
|
||||
is-absolute@1.0.0:
|
||||
resolution: {integrity: sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==, tarball: https://hub.megan.ir/repository/npm/is-absolute/-/is-absolute-1.0.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
is-arrayish@0.2.1:
|
||||
resolution: {integrity: sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==}
|
||||
|
||||
is-core-module@2.16.2:
|
||||
resolution: {integrity: sha512-evOr8xfXKxE6qSR0hSXL2r3sd7ALj8+7jQEUvPYcm5sgZFdJ+AYzT6yNmJenvIYQBgIGwfwz08sL8zoL7yq2BA==, tarball: https://hub.megan.ir/repository/npm/is-core-module/-/is-core-module-2.16.2.tgz}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
is-extglob@2.1.1:
|
||||
resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==}
|
||||
engines: {node: '>=0.10.0'}
|
||||
@@ -2889,23 +2983,47 @@ packages:
|
||||
resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==}
|
||||
engines: {node: '>=0.12.0'}
|
||||
|
||||
is-plain-object@5.0.0:
|
||||
resolution: {integrity: sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==, tarball: https://hub.megan.ir/repository/npm/is-plain-object/-/is-plain-object-5.0.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
is-promise@4.0.0:
|
||||
resolution: {integrity: sha512-hvpoI6korhJMnej285dSg6nu1+e6uxs7zG3BYAm5byqDsgJNWwxzM6z6iZiAgQR4TJ30JmBTOwqZUw3WlyH3AQ==}
|
||||
|
||||
is-property@1.0.2:
|
||||
resolution: {integrity: sha512-Ks/IoX00TtClbGQr4TWXemAnktAQvYB7HzcCxDGqEZU6oCmb2INHuOoKxbtR+HFkmYWBKv/dOZtGRiAjDhj92g==}
|
||||
|
||||
is-relative@1.0.0:
|
||||
resolution: {integrity: sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==, tarball: https://hub.megan.ir/repository/npm/is-relative/-/is-relative-1.0.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
is-stream@2.0.1:
|
||||
resolution: {integrity: sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
is-unc-path@1.0.0:
|
||||
resolution: {integrity: sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==, tarball: https://hub.megan.ir/repository/npm/is-unc-path/-/is-unc-path-1.0.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
is-unicode-supported@0.1.0:
|
||||
resolution: {integrity: sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
is-windows@1.0.2:
|
||||
resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==, tarball: https://hub.megan.ir/repository/npm/is-windows/-/is-windows-1.0.2.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
isbinaryfile@5.0.7:
|
||||
resolution: {integrity: sha512-gnWD14Jh3FzS3CPhF0AxNOJ8CxqeblPTADzI38r0wt8ZyQl5edpy75myt08EG2oKvpyiqSqsx+Wkz9vtkbTqYQ==, tarball: https://hub.megan.ir/repository/npm/isbinaryfile/-/isbinaryfile-5.0.7.tgz}
|
||||
engines: {node: '>= 18.0.0'}
|
||||
|
||||
isexe@2.0.0:
|
||||
resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==}
|
||||
|
||||
isobject@3.0.1:
|
||||
resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==, tarball: https://hub.megan.ir/repository/npm/isobject/-/isobject-3.0.1.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
istanbul-lib-coverage@3.2.2:
|
||||
resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -3140,6 +3258,10 @@ packages:
|
||||
libphonenumber-js@1.12.41:
|
||||
resolution: {integrity: sha512-lsmMmGXBxXIK/VMLEj0kL6MtUs1kBGj1nTCzi6zgQoG1DEwqwt2DQyHxcLykceIxAnfE3hya7NuIh6PpC6S3fA==}
|
||||
|
||||
liftoff@5.0.1:
|
||||
resolution: {integrity: sha512-wwLXMbuxSF8gMvubFcFRp56lkFV69twvbU5vDPbaw+Q+/rF8j0HKjGbIdlSi+LuJm9jf7k9PB+nTxnsLMPcv2Q==, tarball: https://hub.megan.ir/repository/npm/liftoff/-/liftoff-5.0.1.tgz}
|
||||
engines: {node: '>=10.13.0'}
|
||||
|
||||
lines-and-columns@1.2.4:
|
||||
resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==}
|
||||
|
||||
@@ -3229,6 +3351,10 @@ packages:
|
||||
makeerror@1.0.12:
|
||||
resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==}
|
||||
|
||||
map-cache@0.2.2:
|
||||
resolution: {integrity: sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==, tarball: https://hub.megan.ir/repository/npm/map-cache/-/map-cache-0.2.2.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
mariadb@3.4.5:
|
||||
resolution: {integrity: sha512-gThTYkhIS5rRqkVr+Y0cIdzr+GRqJ9sA2Q34e0yzmyhMCwyApf3OKAC1jnF23aSlIOqJuyaUFUcj7O1qZslmmQ==}
|
||||
engines: {node: '>= 14'}
|
||||
@@ -3314,6 +3440,10 @@ packages:
|
||||
resolution: {integrity: sha512-mo+QTzKlx8R7E5ylSXxWzGoXoZbOsRMpyitcht8By2KHvMbf3tjwosZ/Mu/XYU6UuJ3VZnODIrak5ZrPiPyB6A==}
|
||||
engines: {node: '>= 10.16.0'}
|
||||
|
||||
mute-stream@1.0.0:
|
||||
resolution: {integrity: sha512-avsJQhyd+680gKXyG/sQc0nXaC6rBkPOfyHYcFb9+hdkqQkR9bdnkJ0AMZhke0oesPqIO+mFFJ+IdBc7mst4IA==, tarball: https://hub.megan.ir/repository/npm/mute-stream/-/mute-stream-1.0.0.tgz}
|
||||
engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0}
|
||||
|
||||
mute-stream@2.0.0:
|
||||
resolution: {integrity: sha512-WWdIxpyjEn+FhQJQQv9aQAYlHoNVdzIzUySNV1gHUPDSdZJ3yZn7pAAbQcV7B56Mvu881q9FZV+0Vx2xC44VWA==}
|
||||
engines: {node: ^18.17.0 || >=20.5.0}
|
||||
@@ -3332,6 +3462,9 @@ packages:
|
||||
resolution: {integrity: sha512-Tz09sEL2EEuv5fFowm419c1+a/jSMiBjI9gHxVLrVdbUkkNUUfjsVYs9pVZu5oCon/kmRh9TfLEObFtkVxmY0w==}
|
||||
engines: {node: '>=8.0.0'}
|
||||
|
||||
nanospinner@1.2.2:
|
||||
resolution: {integrity: sha512-Zt/AmG6qRU3e+WnzGGLuMCEAO/dAu45stNbHY223tUxldaDAeE+FxSPsd9Q+j+paejmm0ZbrNVs5Sraqy3dRxA==, tarball: https://hub.megan.ir/repository/npm/nanospinner/-/nanospinner-1.2.2.tgz}
|
||||
|
||||
napi-postinstall@0.3.4:
|
||||
resolution: {integrity: sha512-PHI5f1O0EP5xJ9gQmFGMS6IZcrVvTjpXjz7Na41gTE7eE2hK11lg04CECCYEEjdc17EV4DO+fkGEtt7TpTaTiQ==}
|
||||
engines: {node: ^12.20.0 || ^14.18.0 || >=16.0.0}
|
||||
@@ -3367,6 +3500,10 @@ packages:
|
||||
node-int64@0.4.0:
|
||||
resolution: {integrity: sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==}
|
||||
|
||||
node-plop@0.32.3:
|
||||
resolution: {integrity: sha512-tn+OxutdqhvoByKJ7p84FZBSUDfUB76bcvj0ugLBvgE9V52LFcnz8cauCDKi6otnctvFCqa9XkrU35pBY5Baig==, tarball: https://hub.megan.ir/repository/npm/node-plop/-/node-plop-0.32.3.tgz}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
node-releases@2.0.37:
|
||||
resolution: {integrity: sha512-1h5gKZCF+pO/o3Iqt5Jp7wc9rH3eJJ0+nh/CIoiRwjRxde/hAHyLPXYN4V3CqKAbiZPSeJFSWHmJsbkicta0Eg==}
|
||||
|
||||
@@ -3391,6 +3528,14 @@ packages:
|
||||
resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
object.defaults@1.1.0:
|
||||
resolution: {integrity: sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==, tarball: https://hub.megan.ir/repository/npm/object.defaults/-/object.defaults-1.1.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
object.pick@1.3.0:
|
||||
resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==, tarball: https://hub.megan.ir/repository/npm/object.pick/-/object.pick-1.3.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
ohash@2.0.11:
|
||||
resolution: {integrity: sha512-RdR9FQrFwNBNXAr4GixM8YaRZRJ5PUWbKYbE5eOsrwAjJW0q2REGcf79oYPsLyskQCZG1PLN+S/K1V00joZAoQ==}
|
||||
|
||||
@@ -3440,10 +3585,18 @@ packages:
|
||||
resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==}
|
||||
engines: {node: '>=6'}
|
||||
|
||||
parse-filepath@1.0.2:
|
||||
resolution: {integrity: sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==, tarball: https://hub.megan.ir/repository/npm/parse-filepath/-/parse-filepath-1.0.2.tgz}
|
||||
engines: {node: '>=0.8'}
|
||||
|
||||
parse-json@5.2.0:
|
||||
resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
parse-passwd@1.0.0:
|
||||
resolution: {integrity: sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==, tarball: https://hub.megan.ir/repository/npm/parse-passwd/-/parse-passwd-1.0.0.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
parseurl@1.3.3:
|
||||
resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==}
|
||||
engines: {node: '>= 0.8'}
|
||||
@@ -3464,6 +3617,17 @@ packages:
|
||||
resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
path-parse@1.0.7:
|
||||
resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==, tarball: https://hub.megan.ir/repository/npm/path-parse/-/path-parse-1.0.7.tgz}
|
||||
|
||||
path-root-regex@0.1.2:
|
||||
resolution: {integrity: sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==, tarball: https://hub.megan.ir/repository/npm/path-root-regex/-/path-root-regex-0.1.2.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
path-root@0.1.1:
|
||||
resolution: {integrity: sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==, tarball: https://hub.megan.ir/repository/npm/path-root/-/path-root-0.1.1.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
path-scurry@1.11.1:
|
||||
resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==}
|
||||
engines: {node: '>=16 || 14 >=14.18'}
|
||||
@@ -3486,7 +3650,7 @@ packages:
|
||||
resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==}
|
||||
|
||||
picocolors@1.1.1:
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==}
|
||||
resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==, tarball: https://hub.megan.ir/repository/npm/picocolors/-/picocolors-1.1.1.tgz}
|
||||
|
||||
picomatch@2.3.2:
|
||||
resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==}
|
||||
@@ -3507,6 +3671,11 @@ packages:
|
||||
pkg-types@2.3.0:
|
||||
resolution: {integrity: sha512-SIqCzDRg0s9npO5XQ3tNZioRY1uK06lA41ynBC1YmFTmnY6FjUjVt6s4LoADmwoig1qqD0oK8h1p/8mlMx8Oig==}
|
||||
|
||||
plop@4.0.5:
|
||||
resolution: {integrity: sha512-pJz6oWC9LyBp5mBrRp8AUV2RNiuGW+t/HOs4zwN+b/3YxoObZOOFvjn1mJMpAeKi2pbXADMFOOVQVTVXEdDHDw==, tarball: https://hub.megan.ir/repository/npm/plop/-/plop-4.0.5.tgz}
|
||||
engines: {node: '>=18'}
|
||||
hasBin: true
|
||||
|
||||
pluralize@8.0.0:
|
||||
resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -3603,6 +3772,10 @@ packages:
|
||||
resolution: {integrity: sha512-GDhwkLfywWL2s6vEjyhri+eXmfH6j1L7JE27WhqLeYzoh/A3DBaYGEj2H/HFZCn/kMfim73FXxEJTw06WtxQwg==}
|
||||
engines: {node: '>= 14.18.0'}
|
||||
|
||||
rechoir@0.8.0:
|
||||
resolution: {integrity: sha512-/vxpCXddiX8NGfGO/mTafwjq4aFa/71pvamip0++IQk3zG8cbCj0fifNPrjjF1XMXUne91jL9OoxmdykoEtifQ==, tarball: https://hub.megan.ir/repository/npm/rechoir/-/rechoir-0.8.0.tgz}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
|
||||
redis-errors@1.2.0:
|
||||
resolution: {integrity: sha512-1qny3OExCf0UvUV/5wpYKf2YwPcOqXzkwKKSmKHiE6ZMQs5heeE/c8eXK+PNllPvmjgAbfnsbpkGZWy8cBpn9w==, tarball: https://hub.megan.ir/repository/npm/redis-errors/-/redis-errors-1.2.0.tgz}
|
||||
engines: {node: '>=4'}
|
||||
@@ -3629,6 +3802,10 @@ packages:
|
||||
resolution: {integrity: sha512-OrZaX2Mb+rJCpH/6CpSqt9xFVpN++x01XnN2ie9g6P5/3xelLAkXWVADpdz1IHD/KFfEXyE6V0U01OQ3UO2rEg==}
|
||||
engines: {node: '>=8'}
|
||||
|
||||
resolve-dir@1.0.1:
|
||||
resolution: {integrity: sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==, tarball: https://hub.megan.ir/repository/npm/resolve-dir/-/resolve-dir-1.0.1.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
resolve-from@4.0.0:
|
||||
resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==}
|
||||
engines: {node: '>=4'}
|
||||
@@ -3640,6 +3817,11 @@ packages:
|
||||
resolve-pkg-maps@1.0.0:
|
||||
resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==}
|
||||
|
||||
resolve@1.22.12:
|
||||
resolution: {integrity: sha512-TyeJ1zif53BPfHootBGwPRYT1RUt6oGWsaQr8UyZW/eAm9bKoijtvruSDEmZHm92CwS9nj7/fWttqPCgzep8CA==, tarball: https://hub.megan.ir/repository/npm/resolve/-/resolve-1.22.12.tgz}
|
||||
engines: {node: '>= 0.4'}
|
||||
hasBin: true
|
||||
|
||||
restore-cursor@3.1.0:
|
||||
resolution: {integrity: sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==}
|
||||
engines: {node: '>=8'}
|
||||
@@ -3652,6 +3834,10 @@ packages:
|
||||
resolution: {integrity: sha512-nLTrUKm2UyiL7rlhapu/Zl45FwNgkZGaCpZbIHajDYgwlJCOzLSk+cIPAnsEqV955GjILJnKbdQC1nVPz+gAYQ==}
|
||||
engines: {node: '>= 18'}
|
||||
|
||||
run-async@3.0.0:
|
||||
resolution: {integrity: sha512-540WwVDOMxA6dN6We19EcT9sc3hkXPw5mzRNGM3FkdN/vtE9NFvj5lFAPNwUDmJjXidm3v7TC1cTE7t17Ulm1Q==, tarball: https://hub.megan.ir/repository/npm/run-async/-/run-async-3.0.0.tgz}
|
||||
engines: {node: '>=0.12.0'}
|
||||
|
||||
rxjs@7.8.1:
|
||||
resolution: {integrity: sha512-AA3TVj+0A2iuIoQkWEK/tqFjBq2j+6PO6Y0zJcvzLAFhEFIO3HL0vls9hWLncZbAAbK0mar7oZ4V079I/qPMxg==}
|
||||
|
||||
@@ -3842,6 +4028,10 @@ packages:
|
||||
resolution: {integrity: sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==}
|
||||
engines: {node: '>=10'}
|
||||
|
||||
supports-preserve-symlinks-flag@1.0.0:
|
||||
resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==, tarball: https://hub.megan.ir/repository/npm/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz}
|
||||
engines: {node: '>= 0.4'}
|
||||
|
||||
swagger-ui-dist@5.32.4:
|
||||
resolution: {integrity: sha512-0AADFFQNJzExEN49SrD/34Nn9cxNxVLiydYl2MBwSZFPVXNkVwC/EFAjoezGGqE8oDegiDC+p47t8lKObCinMQ==}
|
||||
|
||||
@@ -3890,6 +4080,9 @@ packages:
|
||||
resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==}
|
||||
engines: {node: '>=12.0.0'}
|
||||
|
||||
title-case@4.3.2:
|
||||
resolution: {integrity: sha512-I/nkcBo73mO42Idfv08jhInV61IMb61OdIFxk+B4Gu1oBjWBPOLmhZdsli+oJCVaD+86pYQA93cJfFt224ZFAA==, tarball: https://hub.megan.ir/repository/npm/title-case/-/title-case-4.3.2.tgz}
|
||||
|
||||
tmpl@1.0.5:
|
||||
resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==}
|
||||
|
||||
@@ -4027,6 +4220,10 @@ packages:
|
||||
resolution: {integrity: sha512-rvKSBiC5zqCCiDZ9kAOszZcDvdAHwwIKJG33Ykj43OKcWsnmcBRL09YTU4nOeHZ8Y2a7l1MgTd08SBe9A8Qj6A==}
|
||||
engines: {node: '>=18'}
|
||||
|
||||
unc-path-regex@0.1.2:
|
||||
resolution: {integrity: sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==, tarball: https://hub.megan.ir/repository/npm/unc-path-regex/-/unc-path-regex-0.1.2.tgz}
|
||||
engines: {node: '>=0.10.0'}
|
||||
|
||||
undici-types@6.21.0:
|
||||
resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==}
|
||||
|
||||
@@ -4067,6 +4264,10 @@ packages:
|
||||
resolution: {integrity: sha512-kiGUalWN+rgBJ/1OHZsBtU4rXZOfj/7rKQxULKlIzwzQSvMJUUNgPwJEEh7gU6xEVxC0ahoOBvN2YI8GH6FNgA==}
|
||||
engines: {node: '>=10.12.0'}
|
||||
|
||||
v8flags@4.0.1:
|
||||
resolution: {integrity: sha512-fcRLaS4H/hrZk9hYwbdRM35D0U8IYMfEClhXxCivOojl+yTRAZH3Zy2sSy6qVCiGbV9YAtPssP6jaChqC9vPCg==, tarball: https://hub.megan.ir/repository/npm/v8flags/-/v8flags-4.0.1.tgz}
|
||||
engines: {node: '>= 10.13.0'}
|
||||
|
||||
valibot@1.2.0:
|
||||
resolution: {integrity: sha512-mm1rxUsmOxzrwnX5arGS+U4T25RdvpPjPN4yR0u9pUBov9+zGVtO84tif1eY4r6zWxVxu3KzIyknJy3rxfRZZg==}
|
||||
peerDependencies:
|
||||
@@ -4111,6 +4312,10 @@ packages:
|
||||
webpack-cli:
|
||||
optional: true
|
||||
|
||||
which@1.3.1:
|
||||
resolution: {integrity: sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==, tarball: https://hub.megan.ir/repository/npm/which/-/which-1.3.1.tgz}
|
||||
hasBin: true
|
||||
|
||||
which@2.0.2:
|
||||
resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==}
|
||||
engines: {node: '>= 8'}
|
||||
@@ -6126,10 +6331,17 @@ snapshots:
|
||||
'@types/express-serve-static-core': 5.1.1
|
||||
'@types/serve-static': 2.2.0
|
||||
|
||||
'@types/fined@1.1.5': {}
|
||||
|
||||
'@types/geojson@7946.0.16': {}
|
||||
|
||||
'@types/http-errors@2.0.5': {}
|
||||
|
||||
'@types/inquirer@9.0.9':
|
||||
dependencies:
|
||||
'@types/through': 0.0.33
|
||||
rxjs: 7.8.2
|
||||
|
||||
'@types/istanbul-lib-coverage@2.0.6': {}
|
||||
|
||||
'@types/istanbul-lib-report@3.0.3':
|
||||
@@ -6152,6 +6364,11 @@ snapshots:
|
||||
'@types/ms': 2.1.0
|
||||
'@types/node': 22.19.17
|
||||
|
||||
'@types/liftoff@4.0.3':
|
||||
dependencies:
|
||||
'@types/fined': 1.1.5
|
||||
'@types/node': 22.19.17
|
||||
|
||||
'@types/methods@1.1.4': {}
|
||||
|
||||
'@types/ms@2.1.0': {}
|
||||
@@ -6168,6 +6385,8 @@ snapshots:
|
||||
dependencies:
|
||||
undici-types: 7.16.0
|
||||
|
||||
'@types/picomatch@4.0.3': {}
|
||||
|
||||
'@types/qs@6.15.0': {}
|
||||
|
||||
'@types/range-parser@1.2.7': {}
|
||||
@@ -6199,6 +6418,10 @@ snapshots:
|
||||
'@types/methods': 1.1.4
|
||||
'@types/superagent': 8.1.9
|
||||
|
||||
'@types/through@0.0.33':
|
||||
dependencies:
|
||||
'@types/node': 22.19.17
|
||||
|
||||
'@types/validator@13.15.10': {}
|
||||
|
||||
'@types/yargs-parser@21.0.3': {}
|
||||
@@ -6524,6 +6747,10 @@ snapshots:
|
||||
|
||||
argparse@2.0.1: {}
|
||||
|
||||
array-each@1.0.1: {}
|
||||
|
||||
array-slice@1.1.0: {}
|
||||
|
||||
array-timsort@1.0.3: {}
|
||||
|
||||
asap@2.0.6: {}
|
||||
@@ -6707,6 +6934,8 @@ snapshots:
|
||||
ansi-styles: 4.3.0
|
||||
supports-color: 7.2.0
|
||||
|
||||
change-case@5.4.4: {}
|
||||
|
||||
char-regex@1.0.2: {}
|
||||
|
||||
chardet@2.1.1: {}
|
||||
@@ -6872,6 +7101,8 @@ snapshots:
|
||||
|
||||
destr@2.0.5: {}
|
||||
|
||||
detect-file@1.0.0: {}
|
||||
|
||||
detect-newline@3.1.0: {}
|
||||
|
||||
dezalgo@1.0.4:
|
||||
@@ -6881,6 +7112,8 @@ snapshots:
|
||||
|
||||
diff@4.0.4: {}
|
||||
|
||||
dlv@1.1.3: {}
|
||||
|
||||
dotenv-expand@12.0.3:
|
||||
dependencies:
|
||||
dotenv: 16.6.1
|
||||
@@ -7098,6 +7331,10 @@ snapshots:
|
||||
|
||||
exit-x@0.2.2: {}
|
||||
|
||||
expand-tilde@2.0.2:
|
||||
dependencies:
|
||||
homedir-polyfill: 1.0.3
|
||||
|
||||
expect@30.3.0:
|
||||
dependencies:
|
||||
'@jest/expect-utils': 30.3.0
|
||||
@@ -7142,6 +7379,8 @@ snapshots:
|
||||
|
||||
exsolve@1.0.8: {}
|
||||
|
||||
extend@3.0.2: {}
|
||||
|
||||
fast-check@3.23.2:
|
||||
dependencies:
|
||||
pure-rand: 6.1.0
|
||||
@@ -7214,6 +7453,23 @@ snapshots:
|
||||
locate-path: 6.0.0
|
||||
path-exists: 4.0.0
|
||||
|
||||
findup-sync@5.0.0:
|
||||
dependencies:
|
||||
detect-file: 1.0.0
|
||||
is-glob: 4.0.3
|
||||
micromatch: 4.0.8
|
||||
resolve-dir: 1.0.1
|
||||
|
||||
fined@2.0.0:
|
||||
dependencies:
|
||||
expand-tilde: 2.0.2
|
||||
is-plain-object: 5.0.0
|
||||
object.defaults: 1.1.0
|
||||
object.pick: 1.3.0
|
||||
parse-filepath: 1.0.2
|
||||
|
||||
flagged-respawn@2.0.0: {}
|
||||
|
||||
flat-cache@4.0.1:
|
||||
dependencies:
|
||||
flatted: 3.4.2
|
||||
@@ -7221,6 +7477,12 @@ snapshots:
|
||||
|
||||
flatted@3.4.2: {}
|
||||
|
||||
for-in@1.0.2: {}
|
||||
|
||||
for-own@1.0.0:
|
||||
dependencies:
|
||||
for-in: 1.0.2
|
||||
|
||||
foreground-child@3.3.1:
|
||||
dependencies:
|
||||
cross-spawn: 7.0.6
|
||||
@@ -7351,6 +7613,20 @@ snapshots:
|
||||
once: 1.4.0
|
||||
path-is-absolute: 1.0.1
|
||||
|
||||
global-modules@1.0.0:
|
||||
dependencies:
|
||||
global-prefix: 1.0.2
|
||||
is-windows: 1.0.2
|
||||
resolve-dir: 1.0.1
|
||||
|
||||
global-prefix@1.0.2:
|
||||
dependencies:
|
||||
expand-tilde: 2.0.2
|
||||
homedir-polyfill: 1.0.3
|
||||
ini: 1.3.8
|
||||
is-windows: 1.0.2
|
||||
which: 1.3.1
|
||||
|
||||
globals@14.0.0: {}
|
||||
|
||||
globals@16.5.0: {}
|
||||
@@ -7384,6 +7660,10 @@ snapshots:
|
||||
dependencies:
|
||||
function-bind: 1.1.2
|
||||
|
||||
homedir-polyfill@1.0.3:
|
||||
dependencies:
|
||||
parse-passwd: 1.0.0
|
||||
|
||||
hono@4.12.14: {}
|
||||
|
||||
html-escaper@2.0.2: {}
|
||||
@@ -7433,6 +7713,27 @@ snapshots:
|
||||
|
||||
inherits@2.0.4: {}
|
||||
|
||||
ini@1.3.8: {}
|
||||
|
||||
inquirer@9.3.8(@types/node@22.19.17):
|
||||
dependencies:
|
||||
'@inquirer/external-editor': 1.0.3(@types/node@22.19.17)
|
||||
'@inquirer/figures': 1.0.15
|
||||
ansi-escapes: 4.3.2
|
||||
cli-width: 4.1.0
|
||||
mute-stream: 1.0.0
|
||||
ora: 5.4.1
|
||||
run-async: 3.0.0
|
||||
rxjs: 7.8.2
|
||||
string-width: 4.2.3
|
||||
strip-ansi: 6.0.1
|
||||
wrap-ansi: 6.2.0
|
||||
yoctocolors-cjs: 2.1.3
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
|
||||
interpret@3.1.1: {}
|
||||
|
||||
ioredis@5.10.1:
|
||||
dependencies:
|
||||
'@ioredis/commands': 1.5.1
|
||||
@@ -7449,8 +7750,17 @@ snapshots:
|
||||
|
||||
ipaddr.js@1.9.1: {}
|
||||
|
||||
is-absolute@1.0.0:
|
||||
dependencies:
|
||||
is-relative: 1.0.0
|
||||
is-windows: 1.0.2
|
||||
|
||||
is-arrayish@0.2.1: {}
|
||||
|
||||
is-core-module@2.16.2:
|
||||
dependencies:
|
||||
hasown: 2.0.3
|
||||
|
||||
is-extglob@2.1.1: {}
|
||||
|
||||
is-fullwidth-code-point@3.0.0: {}
|
||||
@@ -7465,16 +7775,32 @@ snapshots:
|
||||
|
||||
is-number@7.0.0: {}
|
||||
|
||||
is-plain-object@5.0.0: {}
|
||||
|
||||
is-promise@4.0.0: {}
|
||||
|
||||
is-property@1.0.2: {}
|
||||
|
||||
is-relative@1.0.0:
|
||||
dependencies:
|
||||
is-unc-path: 1.0.0
|
||||
|
||||
is-stream@2.0.1: {}
|
||||
|
||||
is-unc-path@1.0.0:
|
||||
dependencies:
|
||||
unc-path-regex: 0.1.2
|
||||
|
||||
is-unicode-supported@0.1.0: {}
|
||||
|
||||
is-windows@1.0.2: {}
|
||||
|
||||
isbinaryfile@5.0.7: {}
|
||||
|
||||
isexe@2.0.0: {}
|
||||
|
||||
isobject@3.0.1: {}
|
||||
|
||||
istanbul-lib-coverage@3.2.2: {}
|
||||
|
||||
istanbul-lib-instrument@6.0.3:
|
||||
@@ -7907,6 +8233,16 @@ snapshots:
|
||||
|
||||
libphonenumber-js@1.12.41: {}
|
||||
|
||||
liftoff@5.0.1:
|
||||
dependencies:
|
||||
extend: 3.0.2
|
||||
findup-sync: 5.0.0
|
||||
fined: 2.0.0
|
||||
flagged-respawn: 2.0.0
|
||||
is-plain-object: 5.0.0
|
||||
rechoir: 0.8.0
|
||||
resolve: 1.22.12
|
||||
|
||||
lines-and-columns@1.2.4: {}
|
||||
|
||||
load-esm@1.0.3: {}
|
||||
@@ -7976,6 +8312,8 @@ snapshots:
|
||||
dependencies:
|
||||
tmpl: 1.0.5
|
||||
|
||||
map-cache@0.2.2: {}
|
||||
|
||||
mariadb@3.4.5:
|
||||
dependencies:
|
||||
'@types/geojson': 7946.0.16
|
||||
@@ -8046,6 +8384,8 @@ snapshots:
|
||||
concat-stream: 2.0.0
|
||||
type-is: 1.6.18
|
||||
|
||||
mute-stream@1.0.0: {}
|
||||
|
||||
mute-stream@2.0.0: {}
|
||||
|
||||
mysql2@3.15.3:
|
||||
@@ -8076,6 +8416,10 @@ snapshots:
|
||||
dependencies:
|
||||
lru.min: 1.1.4
|
||||
|
||||
nanospinner@1.2.2:
|
||||
dependencies:
|
||||
picocolors: 1.1.1
|
||||
|
||||
napi-postinstall@0.3.4: {}
|
||||
|
||||
natural-compare@1.4.0: {}
|
||||
@@ -8098,6 +8442,21 @@ snapshots:
|
||||
|
||||
node-int64@0.4.0: {}
|
||||
|
||||
node-plop@0.32.3(@types/node@22.19.17):
|
||||
dependencies:
|
||||
'@types/inquirer': 9.0.9
|
||||
'@types/picomatch': 4.0.3
|
||||
change-case: 5.4.4
|
||||
dlv: 1.1.3
|
||||
handlebars: 4.7.9
|
||||
inquirer: 9.3.8(@types/node@22.19.17)
|
||||
isbinaryfile: 5.0.7
|
||||
resolve: 1.22.12
|
||||
tinyglobby: 0.2.16
|
||||
title-case: 4.3.2
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
|
||||
node-releases@2.0.37: {}
|
||||
|
||||
normalize-path@3.0.0: {}
|
||||
@@ -8116,6 +8475,17 @@ snapshots:
|
||||
|
||||
object-inspect@1.13.4: {}
|
||||
|
||||
object.defaults@1.1.0:
|
||||
dependencies:
|
||||
array-each: 1.0.1
|
||||
array-slice: 1.1.0
|
||||
for-own: 1.0.0
|
||||
isobject: 3.0.1
|
||||
|
||||
object.pick@1.3.0:
|
||||
dependencies:
|
||||
isobject: 3.0.1
|
||||
|
||||
ohash@2.0.11: {}
|
||||
|
||||
on-finished@2.4.1:
|
||||
@@ -8175,6 +8545,12 @@ snapshots:
|
||||
dependencies:
|
||||
callsites: 3.1.0
|
||||
|
||||
parse-filepath@1.0.2:
|
||||
dependencies:
|
||||
is-absolute: 1.0.0
|
||||
map-cache: 0.2.2
|
||||
path-root: 0.1.1
|
||||
|
||||
parse-json@5.2.0:
|
||||
dependencies:
|
||||
'@babel/code-frame': 7.29.0
|
||||
@@ -8182,6 +8558,8 @@ snapshots:
|
||||
json-parse-even-better-errors: 2.3.1
|
||||
lines-and-columns: 1.2.4
|
||||
|
||||
parse-passwd@1.0.0: {}
|
||||
|
||||
parseurl@1.3.3: {}
|
||||
|
||||
path-exists@4.0.0: {}
|
||||
@@ -8192,6 +8570,14 @@ snapshots:
|
||||
|
||||
path-key@3.1.1: {}
|
||||
|
||||
path-parse@1.0.7: {}
|
||||
|
||||
path-root-regex@0.1.2: {}
|
||||
|
||||
path-root@0.1.1:
|
||||
dependencies:
|
||||
path-root-regex: 0.1.2
|
||||
|
||||
path-scurry@1.11.1:
|
||||
dependencies:
|
||||
lru-cache: 10.4.3
|
||||
@@ -8228,6 +8614,18 @@ snapshots:
|
||||
exsolve: 1.0.8
|
||||
pathe: 2.0.3
|
||||
|
||||
plop@4.0.5(@types/node@22.19.17):
|
||||
dependencies:
|
||||
'@types/liftoff': 4.0.3
|
||||
interpret: 3.1.1
|
||||
liftoff: 5.0.1
|
||||
nanospinner: 1.2.2
|
||||
node-plop: 0.32.3(@types/node@22.19.17)
|
||||
picocolors: 1.1.1
|
||||
v8flags: 4.0.1
|
||||
transitivePeerDependencies:
|
||||
- '@types/node'
|
||||
|
||||
pluralize@8.0.0: {}
|
||||
|
||||
postgres@3.4.7: {}
|
||||
@@ -8320,6 +8718,10 @@ snapshots:
|
||||
|
||||
readdirp@4.1.2: {}
|
||||
|
||||
rechoir@0.8.0:
|
||||
dependencies:
|
||||
resolve: 1.22.12
|
||||
|
||||
redis-errors@1.2.0: {}
|
||||
|
||||
redis-parser@3.0.0:
|
||||
@@ -8338,12 +8740,24 @@ snapshots:
|
||||
dependencies:
|
||||
resolve-from: 5.0.0
|
||||
|
||||
resolve-dir@1.0.1:
|
||||
dependencies:
|
||||
expand-tilde: 2.0.2
|
||||
global-modules: 1.0.0
|
||||
|
||||
resolve-from@4.0.0: {}
|
||||
|
||||
resolve-from@5.0.0: {}
|
||||
|
||||
resolve-pkg-maps@1.0.0: {}
|
||||
|
||||
resolve@1.22.12:
|
||||
dependencies:
|
||||
es-errors: 1.3.0
|
||||
is-core-module: 2.16.2
|
||||
path-parse: 1.0.7
|
||||
supports-preserve-symlinks-flag: 1.0.0
|
||||
|
||||
restore-cursor@3.1.0:
|
||||
dependencies:
|
||||
onetime: 5.1.2
|
||||
@@ -8361,6 +8775,8 @@ snapshots:
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
run-async@3.0.0: {}
|
||||
|
||||
rxjs@7.8.1:
|
||||
dependencies:
|
||||
tslib: 2.8.1
|
||||
@@ -8568,6 +8984,8 @@ snapshots:
|
||||
dependencies:
|
||||
has-flag: 4.0.0
|
||||
|
||||
supports-preserve-symlinks-flag@1.0.0: {}
|
||||
|
||||
swagger-ui-dist@5.32.4:
|
||||
dependencies:
|
||||
'@scarf/scarf': 1.4.0
|
||||
@@ -8608,6 +9026,8 @@ snapshots:
|
||||
fdir: 6.5.0(picomatch@4.0.4)
|
||||
picomatch: 4.0.4
|
||||
|
||||
title-case@4.3.2: {}
|
||||
|
||||
tmpl@1.0.5: {}
|
||||
|
||||
to-regex-range@5.0.1:
|
||||
@@ -8741,6 +9161,8 @@ snapshots:
|
||||
|
||||
uint8array-extras@1.5.0: {}
|
||||
|
||||
unc-path-regex@0.1.2: {}
|
||||
|
||||
undici-types@6.21.0: {}
|
||||
|
||||
undici-types@7.16.0: {}
|
||||
@@ -8795,6 +9217,8 @@ snapshots:
|
||||
'@types/istanbul-lib-coverage': 2.0.6
|
||||
convert-source-map: 2.0.0
|
||||
|
||||
v8flags@4.0.1: {}
|
||||
|
||||
valibot@1.2.0(typescript@5.9.3):
|
||||
optionalDependencies:
|
||||
typescript: 5.9.3
|
||||
@@ -8852,6 +9276,10 @@ snapshots:
|
||||
- esbuild
|
||||
- uglify-js
|
||||
|
||||
which@1.3.1:
|
||||
dependencies:
|
||||
isexe: 2.0.0
|
||||
|
||||
which@2.0.2:
|
||||
dependencies:
|
||||
isexe: 2.0.0
|
||||
|
||||
+86
-52
@@ -7,6 +7,7 @@ CREATE TABLE `admin_accounts` (
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `admin_accounts_account_id_key`(`account_id`),
|
||||
INDEX `admin_accounts_admin_id_fkey`(`admin_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -275,28 +276,18 @@ CREATE TABLE `providers` (
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- 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,
|
||||
`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,
|
||||
CREATE TABLE `consumer_account_device` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`device_id` VARCHAR(191) NOT NULL,
|
||||
`device_name` VARCHAR(191) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
`consumer_account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `consumer_devices_uuid_key`(`uuid`),
|
||||
INDEX `consumer_devices_consumer_id_fkey`(`consumer_id`),
|
||||
PRIMARY KEY (`uuid`)
|
||||
UNIQUE INDEX `consumer_account_device_device_id_key`(`device_id`),
|
||||
UNIQUE INDEX `consumer_account_device_consumer_account_id_key`(`consumer_account_id`),
|
||||
INDEX `consumer_account_device_consumer_account_id_idx`(`consumer_account_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
@@ -325,6 +316,7 @@ CREATE TABLE `consumer_accounts` (
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `consumer_accounts_account_id_key`(`account_id`),
|
||||
INDEX `consumer_accounts_consumer_id_fkey`(`consumer_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -381,6 +373,8 @@ CREATE TABLE `business_activities` (
|
||||
`guild_id` VARCHAR(191) NOT NULL,
|
||||
`consumer_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `business_activities_consumer_id_fkey`(`consumer_id`),
|
||||
INDEX `business_activities_guild_id_fkey`(`guild_id`),
|
||||
UNIQUE INDEX `business_activities_economic_code_consumer_id_key`(`economic_code`, `consumer_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
@@ -395,6 +389,7 @@ CREATE TABLE `complexes` (
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`business_activity_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `complexes_business_activity_id_fkey`(`business_activity_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -415,9 +410,23 @@ CREATE TABLE `poses` (
|
||||
|
||||
UNIQUE INDEX `poses_serial_number_key`(`serial_number`),
|
||||
UNIQUE INDEX `poses_account_id_key`(`account_id`),
|
||||
INDEX `poses_complex_id_fkey`(`complex_id`),
|
||||
INDEX `poses_device_id_fkey`(`device_id`),
|
||||
INDEX `poses_provider_id_fkey`(`provider_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `consumer_account_good_favorites` (
|
||||
`created_at` DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3),
|
||||
`consumer_account_id` VARCHAR(191) NOT NULL,
|
||||
`good_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
INDEX `consumer_account_good_favorites_good_id_idx`(`good_id`),
|
||||
INDEX `consumer_account_good_favorites_consumer_account_id_idx`(`consumer_account_id`),
|
||||
PRIMARY KEY (`consumer_account_id`, `good_id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `goods` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
@@ -427,7 +436,7 @@ CREATE TABLE `goods` (
|
||||
`description` TEXT NULL,
|
||||
`local_sku` VARCHAR(100) NULL,
|
||||
`barcode` VARCHAR(100) NULL,
|
||||
`base_sale_price` DECIMAL(15, 0) NULL DEFAULT 0.00,
|
||||
`base_sale_price` DECIMAL(15, 0) NULL DEFAULT 0,
|
||||
`image_url` VARCHAR(255) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
@@ -440,6 +449,9 @@ CREATE TABLE `goods` (
|
||||
UNIQUE INDEX `goods_local_sku_key`(`local_sku`),
|
||||
UNIQUE INDEX `goods_barcode_key`(`barcode`),
|
||||
INDEX `goods_category_id_idx`(`category_id`),
|
||||
INDEX `goods_business_activity_id_fkey`(`business_activity_id`),
|
||||
INDEX `goods_measure_unit_id_fkey`(`measure_unit_id`),
|
||||
INDEX `goods_sku_id_fkey`(`sku_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -456,6 +468,8 @@ CREATE TABLE `good_categories` (
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`deleted_at` TIMESTAMP(0) NULL,
|
||||
|
||||
INDEX `good_categories_complex_id_fkey`(`complex_id`),
|
||||
INDEX `good_categories_guild_id_fkey`(`guild_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -489,7 +503,6 @@ CREATE TABLE `stock_keeping_units` (
|
||||
`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,
|
||||
@@ -498,6 +511,7 @@ CREATE TABLE `stock_keeping_units` (
|
||||
|
||||
UNIQUE INDEX `stock_keeping_units_code_key`(`code`),
|
||||
INDEX `stock_keeping_units_code_idx`(`code`),
|
||||
INDEX `stock_keeping_units_guild_id_fkey`(`guild_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -571,12 +585,18 @@ CREATE TABLE `sales_invoices` (
|
||||
`customer_id` VARCHAR(191) NULL,
|
||||
`consumer_account_id` VARCHAR(191) NOT NULL,
|
||||
`pos_id` VARCHAR(191) NOT NULL,
|
||||
`settlement_type` ENUM('CASH', 'CREDIT', 'MIXED') NOT NULL,
|
||||
`discount_amount` DECIMAL(15, 2) NULL,
|
||||
`tax_amount` DECIMAL(15, 2) 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`),
|
||||
INDEX `sales_invoices_consumer_account_id_fkey`(`consumer_account_id`),
|
||||
INDEX `sales_invoices_customer_id_fkey`(`customer_id`),
|
||||
INDEX `sales_invoices_pos_id_fkey`(`pos_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;
|
||||
@@ -599,8 +619,12 @@ CREATE TABLE `sales_invoice_items` (
|
||||
`invoice_id` VARCHAR(191) NOT NULL,
|
||||
`good_id` VARCHAR(191) NOT NULL,
|
||||
`service_id` VARCHAR(191) NULL,
|
||||
`discount_amount` DECIMAL(15, 2) NULL,
|
||||
`tax_amount` DECIMAL(15, 2) NULL,
|
||||
|
||||
INDEX `sales_invoice_items_invoice_id_good_id_idx`(`invoice_id`, `good_id`),
|
||||
INDEX `sales_invoice_items_good_id_fkey`(`good_id`),
|
||||
INDEX `sales_invoice_items_service_id_fkey`(`service_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
@@ -608,16 +632,19 @@ CREATE TABLE `sales_invoice_items` (
|
||||
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,
|
||||
`status` ENUM('NOT_SEND', 'QUEUED', 'FISCAL_QUEUED', 'SEND_FAILURE', 'SUCCESS', 'FAILURE') NOT 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,
|
||||
`provider_request_payload` JSON NOT NULL,
|
||||
`raw_request_payload` JSON NOT NULL,
|
||||
`error_message` TEXT NULL,
|
||||
`fiscal_warnings` JSON NULL,
|
||||
`provider_response` JSON NULL,
|
||||
`validation_errors` JSON 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`),
|
||||
@@ -666,7 +693,7 @@ CREATE TABLE `services` (
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`deleted_at` TIMESTAMP(0) NULL,
|
||||
`category_id` VARCHAR(191) NULL,
|
||||
`base_sale_price` DECIMAL(15, 0) NOT NULL DEFAULT 0.00,
|
||||
`base_sale_price` DECIMAL(15, 0) NOT NULL DEFAULT 0,
|
||||
`account_id` VARCHAR(191) NOT NULL,
|
||||
`complex_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
@@ -693,10 +720,10 @@ CREATE TABLE `service_categories` (
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `admin_accounts` ADD CONSTRAINT `admin_accounts_admin_id_fkey` FOREIGN KEY (`admin_id`) REFERENCES `admins`(`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 `admin_accounts` ADD CONSTRAINT `admin_accounts_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
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 `devices` ADD CONSTRAINT `devices_brand_id_fkey` FOREIGN KEY (`brand_id`) REFERENCES `device_brands`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
@@ -771,35 +798,38 @@ ALTER TABLE `provider_accounts` ADD CONSTRAINT `provider_accounts_account_id_fke
|
||||
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;
|
||||
ALTER TABLE `consumer_account_device` ADD CONSTRAINT `consumer_account_device_consumer_account_id_fkey` FOREIGN KEY (`consumer_account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- 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;
|
||||
ALTER TABLE `consumer_accounts` ADD CONSTRAINT `consumer_accounts_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers`(`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;
|
||||
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_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;
|
||||
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 `business_activities` ADD CONSTRAINT `business_activities_consumer_id_fkey` FOREIGN KEY (`consumer_id`) REFERENCES `consumers`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `business_activities` ADD CONSTRAINT `business_activities_guild_id_fkey` FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `complexes` ADD CONSTRAINT `complexes_business_activity_id_fkey` FOREIGN KEY (`business_activity_id`) REFERENCES `business_activities`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `poses` ADD CONSTRAINT `poses_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `poses` ADD CONSTRAINT `poses_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
@@ -810,59 +840,62 @@ 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 `poses` ADD CONSTRAINT `poses_account_id_fkey` FOREIGN KEY (`account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
ALTER TABLE `consumer_account_good_favorites` ADD CONSTRAINT `consumer_account_good_favorites_consumer_account_id_fkey` FOREIGN KEY (`consumer_account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
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 `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;
|
||||
ALTER TABLE `consumer_account_good_favorites` ADD CONSTRAINT `consumer_account_good_favorites_good_id_fkey` FOREIGN KEY (`good_id`) REFERENCES `goods`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
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;
|
||||
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_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_sku_id_fkey` FOREIGN KEY (`sku_id`) REFERENCES `stock_keeping_units`(`id`) ON DELETE RESTRICT ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `good_categories` ADD CONSTRAINT `good_categories_complex_id_fkey` FOREIGN KEY (`complex_id`) REFERENCES `complexes`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- 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;
|
||||
ALTER TABLE `good_categories` ADD CONSTRAINT `good_categories_guild_id_fkey` FOREIGN KEY (`guild_id`) REFERENCES `guilds`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `customer_individuals` ADD CONSTRAINT `customer_individuals_customer_id_fkey` FOREIGN KEY (`customer_id`) REFERENCES `customers`(`id`) ON DELETE CASCADE ON UPDATE CASCADE;
|
||||
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_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;
|
||||
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_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;
|
||||
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 `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_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_pos_id_fkey` FOREIGN KEY (`pos_id`) REFERENCES `poses`(`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;
|
||||
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_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_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_service_id_fkey` FOREIGN KEY (`service_id`) REFERENCES `services`(`id`) ON DELETE SET NULL ON UPDATE CASCADE;
|
||||
|
||||
@@ -877,3 +910,4 @@ ALTER TABLE `sales_invoice_payment_terminal_info` ADD CONSTRAINT `sales_invoice_
|
||||
|
||||
-- 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;
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
/*
|
||||
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`;
|
||||
@@ -1,48 +0,0 @@
|
||||
/*
|
||||
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;
|
||||
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- You are about to drop the `consumer_devices` table. If the table is not empty, all the data it contains will be lost.
|
||||
|
||||
*/
|
||||
-- DropForeignKey
|
||||
ALTER TABLE `consumer_devices` DROP FOREIGN KEY `consumer_devices_consumer_id_fkey`;
|
||||
|
||||
-- DropTable
|
||||
DROP TABLE `consumer_devices`;
|
||||
|
||||
-- CreateTable
|
||||
CREATE TABLE `consumer_account_device` (
|
||||
`id` VARCHAR(191) NOT NULL,
|
||||
`device_id` VARCHAR(191) NOT NULL,
|
||||
`device_name` VARCHAR(191) NULL,
|
||||
`created_at` TIMESTAMP(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0),
|
||||
`updated_at` TIMESTAMP(0) NOT NULL,
|
||||
`consumer_account_id` VARCHAR(191) NOT NULL,
|
||||
|
||||
UNIQUE INDEX `consumer_account_device_device_id_key`(`device_id`),
|
||||
UNIQUE INDEX `consumer_account_device_consumer_account_id_key`(`consumer_account_id`),
|
||||
INDEX `consumer_account_device_consumer_account_id_idx`(`consumer_account_id`),
|
||||
PRIMARY KEY (`id`)
|
||||
) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
|
||||
|
||||
-- AddForeignKey
|
||||
ALTER TABLE `consumer_account_device` ADD CONSTRAINT `consumer_account_device_consumer_account_id_fkey` FOREIGN KEY (`consumer_account_id`) REFERENCES `consumer_accounts`(`id`) ON DELETE RESTRICT 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;
|
||||
@@ -0,0 +1,25 @@
|
||||
/*
|
||||
Warnings:
|
||||
|
||||
- A unique constraint covering the columns `[business_activity_id,postal_code,national_id]` on the table `customer_individuals` will be added. If there are existing duplicate values, this will fail.
|
||||
- A unique constraint covering the columns `[business_activity_id,postal_code,registration_number]` on the table `customer_legal` will be added. If there are existing duplicate values, this will fail.
|
||||
|
||||
*/
|
||||
-- AlterTable
|
||||
ALTER TABLE `customer_individuals` MODIFY `first_name` VARCHAR(255) NULL,
|
||||
MODIFY `last_name` VARCHAR(255) NULL,
|
||||
MODIFY `national_id` CHAR(10) NULL,
|
||||
MODIFY `mobile_number` CHAR(15) NULL,
|
||||
MODIFY `postal_code` CHAR(10) NULL,
|
||||
MODIFY `economic_code` CHAR(14) NULL;
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE `customer_legal` MODIFY `name` VARCHAR(255) NULL,
|
||||
MODIFY `economic_code` CHAR(11) NULL,
|
||||
MODIFY `postal_code` CHAR(10) NULL;
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `customer_individuals_business_activity_id_postal_code_nation_key` ON `customer_individuals`(`business_activity_id`, `postal_code`, `national_id`);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE UNIQUE INDEX `customer_legal_business_activity_id_postal_code_registration_key` ON `customer_legal`(`business_activity_id`, `postal_code`, `registration_number`);
|
||||
@@ -0,0 +1,50 @@
|
||||
-- ALTER TABLE
|
||||
ALTER TABLE `sales_invoices`
|
||||
ADD COLUMN `last_attempt_no` INT NULL,
|
||||
ADD COLUMN `last_tsp_status` ENUM(
|
||||
'NOT_SEND',
|
||||
'QUEUED',
|
||||
'FISCAL_QUEUED',
|
||||
'SEND_FAILURE',
|
||||
'SUCCESS',
|
||||
'FAILURE'
|
||||
) NULL;
|
||||
|
||||
-- INDEX
|
||||
CREATE INDEX `sales_invoices_pos_id_invoice_date_idx`
|
||||
ON `sales_invoices` (`pos_id`, `invoice_date`);
|
||||
|
||||
-- BACKFILL LAST ATTEMPT
|
||||
UPDATE sales_invoices si
|
||||
JOIN (
|
||||
SELECT invoice_id, attempt_no, status
|
||||
FROM (
|
||||
SELECT
|
||||
invoice_id,
|
||||
attempt_no,
|
||||
status,
|
||||
ROW_NUMBER() OVER (
|
||||
PARTITION BY invoice_id
|
||||
ORDER BY created_at DESC
|
||||
) rn
|
||||
FROM sale_invoice_tsp_attempts
|
||||
) t
|
||||
WHERE rn = 1
|
||||
) la ON la.invoice_id = si.id
|
||||
SET
|
||||
si.last_attempt_no = la.attempt_no,
|
||||
si.last_tsp_status = la.status;
|
||||
|
||||
-- SET NOT_SEND FOR NO ATTEMPTS
|
||||
UPDATE sales_invoices si
|
||||
LEFT JOIN sale_invoice_tsp_attempts att
|
||||
ON att.invoice_id = si.id
|
||||
SET
|
||||
si.last_attempt_no = NULL,
|
||||
si.last_tsp_status = 'NOT_SEND'
|
||||
WHERE att.invoice_id IS NULL;
|
||||
|
||||
-- SAFETY FILL
|
||||
UPDATE sales_invoices
|
||||
SET last_tsp_status = 'NOT_SEND'
|
||||
WHERE last_tsp_status IS NULL;
|
||||
@@ -1,15 +1,13 @@
|
||||
model AdminAccount {
|
||||
id String @id @default(ulid())
|
||||
|
||||
id String @id @default(ulid())
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
admin_id String
|
||||
admin Admin @relation(fields: [admin_id], references: [id])
|
||||
|
||||
account_id String @unique
|
||||
account Account @relation(fields: [account_id], references: [id], onDelete: Cascade)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
admin_id String
|
||||
account_id String @unique
|
||||
account Account @relation(fields: [account_id], references: [id], onDelete: Cascade)
|
||||
admin Admin @relation(fields: [admin_id], references: [id])
|
||||
|
||||
@@index([admin_id], map: "admin_accounts_admin_id_fkey")
|
||||
@@map("admin_accounts")
|
||||
}
|
||||
|
||||
|
||||
@@ -1,11 +1,9 @@
|
||||
model ConsumerAccountDevice {
|
||||
id String @id @default(ulid())
|
||||
device_id String @unique
|
||||
device_name String?
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
|
||||
id String @id @default(ulid())
|
||||
device_id String @unique
|
||||
device_name String?
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
consumer_account_id String @unique
|
||||
consumer_account ConsumerAccount @relation(fields: [consumer_account_id], references: [id])
|
||||
|
||||
|
||||
@@ -1,23 +1 @@
|
||||
// model ConsumerDevices {
|
||||
// uuid String @id @unique @db.VarChar(255)
|
||||
// app_version String @db.VarChar(20)
|
||||
// build_number String @db.VarChar(20)
|
||||
// platform String @db.VarChar(100)
|
||||
// brand String @db.VarChar(100)
|
||||
// model String @db.VarChar(100)
|
||||
// device String @db.VarChar(100)
|
||||
// publisher ApplicationPublisher
|
||||
// os_version String @db.VarChar(20)
|
||||
// sdk_version String @db.VarChar(20)
|
||||
// release_number String @db.VarChar(20)
|
||||
// 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)
|
||||
// consumer_id String
|
||||
// consumer Consumer @relation(fields: [consumer_id], references: [id])
|
||||
|
||||
// @@index([consumer_id], map: "consumer_devices_consumer_id_fkey")
|
||||
// @@map("consumer_devices")
|
||||
// }
|
||||
|
||||
@@ -1,36 +1,31 @@
|
||||
model ConsumerAccount {
|
||||
id String @id @default(ulid())
|
||||
role ConsumerRole
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
consumer_id String
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id])
|
||||
|
||||
account_id String @unique()
|
||||
account Account @relation(fields: [account_id], references: [id])
|
||||
|
||||
pos Pos?
|
||||
permission PermissionConsumer?
|
||||
account_allocation LicenseAccountAllocation?
|
||||
sales_invoices SalesInvoice[]
|
||||
account_device ConsumerAccountDevice?
|
||||
id String @id @default(ulid())
|
||||
role ConsumerRole
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
consumer_id String
|
||||
account_id String @unique
|
||||
account_device ConsumerAccountDevice?
|
||||
consumer_account_good_favorites ConsumerAccountGoodFavorite[]
|
||||
account Account @relation(fields: [account_id], references: [id])
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id])
|
||||
account_allocation LicenseAccountAllocation?
|
||||
permission PermissionConsumer?
|
||||
pos Pos?
|
||||
sales_invoices SalesInvoice[]
|
||||
|
||||
@@index([consumer_id], map: "consumer_accounts_consumer_id_fkey")
|
||||
@@map("consumer_accounts")
|
||||
}
|
||||
|
||||
model Consumer {
|
||||
id String @id @default(ulid())
|
||||
type ConsumerType
|
||||
status ConsumerStatus @default(ACTIVE)
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
accounts ConsumerAccount[]
|
||||
id String @id @default(ulid())
|
||||
type ConsumerType
|
||||
status ConsumerStatus @default(ACTIVE)
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
business_activities BusinessActivity[]
|
||||
// devices ConsumerDevices[]
|
||||
accounts ConsumerAccount[]
|
||||
individual ConsumerIndividual?
|
||||
legal ConsumerLegal?
|
||||
|
||||
@@ -42,15 +37,12 @@ model ConsumerIndividual {
|
||||
last_name String
|
||||
mobile_number String
|
||||
national_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)
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
partner_id String
|
||||
consumer_id String @id
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id], onDelete: Cascade)
|
||||
partner Partner @relation(fields: [partner_id], references: [id])
|
||||
|
||||
@@unique([mobile_number, consumer_id])
|
||||
@@unique([partner_id, national_code])
|
||||
@@ -60,93 +52,95 @@ model ConsumerIndividual {
|
||||
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)
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
partner_id String
|
||||
consumer_id String @id
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id], onDelete: Cascade)
|
||||
partner Partner @relation(fields: [partner_id], references: [id])
|
||||
|
||||
@@unique([partner_id, registration_code])
|
||||
@@map("consumers_legal")
|
||||
}
|
||||
|
||||
model BusinessActivity {
|
||||
id String @id @default(ulid())
|
||||
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)
|
||||
|
||||
guild_id String
|
||||
guild Guild @relation(fields: [guild_id], references: [id])
|
||||
|
||||
consumer_id String
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id])
|
||||
|
||||
license_activation LicenseActivation?
|
||||
complexes Complex[]
|
||||
permission_businesses PermissionBusiness[]
|
||||
goods Good[]
|
||||
customer_individuals CustomerIndividual[]
|
||||
customer_legals CustomerLegal[]
|
||||
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)
|
||||
guild_id String
|
||||
consumer_id String
|
||||
consumer Consumer @relation(fields: [consumer_id], references: [id])
|
||||
guild Guild @relation(fields: [guild_id], references: [id])
|
||||
complexes Complex[]
|
||||
customer_individuals CustomerIndividual[]
|
||||
customer_legals CustomerLegal[]
|
||||
goods Good[]
|
||||
license_activation LicenseActivation?
|
||||
permission_businesses PermissionBusiness[]
|
||||
|
||||
@@unique([economic_code, consumer_id])
|
||||
@@index([consumer_id], map: "business_activities_consumer_id_fkey")
|
||||
@@index([guild_id], map: "business_activities_guild_id_fkey")
|
||||
@@map("business_activities")
|
||||
}
|
||||
|
||||
model Complex {
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
branch_code String
|
||||
address String?
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
branch_code String
|
||||
address String?
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
business_activity_id String
|
||||
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: [id])
|
||||
|
||||
pos_list Pos[]
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: [id])
|
||||
good_categories GoodCategory[]
|
||||
permission_complexes PermissionComplex[]
|
||||
pos_list Pos[]
|
||||
|
||||
@@index([business_activity_id], map: "complexes_business_activity_id_fkey")
|
||||
@@map("complexes")
|
||||
}
|
||||
|
||||
model Pos {
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
model String?
|
||||
serial_number String? @unique()
|
||||
status POSStatus @default(ACTIVE)
|
||||
pos_type POSType
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
complex_id String
|
||||
complex Complex @relation(fields: [complex_id], references: [id])
|
||||
|
||||
device_id String?
|
||||
device Device? @relation(fields: [device_id], references: [id])
|
||||
|
||||
provider_id String?
|
||||
provider Provider? @relation(fields: [provider_id], references: [id])
|
||||
|
||||
account_id String @unique
|
||||
account ConsumerAccount @relation(fields: [account_id], references: [id])
|
||||
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
model String?
|
||||
serial_number String? @unique
|
||||
status POSStatus @default(ACTIVE)
|
||||
pos_type POSType
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
complex_id String
|
||||
device_id String?
|
||||
provider_id String?
|
||||
account_id String @unique
|
||||
permission_pos PermissionPos[]
|
||||
account ConsumerAccount @relation(fields: [account_id], references: [id])
|
||||
complex Complex @relation(fields: [complex_id], references: [id])
|
||||
device Device? @relation(fields: [device_id], references: [id])
|
||||
provider Provider? @relation(fields: [provider_id], references: [id])
|
||||
sales_invoices SalesInvoice[]
|
||||
|
||||
@@index([complex_id], map: "poses_complex_id_fkey")
|
||||
@@index([device_id], map: "poses_device_id_fkey")
|
||||
@@index([provider_id], map: "poses_provider_id_fkey")
|
||||
@@map("poses")
|
||||
}
|
||||
|
||||
model ConsumerAccountGoodFavorite {
|
||||
created_at DateTime @default(now())
|
||||
consumer_account_id String
|
||||
good_id String
|
||||
consumer_account ConsumerAccount @relation(fields: [consumer_account_id], references: [id], onDelete: Cascade)
|
||||
good Good @relation(fields: [good_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@id([consumer_account_id, good_id])
|
||||
@@index([good_id])
|
||||
@@index([consumer_account_id])
|
||||
@@map("consumer_account_good_favorites")
|
||||
}
|
||||
|
||||
@@ -1,52 +1,50 @@
|
||||
model Good {
|
||||
id String @id @default(ulid())
|
||||
name String @db.VarChar(255)
|
||||
is_default_guild_good Boolean @default(false)
|
||||
pricing_model GoodPricingModel
|
||||
description String? @db.Text
|
||||
local_sku String? @unique() @db.VarChar(100)
|
||||
barcode String? @unique() @db.VarChar(100)
|
||||
base_sale_price Decimal? @default(0.00) @db.Decimal(15, 0)
|
||||
image_url String? @db.VarChar(255)
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
|
||||
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])
|
||||
|
||||
business_activity_id String?
|
||||
business_activity BusinessActivity? @relation(fields: [business_activity_id], references: [id])
|
||||
|
||||
sales_invoice_items SalesInvoiceItem[]
|
||||
id String @id @default(ulid())
|
||||
name String @db.VarChar(255)
|
||||
is_default_guild_good Boolean @default(false)
|
||||
pricing_model GoodPricingModel
|
||||
description String? @db.Text
|
||||
local_sku String? @unique @db.VarChar(100)
|
||||
barcode String? @unique @db.VarChar(100)
|
||||
base_sale_price Decimal? @default(0) @db.Decimal(15, 0)
|
||||
image_url String? @db.VarChar(255)
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
sku_id String
|
||||
measure_unit_id String
|
||||
category_id String?
|
||||
business_activity_id String?
|
||||
consumer_account_good_favorites ConsumerAccountGoodFavorite[]
|
||||
business_activity BusinessActivity? @relation(fields: [business_activity_id], references: [id])
|
||||
category GoodCategory? @relation(fields: [category_id], references: [id])
|
||||
measure_unit MeasureUnits @relation(fields: [measure_unit_id], references: [id])
|
||||
sku StockKeepingUnits @relation(fields: [sku_id], references: [id])
|
||||
sales_invoice_items SalesInvoiceItem[]
|
||||
|
||||
@@index([category_id])
|
||||
@@index([business_activity_id], map: "goods_business_activity_id_fkey")
|
||||
@@index([measure_unit_id], map: "goods_measure_unit_id_fkey")
|
||||
@@index([sku_id], map: "goods_sku_id_fkey")
|
||||
@@map("goods")
|
||||
}
|
||||
|
||||
model GoodCategory {
|
||||
id String @id @default(ulid())
|
||||
name String @db.VarChar(100)
|
||||
description String? @db.Text
|
||||
image_url String? @db.VarChar(255)
|
||||
id String @id @default(ulid())
|
||||
name String @db.VarChar(100)
|
||||
description String? @db.Text
|
||||
image_url String? @db.VarChar(255)
|
||||
complex_id String?
|
||||
is_default_guild_good Boolean @default(false)
|
||||
is_default_guild_good Boolean @default(false)
|
||||
guild_id String?
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
complex Complex? @relation(fields: [complex_id], references: [id])
|
||||
guild Guild? @relation(fields: [guild_id], references: [id])
|
||||
goods Good[]
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
|
||||
goods Good[]
|
||||
guild Guild? @relation(fields: [guild_id], references: [id])
|
||||
complex Complex? @relation(fields: [complex_id], references: [id])
|
||||
|
||||
@@index([complex_id], map: "good_categories_complex_id_fkey")
|
||||
@@index([guild_id], map: "good_categories_guild_id_fkey")
|
||||
@@map("good_categories")
|
||||
}
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
model Guild {
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
invoice_template InvoiceTemplateType
|
||||
code String?
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt() @db.Timestamp(0)
|
||||
|
||||
id String @id @default(ulid())
|
||||
name String
|
||||
invoice_template InvoiceTemplateType
|
||||
code String?
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
business_activities BusinessActivity[]
|
||||
good_categories GoodCategory[]
|
||||
stockKeepingUnits StockKeepingUnits[]
|
||||
|
||||
@@ -1,12 +1,10 @@
|
||||
model MeasureUnits {
|
||||
id String @id @default(ulid())
|
||||
code String @unique
|
||||
name String
|
||||
|
||||
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[]
|
||||
goods Good[]
|
||||
|
||||
@@map("measure_units")
|
||||
}
|
||||
|
||||
@@ -1,19 +1,17 @@
|
||||
model StockKeepingUnits {
|
||||
id String @id @default(ulid())
|
||||
code String @unique
|
||||
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[]
|
||||
VAT Decimal @db.Decimal(5, 2)
|
||||
is_public Boolean @default(true)
|
||||
is_domestic Boolean @default(false)
|
||||
guild_id String
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
goods Good[]
|
||||
guild Guild @relation(fields: [guild_id], references: [id])
|
||||
|
||||
@@index([code])
|
||||
@@index([guild_id], map: "stock_keeping_units_guild_id_fkey")
|
||||
@@map("stock_keeping_units")
|
||||
}
|
||||
|
||||
@@ -1,53 +1,47 @@
|
||||
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)
|
||||
|
||||
individual CustomerIndividual?
|
||||
legal CustomerLegal?
|
||||
|
||||
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)
|
||||
individual CustomerIndividual?
|
||||
legal CustomerLegal?
|
||||
sales_invoices SalesInvoice[]
|
||||
|
||||
@@map("customers")
|
||||
}
|
||||
|
||||
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)
|
||||
|
||||
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(14)
|
||||
customer_id String @id
|
||||
business_activity_id String
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: id)
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: [id])
|
||||
customer Customer @relation(fields: [customer_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([business_activity_id, national_id])
|
||||
@@unique([business_activity_id, postal_code, national_id])
|
||||
@@index([business_activity_id])
|
||||
@@map("customer_individuals")
|
||||
}
|
||||
|
||||
model CustomerLegal {
|
||||
name String @db.VarChar(255)
|
||||
economic_code String @db.Char(10)
|
||||
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)
|
||||
|
||||
name String? @db.VarChar(255)
|
||||
economic_code String? @db.Char(11)
|
||||
registration_number String? @db.Char(20)
|
||||
postal_code String? @db.Char(10)
|
||||
customer_id String @id
|
||||
business_activity_id String
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: id)
|
||||
business_activity BusinessActivity @relation(fields: [business_activity_id], references: [id])
|
||||
customer Customer @relation(fields: [customer_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([business_activity_id, economic_code])
|
||||
@@unique([business_activity_id, postal_code, registration_number])
|
||||
@@index([business_activity_id])
|
||||
@@map("customer_legal")
|
||||
}
|
||||
|
||||
@@ -9,16 +9,6 @@ enum PaymentMethodType {
|
||||
OTHER
|
||||
}
|
||||
|
||||
enum UnitType {
|
||||
COUNT
|
||||
GRAM
|
||||
KILOGRAM
|
||||
MILLILITER
|
||||
LITER
|
||||
METER
|
||||
HOUR
|
||||
}
|
||||
|
||||
enum GoodPricingModel {
|
||||
STANDARD
|
||||
GOLD
|
||||
@@ -50,18 +40,6 @@ enum BusinessRole {
|
||||
OPERATOR
|
||||
}
|
||||
|
||||
enum LicenseType {
|
||||
BASIC
|
||||
PRO
|
||||
ENTERPRISE
|
||||
}
|
||||
|
||||
enum LicenseStatus {
|
||||
ACTIVE
|
||||
EXPIRED
|
||||
SUSPENDED
|
||||
}
|
||||
|
||||
enum POSType {
|
||||
PSP
|
||||
MOBILE
|
||||
@@ -69,11 +47,6 @@ enum POSType {
|
||||
API
|
||||
}
|
||||
|
||||
enum UserType {
|
||||
LEGAL
|
||||
INDIVIDUAL
|
||||
}
|
||||
|
||||
enum AccountType {
|
||||
ADMIN
|
||||
PROVIDER
|
||||
@@ -81,17 +54,6 @@ enum AccountType {
|
||||
CONSUMER
|
||||
}
|
||||
|
||||
enum UserStatus {
|
||||
ACTIVE
|
||||
INACTIVE
|
||||
}
|
||||
|
||||
enum AccountRole {
|
||||
OWNER
|
||||
OPERATOR
|
||||
ACCOUNTANT
|
||||
}
|
||||
|
||||
enum AccountStatus {
|
||||
ACTIVE
|
||||
SUSPENDED
|
||||
@@ -114,11 +76,6 @@ enum ProviderRole {
|
||||
OPERATOR
|
||||
}
|
||||
|
||||
enum ProviderStatus {
|
||||
ACTIVE
|
||||
SUSPENDED
|
||||
}
|
||||
|
||||
enum ConsumerRole {
|
||||
OWNER
|
||||
MANAGER
|
||||
@@ -130,11 +87,6 @@ enum ConsumerStatus {
|
||||
SUSPENDED
|
||||
}
|
||||
|
||||
enum TokenType {
|
||||
ACCESS
|
||||
REFRESH
|
||||
}
|
||||
|
||||
enum ApplicationPlatform {
|
||||
ANDROID
|
||||
IOS
|
||||
@@ -146,27 +98,29 @@ enum ApplicationReleaseType {
|
||||
ALPHA
|
||||
}
|
||||
|
||||
enum ApplicationPublisher {
|
||||
DIRECT
|
||||
CAFE_BAZAR
|
||||
MAYKET
|
||||
}
|
||||
|
||||
enum ConsumerType {
|
||||
INDIVIDUAL
|
||||
LEGAL
|
||||
}
|
||||
|
||||
enum InvoiceSettlementType {
|
||||
CASH
|
||||
CREDIT
|
||||
MIXED
|
||||
}
|
||||
|
||||
enum TspProviderType {
|
||||
NAMA
|
||||
SUN
|
||||
}
|
||||
|
||||
enum TspProviderResponseStatus {
|
||||
SUCCESS
|
||||
FAILURE
|
||||
NOT_SEND
|
||||
QUEUED
|
||||
FISCAL_QUEUED
|
||||
SEND_FAILURE
|
||||
SUCCESS
|
||||
FAILURE
|
||||
}
|
||||
|
||||
enum TspProviderRequestType {
|
||||
@@ -176,15 +130,6 @@ enum TspProviderRequestType {
|
||||
RETURN
|
||||
}
|
||||
|
||||
enum TspProviderCustomerType {
|
||||
Unknown
|
||||
Known
|
||||
}
|
||||
|
||||
enum SKUGuildType {
|
||||
GOLD
|
||||
}
|
||||
|
||||
enum InvoiceTemplateType {
|
||||
SALE
|
||||
FX_SALE
|
||||
|
||||
@@ -1,39 +1,40 @@
|
||||
model SalesInvoice {
|
||||
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
|
||||
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
|
||||
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])
|
||||
|
||||
id String @id @default(uuid())
|
||||
code String @unique @db.VarChar(100)
|
||||
total_amount Decimal @db.Decimal(15, 2)
|
||||
invoice_number 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?
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
main_id String? @db.VarChar(50)
|
||||
ref_id String? @unique @db.VarChar(50)
|
||||
customer_id String?
|
||||
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])
|
||||
|
||||
referenced_by SalesInvoice? @relation("SalesInvoiceReference")
|
||||
items SalesInvoiceItem[]
|
||||
payments SalesInvoicePayment[]
|
||||
tsp_attempts SaleInvoiceTspAttempts[]
|
||||
pos_id String
|
||||
settlement_type InvoiceSettlementType
|
||||
discount_amount Decimal? @db.Decimal(15, 2)
|
||||
tax_amount Decimal? @db.Decimal(15, 2)
|
||||
last_tsp_status TspProviderResponseStatus?
|
||||
last_attempt_no Int?
|
||||
tsp_attempts SaleInvoiceTspAttempts[]
|
||||
items SalesInvoiceItem[]
|
||||
payments SalesInvoicePayment[]
|
||||
consumer_account ConsumerAccount @relation(fields: [consumer_account_id], references: [id])
|
||||
customer Customer? @relation(fields: [customer_id], references: [id])
|
||||
pos Pos @relation(fields: [pos_id], references: [id])
|
||||
reference_invoice SalesInvoice? @relation("SalesInvoiceReference", fields: [ref_id], references: [id])
|
||||
referenced_by SalesInvoice? @relation("SalesInvoiceReference")
|
||||
|
||||
@@unique([invoice_number, pos_id])
|
||||
@@index([pos_id, invoice_date])
|
||||
@@index([ref_id])
|
||||
@@index([tax_id])
|
||||
@@index([consumer_account_id], map: "sales_invoices_consumer_account_id_fkey")
|
||||
@@index([customer_id], map: "sales_invoices_customer_id_fkey")
|
||||
@@map("sales_invoices")
|
||||
}
|
||||
|
||||
@@ -49,40 +50,40 @@ model SalesInvoiceItem {
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
discount Decimal @default(0.00) @db.Decimal(15, 2)
|
||||
notes String? @db.Text
|
||||
payload Json?
|
||||
good_snapshot Json
|
||||
invoice_id String
|
||||
good_id String
|
||||
service_id String?
|
||||
discount_amount Decimal? @db.Decimal(15, 2)
|
||||
tax_amount Decimal? @db.Decimal(15, 2)
|
||||
|
||||
payload Json?
|
||||
good_snapshot Json
|
||||
|
||||
invoice_id String
|
||||
invoice SalesInvoice @relation(fields: [invoice_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])
|
||||
good Good @relation(fields: [good_id], references: [id])
|
||||
invoice SalesInvoice @relation(fields: [invoice_id], references: [id])
|
||||
service Service? @relation(fields: [service_id], references: [id])
|
||||
|
||||
@@index([invoice_id, good_id])
|
||||
@@index([good_id], map: "sales_invoice_items_good_id_fkey")
|
||||
@@index([service_id], map: "sales_invoice_items_service_id_fkey")
|
||||
@@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)
|
||||
id String @id @default(ulid())
|
||||
attempt_no Int
|
||||
status TspProviderResponseStatus
|
||||
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
|
||||
provider_request_payload Json
|
||||
raw_request_payload Json
|
||||
error_message String? @db.Text
|
||||
fiscal_warnings Json?
|
||||
provider_response Json?
|
||||
validation_errors Json?
|
||||
invoice SalesInvoice @relation(fields: [invoice_id], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([invoice_id, attempt_no])
|
||||
@@index([status])
|
||||
@@ -91,35 +92,30 @@ model SaleInvoiceTspAttempts {
|
||||
}
|
||||
|
||||
model SalesInvoicePayment {
|
||||
id String @id @default(ulid())
|
||||
amount Decimal @db.Decimal(15, 2)
|
||||
id String @id @default(ulid())
|
||||
amount Decimal @db.Decimal(15, 2)
|
||||
payment_method PaymentMethodType
|
||||
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?
|
||||
paid_at DateTime @db.Timestamp(0)
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
invoice_id String
|
||||
terminal_info SalesInvoicePaymentTerminalInfo?
|
||||
invoice SalesInvoice @relation(fields: [invoice_id], references: [id])
|
||||
|
||||
@@index([invoice_id])
|
||||
@@map("sales_invoice_payments")
|
||||
}
|
||||
|
||||
model SalesInvoicePaymentTerminalInfo {
|
||||
id String @id @default(ulid())
|
||||
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])
|
||||
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")
|
||||
|
||||
@@ -1,20 +1,19 @@
|
||||
model Service {
|
||||
id String @id @default(ulid())
|
||||
name String @db.VarChar(255)
|
||||
description String? @db.Text
|
||||
sku String @unique() @db.VarChar(100)
|
||||
local_sku String? @unique() @db.VarChar(100)
|
||||
barcode String? @unique() @db.VarChar(100)
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
category_id String?
|
||||
base_sale_price Decimal @default(0.00) @db.Decimal(15, 0)
|
||||
account_id String
|
||||
complex_id String
|
||||
|
||||
category ServiceCategory? @relation(fields: [category_id], references: [id])
|
||||
id String @id @default(ulid())
|
||||
name String @db.VarChar(255)
|
||||
description String? @db.Text
|
||||
sku String @unique @db.VarChar(100)
|
||||
local_sku String? @unique @db.VarChar(100)
|
||||
barcode String? @unique @db.VarChar(100)
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
category_id String?
|
||||
base_sale_price Decimal @default(0) @db.Decimal(15, 0)
|
||||
account_id String
|
||||
complex_id String
|
||||
sales_invoice_items SalesInvoiceItem[]
|
||||
category ServiceCategory? @relation(fields: [category_id], references: [id])
|
||||
|
||||
@@index([category_id])
|
||||
@@map("services")
|
||||
@@ -30,8 +29,7 @@ model ServiceCategory {
|
||||
created_at DateTime @default(now()) @db.Timestamp(0)
|
||||
updated_at DateTime @updatedAt @db.Timestamp(0)
|
||||
deleted_at DateTime? @db.Timestamp(0)
|
||||
|
||||
services Service[]
|
||||
services Service[]
|
||||
|
||||
@@map("service_categories")
|
||||
}
|
||||
|
||||
@@ -198,8 +198,6 @@ async function main() {
|
||||
code: sku_code,
|
||||
},
|
||||
})
|
||||
console.log(name)
|
||||
console.log(sku?.id)
|
||||
|
||||
if (sku) {
|
||||
return {
|
||||
|
||||
@@ -1,548 +0,0 @@
|
||||
-- AUTO-GENERATED MYSQL TRIGGER DUMP
|
||||
-- Generated at: 2026-01-06T16:09:38.959Z
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 1
|
||||
-- Trigger: trg_bank_account_transaction_after_delete
|
||||
-- Event: DELETE
|
||||
-- Table: Bank_Account_Transactions
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_bank_account_transaction_after_delete`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_bank_account_transaction_after_delete` AFTER DELETE ON `Bank_Account_Transactions` FOR EACH ROW BEGIN
|
||||
UPDATE `Bank_Account_Balance` SET balance = balance - OLD.amount WHERE `bankAccountId` = OLD.bankAccountId;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 2
|
||||
-- Trigger: trg_transfer_item_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Inventory_Transfer_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin
|
||||
|
||||
DECLARE fromInv INT;
|
||||
DECLARE toInv INT;
|
||||
DECLARE _avgCost DECIMAL(10,2);
|
||||
DECLARE latestQuantityInOrigin DECIMAL(10,2);
|
||||
DECLARE latestQuantityInDestination DECIMAL(10,2);
|
||||
|
||||
SELECT fromInventoryId, toInventoryId INTO fromInv, toInv
|
||||
FROM Inventory_Transfers WHERE id = NEW.transferId;
|
||||
|
||||
SELECT COALESCE(avgCost, 0), COALESCE(quantity, 0) INTO _avgCost, latestQuantityInOrigin FROM Stock_Balance
|
||||
WHERE ProductId = NEW.productId AND inventoryId = fromInv LIMIT 1;
|
||||
|
||||
SELECT COALESCE(quantity, 0) INTO latestQuantityInDestination FROM Stock_Balance
|
||||
WHERE ProductId = NEW.productId AND inventoryId = toInv LIMIT 1;
|
||||
|
||||
|
||||
-- OUT from source
|
||||
INSERT INTO Stock_Movements
|
||||
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||
VALUES
|
||||
('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, toInv, NOW(), latestQuantityInOrigin-NEW.count);
|
||||
|
||||
-- IN to destination
|
||||
INSERT INTO Stock_Movements
|
||||
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||
VALUES
|
||||
('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, fromInv, NOW(), latestQuantityInOrigin-NEW.count);
|
||||
end;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 3
|
||||
-- Trigger: trg_order_item_after_update
|
||||
-- Event: UPDATE
|
||||
-- Table: Order_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_order_item_after_update`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_item_after_update` AFTER UPDATE ON `Order_Items` FOR EACH ROW BEGIN
|
||||
|
||||
UPDATE Stock_Reservations
|
||||
SET quantity = quantity - OLD.quantity + NEW.quantity
|
||||
WHERE orderId = NEW.orderId AND productId = NEW.productId;
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 4
|
||||
-- Trigger: trg_order_item_after_delete
|
||||
-- Event: DELETE
|
||||
-- Table: Order_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_order_item_after_delete`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_item_after_delete` AFTER DELETE ON `Order_Items` FOR EACH ROW BEGIN
|
||||
|
||||
DELETE From Stock_Reservations
|
||||
WHERE orderId = OLD.orderId AND productId = OLD.productId;
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 5
|
||||
-- Trigger: trg_order_after_cancel
|
||||
-- Event: UPDATE
|
||||
-- Table: Orders
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_order_after_cancel`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_after_cancel` AFTER UPDATE ON `Orders` FOR EACH ROW BEGIN
|
||||
IF NEW.status = 'CANCELED' OR NEW.status = 'REJECTED' OR NEW.status = 'DONE' THEN
|
||||
UPDATE Stock_Reservations sr SET quantity = 0
|
||||
WHERE sr.orderId = NEW.id;
|
||||
END IF;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 6
|
||||
-- Trigger: trg_purchase_receipt_item_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Purchase_Receipt_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_item_after_insert` AFTER INSERT ON `Purchase_Receipt_Items` FOR EACH ROW BEGIN DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0;
|
||||
|
||||
DECLARE invId INT;
|
||||
DECLARE suppId INT;
|
||||
|
||||
-- Get inventory & supplier from
|
||||
SELECT inventoryId, supplierId
|
||||
INTO invId, suppId
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = NEW.receiptId;
|
||||
|
||||
-- Get current stock quantity (if exists)
|
||||
SELECT COALESCE(quantity, 0)
|
||||
INTO latestQuantity
|
||||
FROM Stock_Balance sb
|
||||
WHERE sb.inventoryId = invId
|
||||
AND sb.productId = NEW.productId
|
||||
LIMIT 1;
|
||||
|
||||
-- Insert stock movement
|
||||
INSERT INTO Stock_Movements (
|
||||
type,
|
||||
quantity,
|
||||
unitPrice,
|
||||
totalCost,
|
||||
referenceType,
|
||||
referenceId,
|
||||
productId,
|
||||
inventoryId,
|
||||
avgCost,
|
||||
supplierId,
|
||||
remainedInStock,
|
||||
createdAt
|
||||
)
|
||||
VALUES (
|
||||
'IN',
|
||||
NEW.count,
|
||||
NEW.unitPrice,
|
||||
NEW.totalAmount,
|
||||
'PURCHASE',
|
||||
NEW.receiptId,
|
||||
NEW.productId,
|
||||
invId,
|
||||
CASE
|
||||
WHEN NEW.count = 0 THEN 0
|
||||
ELSE NEW.totalAmount / NEW.count
|
||||
END
|
||||
|
||||
,
|
||||
suppId,
|
||||
latestQuantity + NEW.count,
|
||||
NOW()
|
||||
);
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 7
|
||||
-- Trigger: trg_pr_payment_after_delete
|
||||
-- Event: DELETE
|
||||
-- Table: Purchase_Receipt_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_pr_payment_after_delete`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_delete` AFTER DELETE ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
||||
DECLARE receiptTotal DECIMAL(14,2);
|
||||
DECLARE newPaid DECIMAL(14,2);
|
||||
|
||||
SELECT totalAmount, paidAmount
|
||||
INTO receiptTotal, newPaid
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = OLD.receiptId
|
||||
FOR UPDATE;
|
||||
|
||||
IF OLD.type = 'PAYMENT' THEN
|
||||
SET newPaid = newPaid - OLD.amount;
|
||||
ELSE
|
||||
SET newPaid = newPaid + OLD.amount;
|
||||
END IF;
|
||||
|
||||
UPDATE Purchase_Receipts
|
||||
SET
|
||||
paidAmount = newPaid,
|
||||
status =
|
||||
CASE
|
||||
WHEN newPaid = 0 THEN 'UNPAID'
|
||||
WHEN newPaid < receiptTotal THEN 'PARTIALLY_PAID'
|
||||
ELSE 'PAID'
|
||||
END
|
||||
WHERE id = OLD.receiptId;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 8
|
||||
-- Trigger: trg_sales_invoice_items_before_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Sales_Invoice_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW BEGIN
|
||||
|
||||
DECLARE current_stock DECIMAL(10, 2);
|
||||
DECLARE inventory_id INT;
|
||||
|
||||
|
||||
|
||||
SELECT pa.inventoryId INTO inventory_id
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = NEW.invoiceId;
|
||||
|
||||
|
||||
SELECT COALESCE(sav.availableQuantity, 0) INTO current_stock
|
||||
FROM Stock_Available_View sav
|
||||
WHERE productId = NEW.productId AND sav.inventoryId = inventory_id;
|
||||
|
||||
|
||||
|
||||
IF NEW.count > current_stock THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'موجودی کالا در انبار کافی نیست.';
|
||||
END IF;
|
||||
end;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 9
|
||||
-- Trigger: trg_sales_invoice_items_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Sales_Invoice_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
||||
|
||||
DECLARE inventory_id INT;
|
||||
DECLARE customer_id INT;
|
||||
DECLARE pos_id INT;
|
||||
|
||||
|
||||
|
||||
SELECT posAccountId, customerId INTO pos_id, customer_id
|
||||
FROM Sales_Invoices si
|
||||
WHERE si.id = NEW.invoiceId
|
||||
LIMIT 1;
|
||||
INSERT INTO Trigger_Logs (name , message) VALUES ('pos_id', pos_id);
|
||||
INSERT INTO Trigger_Logs (name , message) VALUES ('customer_id', customer_id);
|
||||
|
||||
|
||||
SELECT pa.inventoryId INTO inventory_id
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = NEW.invoiceId;
|
||||
|
||||
|
||||
|
||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
||||
FROM Stock_Balance sb
|
||||
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
|
||||
LIMIT 1;
|
||||
|
||||
|
||||
|
||||
INSERT INTO Stock_Movements (
|
||||
type,
|
||||
quantity,
|
||||
unitPrice,
|
||||
totalCost,
|
||||
referenceType,
|
||||
referenceId,
|
||||
productId,
|
||||
inventoryId,
|
||||
avgCost,
|
||||
remainedInStock,
|
||||
customerId,
|
||||
createdAt
|
||||
)
|
||||
VALUES (
|
||||
'OUT',
|
||||
NEW.count,
|
||||
NEW.unitPrice,
|
||||
NEW.totalAmount,
|
||||
'SALES',
|
||||
NEW.invoiceId,
|
||||
NEW.productId,
|
||||
inventory_id,
|
||||
|
||||
CASE
|
||||
WHEN NEW.count = 0 THEN 0
|
||||
ELSE NEW.totalAmount / NEW.count
|
||||
END,
|
||||
current_stock - NEW.count,
|
||||
customer_id,
|
||||
NOW()
|
||||
);
|
||||
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 10
|
||||
-- Trigger: trg_pos_account_payment_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Sales_Invoice_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_pos_account_payment_after_insert`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pos_account_payment_after_insert` AFTER INSERT ON `Sales_Invoice_Payments` FOR EACH ROW BEGIN
|
||||
|
||||
DECLARE _bankAccountId INT;
|
||||
|
||||
IF(NEW.paymentMethod != 'CASH') THEN
|
||||
SELECT cashBankAccountId INTO _bankAccountId
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = NEW.invoiceId;
|
||||
End IF;
|
||||
|
||||
INSERT INTO Bank_Account_Transactions (
|
||||
bankAccountId,
|
||||
type,
|
||||
amount,
|
||||
balanceAfter,
|
||||
referenceType,
|
||||
referenceId
|
||||
)
|
||||
VALUES(
|
||||
_bankAccountId,
|
||||
'DEPOSIT',
|
||||
NEW.amount,
|
||||
0,
|
||||
'POS_SALE',
|
||||
NEW.id
|
||||
);
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 11
|
||||
-- Trigger: trg_sales_invoice_payment_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Sales_Invoice_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_payment_after_insert`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_payment_after_insert` AFTER INSERT ON `Sales_Invoice_Payments` FOR EACH ROW BEGIN
|
||||
DECLARE currentBalance DECIMAL(15,2);
|
||||
DECLARE bankAccountId INT;
|
||||
|
||||
SELECT pa.bankAccountId INTO bankAccountId
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = NEW.invoiceId;
|
||||
|
||||
SELECT balance INTO currentBalance
|
||||
FROM Bank_Account_Balance
|
||||
WHERE bankAccountId = bankAccountId
|
||||
FOR UPDATE;
|
||||
|
||||
IF currentBalance IS NULL THEN
|
||||
SET currentBalance = 0;
|
||||
INSERT INTO Bank_Account_Balance (bankAccountId, balance)
|
||||
VALUES (bankAccountId, 0);
|
||||
END IF;
|
||||
|
||||
SET currentBalance = currentBalance + NEW.amount;
|
||||
|
||||
INSERT INTO Bank_Account_Transactions
|
||||
(bankAccountId, type, amount, balanceAfter, referenceType, referenceId)
|
||||
VALUES
|
||||
(bankAccountId, 'DEPOSIT', NEW.amount, currentBalance, 'POS_SALE', NEW.id);
|
||||
|
||||
UPDATE Bank_Account_Balance
|
||||
SET balance = currentBalance
|
||||
WHERE bankAccountId = bankAccountId;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 12
|
||||
-- Trigger: trg_stock_sale_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Stock_Movements
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_stock_sale_insert`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN
|
||||
|
||||
INSERT INTO
|
||||
Stock_Balance (
|
||||
productId,
|
||||
quantity,
|
||||
avgCost,
|
||||
totalCost,
|
||||
inventoryId,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
NEW.productId,
|
||||
NEW.quantity,
|
||||
NEW.unitPrice,
|
||||
NEW.totalCost,
|
||||
NEW.inventoryId,
|
||||
NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
quantity = quantity - NEW.quantity,
|
||||
totalCost = totalCost - NEW.totalCost,
|
||||
avgCost = totalCost / quantity;
|
||||
|
||||
END IF;
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 13
|
||||
-- Trigger: trg_stock_purchase_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Stock_Movements
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN
|
||||
|
||||
INSERT INTO
|
||||
Stock_Balance (
|
||||
productId,
|
||||
quantity,
|
||||
avgCost,
|
||||
totalCost,
|
||||
inventoryId,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
NEW.productId,
|
||||
NEW.quantity,
|
||||
NEW.unitPrice,
|
||||
NEW.totalCost,
|
||||
NEW.inventoryId,
|
||||
NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
quantity = quantity + NEW.quantity,
|
||||
totalCost = totalCost + NEW.totalCost,
|
||||
avgCost = totalCost / quantity;
|
||||
|
||||
END IF;
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 14
|
||||
-- Trigger: trg_stock_transfer
|
||||
-- Event: INSERT
|
||||
-- Table: Stock_Movements
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_stock_transfer`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_transfer` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'INVENTORY_TRANSFER' THEN IF NEW.type = 'IN' THEN
|
||||
INSERT INTO
|
||||
Stock_Balance (
|
||||
productId,
|
||||
inventoryId,
|
||||
quantity,
|
||||
totalCost,
|
||||
avgCost,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
NEW.productId,
|
||||
NEW.inventoryId,
|
||||
NEW.quantity,
|
||||
NEW.totalCost,
|
||||
CASE
|
||||
WHEN NEW.quantity = 0 THEN 0
|
||||
ELSE NEW.totalCost / NEW.quantity
|
||||
END,
|
||||
NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
quantity = quantity + NEW.quantity,
|
||||
totalCost = totalCost + NEW.totalCost,
|
||||
avgCost = CASE
|
||||
WHEN (quantity + NEW.quantity) = 0 THEN 0
|
||||
ELSE (totalCost + NEW.totalCost) / (quantity + NEW.quantity)
|
||||
END,
|
||||
updatedAt = NOW();
|
||||
|
||||
END IF;
|
||||
|
||||
IF NEW.type = 'OUT' THEN IF EXISTS (
|
||||
SELECT 1
|
||||
FROM Stock_Balance sb
|
||||
WHERE
|
||||
sb.productId = NEW.productId
|
||||
AND sb.inventoryId = NEW.inventoryId
|
||||
) THEN
|
||||
|
||||
UPDATE Stock_Balance sb
|
||||
SET
|
||||
sb.quantity = sb.quantity - NEW.quantity,
|
||||
sb.totalCost = sb.totalCost - (sb.avgCost * NEW.quantity),
|
||||
sb.updatedAt = NOW()
|
||||
WHERE
|
||||
sb.productId = NEW.productId
|
||||
AND sb.inventoryId = NEW.inventoryId;
|
||||
|
||||
ELSE
|
||||
INSERT INTO
|
||||
Stock_Balance (
|
||||
productId,
|
||||
inventoryId,
|
||||
quantity,
|
||||
totalCost,
|
||||
avgCost,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
NEW.productId,
|
||||
NEW.inventoryId,
|
||||
- NEW.quantity,
|
||||
- COALESCE(NEW.unitPrice, 0) * NEW.quantity,
|
||||
COALESCE(NEW.unitPrice, 0),
|
||||
NOW()
|
||||
);
|
||||
|
||||
END IF;
|
||||
|
||||
END IF;
|
||||
|
||||
END IF;
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 15
|
||||
-- Trigger: trg_no_negative_available_stock
|
||||
-- Event: INSERT
|
||||
-- Table: Stock_Reservations
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_no_negative_available_stock`;
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_no_negative_available_stock` BEFORE INSERT ON `Stock_Reservations` FOR EACH ROW BEGIN
|
||||
DECLARE available DECIMAL(14,3);
|
||||
|
||||
SELECT availableQuantity
|
||||
INTO available
|
||||
FROM Stock_Available_View
|
||||
WHERE productId = NEW.productId
|
||||
AND inventoryId = NEW.inventoryId;
|
||||
|
||||
IF available < NEW.quantity THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'موجودی کافی نیست';
|
||||
END IF;
|
||||
END;
|
||||
|
||||
@@ -1,825 +0,0 @@
|
||||
-- AUTO-GENERATED MYSQL TRIGGER DUMP
|
||||
-- Generated at: 2026-01-04T09:46:30.365Z
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 1
|
||||
-- Trigger: trg_bank_account_transaction_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Bank_Account_Transactions
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_bank_account_transaction_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_bank_account_transaction_after_insert` AFTER INSERT ON `Bank_Account_Transactions` FOR EACH ROW BEGIN
|
||||
IF NEW.type = 'DEPOSIT' THEN
|
||||
UPDATE Bank_Account_Balance SET balance = balance + NEW.amount WHERE bankAccountId = NEW.bankAccountId;
|
||||
ELSEIF NEW.type = 'WITHDRAWAL' THEN
|
||||
UPDATE Bank_Account_Balance SET balance = balance - NEW.amount WHERE bankAccountId = NEW.bankAccountId;
|
||||
END IF;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 2
|
||||
-- Trigger: trg_bank_account_transaction_after_delete
|
||||
-- Event: DELETE
|
||||
-- Table: Bank_Account_Transactions
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_bank_account_transaction_after_delete`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_bank_account_transaction_after_delete` AFTER DELETE ON `Bank_Account_Transactions` FOR EACH ROW BEGIN
|
||||
UPDATE Bank_Accounts SET balance = balance - OLD.amount;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 3
|
||||
-- Trigger: trg_transfer_item_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Inventory_Transfer_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_transfer_item_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_transfer_item_after_insert` AFTER INSERT ON `Inventory_Transfer_Items` FOR EACH ROW begin
|
||||
|
||||
DECLARE fromInv INT;
|
||||
DECLARE toInv INT;
|
||||
DECLARE _avgCost DECIMAL(10,2);
|
||||
DECLARE latestQuantityInOrigin DECIMAL(10,2);
|
||||
DECLARE latestQuantityInDestination DECIMAL(10,2);
|
||||
|
||||
SELECT fromInventoryId, toInventoryId INTO fromInv, toInv
|
||||
FROM Inventory_Transfers WHERE id = NEW.transferId;
|
||||
|
||||
SELECT COALESCE(avgCost, 0), COALESCE(quantity, 0) INTO _avgCost, latestQuantityInOrigin FROM Stock_Balance
|
||||
WHERE ProductId = NEW.productId AND inventoryId = fromInv LIMIT 1;
|
||||
|
||||
SELECT COALESCE(quantity, 0) INTO latestQuantityInDestination FROM Stock_Balance
|
||||
WHERE ProductId = NEW.productId AND inventoryId = toInv LIMIT 1;
|
||||
|
||||
|
||||
-- OUT from source
|
||||
INSERT INTO Stock_Movements
|
||||
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||
VALUES
|
||||
('OUT', NEW.count, _avgCost, _avgCost*NEW.count, _avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, fromInv, toInv, NOW(), latestQuantityInOrigin-NEW.count);
|
||||
|
||||
-- IN to destination
|
||||
INSERT INTO Stock_Movements
|
||||
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||
VALUES
|
||||
('IN', NEW.count,_avgCost, _avgCost*NEW.count,_avgCost, 'INVENTORY_TRANSFER', NEW.transferId, NEW.productId, toInv, fromInv, NOW(), latestQuantityInOrigin-NEW.count);
|
||||
end;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 4
|
||||
-- Trigger: trg_order_item_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Order_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_order_item_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_item_after_insert` AFTER INSERT ON `Order_Items` FOR EACH ROW BEGIN
|
||||
UPDATE Stock_Reservations SET quantity = quantity + NEW.quantity
|
||||
WHERE orderId = NEW.orderId AND productId = NEW.productId;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 5
|
||||
-- Trigger: trg_order_item_after_update
|
||||
-- Event: UPDATE
|
||||
-- Table: Order_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_order_item_after_update`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_item_after_update` AFTER UPDATE ON `Order_Items` FOR EACH ROW BEGIN
|
||||
UPDATE Stock_Reservations
|
||||
SET quantity = quantity - OLD.quantity + NEW.quantity
|
||||
WHERE orderId = NEW.orderId AND productId = NEW.productId;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 6
|
||||
-- Trigger: trg_order_item_after_delete
|
||||
-- Event: DELETE
|
||||
-- Table: Order_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_order_item_after_delete`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_item_after_delete` AFTER DELETE ON `Order_Items` FOR EACH ROW BEGIN
|
||||
UPDATE Stock_Reservations SET quantity = quantity - OLD.quantity
|
||||
WHERE orderId = OLD.orderId AND productId = OLD.productId;
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 7
|
||||
-- Trigger: trg_order_after_cancel
|
||||
-- Event: UPDATE
|
||||
-- Table: Orders
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_order_after_cancel`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_order_after_cancel` AFTER UPDATE ON `Orders` FOR EACH ROW BEGIN
|
||||
IF NEW.status = 'CANCELED' OR NEW.status = 'REJECTED' OR NEW.status = 'DONE' THEN
|
||||
UPDATE Stock_Reservations sr SET quantity = 0
|
||||
WHERE sr.orderId = NEW.id;
|
||||
END IF;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 8
|
||||
-- Trigger: trg_purchase_receipt_item_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Purchase_Receipt_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_purchase_receipt_item_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_item_after_insert` AFTER INSERT ON `Purchase_Receipt_Items` FOR EACH ROW BEGIN DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0;
|
||||
|
||||
DECLARE invId INT;
|
||||
DECLARE suppId INT;
|
||||
|
||||
-- Get inventory & supplier from
|
||||
SELECT inventoryId, supplierId
|
||||
INTO invId, suppId
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = NEW.receiptId;
|
||||
|
||||
-- Get current stock quantity (if exists)
|
||||
SELECT COALESCE(quantity, 0)
|
||||
INTO latestQuantity
|
||||
FROM Stock_Balance sb
|
||||
WHERE sb.inventoryId = invId
|
||||
AND sb.productId = NEW.productId
|
||||
LIMIT 1;
|
||||
|
||||
-- Insert stock movement
|
||||
INSERT INTO Stock_Movements (
|
||||
type,
|
||||
quantity,
|
||||
unitPrice,
|
||||
totalCost,
|
||||
referenceType,
|
||||
referenceId,
|
||||
productId,
|
||||
inventoryId,
|
||||
avgCost,
|
||||
supplierId,
|
||||
remainedInStock,
|
||||
createdAt
|
||||
)
|
||||
VALUES (
|
||||
'IN',
|
||||
NEW.count,
|
||||
NEW.unitPrice,
|
||||
NEW.totalAmount,
|
||||
'PURCHASE',
|
||||
NEW.receiptId,
|
||||
NEW.productId,
|
||||
invId,
|
||||
CASE
|
||||
WHEN NEW.count = 0 THEN 0
|
||||
ELSE NEW.totalAmount / NEW.count
|
||||
END
|
||||
|
||||
,
|
||||
suppId,
|
||||
latestQuantity + NEW.count,
|
||||
NOW()
|
||||
);
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 9
|
||||
-- Trigger: trg_pr_payment_before_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Purchase_Receipt_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_pr_payment_before_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_before_insert` BEFORE INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
||||
|
||||
|
||||
DECLARE receiptTotal DECIMAL(14,2);
|
||||
DECLARE paid DECIMAL(14,2);
|
||||
|
||||
|
||||
SELECT totalAmount, paidAmount
|
||||
INTO receiptTotal, paid
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = NEW.receiptId
|
||||
FOR UPDATE;
|
||||
|
||||
IF NEW.type = 'PAYMENT' AND paid + NEW.amount > receiptTotal THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'مجموع مبلغ پرداختی بیشتر از مبلغ فاکتور است.';
|
||||
END IF;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 10
|
||||
-- Trigger: trg_purchase_payment_update_receipt
|
||||
-- Event: INSERT
|
||||
-- Table: Purchase_Receipt_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_purchase_payment_update_receipt`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_payment_update_receipt` AFTER INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
||||
DECLARE paid DECIMAL(15,2);
|
||||
DECLARE total DECIMAL(15,2);
|
||||
|
||||
SELECT
|
||||
COALESCE(SUM(
|
||||
CASE WHEN type = 'PAYMENT' THEN amount ELSE -amount END
|
||||
),0)
|
||||
INTO paid
|
||||
FROM Purchase_Receipt_Payments
|
||||
WHERE receiptId = NEW.receiptId;
|
||||
|
||||
SELECT totalAmount INTO total
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = NEW.receiptId;
|
||||
|
||||
UPDATE Purchase_Receipts
|
||||
SET
|
||||
paidAmount = paid,
|
||||
status = CASE
|
||||
WHEN paid = 0 THEN 'UNPAID'
|
||||
WHEN paid < total THEN 'PARTIALLY_PAID'
|
||||
ELSE 'PAID'
|
||||
END
|
||||
WHERE id = NEW.receiptId;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 11
|
||||
-- Trigger: trg_purchase_payment_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Purchase_Receipt_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_purchase_payment_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_payment_after_insert` AFTER INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
||||
|
||||
DECLARE currentBalance DECIMAL(15, 2);
|
||||
|
||||
|
||||
SELECT balance INTO currentBalance
|
||||
FROM Bank_Account_Balance
|
||||
WHERE
|
||||
bankAccountId = NEW.bankAccountId FOR
|
||||
UPDATE;
|
||||
|
||||
|
||||
IF currentBalance IS NULL THEN SET currentBalance = 0;
|
||||
|
||||
|
||||
INSERT INTO
|
||||
Bank_Account_Balance (bankAccountId, balance, updatedAt)
|
||||
VALUES (NEW.bankAccountId, 0, NOW());
|
||||
|
||||
END IF;
|
||||
|
||||
IF NEW.type = 'PAYMENT' THEN
|
||||
SET
|
||||
currentBalance = currentBalance - NEW.amount;
|
||||
|
||||
INSERT INTO
|
||||
Bank_Account_Transactions (
|
||||
bankAccountId,
|
||||
type,
|
||||
amount,
|
||||
balanceAfter,
|
||||
referenceType,
|
||||
referenceId
|
||||
)
|
||||
VALUES (
|
||||
NEW.bankAccountId,
|
||||
'WITHDRAWAL',
|
||||
NEW.amount,
|
||||
currentBalance,
|
||||
'PURCHASE_PAYMENT',
|
||||
NEW.id
|
||||
);
|
||||
|
||||
ELSE SET currentBalance = currentBalance + NEW.amount;
|
||||
|
||||
INSERT INTO
|
||||
Bank_Account_Transactions (
|
||||
bankAccountId,
|
||||
type,
|
||||
amount,
|
||||
balanceAfter,
|
||||
referenceType,
|
||||
referenceId
|
||||
)
|
||||
VALUES (
|
||||
NEW.bankAccountId,
|
||||
'DEPOSIT',
|
||||
NEW.amount,
|
||||
currentBalance,
|
||||
'PURCHASE_REFUND',
|
||||
NEW.id
|
||||
);
|
||||
|
||||
END IF;
|
||||
|
||||
UPDATE Bank_Account_Balance
|
||||
SET
|
||||
balance = currentBalance
|
||||
WHERE
|
||||
bankAccountId = NEW.bankAccountId;
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 12
|
||||
-- Trigger: trg_pr_payment_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Purchase_Receipt_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_pr_payment_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_insert` AFTER INSERT ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
||||
DECLARE receiptTotal DECIMAL(14,2) Default 0;
|
||||
DECLARE newPaid DECIMAL(14,2) Default 0;
|
||||
DECLARE _supplierId INT;
|
||||
DECLARE lastBalance DECIMAL(14,2) Default 0;
|
||||
|
||||
|
||||
-- Lock receipt row
|
||||
SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
||||
INTO receiptTotal, newPaid, _supplierId
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = NEW.receiptId
|
||||
FOR UPDATE;
|
||||
|
||||
-- Apply payment or refund
|
||||
IF NEW.type = 'PAYMENT' THEN
|
||||
SET newPaid = newPaid + NEW.amount;
|
||||
ELSE
|
||||
SET newPaid = newPaid - NEW.amount;
|
||||
END IF;
|
||||
|
||||
-- Update receipt
|
||||
UPDATE Purchase_Receipts
|
||||
SET
|
||||
paidAmount = newPaid,
|
||||
status =
|
||||
CASE
|
||||
WHEN newPaid = 0 THEN 'UNPAID'
|
||||
WHEN newPaid < receiptTotal THEN 'PARTIALLY_PAID'
|
||||
ELSE 'PAID'
|
||||
END
|
||||
WHERE id = NEW.receiptId;
|
||||
|
||||
-- Get last supplier balance
|
||||
SELECT IFNULL(balance, 0)
|
||||
INTO lastBalance
|
||||
FROM Supplier_Ledger
|
||||
WHERE supplierId = _supplierId
|
||||
ORDER BY id DESC
|
||||
LIMIT 1;
|
||||
|
||||
|
||||
|
||||
-- Insert supplier ledger
|
||||
INSERT INTO Supplier_Ledger
|
||||
(
|
||||
supplierId,
|
||||
debit,
|
||||
credit,
|
||||
balance,
|
||||
sourceType,
|
||||
sourceId,
|
||||
createdAt
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
_supplierId,
|
||||
IF(NEW.type = 'REFUND', NEW.amount, 0),
|
||||
IF(NEW.type = 'PAYMENT', NEW.amount, 0),
|
||||
lastBalance
|
||||
+ IF(NEW.type = 'PAYMENT', NEW.amount, 0)
|
||||
- IF(NEW.type = 'REFUND', NEW.amount, 0),
|
||||
'PAYMENT',
|
||||
NEW.id,
|
||||
NOW()
|
||||
);
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 13
|
||||
-- Trigger: trg_pr_payment_after_delete
|
||||
-- Event: DELETE
|
||||
-- Table: Purchase_Receipt_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_pr_payment_after_delete`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pr_payment_after_delete` AFTER DELETE ON `Purchase_Receipt_Payments` FOR EACH ROW BEGIN
|
||||
DECLARE receiptTotal DECIMAL(14,2);
|
||||
DECLARE newPaid DECIMAL(14,2);
|
||||
|
||||
SELECT totalAmount, paidAmount
|
||||
INTO receiptTotal, newPaid
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = OLD.receiptId
|
||||
FOR UPDATE;
|
||||
|
||||
IF OLD.type = 'PAYMENT' THEN
|
||||
SET newPaid = newPaid - OLD.amount;
|
||||
ELSE
|
||||
SET newPaid = newPaid + OLD.amount;
|
||||
END IF;
|
||||
|
||||
UPDATE Purchase_Receipts
|
||||
SET
|
||||
paidAmount = newPaid,
|
||||
status =
|
||||
CASE
|
||||
WHEN newPaid = 0 THEN 'UNPAID'
|
||||
WHEN newPaid < receiptTotal THEN 'PARTIALLY_PAID'
|
||||
ELSE 'PAID'
|
||||
END
|
||||
WHERE id = OLD.receiptId;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 14
|
||||
-- Trigger: trg_purchase_receipt_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Purchase_Receipts
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_purchase_receipt_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_purchase_receipt_after_insert` AFTER INSERT ON `Purchase_Receipts` FOR EACH ROW BEGIN
|
||||
DECLARE lastBalance DECIMAL(14,2) DEFAULT 0;
|
||||
|
||||
SELECT COALESCE(balance, 0)
|
||||
INTO lastBalance
|
||||
FROM Supplier_Ledger
|
||||
WHERE supplierId = NEW.supplierId
|
||||
ORDER BY id DESC
|
||||
LIMIT 1;
|
||||
|
||||
INSERT INTO Supplier_Ledger
|
||||
(
|
||||
supplierId,
|
||||
debit,
|
||||
credit,
|
||||
balance,
|
||||
sourceType,
|
||||
sourceId,
|
||||
createdAt
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
NEW.supplierId,
|
||||
NEW.totalAmount,
|
||||
0,
|
||||
lastBalance - NEW.totalAmount,
|
||||
'PURCHASE',
|
||||
NEW.id,
|
||||
NOW()
|
||||
);
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 15
|
||||
-- Trigger: trg_sales_invoice_items_before_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Sales_Invoice_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_before_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_before_insert` BEFORE INSERT ON `Sales_Invoice_Items` FOR EACH ROW BEGIN
|
||||
|
||||
DECLARE current_stock DECIMAL(10, 2);
|
||||
DECLARE inventory_id INT;
|
||||
|
||||
|
||||
|
||||
SELECT pa.inventoryId INTO inventory_id
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = NEW.invoiceId;
|
||||
|
||||
|
||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
||||
FROM Stock_Balance sb
|
||||
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
|
||||
LIMIT 1;
|
||||
|
||||
|
||||
|
||||
IF NEW.count > current_stock THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'موجودی کالا در انبار کافی نیست.';
|
||||
END IF;
|
||||
end;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 16
|
||||
-- Trigger: trg_sales_invoice_items_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Sales_Invoice_Items
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_items_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_items_after_insert` AFTER INSERT ON `Sales_Invoice_Items` FOR EACH ROW begin DECLARE current_stock DECIMAL(10, 2);
|
||||
|
||||
DECLARE inventory_id INT;
|
||||
DECLARE customer_id INT;
|
||||
DECLARE pos_id INT;
|
||||
|
||||
|
||||
|
||||
SELECT posAccountId, customerId INTO pos_id, customer_id
|
||||
FROM Sales_Invoices si
|
||||
WHERE si.id = NEW.invoiceId
|
||||
LIMIT 1;
|
||||
INSERT INTO Trigger_Logs (name , message) VALUES ('pos_id', pos_id);
|
||||
INSERT INTO Trigger_Logs (name , message) VALUES ('customer_id', customer_id);
|
||||
|
||||
|
||||
SELECT pa.inventoryId INTO inventory_id
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = NEW.invoiceId;
|
||||
|
||||
|
||||
|
||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
||||
FROM Stock_Balance sb
|
||||
WHERE productId = NEW.productId AND sb.inventoryId = inventory_id
|
||||
LIMIT 1;
|
||||
|
||||
|
||||
|
||||
INSERT INTO Stock_Movements (
|
||||
type,
|
||||
quantity,
|
||||
unitPrice,
|
||||
totalCost,
|
||||
referenceType,
|
||||
referenceId,
|
||||
productId,
|
||||
inventoryId,
|
||||
avgCost,
|
||||
remainedInStock,
|
||||
customerId,
|
||||
createdAt
|
||||
)
|
||||
VALUES (
|
||||
'OUT',
|
||||
NEW.count,
|
||||
NEW.unitPrice,
|
||||
NEW.totalAmount,
|
||||
'SALES',
|
||||
NEW.invoiceId,
|
||||
NEW.productId,
|
||||
inventory_id,
|
||||
|
||||
CASE
|
||||
WHEN NEW.count = 0 THEN 0
|
||||
ELSE NEW.totalAmount / NEW.count
|
||||
END,
|
||||
current_stock - NEW.count,
|
||||
customer_id,
|
||||
NOW()
|
||||
);
|
||||
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 17
|
||||
-- Trigger: trg_sales_invoice_payment_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Sales_Invoice_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_sales_invoice_payment_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_sales_invoice_payment_after_insert` AFTER INSERT ON `Sales_Invoice_Payments` FOR EACH ROW BEGIN
|
||||
DECLARE currentBalance DECIMAL(15,2);
|
||||
DECLARE bankAccountId INT;
|
||||
|
||||
SELECT pa.bankAccountId INTO bankAccountId
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = NEW.invoiceId;
|
||||
|
||||
SELECT balance INTO currentBalance
|
||||
FROM Bank_Account_Balance
|
||||
WHERE bankAccountId = bankAccountId
|
||||
FOR UPDATE;
|
||||
|
||||
IF currentBalance IS NULL THEN
|
||||
SET currentBalance = 0;
|
||||
INSERT INTO Bank_Account_Balance (bankAccountId, balance)
|
||||
VALUES (bankAccountId, 0);
|
||||
END IF;
|
||||
|
||||
SET currentBalance = currentBalance + NEW.amount;
|
||||
|
||||
INSERT INTO Bank_Account_Transactions
|
||||
(bankAccountId, type, amount, balanceAfter, referenceType, referenceId)
|
||||
VALUES
|
||||
(bankAccountId, 'DEPOSIT', NEW.amount, currentBalance, 'POS_SALE', NEW.id);
|
||||
|
||||
UPDATE Bank_Account_Balance
|
||||
SET balance = currentBalance
|
||||
WHERE bankAccountId = bankAccountId;
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 18
|
||||
-- Trigger: trg_pos_account_payment_after_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Sales_Invoice_Payments
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_pos_account_payment_after_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_pos_account_payment_after_insert` AFTER INSERT ON `Sales_Invoice_Payments` FOR EACH ROW BEGIN
|
||||
|
||||
DECLARE _bankAccountId INT;
|
||||
|
||||
IF(NEW.paymentMethod != 'CASH') THEN
|
||||
SELECT cashBankAccountId INTO _bankAccountId
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = NEW.invoiceId;
|
||||
End IF;
|
||||
|
||||
INSERT INTO Bank_Account_Transactions (
|
||||
bankAccountId,
|
||||
type,
|
||||
amount,
|
||||
balanceAfter,
|
||||
referenceType,
|
||||
referenceId
|
||||
)
|
||||
VALUES(
|
||||
_bankAccountId,
|
||||
'DEPOSIT',
|
||||
NEW.amount,
|
||||
0,
|
||||
'POS_SALE',
|
||||
NEW.id
|
||||
);
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 19
|
||||
-- Trigger: trg_stock_transfer
|
||||
-- Event: INSERT
|
||||
-- Table: Stock_Movements
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_stock_transfer`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_transfer` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'INVENTORY_TRANSFER' THEN IF NEW.type = 'IN' THEN
|
||||
INSERT INTO
|
||||
Stock_Balance (
|
||||
productId,
|
||||
inventoryId,
|
||||
quantity,
|
||||
totalCost,
|
||||
avgCost,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
NEW.productId,
|
||||
NEW.inventoryId,
|
||||
NEW.quantity,
|
||||
NEW.totalCost,
|
||||
CASE
|
||||
WHEN NEW.quantity = 0 THEN 0
|
||||
ELSE NEW.totalCost / NEW.quantity
|
||||
END,
|
||||
NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
quantity = quantity + NEW.quantity,
|
||||
totalCost = totalCost + NEW.totalCost,
|
||||
avgCost = CASE
|
||||
WHEN (quantity + NEW.quantity) = 0 THEN 0
|
||||
ELSE (totalCost + NEW.totalCost) / (quantity + NEW.quantity)
|
||||
END,
|
||||
updatedAt = NOW();
|
||||
|
||||
END IF;
|
||||
|
||||
IF NEW.type = 'OUT' THEN IF EXISTS (
|
||||
SELECT 1
|
||||
FROM Stock_Balance sb
|
||||
WHERE
|
||||
sb.productId = NEW.productId
|
||||
AND sb.inventoryId = NEW.inventoryId
|
||||
) THEN
|
||||
|
||||
UPDATE Stock_Balance sb
|
||||
SET
|
||||
sb.quantity = sb.quantity - NEW.quantity,
|
||||
sb.totalCost = sb.totalCost - (sb.avgCost * NEW.quantity),
|
||||
sb.updatedAt = NOW()
|
||||
WHERE
|
||||
sb.productId = NEW.productId
|
||||
AND sb.inventoryId = NEW.inventoryId;
|
||||
|
||||
ELSE
|
||||
INSERT INTO
|
||||
Stock_Balance (
|
||||
productId,
|
||||
inventoryId,
|
||||
quantity,
|
||||
totalCost,
|
||||
avgCost,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
NEW.productId,
|
||||
NEW.inventoryId,
|
||||
- NEW.quantity,
|
||||
- COALESCE(NEW.unitPrice, 0) * NEW.quantity,
|
||||
COALESCE(NEW.unitPrice, 0),
|
||||
NOW()
|
||||
);
|
||||
|
||||
END IF;
|
||||
|
||||
END IF;
|
||||
|
||||
END IF;
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 20
|
||||
-- Trigger: trg_stock_purchase_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Stock_Movements
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_stock_purchase_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_purchase_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'PURCHASE' THEN
|
||||
|
||||
INSERT INTO
|
||||
Stock_Balance (
|
||||
productId,
|
||||
quantity,
|
||||
avgCost,
|
||||
totalCost,
|
||||
inventoryId,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
NEW.productId,
|
||||
NEW.quantity,
|
||||
NEW.unitPrice,
|
||||
NEW.totalCost,
|
||||
NEW.inventoryId,
|
||||
NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
quantity = quantity + NEW.quantity,
|
||||
totalCost = totalCost + NEW.totalCost,
|
||||
avgCost = totalCost / quantity;
|
||||
|
||||
END IF;
|
||||
|
||||
END;
|
||||
|
||||
-- ------------------------------------------
|
||||
-- index: 21
|
||||
-- Trigger: trg_stock_sale_insert
|
||||
-- Event: INSERT
|
||||
-- Table: Stock_Movements
|
||||
-- ------------------------------------------
|
||||
DROP TRIGGER IF EXISTS `trg_stock_sale_insert`;
|
||||
|
||||
CREATE DEFINER=`pos`@`%` TRIGGER `trg_stock_sale_insert` AFTER INSERT ON `Stock_Movements` FOR EACH ROW BEGIN IF NEW.referenceType = 'SALES' THEN
|
||||
|
||||
INSERT INTO
|
||||
Stock_Balance (
|
||||
productId,
|
||||
quantity,
|
||||
avgCost,
|
||||
totalCost,
|
||||
inventoryId,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
NEW.productId,
|
||||
NEW.quantity,
|
||||
NEW.unitPrice,
|
||||
NEW.totalCost,
|
||||
NEW.inventoryId,
|
||||
NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
quantity = quantity - NEW.quantity,
|
||||
totalCost = totalCost - NEW.totalCost,
|
||||
avgCost = totalCost / quantity;
|
||||
|
||||
END IF;
|
||||
|
||||
END;
|
||||
@@ -1,657 +0,0 @@
|
||||
-- Stored Procedures equivalent to triggers
|
||||
|
||||
DELIMITER / /
|
||||
|
||||
-- Procedure for trg_bank_account_transaction_after_insert
|
||||
CREATE PROCEDURE update_bank_balance(IN p_bankAccountId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2))
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
IF p_type = 'DEPOSIT' THEN
|
||||
UPDATE Bank_Account_Balance SET balance = balance + p_amount WHERE bankAccountId = p_bankAccountId;
|
||||
ELSEIF p_type = 'WITHDRAWAL' THEN
|
||||
UPDATE Bank_Account_Balance SET balance = balance - p_amount WHERE bankAccountId = p_bankAccountId;
|
||||
END IF;
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_bank_account_transaction_after_delete
|
||||
CREATE PROCEDURE update_bank_balance_on_delete(IN p_bankAccountId INT, IN p_amount DECIMAL(15,2))
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
UPDATE Bank_Accounts SET balance = balance - p_amount WHERE id = p_bankAccountId;
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_transfer_item_after_insert
|
||||
CREATE PROCEDURE process_transfer_item(IN p_transferId INT, IN p_productId INT, IN p_count DECIMAL(10,2))
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
DECLARE fromInv INT;
|
||||
DECLARE toInv INT;
|
||||
DECLARE _avgCost DECIMAL(10,2);
|
||||
DECLARE latestQuantityInOrigin DECIMAL(10,2);
|
||||
DECLARE latestQuantityInDestination DECIMAL(10,2);
|
||||
|
||||
SELECT fromInventoryId, toInventoryId INTO fromInv, toInv
|
||||
FROM Inventory_Transfers WHERE id = p_transferId;
|
||||
|
||||
SELECT COALESCE(avgCost, 0), COALESCE(quantity, 0) INTO _avgCost, latestQuantityInOrigin FROM Stock_Balance
|
||||
WHERE ProductId = p_productId AND inventoryId = fromInv LIMIT 1;
|
||||
|
||||
SELECT COALESCE(quantity, 0) INTO latestQuantityInDestination FROM Stock_Balance
|
||||
WHERE ProductId = p_productId AND inventoryId = toInv LIMIT 1;
|
||||
|
||||
-- OUT from source
|
||||
INSERT INTO Stock_Movements
|
||||
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||
VALUES
|
||||
('OUT', p_count, _avgCost, _avgCost*p_count, _avgCost, 'INVENTORY_TRANSFER', p_transferId, p_productId, fromInv, toInv, NOW(), latestQuantityInOrigin-p_count);
|
||||
|
||||
-- IN to destination
|
||||
INSERT INTO Stock_Movements
|
||||
(type, quantity, unitPrice, totalCost, avgCost, referenceType, referenceId, productId, inventoryId, counterInventoryId, createdAt, remainedInStock)
|
||||
VALUES
|
||||
('IN', p_count, _avgCost, _avgCost*p_count, _avgCost, 'INVENTORY_TRANSFER', p_transferId, p_productId, toInv, fromInv, NOW(), latestQuantityInOrigin-p_count);
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_order_item_after_insert
|
||||
CREATE PROCEDURE update_stock_reservation_insert(IN p_orderId INT, IN p_productId INT, IN p_quantity DECIMAL(10,2))
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
UPDATE Stock_Reservations SET quantity = quantity + p_quantity
|
||||
WHERE orderId = p_orderId AND productId = p_productId;
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_order_item_after_update
|
||||
CREATE PROCEDURE update_stock_reservation_update(IN p_orderId INT, IN p_productId INT, IN p_old_quantity DECIMAL(10,2), IN p_new_quantity DECIMAL(10,2))
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
UPDATE Stock_Reservations
|
||||
SET quantity = quantity - p_old_quantity + p_new_quantity
|
||||
WHERE orderId = p_orderId AND productId = p_productId;
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_order_item_after_delete
|
||||
CREATE PROCEDURE update_stock_reservation_delete(IN p_orderId INT, IN p_productId INT, IN p_quantity DECIMAL(10,2))
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
UPDATE Stock_Reservations SET quantity = quantity - p_quantity
|
||||
WHERE orderId = p_orderId AND productId = p_productId;
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_order_after_cancel
|
||||
CREATE PROCEDURE cancel_order_stock(IN p_orderId INT, IN p_status VARCHAR(20))
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
IF p_status = 'CANCELED' OR p_status = 'REJECTED' OR p_status = 'DONE' THEN
|
||||
UPDATE Stock_Reservations sr SET quantity = 0
|
||||
WHERE sr.orderId = p_orderId;
|
||||
END IF;
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_purchase_receipt_item_after_insert
|
||||
CREATE PROCEDURE process_purchase_item(IN p_receiptId INT, IN p_productId INT, IN p_count DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalAmount DECIMAL(15,2))
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
DECLARE latestQuantity DECIMAL(10, 2) DEFAULT 0;
|
||||
DECLARE invId INT;
|
||||
DECLARE suppId INT;
|
||||
|
||||
-- Get inventory & supplier from
|
||||
SELECT inventoryId, supplierId
|
||||
INTO invId, suppId
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = p_receiptId;
|
||||
|
||||
-- Get current stock quantity (if exists)
|
||||
SELECT COALESCE(quantity, 0)
|
||||
INTO latestQuantity
|
||||
FROM Stock_Balance sb
|
||||
WHERE sb.inventoryId = invId
|
||||
AND sb.productId = p_productId
|
||||
LIMIT 1;
|
||||
|
||||
-- Insert stock movement
|
||||
INSERT INTO Stock_Movements (
|
||||
type,
|
||||
quantity,
|
||||
unitPrice,
|
||||
totalCost,
|
||||
referenceType,
|
||||
referenceId,
|
||||
productId,
|
||||
inventoryId,
|
||||
avgCost,
|
||||
supplierId,
|
||||
remainedInStock,
|
||||
createdAt
|
||||
)
|
||||
VALUES (
|
||||
'IN',
|
||||
p_count,
|
||||
p_unitPrice,
|
||||
p_totalAmount,
|
||||
'PURCHASE',
|
||||
p_receiptId,
|
||||
p_productId,
|
||||
invId,
|
||||
CASE
|
||||
WHEN p_count = 0 THEN 0
|
||||
ELSE p_totalAmount / p_count
|
||||
END,
|
||||
suppId,
|
||||
latestQuantity + p_count,
|
||||
NOW()
|
||||
);
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_pr_payment_before_insert
|
||||
CREATE PROCEDURE validate_payment_before_insert(IN p_receiptId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2))
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
DECLARE receiptTotal DECIMAL(14,2);
|
||||
DECLARE paid DECIMAL(14,2);
|
||||
|
||||
SELECT totalAmount, paidAmount
|
||||
INTO receiptTotal, paid
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = p_receiptId
|
||||
FOR UPDATE;
|
||||
|
||||
IF p_type = 'PAYMENT' AND paid + p_amount > receiptTotal THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'مجموع مبلغ پرداختی بیشتر از مبلغ فاکتور است.';
|
||||
END IF;
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_purchase_payment_update_receipt
|
||||
CREATE PROCEDURE update_receipt_payment(IN p_receiptId INT)
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
DECLARE paid DECIMAL(15,2);
|
||||
DECLARE total DECIMAL(15,2);
|
||||
|
||||
SELECT
|
||||
COALESCE(SUM(
|
||||
CASE WHEN type = 'PAYMENT' THEN amount ELSE -amount END
|
||||
),0)
|
||||
INTO paid
|
||||
FROM Purchase_Receipt_Payments
|
||||
WHERE receiptId = p_receiptId;
|
||||
|
||||
SELECT totalAmount INTO total
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = p_receiptId;
|
||||
|
||||
UPDATE Purchase_Receipts
|
||||
SET
|
||||
paidAmount = paid,
|
||||
status = CASE
|
||||
WHEN paid = 0 THEN 'UNPAID'
|
||||
WHEN paid < total THEN 'PARTIALLY_PAID'
|
||||
ELSE 'PAID'
|
||||
END
|
||||
WHERE id = p_receiptId;
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_purchase_payment_after_insert
|
||||
CREATE PROCEDURE process_purchase_payment(IN p_bankAccountId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2), IN p_id INT)
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
DECLARE currentBalance DECIMAL(15, 2);
|
||||
|
||||
SELECT balance INTO currentBalance
|
||||
FROM Bank_Account_Balance
|
||||
WHERE bankAccountId = p_bankAccountId FOR UPDATE;
|
||||
|
||||
IF currentBalance IS NULL THEN SET currentBalance = 0;
|
||||
INSERT INTO Bank_Account_Balance (bankAccountId, balance, updatedAt)
|
||||
VALUES (p_bankAccountId, 0, NOW());
|
||||
END IF;
|
||||
|
||||
IF p_type = 'PAYMENT' THEN
|
||||
SET currentBalance = currentBalance - p_amount;
|
||||
INSERT INTO Bank_Account_Transactions (
|
||||
bankAccountId,
|
||||
type,
|
||||
amount,
|
||||
balanceAfter,
|
||||
referenceType,
|
||||
referenceId
|
||||
)
|
||||
VALUES (
|
||||
p_bankAccountId,
|
||||
'WITHDRAWAL',
|
||||
p_amount,
|
||||
currentBalance,
|
||||
'PURCHASE_PAYMENT',
|
||||
p_id
|
||||
);
|
||||
ELSE
|
||||
SET currentBalance = currentBalance + p_amount;
|
||||
INSERT INTO Bank_Account_Transactions (
|
||||
bankAccountId,
|
||||
type,
|
||||
amount,
|
||||
balanceAfter,
|
||||
referenceType,
|
||||
referenceId
|
||||
)
|
||||
VALUES (
|
||||
p_bankAccountId,
|
||||
'DEPOSIT',
|
||||
p_amount,
|
||||
currentBalance,
|
||||
'PURCHASE_REFUND',
|
||||
p_id
|
||||
);
|
||||
END IF;
|
||||
|
||||
UPDATE Bank_Account_Balance
|
||||
SET balance = currentBalance
|
||||
WHERE bankAccountId = p_bankAccountId;
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_pr_payment_after_insert
|
||||
CREATE PROCEDURE update_supplier_ledger(IN p_receiptId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2), IN p_id INT)
|
||||
BEGIN
|
||||
START TRANSACTION;
|
||||
DECLARE receiptTotal DECIMAL(14,2) DEFAULT 0;
|
||||
DECLARE newPaid DECIMAL(14,2) DEFAULT 0;
|
||||
DECLARE _supplierId INT;
|
||||
DECLARE lastBalance DECIMAL(14,2) DEFAULT 0;
|
||||
|
||||
-- Lock receipt row
|
||||
SELECT COALESCE(totalAmount, 0), COALESCE(paidAmount, 0), supplierId
|
||||
INTO receiptTotal, newPaid, _supplierId
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = p_receiptId
|
||||
FOR UPDATE;
|
||||
|
||||
-- Apply payment or refund
|
||||
IF p_type = 'PAYMENT' THEN
|
||||
SET newPaid = newPaid + p_amount;
|
||||
ELSE
|
||||
SET newPaid = newPaid - p_amount;
|
||||
END IF;
|
||||
|
||||
-- Update receipt
|
||||
UPDATE Purchase_Receipts
|
||||
SET
|
||||
paidAmount = newPaid,
|
||||
status =
|
||||
CASE
|
||||
WHEN newPaid = 0 THEN 'UNPAID'
|
||||
WHEN newPaid < receiptTotal THEN 'PARTIALLY_PAID'
|
||||
ELSE 'PAID'
|
||||
END
|
||||
WHERE id = p_receiptId;
|
||||
|
||||
-- Get last supplier balance
|
||||
SELECT IFNULL(balance, 0)
|
||||
INTO lastBalance
|
||||
FROM Supplier_Ledger
|
||||
WHERE supplierId = _supplierId
|
||||
ORDER BY id DESC
|
||||
LIMIT 1;
|
||||
|
||||
-- Insert supplier ledger
|
||||
INSERT INTO Supplier_Ledger
|
||||
(
|
||||
supplierId,
|
||||
debit,
|
||||
credit,
|
||||
balance,
|
||||
sourceType,
|
||||
sourceId,
|
||||
createdAt
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
_supplierId,
|
||||
IF(p_type = 'REFUND', p_amount, 0),
|
||||
IF(p_type = 'PAYMENT', p_amount, 0),
|
||||
lastBalance
|
||||
+ IF(p_type = 'PAYMENT', p_amount, 0)
|
||||
- IF(p_type = 'REFUND', p_amount, 0),
|
||||
'PAYMENT',
|
||||
p_id,
|
||||
NOW()
|
||||
);
|
||||
COMMIT;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_pr_payment_after_delete
|
||||
CREATE PROCEDURE update_receipt_on_payment_delete(IN p_receiptId INT, IN p_type VARCHAR(20), IN p_amount DECIMAL(15,2))
|
||||
BEGIN
|
||||
DECLARE receiptTotal DECIMAL(14,2);
|
||||
DECLARE newPaid DECIMAL(14,2);
|
||||
|
||||
SELECT totalAmount, paidAmount
|
||||
INTO receiptTotal, newPaid
|
||||
FROM Purchase_Receipts
|
||||
WHERE id = p_receiptId
|
||||
FOR UPDATE;
|
||||
|
||||
IF p_type = 'PAYMENT' THEN
|
||||
SET newPaid = newPaid - p_amount;
|
||||
ELSE
|
||||
SET newPaid = newPaid + p_amount;
|
||||
END IF;
|
||||
|
||||
UPDATE Purchase_Receipts
|
||||
SET
|
||||
paidAmount = newPaid,
|
||||
status =
|
||||
CASE
|
||||
WHEN newPaid = 0 THEN 'UNPAID'
|
||||
WHEN newPaid < receiptTotal THEN 'PARTIALLY_PAID'
|
||||
ELSE 'PAID'
|
||||
END
|
||||
WHERE id = p_receiptId;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_purchase_receipt_after_insert
|
||||
CREATE PROCEDURE insert_supplier_ledger_purchase(IN p_supplierId INT, IN p_totalAmount DECIMAL(15,2), IN p_id INT)
|
||||
BEGIN
|
||||
DECLARE lastBalance DECIMAL(14,2) DEFAULT 0;
|
||||
|
||||
SELECT COALESCE(balance, 0)
|
||||
INTO lastBalance
|
||||
FROM Supplier_Ledger
|
||||
WHERE supplierId = p_supplierId
|
||||
ORDER BY id DESC
|
||||
LIMIT 1;
|
||||
|
||||
INSERT INTO Supplier_Ledger
|
||||
(
|
||||
supplierId,
|
||||
debit,
|
||||
credit,
|
||||
balance,
|
||||
sourceType,
|
||||
sourceId,
|
||||
createdAt
|
||||
)
|
||||
VALUES
|
||||
(
|
||||
p_supplierId,
|
||||
p_totalAmount,
|
||||
0,
|
||||
lastBalance - p_totalAmount,
|
||||
'PURCHASE',
|
||||
p_id,
|
||||
NOW()
|
||||
);
|
||||
END //
|
||||
|
||||
-- Procedure for trg_sales_invoice_items_before_insert
|
||||
CREATE PROCEDURE validate_stock_before_sale(IN p_invoiceId INT, IN p_productId INT, IN p_count DECIMAL(10,2))
|
||||
BEGIN
|
||||
DECLARE current_stock DECIMAL(10, 2);
|
||||
DECLARE inventory_id INT;
|
||||
|
||||
SELECT pa.inventoryId INTO inventory_id
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = p_invoiceId;
|
||||
|
||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
||||
FROM Stock_Balance sb
|
||||
WHERE productId = p_productId AND sb.inventoryId = inventory_id
|
||||
LIMIT 1;
|
||||
|
||||
IF p_count > current_stock THEN
|
||||
SIGNAL SQLSTATE '45000'
|
||||
SET MESSAGE_TEXT = 'موجودی کالا در انبار کافی نیست.';
|
||||
END IF;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_sales_invoice_items_after_insert
|
||||
CREATE PROCEDURE process_sale_item(IN p_invoiceId INT, IN p_productId INT, IN p_count DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalAmount DECIMAL(15,2))
|
||||
BEGIN
|
||||
DECLARE current_stock DECIMAL(10, 2);
|
||||
DECLARE inventory_id INT;
|
||||
DECLARE customer_id INT;
|
||||
DECLARE pos_id INT;
|
||||
|
||||
SELECT posAccountId, customerId INTO pos_id, customer_id
|
||||
FROM Sales_Invoices si
|
||||
WHERE si.id = p_invoiceId
|
||||
LIMIT 1;
|
||||
|
||||
SELECT pa.inventoryId INTO inventory_id
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = p_invoiceId;
|
||||
|
||||
SELECT COALESCE(quantity, 0) INTO current_stock
|
||||
FROM Stock_Balance sb
|
||||
WHERE productId = p_productId AND sb.inventoryId = inventory_id
|
||||
LIMIT 1;
|
||||
|
||||
INSERT INTO Stock_Movements (
|
||||
type,
|
||||
quantity,
|
||||
unitPrice,
|
||||
totalCost,
|
||||
referenceType,
|
||||
referenceId,
|
||||
productId,
|
||||
inventoryId,
|
||||
avgCost,
|
||||
remainedInStock,
|
||||
customerId,
|
||||
createdAt
|
||||
)
|
||||
VALUES (
|
||||
'OUT',
|
||||
p_count,
|
||||
p_unitPrice,
|
||||
p_totalAmount,
|
||||
'SALES',
|
||||
p_invoiceId,
|
||||
p_productId,
|
||||
inventory_id,
|
||||
CASE
|
||||
WHEN p_count = 0 THEN 0
|
||||
ELSE p_totalAmount / p_count
|
||||
END,
|
||||
current_stock - p_count,
|
||||
customer_id,
|
||||
NOW()
|
||||
);
|
||||
END //
|
||||
|
||||
-- Procedure for trg_sales_invoice_payment_after_insert
|
||||
CREATE PROCEDURE process_sale_payment(IN p_invoiceId INT, IN p_amount DECIMAL(15,2), IN p_id INT)
|
||||
BEGIN
|
||||
DECLARE currentBalance DECIMAL(15,2);
|
||||
DECLARE bankAccountId INT;
|
||||
|
||||
SELECT pa.bankAccountId INTO bankAccountId
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = p_invoiceId;
|
||||
|
||||
SELECT balance INTO currentBalance
|
||||
FROM Bank_Account_Balance
|
||||
WHERE bankAccountId = bankAccountId
|
||||
FOR UPDATE;
|
||||
|
||||
IF currentBalance IS NULL THEN
|
||||
SET currentBalance = 0;
|
||||
INSERT INTO Bank_Account_Balance (bankAccountId, balance, updatedAt)
|
||||
VALUES (bankAccountId, 0, NOW());
|
||||
END IF;
|
||||
|
||||
SET currentBalance = currentBalance + p_amount;
|
||||
|
||||
INSERT INTO Bank_Account_Transactions
|
||||
(bankAccountId, type, amount, balanceAfter, referenceType, referenceId)
|
||||
VALUES
|
||||
(bankAccountId, 'DEPOSIT', p_amount, currentBalance, 'POS_SALE', p_id);
|
||||
|
||||
UPDATE Bank_Account_Balance
|
||||
SET balance = currentBalance
|
||||
WHERE bankAccountId = bankAccountId;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_pos_account_payment_after_insert
|
||||
CREATE PROCEDURE process_pos_payment(IN p_invoiceId INT, IN p_paymentMethod VARCHAR(20), IN p_amount DECIMAL(15,2), IN p_id INT)
|
||||
BEGIN
|
||||
DECLARE _bankAccountId INT;
|
||||
|
||||
IF(p_paymentMethod != 'CASH') THEN
|
||||
SELECT cashBankAccountId INTO _bankAccountId
|
||||
FROM Pos_Accounts pa
|
||||
INNER JOIN Sales_Invoices si ON pa.id = si.posAccountId
|
||||
WHERE si.id = p_invoiceId;
|
||||
END IF;
|
||||
|
||||
INSERT INTO Bank_Account_Transactions (
|
||||
bankAccountId,
|
||||
type,
|
||||
amount,
|
||||
balanceAfter,
|
||||
referenceType,
|
||||
referenceId
|
||||
)
|
||||
VALUES(
|
||||
_bankAccountId,
|
||||
'DEPOSIT',
|
||||
p_amount,
|
||||
0,
|
||||
'POS_SALE',
|
||||
p_id
|
||||
);
|
||||
END //
|
||||
|
||||
-- Procedure for trg_stock_transfer
|
||||
CREATE PROCEDURE update_stock_balance_transfer(IN p_productId INT, IN p_inventoryId INT, IN p_quantity DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalCost DECIMAL(15,2), IN p_type VARCHAR(10))
|
||||
BEGIN
|
||||
IF p_type = 'IN' THEN
|
||||
INSERT INTO Stock_Balance (
|
||||
productId,
|
||||
inventoryId,
|
||||
quantity,
|
||||
totalCost,
|
||||
avgCost,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
p_productId,
|
||||
p_inventoryId,
|
||||
p_quantity,
|
||||
p_totalCost,
|
||||
CASE
|
||||
WHEN p_quantity = 0 THEN 0
|
||||
ELSE p_totalCost / p_quantity
|
||||
END,
|
||||
NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
quantity = quantity + p_quantity,
|
||||
totalCost = totalCost + p_totalCost,
|
||||
avgCost = CASE
|
||||
WHEN (quantity + p_quantity) = 0 THEN 0
|
||||
ELSE (totalCost + p_totalCost) / (quantity + p_quantity)
|
||||
END,
|
||||
updatedAt = NOW();
|
||||
END IF;
|
||||
|
||||
IF p_type = 'OUT' THEN
|
||||
IF EXISTS (
|
||||
SELECT 1
|
||||
FROM Stock_Balance sb
|
||||
WHERE sb.productId = p_productId AND sb.inventoryId = p_inventoryId
|
||||
) THEN
|
||||
UPDATE Stock_Balance sb
|
||||
SET
|
||||
sb.quantity = sb.quantity - p_quantity,
|
||||
sb.totalCost = sb.totalCost - (sb.avgCost * p_quantity),
|
||||
sb.updatedAt = NOW()
|
||||
WHERE
|
||||
sb.productId = p_productId
|
||||
AND sb.inventoryId = p_inventoryId;
|
||||
ELSE
|
||||
INSERT INTO Stock_Balance (
|
||||
productId,
|
||||
inventoryId,
|
||||
quantity,
|
||||
totalCost,
|
||||
avgCost,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
p_productId,
|
||||
p_inventoryId,
|
||||
- p_quantity,
|
||||
- COALESCE(p_unitPrice, 0) * p_quantity,
|
||||
COALESCE(p_unitPrice, 0),
|
||||
NOW()
|
||||
);
|
||||
END IF;
|
||||
END IF;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_stock_purchase_insert
|
||||
CREATE PROCEDURE update_stock_balance_purchase(IN p_productId INT, IN p_quantity DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalCost DECIMAL(15,2), IN p_inventoryId INT)
|
||||
BEGIN
|
||||
INSERT INTO Stock_Balance (
|
||||
productId,
|
||||
quantity,
|
||||
avgCost,
|
||||
totalCost,
|
||||
inventoryId,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
p_productId,
|
||||
p_quantity,
|
||||
p_unitPrice,
|
||||
p_totalCost,
|
||||
p_inventoryId,
|
||||
NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
quantity = quantity + p_quantity,
|
||||
totalCost = totalCost + p_totalCost,
|
||||
avgCost = totalCost / quantity;
|
||||
END //
|
||||
|
||||
-- Procedure for trg_stock_sale_insert
|
||||
CREATE PROCEDURE update_stock_balance_sale(IN p_productId INT, IN p_quantity DECIMAL(10,2), IN p_unitPrice DECIMAL(15,2), IN p_totalCost DECIMAL(15,2), IN p_inventoryId INT)
|
||||
BEGIN
|
||||
INSERT INTO Stock_Balance (
|
||||
productId,
|
||||
quantity,
|
||||
avgCost,
|
||||
totalCost,
|
||||
inventoryId,
|
||||
updatedAt
|
||||
)
|
||||
VALUES (
|
||||
p_productId,
|
||||
p_quantity,
|
||||
p_unitPrice,
|
||||
p_totalCost,
|
||||
p_inventoryId,
|
||||
NOW()
|
||||
)
|
||||
ON DUPLICATE KEY UPDATE
|
||||
quantity = quantity - p_quantity,
|
||||
totalCost = totalCost - p_totalCost,
|
||||
avgCost = totalCost / quantity;
|
||||
END //
|
||||
|
||||
DELIMITER;
|
||||
File diff suppressed because it is too large
Load Diff
+2
-4
@@ -7,10 +7,9 @@ import { AuthModule } from './modules/auth/auth.module'
|
||||
import { CatalogModule } from './modules/catalog/catalog.module'
|
||||
import { ConsumerModule } from './modules/consumer/consumer.module'
|
||||
import { EnumsModule } from './modules/enums/enums.module'
|
||||
import { PublicInvoicesModule } from './modules/invoices/invoices.module'
|
||||
import { PartnerModule } from './modules/partners/partners.module'
|
||||
import { PosModule } from './modules/pos/pos.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'
|
||||
import { PrismaModule } from './prisma/prisma.module'
|
||||
import { RedisModule } from './redis/redis.module'
|
||||
@@ -26,8 +25,7 @@ import { RedisModule } from './redis/redis.module'
|
||||
ConsumerModule,
|
||||
PosModule,
|
||||
PartnerModule,
|
||||
SalesInvoicePaymentsModule,
|
||||
TriggerLogsModule,
|
||||
PublicInvoicesModule,
|
||||
UploaderModule,
|
||||
ApplicationModule,
|
||||
],
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
import { TspProviderResponseStatus } from '@/generated/prisma/enums'
|
||||
import {
|
||||
InvoiceSettlementType,
|
||||
TspProviderRequestType,
|
||||
TspProviderResponseStatus,
|
||||
} from '@/generated/prisma/enums'
|
||||
|
||||
export default {
|
||||
PaymentMethodType: {
|
||||
@@ -137,16 +141,23 @@ export default {
|
||||
SUN: 'سان',
|
||||
},
|
||||
TspProviderResponseStatus: {
|
||||
SUCCESS: 'موفق',
|
||||
FAILURE: 'ناموفق',
|
||||
NOT_SEND: 'ارسال نشده',
|
||||
[TspProviderResponseStatus.SUCCESS]: 'تایید شده',
|
||||
[TspProviderResponseStatus.FAILURE]: 'ناموفق',
|
||||
[TspProviderResponseStatus.NOT_SEND]: 'ارسال نشده',
|
||||
[TspProviderResponseStatus.QUEUED]: 'در صف ارسال',
|
||||
[TspProviderResponseStatus.FISCAL_QUEUED]: 'در انتظار تایید سازمان',
|
||||
[TspProviderResponseStatus.SEND_FAILURE]: 'خطا در ارسال',
|
||||
},
|
||||
InvoiceSettlementType: {
|
||||
[InvoiceSettlementType.CASH]: 'نقدی',
|
||||
[InvoiceSettlementType.CREDIT]: 'نسیه',
|
||||
[InvoiceSettlementType.MIXED]: 'نقدی / نسیه',
|
||||
},
|
||||
TspProviderRequestType: {
|
||||
ORIGINAL: 'اصلی',
|
||||
CORRECTION: 'اصلاح',
|
||||
REVOKE: 'ابطال',
|
||||
REMOVE: 'حذف',
|
||||
[TspProviderRequestType.ORIGINAL]: 'اصلی',
|
||||
[TspProviderRequestType.CORRECTION]: 'اصلاح',
|
||||
[TspProviderRequestType.REVOKE]: 'ابطال',
|
||||
[TspProviderRequestType.RETURN]: 'برگشت از فروش',
|
||||
},
|
||||
TspProviderCustomerType: {
|
||||
Unknown: 'ناشناس',
|
||||
|
||||
@@ -11,9 +11,11 @@ export enum TspProviderRequestType {
|
||||
REMOVE = 'REMOVE',
|
||||
}
|
||||
|
||||
export enum SKUGuildType {
|
||||
GOLD = 'GOLD',
|
||||
}
|
||||
export const SKUGuildType = {
|
||||
GOLD: 'GOLD',
|
||||
} as const
|
||||
|
||||
export type SKUGuildType = (typeof SKUGuildType)[keyof typeof SKUGuildType]
|
||||
|
||||
export const UploadedFileTypes = {
|
||||
GOOD: 'GOOD',
|
||||
|
||||
@@ -52,85 +52,5 @@ export class PosGuard {
|
||||
}
|
||||
|
||||
return true
|
||||
// const pos = await this.prisma.pos.findUnique({
|
||||
// where: {
|
||||
// id: posId,
|
||||
// account_id: tokenPayload.account_id,
|
||||
// },
|
||||
// select: {
|
||||
// complex: {
|
||||
// select: {
|
||||
// id: true,
|
||||
// business_activity: {
|
||||
// select: {
|
||||
// id: true,
|
||||
// license_activation: {
|
||||
// select: {
|
||||
// expires_at: true,
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// },
|
||||
// })
|
||||
|
||||
// if (!pos) {
|
||||
// throw new ForbiddenException('شما دسترسی لازم را ندارید.')
|
||||
// }
|
||||
|
||||
// if (req.method !== 'GET') {
|
||||
// if (!pos.complex.business_activity.license_activation) {
|
||||
// throw new ForbiddenException('برای کاربر شما لایسنس ایجاد نشده است.')
|
||||
// }
|
||||
// if (
|
||||
// pos.complex.business_activity.license_activation.expires_at &&
|
||||
// new Date().getTime() >
|
||||
// new Date(pos.complex.business_activity.license_activation.expires_at).getTime()
|
||||
// ) {
|
||||
// throw new ForbiddenException('لایسنس شما منقضی شده است.')
|
||||
// }
|
||||
// }
|
||||
|
||||
// const foundedAccount = await this.prisma.consumerAccount.findUnique({
|
||||
// where: {
|
||||
// id: tokenPayload.account_id,
|
||||
// },
|
||||
// select: {
|
||||
// role: true,
|
||||
// },
|
||||
// })
|
||||
|
||||
// if (foundedAccount?.role === 'OWNER') {
|
||||
// return true
|
||||
// }
|
||||
|
||||
// const accountPermissions = await this.prisma.permissionConsumer.findUnique({
|
||||
// where: {
|
||||
// consumer_account_id: tokenPayload.account_id,
|
||||
// },
|
||||
// select: {
|
||||
// pos_permissions: true,
|
||||
// business_permissions: true,
|
||||
// complex_permissions: true,
|
||||
// },
|
||||
// })
|
||||
|
||||
// if (accountPermissions?.pos_permissions.some(p => p.pos_id === posId)) {
|
||||
// return true
|
||||
// }
|
||||
// if (
|
||||
// accountPermissions?.complex_permissions.some(p => p.complex_id === pos.complex.id)
|
||||
// ) {
|
||||
// return true
|
||||
// }
|
||||
// if (
|
||||
// accountPermissions?.business_permissions.some(
|
||||
// p => p.business_id === pos.complex.business_activity.id,
|
||||
// )
|
||||
// ) {
|
||||
// return true
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -95,7 +95,7 @@ export class ResponseMappingInterceptor implements NestInterceptor {
|
||||
meta = {
|
||||
totalRecords: total,
|
||||
totalPages: Math.max(1, Math.ceil(total / perPage)),
|
||||
page,
|
||||
page: parseInt(page),
|
||||
perPage,
|
||||
}
|
||||
break
|
||||
@@ -188,7 +188,7 @@ export class ResponseMappingInterceptor implements NestInterceptor {
|
||||
meta = {
|
||||
totalRecords: total,
|
||||
totalPages: Math.max(1, Math.ceil(total / perPage)),
|
||||
page,
|
||||
page: parseInt(page),
|
||||
perPage,
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,10 @@ export const summarySelect: SalesInvoiceSelect = {
|
||||
type: true,
|
||||
notes: true,
|
||||
created_at: true,
|
||||
settlement_type: true,
|
||||
unknown_customer: true,
|
||||
last_attempt_no: true,
|
||||
last_tsp_status: true,
|
||||
customer: {
|
||||
select: {
|
||||
type: true,
|
||||
@@ -20,6 +24,8 @@ export const summarySelect: SalesInvoiceSelect = {
|
||||
last_name: true,
|
||||
mobile_number: true,
|
||||
national_id: true,
|
||||
economic_code: true,
|
||||
postal_code: true,
|
||||
},
|
||||
},
|
||||
legal: {
|
||||
@@ -27,21 +33,11 @@ export const summarySelect: SalesInvoiceSelect = {
|
||||
name: true,
|
||||
economic_code: true,
|
||||
registration_number: true,
|
||||
postal_code: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
tsp_attempts: {
|
||||
orderBy: {
|
||||
created_at: 'desc',
|
||||
},
|
||||
take: 1,
|
||||
select: {
|
||||
status: true,
|
||||
sent_at: true,
|
||||
message: true,
|
||||
},
|
||||
},
|
||||
reference_invoice: {
|
||||
select: {
|
||||
id: true,
|
||||
@@ -52,8 +48,11 @@ export const summarySelect: SalesInvoiceSelect = {
|
||||
|
||||
export const select: SalesInvoiceSelect = {
|
||||
...summarySelect,
|
||||
discount_amount: true,
|
||||
tax_amount: true,
|
||||
updated_at: true,
|
||||
unknown_customer: true,
|
||||
|
||||
pos: {
|
||||
select: {
|
||||
id: true,
|
||||
@@ -66,6 +65,12 @@ export const select: SalesInvoiceSelect = {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
economic_code: true,
|
||||
guild: {
|
||||
select: {
|
||||
name: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
@@ -93,19 +98,12 @@ export const select: SalesInvoiceSelect = {
|
||||
measure_unit_text: true,
|
||||
sku_code: true,
|
||||
unit_price: true,
|
||||
discount: true,
|
||||
discount_amount: true,
|
||||
tax_amount: true,
|
||||
total_amount: true,
|
||||
notes: true,
|
||||
payload: true,
|
||||
good_snapshot: true,
|
||||
good: {
|
||||
select: {
|
||||
name: true,
|
||||
barcode: true,
|
||||
image_url: true,
|
||||
category: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
payments: {
|
||||
@@ -127,19 +125,4 @@ export const select: SalesInvoiceSelect = {
|
||||
},
|
||||
},
|
||||
},
|
||||
tsp_attempts: {
|
||||
orderBy: {
|
||||
created_at: 'desc',
|
||||
},
|
||||
select: {
|
||||
id: true,
|
||||
attempt_no: true,
|
||||
status: true,
|
||||
message: true,
|
||||
sent_at: true,
|
||||
received_at: true,
|
||||
created_at: true,
|
||||
},
|
||||
take: 1,
|
||||
},
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ export class SharedSaleInvoiceAccessService {
|
||||
})
|
||||
|
||||
if (!consumer) {
|
||||
throw new BadRequestException('شما دسترسی لازم برای ارسال فاکتور را ندارید.')
|
||||
throw new BadRequestException('شما دسترسی لازم برای ارسال صورتحساب را ندارید.')
|
||||
}
|
||||
|
||||
return consumer.consumer_id
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { SharedSaleInvoiceAccessService } from '@/common/services/saleInvoices/sale-invoice-access.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { PosCorrectionSalesInvoiceDto } from '@/modules/pos/sales-invoices/dto/create-sales-invoice.dto'
|
||||
import { SalesInvoiceTspService } from '@/modules/tspProviders/sales-invoice-tsp.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
|
||||
@Injectable()
|
||||
export class SharedSaleInvoiceActionsService {
|
||||
@@ -45,6 +46,28 @@ export class SharedSaleInvoiceActionsService {
|
||||
)
|
||||
}
|
||||
|
||||
async correction(
|
||||
data: PosCorrectionSalesInvoiceDto,
|
||||
consumerAccountId: string,
|
||||
posId: string,
|
||||
complexId: string,
|
||||
businessId: string,
|
||||
invoiceId: string,
|
||||
) {
|
||||
await this.saleInvoiceAccessService.getConsumerIdWithPosAccess(
|
||||
consumerAccountId,
|
||||
posId,
|
||||
)
|
||||
return this.salesInvoiceTspService.correctionSend(
|
||||
consumerAccountId,
|
||||
posId,
|
||||
complexId,
|
||||
businessId,
|
||||
invoiceId,
|
||||
data,
|
||||
)
|
||||
}
|
||||
|
||||
async inquiry(consumerAccountId: string, posId: string, invoiceId: string) {
|
||||
const consumerId = await this.saleInvoiceAccessService.getConsumerIdWithPosAccess(
|
||||
consumerAccountId,
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import type { SaleInvoiceType } from '@/common/interfaces/sale-invoice-payload'
|
||||
import { ApiProperty } from '@nestjs/swagger'
|
||||
import { ApiProperty, OmitType } from '@nestjs/swagger'
|
||||
import { Type } from 'class-transformer'
|
||||
import {
|
||||
ArrayMinSize,
|
||||
@@ -15,7 +15,11 @@ import {
|
||||
Min,
|
||||
ValidateNested,
|
||||
} from 'class-validator'
|
||||
import type { CustomerIndividual, CustomerLegal } from 'generated/prisma/client'
|
||||
import {
|
||||
CustomerIndividual,
|
||||
CustomerLegal,
|
||||
InvoiceSettlementType,
|
||||
} from 'generated/prisma/client'
|
||||
import { CustomerType } from 'generated/prisma/enums'
|
||||
|
||||
export class SharedCreateSalesInvoiceItemDto {
|
||||
@@ -29,11 +33,15 @@ export class SharedCreateSalesInvoiceItemDto {
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true })
|
||||
total_amount: number
|
||||
discount_amount: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true })
|
||||
discount_amount: number
|
||||
tax_amount: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true })
|
||||
total_amount: number
|
||||
|
||||
@IsString()
|
||||
@ApiProperty({ required: true })
|
||||
@@ -158,6 +166,14 @@ export class SharedCreateSalesInvoiceDto {
|
||||
@ApiProperty({ required: true, default: 0 })
|
||||
total_amount: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true, default: 0 })
|
||||
discount_amount: number
|
||||
|
||||
@IsNumber()
|
||||
@ApiProperty({ required: true, default: 0 })
|
||||
tax_amount: number
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsDateString(
|
||||
{ strict: true },
|
||||
@@ -165,6 +181,10 @@ export class SharedCreateSalesInvoiceDto {
|
||||
)
|
||||
invoice_date: Date
|
||||
|
||||
@ApiProperty({ required: true, enum: InvoiceSettlementType })
|
||||
@IsEnum(InvoiceSettlementType)
|
||||
settlement_type: InvoiceSettlementType
|
||||
|
||||
@ApiProperty({ required: true })
|
||||
@IsObject()
|
||||
@ValidateNested({ each: true })
|
||||
@@ -207,3 +227,8 @@ export class SharedCreateSalesInvoiceDto {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export class SharedCorrectionSalesInvoiceDto extends OmitType(
|
||||
SharedCreateSalesInvoiceDto,
|
||||
['customer', 'customer_id', 'send_to_tsp', 'customer_type', 'settlement_type'],
|
||||
) {}
|
||||
|
||||
@@ -109,7 +109,7 @@ export class SharedSaleInvoiceCreateService {
|
||||
}
|
||||
}
|
||||
|
||||
throw new BadRequestException('ایجاد فاکتور با خطا مواجه شد.')
|
||||
throw new BadRequestException('ایجاد صورتحساب با خطا مواجه شد.')
|
||||
}
|
||||
|
||||
private isRetryableInvoiceConflict(error: unknown) {
|
||||
@@ -150,12 +150,6 @@ export class SharedSaleInvoiceCreateService {
|
||||
const rawPayments = (paymentsData || {}) as Record<string, unknown>
|
||||
const terminalInfo = rawPayments.terminals as TerminalPaymentInfo | undefined
|
||||
|
||||
console.log(
|
||||
'terminalInfo0',
|
||||
rawPayments.terminals?.[0]?.customer_card_no,
|
||||
terminalInfo,
|
||||
)
|
||||
|
||||
const payments: NormalizedPayment[] = Object.entries(rawPayments)
|
||||
.filter(([key, value]) => key !== 'terminals' && value && Number(value) > 0)
|
||||
.map(([key, value]) => ({
|
||||
@@ -203,7 +197,7 @@ export class SharedSaleInvoiceCreateService {
|
||||
const roundedTotalAmount = Number(Number(totalAmount).toFixed(2))
|
||||
|
||||
if (roundedTotalPayments !== roundedTotalAmount) {
|
||||
throw new BadRequestException('مبلغ پرداختی باید برابر با مبلغ کل فاکتور باشد.')
|
||||
throw new BadRequestException('مبلغ پرداختی باید برابر با مبلغ کل صورتحساب باشد.')
|
||||
}
|
||||
|
||||
const terminalPayments = payments.filter(
|
||||
@@ -220,84 +214,126 @@ export class SharedSaleInvoiceCreateService {
|
||||
data: SharedCreateSalesInvoiceDto,
|
||||
businessId: string,
|
||||
) {
|
||||
if (data.customer_id) {
|
||||
return data.customer_id
|
||||
const { customer_id, customer_type, customer } = data
|
||||
|
||||
if (customer_id) {
|
||||
return customer_id
|
||||
}
|
||||
|
||||
if (
|
||||
data.customer_type === CustomerType.INDIVIDUAL &&
|
||||
data.customer?.customer_individual
|
||||
) {
|
||||
const { national_id, mobile_number, ...rest } = data.customer.customer_individual
|
||||
if (customer_type === CustomerType.INDIVIDUAL && customer?.customer_individual) {
|
||||
const { national_id, postal_code, economic_code, ...rest } =
|
||||
customer.customer_individual
|
||||
|
||||
const customerIndividual = await tx.customerIndividual.upsert({
|
||||
const foundedCustomer = await tx.customerIndividual.findFirst({
|
||||
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_id: businessId,
|
||||
OR: [
|
||||
{
|
||||
economic_code,
|
||||
},
|
||||
},
|
||||
business_activity: {
|
||||
connect: {
|
||||
id: businessId,
|
||||
{
|
||||
postal_code,
|
||||
national_id,
|
||||
},
|
||||
},
|
||||
},
|
||||
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,
|
||||
},
|
||||
})
|
||||
let customerIndividualId: string | undefined = foundedCustomer?.customer_id
|
||||
|
||||
if (!customerLegal) {
|
||||
if (foundedCustomer) {
|
||||
await tx.customerIndividual.update({
|
||||
where: {
|
||||
customer_id: foundedCustomer.customer_id,
|
||||
},
|
||||
data: {
|
||||
...customer.customer_individual,
|
||||
},
|
||||
})
|
||||
} else {
|
||||
const createdCustomer = await tx.customerIndividual.create({
|
||||
data: {
|
||||
...customer.customer_individual,
|
||||
customer: {
|
||||
create: {
|
||||
type: CustomerType.INDIVIDUAL,
|
||||
},
|
||||
},
|
||||
business_activity: {
|
||||
connect: {
|
||||
id: businessId,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
customerIndividualId = createdCustomer.customer_id
|
||||
}
|
||||
|
||||
if (!customerIndividualId) {
|
||||
throw new BadRequestException('متاسفانه مشکلی در اطلاعات مشتری وجود دارد.')
|
||||
}
|
||||
|
||||
return customerLegal.customer_id
|
||||
return customerIndividualId
|
||||
}
|
||||
|
||||
if (customer_type === CustomerType.LEGAL && customer?.customer_legal) {
|
||||
const { registration_number, economic_code, postal_code } = customer.customer_legal
|
||||
const foundedCustomer = await tx.customerLegal.findFirst({
|
||||
where: {
|
||||
business_activity_id: businessId,
|
||||
OR: [
|
||||
{
|
||||
economic_code,
|
||||
},
|
||||
{
|
||||
postal_code,
|
||||
registration_number,
|
||||
},
|
||||
],
|
||||
},
|
||||
select: {
|
||||
customer_id: true,
|
||||
},
|
||||
})
|
||||
let customerLegalId: string | undefined = foundedCustomer?.customer_id
|
||||
|
||||
if (foundedCustomer) {
|
||||
await tx.customerLegal.update({
|
||||
where: {
|
||||
customer_id: foundedCustomer.customer_id,
|
||||
},
|
||||
data: {
|
||||
...customer.customer_legal,
|
||||
},
|
||||
})
|
||||
} else {
|
||||
const createdCustomer = await tx.customerLegal.create({
|
||||
data: {
|
||||
...customer.customer_legal,
|
||||
customer: {
|
||||
create: {
|
||||
type: CustomerType.LEGAL,
|
||||
},
|
||||
},
|
||||
business_activity: {
|
||||
connect: {
|
||||
id: businessId,
|
||||
},
|
||||
},
|
||||
},
|
||||
})
|
||||
|
||||
customerLegalId = createdCustomer.customer_id
|
||||
}
|
||||
|
||||
if (!customerLegalId) {
|
||||
throw new BadRequestException('متاسفانه مشکلی در اطلاعات مشتری وجود دارد.')
|
||||
}
|
||||
|
||||
return customerLegalId
|
||||
}
|
||||
|
||||
return null
|
||||
@@ -382,13 +418,20 @@ export class SharedSaleInvoiceCreateService {
|
||||
main_invoice_id,
|
||||
ref_invoice_id,
|
||||
} = params
|
||||
const { customer_id, customer_type, customer, payments, ...invoiceData } = data
|
||||
const {
|
||||
customer_id,
|
||||
customer_type,
|
||||
customer,
|
||||
payments,
|
||||
settlement_type,
|
||||
...invoiceData
|
||||
} = data
|
||||
|
||||
if (
|
||||
type !== TspProviderRequestType.ORIGINAL &&
|
||||
!(main_invoice_id || ref_invoice_id)
|
||||
) {
|
||||
throw new BadRequestException('متاسفانه مشکلی در اطلاعات فاکتور وجود دارد.')
|
||||
throw new BadRequestException('متاسفانه مشکلی در اطلاعات صورتحساب وجود دارد.')
|
||||
}
|
||||
|
||||
const salesInvoiceData: SalesInvoiceCreateInput = {
|
||||
@@ -396,8 +439,14 @@ export class SharedSaleInvoiceCreateService {
|
||||
invoice_date: normalizedInvoiceDate,
|
||||
invoice_number: invoiceNumber,
|
||||
total_amount: data.total_amount,
|
||||
discount_amount: data.items.reduce(
|
||||
(prev, curr) => (prev += curr.discount_amount),
|
||||
0,
|
||||
),
|
||||
tax_amount: data.items.reduce((prev, curr) => (prev += curr.tax_amount), 0),
|
||||
code: this.generateInvoiceCode(businessId, complexId, posId, invoiceNumber),
|
||||
type,
|
||||
settlement_type,
|
||||
items: {
|
||||
createMany: {
|
||||
data: data.items.map(item => ({
|
||||
@@ -405,17 +454,15 @@ export class SharedSaleInvoiceCreateService {
|
||||
quantity: item.quantity,
|
||||
unit_price: item.unit_price,
|
||||
total_amount: item.total_amount,
|
||||
discount_amount: item.discount_amount,
|
||||
tax_amount: item.tax_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,
|
||||
}),
|
||||
)
|
||||
? JSON.parse(JSON.stringify(goodsById.get(item.good_id) || null))
|
||||
: undefined,
|
||||
})),
|
||||
},
|
||||
|
||||
@@ -0,0 +1,90 @@
|
||||
import { ApiPropertyOptional } from '@nestjs/swagger'
|
||||
import { Type } from 'class-transformer'
|
||||
import {
|
||||
IsDateString,
|
||||
IsEnum,
|
||||
IsNumber,
|
||||
IsOptional,
|
||||
IsString,
|
||||
Min,
|
||||
} from 'class-validator'
|
||||
import { TspProviderResponseStatus } from 'generated/prisma/enums'
|
||||
|
||||
export class SharedSaleInvoicesFilterDto {
|
||||
@ApiPropertyOptional({ default: 1 })
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
@Min(1)
|
||||
page?: number
|
||||
|
||||
@ApiPropertyOptional({ default: 10 })
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
@Min(1)
|
||||
perPage?: number
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
invoice_date_from?: string
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
invoice_date_to?: string
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
created_at_from?: string
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsDateString()
|
||||
created_at_to?: string
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
customer_name?: string
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
customer_mobile?: string
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
customer_national_id?: string
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@IsString()
|
||||
customer_economic_code?: string
|
||||
|
||||
@ApiPropertyOptional({ enum: TspProviderResponseStatus })
|
||||
@IsOptional()
|
||||
@IsEnum(TspProviderResponseStatus)
|
||||
status?: TspProviderResponseStatus
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
total_amount?: number
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
total_amount_from?: number
|
||||
|
||||
@ApiPropertyOptional()
|
||||
@IsOptional()
|
||||
@Type(() => Number)
|
||||
@IsNumber()
|
||||
total_amount_to?: number
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
import { TspProviderResponseStatus } from '@/generated/prisma/enums'
|
||||
import { SalesInvoiceWhereInput } from '@/generated/prisma/models'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { SharedSaleInvoicesFilterDto } from './sale-invoice-filter.dto'
|
||||
|
||||
@Injectable()
|
||||
export class SharedSaleInvoiceFilterService {
|
||||
buildWhere(filter: SharedSaleInvoicesFilterDto): SalesInvoiceWhereInput {
|
||||
const where: SalesInvoiceWhereInput = {}
|
||||
|
||||
if (filter.invoice_date_from || filter.invoice_date_to) {
|
||||
where.invoice_date = {
|
||||
...(filter.invoice_date_from ? { gte: new Date(filter.invoice_date_from) } : {}),
|
||||
...(filter.invoice_date_to ? { lte: new Date(filter.invoice_date_to) } : {}),
|
||||
}
|
||||
}
|
||||
|
||||
if (filter.created_at_from || filter.created_at_to) {
|
||||
where.created_at = {
|
||||
...(filter.created_at_from ? { gte: new Date(filter.created_at_from) } : {}),
|
||||
...(filter.created_at_to ? { lte: new Date(filter.created_at_to) } : {}),
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
filter.total_amount !== undefined ||
|
||||
filter.total_amount_from !== undefined ||
|
||||
filter.total_amount_to !== undefined
|
||||
) {
|
||||
where.total_amount = {
|
||||
...(filter.total_amount !== undefined ? { equals: filter.total_amount } : {}),
|
||||
...(filter.total_amount_from !== undefined
|
||||
? { gte: filter.total_amount_from }
|
||||
: {}),
|
||||
...(filter.total_amount_to !== undefined ? { lte: filter.total_amount_to } : {}),
|
||||
}
|
||||
}
|
||||
|
||||
if (
|
||||
filter.customer_name?.trim() ||
|
||||
filter.customer_mobile?.trim() ||
|
||||
filter.customer_national_id?.trim() ||
|
||||
filter.customer_economic_code?.trim()
|
||||
) {
|
||||
where.customer = {
|
||||
is: {
|
||||
OR: [
|
||||
...(filter.customer_name?.trim()
|
||||
? [
|
||||
{
|
||||
individual: {
|
||||
is: {
|
||||
OR: [
|
||||
{ first_name: { contains: filter.customer_name.trim() } },
|
||||
{ last_name: { contains: filter.customer_name.trim() } },
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
legal: {
|
||||
is: {
|
||||
name: {
|
||||
contains: filter.customer_name.trim(),
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(filter.customer_mobile?.trim()
|
||||
? [
|
||||
{
|
||||
individual: {
|
||||
is: {
|
||||
mobile_number: { contains: filter.customer_mobile.trim() },
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(filter.customer_national_id?.trim()
|
||||
? [
|
||||
{
|
||||
individual: {
|
||||
is: {
|
||||
national_id: { contains: filter.customer_national_id.trim() },
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
: []),
|
||||
...(filter.customer_economic_code?.trim()
|
||||
? [
|
||||
{
|
||||
legal: {
|
||||
is: {
|
||||
OR: [
|
||||
{
|
||||
economic_code: {
|
||||
contains: filter.customer_economic_code.trim(),
|
||||
},
|
||||
},
|
||||
{
|
||||
registration_number: {
|
||||
contains: filter.customer_economic_code.trim(),
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
},
|
||||
]
|
||||
: []),
|
||||
],
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
if (filter.status) {
|
||||
if (filter.status === TspProviderResponseStatus.NOT_SEND) {
|
||||
where.OR = [
|
||||
{
|
||||
last_tsp_status: null,
|
||||
},
|
||||
{
|
||||
last_tsp_status: TspProviderResponseStatus.NOT_SEND,
|
||||
},
|
||||
]
|
||||
} else {
|
||||
where.last_tsp_status = filter.status
|
||||
}
|
||||
}
|
||||
|
||||
return where
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { Injectable } from '@nestjs/common'
|
||||
|
||||
@Injectable()
|
||||
export class SharedSaleInvoicePaginationService {
|
||||
normalize(
|
||||
page: number = 1,
|
||||
perPage: number = 10,
|
||||
defaultPerPage: number = 10,
|
||||
maxPerPage: number = 50,
|
||||
) {
|
||||
const normalizedPageValue = Number(page ?? 1)
|
||||
const normalizedPage = Number.isFinite(normalizedPageValue)
|
||||
? Math.max(1, Math.floor(normalizedPageValue))
|
||||
: 1
|
||||
|
||||
const requestedPerPageValue = Number(perPage ?? defaultPerPage)
|
||||
const requestedPerPage = Number.isFinite(requestedPerPageValue)
|
||||
? Math.max(1, Math.floor(requestedPerPageValue))
|
||||
: defaultPerPage
|
||||
const normalizedPerPage = Math.min(requestedPerPage, maxPerPage)
|
||||
|
||||
return {
|
||||
page: normalizedPage,
|
||||
perPage: normalizedPerPage,
|
||||
skip: (normalizedPage - 1) * normalizedPerPage,
|
||||
take: normalizedPerPage,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
import dayjs, { Dayjs } from 'dayjs'
|
||||
import 'dayjs/locale/fa'
|
||||
import relativeTime from 'dayjs/plugin/relativeTime'
|
||||
import jalaliPlugin from 'jalaliday/dayjs'
|
||||
|
||||
dayjs.extend(jalaliPlugin)
|
||||
dayjs.extend(relativeTime)
|
||||
|
||||
export function toJalali(date: string | number | Date | Dayjs): Date {
|
||||
return dayjs(date).calendar('jalali').toDate()
|
||||
}
|
||||
|
||||
export function toGregorian(date: string | number | Date | Dayjs): Date {
|
||||
return dayjs(date).calendar('gregory').toDate()
|
||||
}
|
||||
|
||||
export function getCurrentJalaliSeasonStart(
|
||||
baseDate: string | number | Date | Dayjs = dayjs(),
|
||||
): Date {
|
||||
const date = dayjs(baseDate).calendar('jalali')
|
||||
const month = date.month() + 1
|
||||
const seasonStartMonth = Math.floor((month - 1) / 3) * 3 + 1
|
||||
return date
|
||||
.month(seasonStartMonth - 1)
|
||||
.startOf('month')
|
||||
.startOf('day')
|
||||
.toDate()
|
||||
}
|
||||
|
||||
export function getCurrentJalaliSeasonEnd(
|
||||
baseDate: string | number | Date | Dayjs = dayjs(),
|
||||
): Date {
|
||||
return dayjs(getCurrentJalaliSeasonStart(baseDate))
|
||||
.add(3, 'month')
|
||||
.endOf('month')
|
||||
.endOf('day')
|
||||
.toDate()
|
||||
}
|
||||
|
||||
export function getCurrentGregorianSeasonStart(
|
||||
baseDate: string | number | Date | Dayjs = dayjs(),
|
||||
): Date {
|
||||
const date = dayjs(baseDate).calendar('gregory')
|
||||
const month = date.month() + 1
|
||||
const seasonStartMonth = Math.floor((month - 1) / 3) * 3 + 1
|
||||
return date
|
||||
.month(seasonStartMonth - 1)
|
||||
.startOf('month')
|
||||
.startOf('day')
|
||||
.toDate()
|
||||
}
|
||||
|
||||
export function getCurrentGregorianSeasonEnd(
|
||||
baseDate: string | number | Date | Dayjs = dayjs(),
|
||||
): Date {
|
||||
return dayjs(getCurrentGregorianSeasonStart(baseDate))
|
||||
.add(2, 'month')
|
||||
.endOf('month')
|
||||
.endOf('day')
|
||||
.toDate()
|
||||
}
|
||||
|
||||
export function getCurrentJalaliSeasonRange(
|
||||
baseDate: string | number | Date | Dayjs = dayjs(),
|
||||
): { start: Date; end: Date } {
|
||||
return {
|
||||
start: getCurrentJalaliSeasonStart(baseDate),
|
||||
end: getCurrentJalaliSeasonEnd(baseDate),
|
||||
}
|
||||
}
|
||||
|
||||
export function getCurrentGregorianSeasonRange(
|
||||
baseDate: string | number | Date | Dayjs = dayjs(),
|
||||
): { start: Date; end: Date } {
|
||||
return {
|
||||
start: getCurrentGregorianSeasonStart(baseDate),
|
||||
end: getCurrentGregorianSeasonEnd(baseDate),
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
toJalali,
|
||||
toGregorian,
|
||||
getCurrentJalaliSeasonStart,
|
||||
getCurrentJalaliSeasonEnd,
|
||||
getCurrentGregorianSeasonStart,
|
||||
getCurrentGregorianSeasonEnd,
|
||||
getCurrentJalaliSeasonRange,
|
||||
getCurrentGregorianSeasonRange,
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Matches, MinLength } from 'class-validator'
|
||||
|
||||
const MIN_LENGTH = 6
|
||||
const REGEX = /^[a-zA-Z0-9]*$/
|
||||
|
||||
export const FiscalIdFieldValidator = () =>
|
||||
function (target: object, propertyKey: string) {
|
||||
MinLength(MIN_LENGTH, {
|
||||
message: `شناسه یکتا باید حداقل ${MIN_LENGTH} کاراکتر باشد`,
|
||||
})(target, propertyKey)
|
||||
Matches(REGEX, {
|
||||
message: 'شناسه یکتا فقط میتواند شامل حروف و اعداد باشد',
|
||||
})(target, propertyKey)
|
||||
}
|
||||
@@ -0,0 +1,3 @@
|
||||
export { FiscalIdFieldValidator } from './fiscalId-validator'
|
||||
export { PasswordFieldValidator, PASSWORD_MIN_LENGTH } from './password'
|
||||
export { UsernameFieldValidator } from './username'
|
||||
@@ -0,0 +1,10 @@
|
||||
import { MinLength } from 'class-validator'
|
||||
|
||||
export const PASSWORD_MIN_LENGTH = 6
|
||||
|
||||
export const PasswordFieldValidator = () =>
|
||||
function (target: object, propertyKey: string) {
|
||||
MinLength(PASSWORD_MIN_LENGTH, {
|
||||
message: `رمز عبور باید حداقل ${PASSWORD_MIN_LENGTH} کاراکتر باشد`,
|
||||
})(target, propertyKey)
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
import { Matches, MinLength } from 'class-validator'
|
||||
|
||||
const USERNAME_REGEX = /^[a-zA-Z0-9_-]*$/
|
||||
const USERNAME_MIN_LENGTH = 6
|
||||
|
||||
export const UsernameFieldValidator = () =>
|
||||
function (target: object, propertyKey: string) {
|
||||
MinLength(USERNAME_MIN_LENGTH, {
|
||||
message: `نام کاربری باید حداقل ${USERNAME_MIN_LENGTH} کاراکتر باشد`,
|
||||
})(target, propertyKey)
|
||||
Matches(USERNAME_REGEX, {
|
||||
message: 'نام کاربری فقط میتواند شامل حروف، اعداد، زیرخط و خط تیره باشد',
|
||||
})(target, propertyKey)
|
||||
}
|
||||
@@ -1,4 +1,6 @@
|
||||
export * from './date-formatter.utils'
|
||||
export * from './enum-translator.util'
|
||||
export * from './field-validator.util'
|
||||
export * from './http-client.util'
|
||||
export * from './jwt-user.util'
|
||||
export * from './mappers/consumer_mappers.util'
|
||||
|
||||
@@ -18,13 +18,13 @@ export function checkAndDecodeJwtToken(
|
||||
token = authHeader.slice(7)
|
||||
}
|
||||
}
|
||||
if (!token) throw new UnauthorizedException('Missing accessToken cookie')
|
||||
if (!token) throw new UnauthorizedException('توکن احراز هویت ارسال نشده است')
|
||||
|
||||
try {
|
||||
const payload = jwtService.decode(token) as AccessTokenPayload
|
||||
|
||||
return payload as ITokenPayload
|
||||
} catch {
|
||||
return null
|
||||
throw new UnauthorizedException('توکن احراز هویت نامعتبر است')
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
export class ConsumerKeyMaker {
|
||||
static middleware(token: string): string {
|
||||
return `consumer:middleware:${token}`
|
||||
}
|
||||
|
||||
static consumerInfo(consumerId: string): string {
|
||||
return `consumers:${consumerId}:info`
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@ import { EnumKeyMaker } from './enum'
|
||||
import { GuildKeyMaker } from './guild'
|
||||
import { PartnerKeyMaker } from './partner'
|
||||
import { PosKeyMaker } from './pos'
|
||||
import { PublicSaleInvoiceKeyMaker } from './publicSaleInvoice'
|
||||
|
||||
// Keep backward-compatible static methods while separating key builders by domain.
|
||||
export class RedisKeyMaker extends PartnerKeyMaker {
|
||||
@@ -13,18 +14,23 @@ export class RedisKeyMaker extends PartnerKeyMaker {
|
||||
static pos = PosKeyMaker
|
||||
|
||||
static consumerInfo = ConsumerKeyMaker.consumerInfo
|
||||
static consumerMiddleware = ConsumerKeyMaker.middleware
|
||||
static consumerBusinessActivitiesList = ConsumerKeyMaker.consumerBusinessActivitiesList
|
||||
static consumerBusinessActivityInfo = ConsumerKeyMaker.consumerBusinessActivityInfo
|
||||
|
||||
static guildStockKeepingUnitsList = GuildKeyMaker.guildStockKeepingUnitsList
|
||||
static guildGoodsList = GuildKeyMaker.guildGoodsList
|
||||
|
||||
static posInfo = PosKeyMaker.posInfo
|
||||
static posMe = PosKeyMaker.posMe
|
||||
static posGoodsList = PosKeyMaker.posGoodsList
|
||||
static posMiddleware = PosKeyMaker.middleware
|
||||
static partnerMiddleware = PartnerKeyMaker.middleware
|
||||
static posInfo = PosKeyMaker.info
|
||||
static posMe = PosKeyMaker.me
|
||||
static posGoodsList = PosKeyMaker.goodList
|
||||
|
||||
static enumsAll = EnumKeyMaker.enumsAll
|
||||
static enumsValues = EnumKeyMaker.enumsValues
|
||||
|
||||
static publicSaleInvoice = PublicSaleInvoiceKeyMaker.invoice
|
||||
}
|
||||
|
||||
export { ConsumerKeyMaker, EnumKeyMaker, GuildKeyMaker, PartnerKeyMaker, PosKeyMaker }
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
export class PartnerKeyMaker {
|
||||
static middleware(token): string {
|
||||
return `partner:middleware:${token}`
|
||||
}
|
||||
|
||||
static partnersList(): string {
|
||||
return 'partners:list'
|
||||
}
|
||||
|
||||
@@ -1,13 +1,67 @@
|
||||
export class PosKeyMaker {
|
||||
static posInfo(posId: string): string {
|
||||
static middleware(token: string): string {
|
||||
return `pos:${token}:middleware`
|
||||
}
|
||||
|
||||
static info(posId: string): string {
|
||||
return `pos:${posId}:info`
|
||||
}
|
||||
|
||||
static posMe(accountId: string, posId: string): string {
|
||||
static me(accountId: string, posId: string): string {
|
||||
return `pos:${posId}:me:${accountId}`
|
||||
}
|
||||
|
||||
static posGoodsList(businessActivityId: string, guildId: string): string {
|
||||
return `pos:ba:${businessActivityId}:guild:${guildId}:goods:list`
|
||||
static goodList(guildId: string, businessActivityId: string): string {
|
||||
return `pos:goods:list:guildId:${guildId}:ba:${businessActivityId}`
|
||||
}
|
||||
|
||||
static goodListByGuildPattern(guildId: string): string {
|
||||
return `pos:goods:list:guildId:${guildId}:ba:*`
|
||||
}
|
||||
|
||||
static statisticInvoicesPattern(businessActivityId: string): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:*`
|
||||
}
|
||||
static statisticInvoices(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:all`
|
||||
}
|
||||
static statisticInvoicesNotSent(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:not-sent`
|
||||
}
|
||||
static statisticInvoicesSuccess(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:success`
|
||||
}
|
||||
static statisticInvoicesFailure(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:failure`
|
||||
}
|
||||
static statisticInvoicesPending(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:pending`
|
||||
}
|
||||
static statisticInvoicesCredit(
|
||||
businessActivityId: string,
|
||||
posId: string,
|
||||
from: string,
|
||||
): string {
|
||||
return `pos:statistics:invoices:ba:${businessActivityId}:pos:${posId}:from:${from}:credit`
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export class PublicSaleInvoiceKeyMaker {
|
||||
static invoice(id: string): string {
|
||||
return `publicSaleInvoices:${id}`
|
||||
}
|
||||
}
|
||||
@@ -167,6 +167,11 @@ export type Complex = Prisma.ComplexModel
|
||||
*
|
||||
*/
|
||||
export type Pos = Prisma.PosModel
|
||||
/**
|
||||
* Model ConsumerAccountGoodFavorite
|
||||
*
|
||||
*/
|
||||
export type ConsumerAccountGoodFavorite = Prisma.ConsumerAccountGoodFavoriteModel
|
||||
/**
|
||||
* Model Good
|
||||
*
|
||||
|
||||
@@ -189,6 +189,11 @@ export type Complex = Prisma.ComplexModel
|
||||
*
|
||||
*/
|
||||
export type Pos = Prisma.PosModel
|
||||
/**
|
||||
* Model ConsumerAccountGoodFavorite
|
||||
*
|
||||
*/
|
||||
export type ConsumerAccountGoodFavorite = Prisma.ConsumerAccountGoodFavoriteModel
|
||||
/**
|
||||
* Model Good
|
||||
*
|
||||
|
||||
@@ -623,6 +623,31 @@ export type EnumTspProviderRequestTypeFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||
}
|
||||
|
||||
export type EnumInvoiceSettlementTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.InvoiceSettlementType | Prisma.EnumInvoiceSettlementTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.InvoiceSettlementType[]
|
||||
notIn?: $Enums.InvoiceSettlementType[]
|
||||
not?: Prisma.NestedEnumInvoiceSettlementTypeFilter<$PrismaModel> | $Enums.InvoiceSettlementType
|
||||
}
|
||||
|
||||
export type EnumTspProviderResponseStatusNullableFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.TspProviderResponseStatus[] | null
|
||||
notIn?: $Enums.TspProviderResponseStatus[] | null
|
||||
not?: Prisma.NestedEnumTspProviderResponseStatusNullableFilter<$PrismaModel> | $Enums.TspProviderResponseStatus | null
|
||||
}
|
||||
|
||||
export type IntNullableFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntNullableFilter<$PrismaModel> | number | null
|
||||
}
|
||||
|
||||
export type EnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderRequestType[]
|
||||
@@ -633,6 +658,42 @@ export type EnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel = never>
|
||||
_max?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumInvoiceSettlementTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.InvoiceSettlementType | Prisma.EnumInvoiceSettlementTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.InvoiceSettlementType[]
|
||||
notIn?: $Enums.InvoiceSettlementType[]
|
||||
not?: Prisma.NestedEnumInvoiceSettlementTypeWithAggregatesFilter<$PrismaModel> | $Enums.InvoiceSettlementType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumInvoiceSettlementTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumInvoiceSettlementTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type EnumTspProviderResponseStatusNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.TspProviderResponseStatus[] | null
|
||||
notIn?: $Enums.TspProviderResponseStatus[] | null
|
||||
not?: Prisma.NestedEnumTspProviderResponseStatusNullableWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderResponseStatus | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTspProviderResponseStatusNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTspProviderResponseStatusNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type IntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type JsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<JsonFilterBase<$PrismaModel>>, Exclude<keyof Required<JsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
@@ -1317,6 +1378,20 @@ export type NestedEnumTspProviderRequestTypeFilter<$PrismaModel = never> = {
|
||||
not?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel> | $Enums.TspProviderRequestType
|
||||
}
|
||||
|
||||
export type NestedEnumInvoiceSettlementTypeFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.InvoiceSettlementType | Prisma.EnumInvoiceSettlementTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.InvoiceSettlementType[]
|
||||
notIn?: $Enums.InvoiceSettlementType[]
|
||||
not?: Prisma.NestedEnumInvoiceSettlementTypeFilter<$PrismaModel> | $Enums.InvoiceSettlementType
|
||||
}
|
||||
|
||||
export type NestedEnumTspProviderResponseStatusNullableFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.TspProviderResponseStatus[] | null
|
||||
notIn?: $Enums.TspProviderResponseStatus[] | null
|
||||
not?: Prisma.NestedEnumTspProviderResponseStatusNullableFilter<$PrismaModel> | $Enums.TspProviderResponseStatus | null
|
||||
}
|
||||
|
||||
export type NestedEnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderRequestType | Prisma.EnumTspProviderRequestTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.TspProviderRequestType[]
|
||||
@@ -1327,6 +1402,53 @@ export type NestedEnumTspProviderRequestTypeWithAggregatesFilter<$PrismaModel =
|
||||
_max?: Prisma.NestedEnumTspProviderRequestTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumInvoiceSettlementTypeWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.InvoiceSettlementType | Prisma.EnumInvoiceSettlementTypeFieldRefInput<$PrismaModel>
|
||||
in?: $Enums.InvoiceSettlementType[]
|
||||
notIn?: $Enums.InvoiceSettlementType[]
|
||||
not?: Prisma.NestedEnumInvoiceSettlementTypeWithAggregatesFilter<$PrismaModel> | $Enums.InvoiceSettlementType
|
||||
_count?: Prisma.NestedIntFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumInvoiceSettlementTypeFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumInvoiceSettlementTypeFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedEnumTspProviderResponseStatusNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: $Enums.TspProviderResponseStatus | Prisma.EnumTspProviderResponseStatusFieldRefInput<$PrismaModel> | null
|
||||
in?: $Enums.TspProviderResponseStatus[] | null
|
||||
notIn?: $Enums.TspProviderResponseStatus[] | null
|
||||
not?: Prisma.NestedEnumTspProviderResponseStatusNullableWithAggregatesFilter<$PrismaModel> | $Enums.TspProviderResponseStatus | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedEnumTspProviderResponseStatusNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedEnumTspProviderResponseStatusNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedIntNullableWithAggregatesFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.IntFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.IntFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedIntNullableWithAggregatesFilter<$PrismaModel> | number | null
|
||||
_count?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_avg?: Prisma.NestedFloatNullableFilter<$PrismaModel>
|
||||
_sum?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_min?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
_max?: Prisma.NestedIntNullableFilter<$PrismaModel>
|
||||
}
|
||||
|
||||
export type NestedFloatNullableFilter<$PrismaModel = never> = {
|
||||
equals?: number | Prisma.FloatFieldRefInput<$PrismaModel> | null
|
||||
in?: number[] | null
|
||||
notIn?: number[] | null
|
||||
lt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
lte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gt?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
gte?: number | Prisma.FloatFieldRefInput<$PrismaModel>
|
||||
not?: Prisma.NestedFloatNullableFilter<$PrismaModel> | number | null
|
||||
}
|
||||
|
||||
export type NestedJsonFilter<$PrismaModel = never> =
|
||||
| Prisma.PatchUndefined<
|
||||
Prisma.Either<Required<NestedJsonFilterBase<$PrismaModel>>, Exclude<keyof Required<NestedJsonFilterBase<$PrismaModel>>, 'path'>>,
|
||||
|
||||
@@ -23,19 +23,6 @@ export const PaymentMethodType = {
|
||||
export type PaymentMethodType = (typeof PaymentMethodType)[keyof typeof PaymentMethodType]
|
||||
|
||||
|
||||
export const UnitType = {
|
||||
COUNT: 'COUNT',
|
||||
GRAM: 'GRAM',
|
||||
KILOGRAM: 'KILOGRAM',
|
||||
MILLILITER: 'MILLILITER',
|
||||
LITER: 'LITER',
|
||||
METER: 'METER',
|
||||
HOUR: 'HOUR'
|
||||
} as const
|
||||
|
||||
export type UnitType = (typeof UnitType)[keyof typeof UnitType]
|
||||
|
||||
|
||||
export const GoodPricingModel = {
|
||||
STANDARD: 'STANDARD',
|
||||
GOLD: 'GOLD'
|
||||
@@ -85,24 +72,6 @@ export const BusinessRole = {
|
||||
export type BusinessRole = (typeof BusinessRole)[keyof typeof BusinessRole]
|
||||
|
||||
|
||||
export const LicenseType = {
|
||||
BASIC: 'BASIC',
|
||||
PRO: 'PRO',
|
||||
ENTERPRISE: 'ENTERPRISE'
|
||||
} as const
|
||||
|
||||
export type LicenseType = (typeof LicenseType)[keyof typeof LicenseType]
|
||||
|
||||
|
||||
export const LicenseStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
EXPIRED: 'EXPIRED',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
} as const
|
||||
|
||||
export type LicenseStatus = (typeof LicenseStatus)[keyof typeof LicenseStatus]
|
||||
|
||||
|
||||
export const POSType = {
|
||||
PSP: 'PSP',
|
||||
MOBILE: 'MOBILE',
|
||||
@@ -113,14 +82,6 @@ export const POSType = {
|
||||
export type POSType = (typeof POSType)[keyof typeof POSType]
|
||||
|
||||
|
||||
export const UserType = {
|
||||
LEGAL: 'LEGAL',
|
||||
INDIVIDUAL: 'INDIVIDUAL'
|
||||
} as const
|
||||
|
||||
export type UserType = (typeof UserType)[keyof typeof UserType]
|
||||
|
||||
|
||||
export const AccountType = {
|
||||
ADMIN: 'ADMIN',
|
||||
PROVIDER: 'PROVIDER',
|
||||
@@ -131,23 +92,6 @@ export const AccountType = {
|
||||
export type AccountType = (typeof AccountType)[keyof typeof AccountType]
|
||||
|
||||
|
||||
export const UserStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
INACTIVE: 'INACTIVE'
|
||||
} as const
|
||||
|
||||
export type UserStatus = (typeof UserStatus)[keyof typeof UserStatus]
|
||||
|
||||
|
||||
export const AccountRole = {
|
||||
OWNER: 'OWNER',
|
||||
OPERATOR: 'OPERATOR',
|
||||
ACCOUNTANT: 'ACCOUNTANT'
|
||||
} as const
|
||||
|
||||
export type AccountRole = (typeof AccountRole)[keyof typeof AccountRole]
|
||||
|
||||
|
||||
export const AccountStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
@@ -182,14 +126,6 @@ export const ProviderRole = {
|
||||
export type ProviderRole = (typeof ProviderRole)[keyof typeof ProviderRole]
|
||||
|
||||
|
||||
export const ProviderStatus = {
|
||||
ACTIVE: 'ACTIVE',
|
||||
SUSPENDED: 'SUSPENDED'
|
||||
} as const
|
||||
|
||||
export type ProviderStatus = (typeof ProviderStatus)[keyof typeof ProviderStatus]
|
||||
|
||||
|
||||
export const ConsumerRole = {
|
||||
OWNER: 'OWNER',
|
||||
MANAGER: 'MANAGER',
|
||||
@@ -207,14 +143,6 @@ export const ConsumerStatus = {
|
||||
export type ConsumerStatus = (typeof ConsumerStatus)[keyof typeof ConsumerStatus]
|
||||
|
||||
|
||||
export const TokenType = {
|
||||
ACCESS: 'ACCESS',
|
||||
REFRESH: 'REFRESH'
|
||||
} as const
|
||||
|
||||
export type TokenType = (typeof TokenType)[keyof typeof TokenType]
|
||||
|
||||
|
||||
export const ApplicationPlatform = {
|
||||
ANDROID: 'ANDROID',
|
||||
IOS: 'IOS'
|
||||
@@ -232,15 +160,6 @@ export const ApplicationReleaseType = {
|
||||
export type ApplicationReleaseType = (typeof ApplicationReleaseType)[keyof typeof ApplicationReleaseType]
|
||||
|
||||
|
||||
export const ApplicationPublisher = {
|
||||
DIRECT: 'DIRECT',
|
||||
CAFE_BAZAR: 'CAFE_BAZAR',
|
||||
MAYKET: 'MAYKET'
|
||||
} as const
|
||||
|
||||
export type ApplicationPublisher = (typeof ApplicationPublisher)[keyof typeof ApplicationPublisher]
|
||||
|
||||
|
||||
export const ConsumerType = {
|
||||
INDIVIDUAL: 'INDIVIDUAL',
|
||||
LEGAL: 'LEGAL'
|
||||
@@ -249,6 +168,15 @@ export const ConsumerType = {
|
||||
export type ConsumerType = (typeof ConsumerType)[keyof typeof ConsumerType]
|
||||
|
||||
|
||||
export const InvoiceSettlementType = {
|
||||
CASH: 'CASH',
|
||||
CREDIT: 'CREDIT',
|
||||
MIXED: 'MIXED'
|
||||
} as const
|
||||
|
||||
export type InvoiceSettlementType = (typeof InvoiceSettlementType)[keyof typeof InvoiceSettlementType]
|
||||
|
||||
|
||||
export const TspProviderType = {
|
||||
NAMA: 'NAMA',
|
||||
SUN: 'SUN'
|
||||
@@ -258,10 +186,12 @@ export type TspProviderType = (typeof TspProviderType)[keyof typeof TspProviderT
|
||||
|
||||
|
||||
export const TspProviderResponseStatus = {
|
||||
SUCCESS: 'SUCCESS',
|
||||
FAILURE: 'FAILURE',
|
||||
NOT_SEND: 'NOT_SEND',
|
||||
QUEUED: 'QUEUED'
|
||||
QUEUED: 'QUEUED',
|
||||
FISCAL_QUEUED: 'FISCAL_QUEUED',
|
||||
SEND_FAILURE: 'SEND_FAILURE',
|
||||
SUCCESS: 'SUCCESS',
|
||||
FAILURE: 'FAILURE'
|
||||
} as const
|
||||
|
||||
export type TspProviderResponseStatus = (typeof TspProviderResponseStatus)[keyof typeof TspProviderResponseStatus]
|
||||
@@ -277,21 +207,6 @@ export const TspProviderRequestType = {
|
||||
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',
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -414,6 +414,7 @@ export const ModelName = {
|
||||
BusinessActivity: 'BusinessActivity',
|
||||
Complex: 'Complex',
|
||||
Pos: 'Pos',
|
||||
ConsumerAccountGoodFavorite: 'ConsumerAccountGoodFavorite',
|
||||
Good: 'Good',
|
||||
GoodCategory: 'GoodCategory',
|
||||
Guild: 'Guild',
|
||||
@@ -445,7 +446,7 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
omit: GlobalOmitOptions
|
||||
}
|
||||
meta: {
|
||||
modelProps: "adminAccount" | "admin" | "account" | "deviceBrand" | "device" | "licenseChargeTransaction" | "license" | "licenseActivation" | "licenseRenewChargeTransaction" | "licenseRenew" | "partnerAccountQuotaChargeTransaction" | "partnerAccountQuotaCredit" | "licenseAccountAllocation" | "partnerAccount" | "partner" | "permissionConsumer" | "permissionPos" | "permissionComplex" | "permissionBusiness" | "providerAccount" | "provider" | "consumerAccountDevice" | "applicationReleasedInfo" | "consumerAccount" | "consumer" | "consumerIndividual" | "consumerLegal" | "businessActivity" | "complex" | "pos" | "good" | "goodCategory" | "guild" | "measureUnits" | "stockKeepingUnits" | "triggerLog" | "customer" | "customerIndividual" | "customerLegal" | "salesInvoice" | "salesInvoiceItem" | "saleInvoiceTspAttempts" | "salesInvoicePayment" | "salesInvoicePaymentTerminalInfo" | "service" | "serviceCategory"
|
||||
modelProps: "adminAccount" | "admin" | "account" | "deviceBrand" | "device" | "licenseChargeTransaction" | "license" | "licenseActivation" | "licenseRenewChargeTransaction" | "licenseRenew" | "partnerAccountQuotaChargeTransaction" | "partnerAccountQuotaCredit" | "licenseAccountAllocation" | "partnerAccount" | "partner" | "permissionConsumer" | "permissionPos" | "permissionComplex" | "permissionBusiness" | "providerAccount" | "provider" | "consumerAccountDevice" | "applicationReleasedInfo" | "consumerAccount" | "consumer" | "consumerIndividual" | "consumerLegal" | "businessActivity" | "complex" | "pos" | "consumerAccountGoodFavorite" | "good" | "goodCategory" | "guild" | "measureUnits" | "stockKeepingUnits" | "triggerLog" | "customer" | "customerIndividual" | "customerLegal" | "salesInvoice" | "salesInvoiceItem" | "saleInvoiceTspAttempts" | "salesInvoicePayment" | "salesInvoicePaymentTerminalInfo" | "service" | "serviceCategory"
|
||||
txIsolationLevel: TransactionIsolationLevel
|
||||
}
|
||||
model: {
|
||||
@@ -2429,6 +2430,72 @@ export type TypeMap<ExtArgs extends runtime.Types.Extensions.InternalArgs = runt
|
||||
}
|
||||
}
|
||||
}
|
||||
ConsumerAccountGoodFavorite: {
|
||||
payload: Prisma.$ConsumerAccountGoodFavoritePayload<ExtArgs>
|
||||
fields: Prisma.ConsumerAccountGoodFavoriteFieldRefs
|
||||
operations: {
|
||||
findUnique: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteFindUniqueArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$ConsumerAccountGoodFavoritePayload> | null
|
||||
}
|
||||
findUniqueOrThrow: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteFindUniqueOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$ConsumerAccountGoodFavoritePayload>
|
||||
}
|
||||
findFirst: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteFindFirstArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$ConsumerAccountGoodFavoritePayload> | null
|
||||
}
|
||||
findFirstOrThrow: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteFindFirstOrThrowArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$ConsumerAccountGoodFavoritePayload>
|
||||
}
|
||||
findMany: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteFindManyArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$ConsumerAccountGoodFavoritePayload>[]
|
||||
}
|
||||
create: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteCreateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$ConsumerAccountGoodFavoritePayload>
|
||||
}
|
||||
createMany: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteCreateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
delete: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteDeleteArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$ConsumerAccountGoodFavoritePayload>
|
||||
}
|
||||
update: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteUpdateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$ConsumerAccountGoodFavoritePayload>
|
||||
}
|
||||
deleteMany: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteDeleteManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
updateMany: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteUpdateManyArgs<ExtArgs>
|
||||
result: BatchPayload
|
||||
}
|
||||
upsert: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteUpsertArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.PayloadToResult<Prisma.$ConsumerAccountGoodFavoritePayload>
|
||||
}
|
||||
aggregate: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteAggregateArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.AggregateConsumerAccountGoodFavorite>
|
||||
}
|
||||
groupBy: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteGroupByArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.ConsumerAccountGoodFavoriteGroupByOutputType>[]
|
||||
}
|
||||
count: {
|
||||
args: Prisma.ConsumerAccountGoodFavoriteCountArgs<ExtArgs>
|
||||
result: runtime.Types.Utils.Optional<Prisma.ConsumerAccountGoodFavoriteCountAggregateOutputType> | number
|
||||
}
|
||||
}
|
||||
}
|
||||
Good: {
|
||||
payload: Prisma.$GoodPayload<ExtArgs>
|
||||
fields: Prisma.GoodFieldRefs
|
||||
@@ -3890,6 +3957,15 @@ export const PosScalarFieldEnum = {
|
||||
export type PosScalarFieldEnum = (typeof PosScalarFieldEnum)[keyof typeof PosScalarFieldEnum]
|
||||
|
||||
|
||||
export const ConsumerAccountGoodFavoriteScalarFieldEnum = {
|
||||
created_at: 'created_at',
|
||||
consumer_account_id: 'consumer_account_id',
|
||||
good_id: 'good_id'
|
||||
} as const
|
||||
|
||||
export type ConsumerAccountGoodFavoriteScalarFieldEnum = (typeof ConsumerAccountGoodFavoriteScalarFieldEnum)[keyof typeof ConsumerAccountGoodFavoriteScalarFieldEnum]
|
||||
|
||||
|
||||
export const GoodScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -4030,7 +4106,12 @@ export const SalesInvoiceScalarFieldEnum = {
|
||||
ref_id: 'ref_id',
|
||||
customer_id: 'customer_id',
|
||||
consumer_account_id: 'consumer_account_id',
|
||||
pos_id: 'pos_id'
|
||||
pos_id: 'pos_id',
|
||||
settlement_type: 'settlement_type',
|
||||
discount_amount: 'discount_amount',
|
||||
tax_amount: 'tax_amount',
|
||||
last_tsp_status: 'last_tsp_status',
|
||||
last_attempt_no: 'last_attempt_no'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||
@@ -4052,7 +4133,9 @@ export const SalesInvoiceItemScalarFieldEnum = {
|
||||
good_snapshot: 'good_snapshot',
|
||||
invoice_id: 'invoice_id',
|
||||
good_id: 'good_id',
|
||||
service_id: 'service_id'
|
||||
service_id: 'service_id',
|
||||
discount_amount: 'discount_amount',
|
||||
tax_amount: 'tax_amount'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
||||
@@ -4062,14 +4145,17 @@ 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'
|
||||
invoice_id: 'invoice_id',
|
||||
provider_request_payload: 'provider_request_payload',
|
||||
raw_request_payload: 'raw_request_payload',
|
||||
error_message: 'error_message',
|
||||
fiscal_warnings: 'fiscal_warnings',
|
||||
provider_response: 'provider_response',
|
||||
validation_errors: 'validation_errors'
|
||||
} as const
|
||||
|
||||
export type SaleInvoiceTspAttemptsScalarFieldEnum = (typeof SaleInvoiceTspAttemptsScalarFieldEnum)[keyof typeof SaleInvoiceTspAttemptsScalarFieldEnum]
|
||||
@@ -4469,6 +4555,14 @@ export const PosOrderByRelevanceFieldEnum = {
|
||||
export type PosOrderByRelevanceFieldEnum = (typeof PosOrderByRelevanceFieldEnum)[keyof typeof PosOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ConsumerAccountGoodFavoriteOrderByRelevanceFieldEnum = {
|
||||
consumer_account_id: 'consumer_account_id',
|
||||
good_id: 'good_id'
|
||||
} as const
|
||||
|
||||
export type ConsumerAccountGoodFavoriteOrderByRelevanceFieldEnum = (typeof ConsumerAccountGoodFavoriteOrderByRelevanceFieldEnum)[keyof typeof ConsumerAccountGoodFavoriteOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const GoodOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -4598,7 +4692,8 @@ export type SalesInvoiceItemOrderByRelevanceFieldEnum = (typeof SalesInvoiceItem
|
||||
export const SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
message: 'message',
|
||||
invoice_id: 'invoice_id'
|
||||
invoice_id: 'invoice_id',
|
||||
error_message: 'error_message'
|
||||
} as const
|
||||
|
||||
export type SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = (typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum)[keyof typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum]
|
||||
@@ -4847,6 +4942,13 @@ export type EnumTspProviderRequestTypeFieldRefInput<$PrismaModel> = FieldRefInpu
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'InvoiceSettlementType'
|
||||
*/
|
||||
export type EnumInvoiceSettlementTypeFieldRefInput<$PrismaModel> = FieldRefInputType<$PrismaModel, 'InvoiceSettlementType'>
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Reference to a field of type 'TspProviderResponseStatus'
|
||||
*/
|
||||
@@ -4992,6 +5094,7 @@ export type GlobalOmitConfig = {
|
||||
businessActivity?: Prisma.BusinessActivityOmit
|
||||
complex?: Prisma.ComplexOmit
|
||||
pos?: Prisma.PosOmit
|
||||
consumerAccountGoodFavorite?: Prisma.ConsumerAccountGoodFavoriteOmit
|
||||
good?: Prisma.GoodOmit
|
||||
goodCategory?: Prisma.GoodCategoryOmit
|
||||
guild?: Prisma.GuildOmit
|
||||
|
||||
@@ -81,6 +81,7 @@ export const ModelName = {
|
||||
BusinessActivity: 'BusinessActivity',
|
||||
Complex: 'Complex',
|
||||
Pos: 'Pos',
|
||||
ConsumerAccountGoodFavorite: 'ConsumerAccountGoodFavorite',
|
||||
Good: 'Good',
|
||||
GoodCategory: 'GoodCategory',
|
||||
Guild: 'Guild',
|
||||
@@ -481,6 +482,15 @@ export const PosScalarFieldEnum = {
|
||||
export type PosScalarFieldEnum = (typeof PosScalarFieldEnum)[keyof typeof PosScalarFieldEnum]
|
||||
|
||||
|
||||
export const ConsumerAccountGoodFavoriteScalarFieldEnum = {
|
||||
created_at: 'created_at',
|
||||
consumer_account_id: 'consumer_account_id',
|
||||
good_id: 'good_id'
|
||||
} as const
|
||||
|
||||
export type ConsumerAccountGoodFavoriteScalarFieldEnum = (typeof ConsumerAccountGoodFavoriteScalarFieldEnum)[keyof typeof ConsumerAccountGoodFavoriteScalarFieldEnum]
|
||||
|
||||
|
||||
export const GoodScalarFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -621,7 +631,12 @@ export const SalesInvoiceScalarFieldEnum = {
|
||||
ref_id: 'ref_id',
|
||||
customer_id: 'customer_id',
|
||||
consumer_account_id: 'consumer_account_id',
|
||||
pos_id: 'pos_id'
|
||||
pos_id: 'pos_id',
|
||||
settlement_type: 'settlement_type',
|
||||
discount_amount: 'discount_amount',
|
||||
tax_amount: 'tax_amount',
|
||||
last_tsp_status: 'last_tsp_status',
|
||||
last_attempt_no: 'last_attempt_no'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceScalarFieldEnum = (typeof SalesInvoiceScalarFieldEnum)[keyof typeof SalesInvoiceScalarFieldEnum]
|
||||
@@ -643,7 +658,9 @@ export const SalesInvoiceItemScalarFieldEnum = {
|
||||
good_snapshot: 'good_snapshot',
|
||||
invoice_id: 'invoice_id',
|
||||
good_id: 'good_id',
|
||||
service_id: 'service_id'
|
||||
service_id: 'service_id',
|
||||
discount_amount: 'discount_amount',
|
||||
tax_amount: 'tax_amount'
|
||||
} as const
|
||||
|
||||
export type SalesInvoiceItemScalarFieldEnum = (typeof SalesInvoiceItemScalarFieldEnum)[keyof typeof SalesInvoiceItemScalarFieldEnum]
|
||||
@@ -653,14 +670,17 @@ 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'
|
||||
invoice_id: 'invoice_id',
|
||||
provider_request_payload: 'provider_request_payload',
|
||||
raw_request_payload: 'raw_request_payload',
|
||||
error_message: 'error_message',
|
||||
fiscal_warnings: 'fiscal_warnings',
|
||||
provider_response: 'provider_response',
|
||||
validation_errors: 'validation_errors'
|
||||
} as const
|
||||
|
||||
export type SaleInvoiceTspAttemptsScalarFieldEnum = (typeof SaleInvoiceTspAttemptsScalarFieldEnum)[keyof typeof SaleInvoiceTspAttemptsScalarFieldEnum]
|
||||
@@ -1060,6 +1080,14 @@ export const PosOrderByRelevanceFieldEnum = {
|
||||
export type PosOrderByRelevanceFieldEnum = (typeof PosOrderByRelevanceFieldEnum)[keyof typeof PosOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const ConsumerAccountGoodFavoriteOrderByRelevanceFieldEnum = {
|
||||
consumer_account_id: 'consumer_account_id',
|
||||
good_id: 'good_id'
|
||||
} as const
|
||||
|
||||
export type ConsumerAccountGoodFavoriteOrderByRelevanceFieldEnum = (typeof ConsumerAccountGoodFavoriteOrderByRelevanceFieldEnum)[keyof typeof ConsumerAccountGoodFavoriteOrderByRelevanceFieldEnum]
|
||||
|
||||
|
||||
export const GoodOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
name: 'name',
|
||||
@@ -1189,7 +1217,8 @@ export type SalesInvoiceItemOrderByRelevanceFieldEnum = (typeof SalesInvoiceItem
|
||||
export const SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = {
|
||||
id: 'id',
|
||||
message: 'message',
|
||||
invoice_id: 'invoice_id'
|
||||
invoice_id: 'invoice_id',
|
||||
error_message: 'error_message'
|
||||
} as const
|
||||
|
||||
export type SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum = (typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum)[keyof typeof SaleInvoiceTspAttemptsOrderByRelevanceFieldEnum]
|
||||
|
||||
@@ -38,6 +38,7 @@ 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/ConsumerAccountGoodFavorite.js'
|
||||
export type * from './models/Good.js'
|
||||
export type * from './models/GoodCategory.js'
|
||||
export type * from './models/Guild.js'
|
||||
|
||||
@@ -182,8 +182,8 @@ export type AdminAccountWhereInput = {
|
||||
updated_at?: Prisma.DateTimeFilter<"AdminAccount"> | Date | string
|
||||
admin_id?: Prisma.StringFilter<"AdminAccount"> | string
|
||||
account_id?: Prisma.StringFilter<"AdminAccount"> | string
|
||||
admin?: Prisma.XOR<Prisma.AdminScalarRelationFilter, Prisma.AdminWhereInput>
|
||||
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
|
||||
admin?: Prisma.XOR<Prisma.AdminScalarRelationFilter, Prisma.AdminWhereInput>
|
||||
}
|
||||
|
||||
export type AdminAccountOrderByWithRelationInput = {
|
||||
@@ -192,8 +192,8 @@ export type AdminAccountOrderByWithRelationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
admin_id?: Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
admin?: Prisma.AdminOrderByWithRelationInput
|
||||
account?: Prisma.AccountOrderByWithRelationInput
|
||||
admin?: Prisma.AdminOrderByWithRelationInput
|
||||
_relevance?: Prisma.AdminAccountOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -206,8 +206,8 @@ export type AdminAccountWhereUniqueInput = Prisma.AtLeast<{
|
||||
created_at?: Prisma.DateTimeFilter<"AdminAccount"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"AdminAccount"> | Date | string
|
||||
admin_id?: Prisma.StringFilter<"AdminAccount"> | string
|
||||
admin?: Prisma.XOR<Prisma.AdminScalarRelationFilter, Prisma.AdminWhereInput>
|
||||
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
|
||||
admin?: Prisma.XOR<Prisma.AdminScalarRelationFilter, Prisma.AdminWhereInput>
|
||||
}, "id" | "account_id">
|
||||
|
||||
export type AdminAccountOrderByWithAggregationInput = {
|
||||
@@ -236,8 +236,8 @@ export type AdminAccountCreateInput = {
|
||||
id?: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
admin: Prisma.AdminCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutAdmin_accountInput
|
||||
admin: Prisma.AdminCreateNestedOneWithoutAccountsInput
|
||||
}
|
||||
|
||||
export type AdminAccountUncheckedCreateInput = {
|
||||
@@ -252,8 +252,8 @@ export type AdminAccountUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
admin?: Prisma.AdminUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutAdmin_accountNestedInput
|
||||
admin?: Prisma.AdminUpdateOneRequiredWithoutAccountsNestedInput
|
||||
}
|
||||
|
||||
export type AdminAccountUncheckedUpdateInput = {
|
||||
@@ -544,8 +544,8 @@ export type AdminAccountSelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
updated_at?: boolean
|
||||
admin_id?: boolean
|
||||
account_id?: boolean
|
||||
admin?: boolean | Prisma.AdminDefaultArgs<ExtArgs>
|
||||
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
|
||||
admin?: boolean | Prisma.AdminDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["adminAccount"]>
|
||||
|
||||
|
||||
@@ -560,15 +560,15 @@ export type AdminAccountSelectScalar = {
|
||||
|
||||
export type AdminAccountOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "created_at" | "updated_at" | "admin_id" | "account_id", ExtArgs["result"]["adminAccount"]>
|
||||
export type AdminAccountInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
admin?: boolean | Prisma.AdminDefaultArgs<ExtArgs>
|
||||
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
|
||||
admin?: boolean | Prisma.AdminDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $AdminAccountPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "AdminAccount"
|
||||
objects: {
|
||||
admin: Prisma.$AdminPayload<ExtArgs>
|
||||
account: Prisma.$AccountPayload<ExtArgs>
|
||||
admin: Prisma.$AdminPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -916,8 +916,8 @@ readonly fields: AdminAccountFieldRefs;
|
||||
*/
|
||||
export interface Prisma__AdminAccountClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
admin<T extends Prisma.AdminDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AdminDefaultArgs<ExtArgs>>): Prisma.Prisma__AdminClient<runtime.Types.Result.GetResult<Prisma.$AdminPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
account<T extends Prisma.AccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AccountDefaultArgs<ExtArgs>>): Prisma.Prisma__AccountClient<runtime.Types.Result.GetResult<Prisma.$AccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
admin<T extends Prisma.AdminDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AdminDefaultArgs<ExtArgs>>): Prisma.Prisma__AdminClient<runtime.Types.Result.GetResult<Prisma.$AdminPayload<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.
|
||||
|
||||
@@ -256,14 +256,14 @@ export type BusinessActivityWhereInput = {
|
||||
updated_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
||||
guild_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||
consumer_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||
guild?: Prisma.XOR<Prisma.GuildScalarRelationFilter, Prisma.GuildWhereInput>
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
guild?: Prisma.XOR<Prisma.GuildScalarRelationFilter, Prisma.GuildWhereInput>
|
||||
complexes?: Prisma.ComplexListRelationFilter
|
||||
permission_businesses?: Prisma.PermissionBusinessListRelationFilter
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
customer_individuals?: Prisma.CustomerIndividualListRelationFilter
|
||||
customer_legals?: Prisma.CustomerLegalListRelationFilter
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
permission_businesses?: Prisma.PermissionBusinessListRelationFilter
|
||||
}
|
||||
|
||||
export type BusinessActivityOrderByWithRelationInput = {
|
||||
@@ -277,14 +277,14 @@ export type BusinessActivityOrderByWithRelationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
guild_id?: Prisma.SortOrder
|
||||
consumer_id?: Prisma.SortOrder
|
||||
guild?: Prisma.GuildOrderByWithRelationInput
|
||||
consumer?: Prisma.ConsumerOrderByWithRelationInput
|
||||
license_activation?: Prisma.LicenseActivationOrderByWithRelationInput
|
||||
guild?: Prisma.GuildOrderByWithRelationInput
|
||||
complexes?: Prisma.ComplexOrderByRelationAggregateInput
|
||||
permission_businesses?: Prisma.PermissionBusinessOrderByRelationAggregateInput
|
||||
goods?: Prisma.GoodOrderByRelationAggregateInput
|
||||
customer_individuals?: Prisma.CustomerIndividualOrderByRelationAggregateInput
|
||||
customer_legals?: Prisma.CustomerLegalOrderByRelationAggregateInput
|
||||
goods?: Prisma.GoodOrderByRelationAggregateInput
|
||||
license_activation?: Prisma.LicenseActivationOrderByWithRelationInput
|
||||
permission_businesses?: Prisma.PermissionBusinessOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.BusinessActivityOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -303,14 +303,14 @@ export type BusinessActivityWhereUniqueInput = Prisma.AtLeast<{
|
||||
updated_at?: Prisma.DateTimeFilter<"BusinessActivity"> | Date | string
|
||||
guild_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||
consumer_id?: Prisma.StringFilter<"BusinessActivity"> | string
|
||||
guild?: Prisma.XOR<Prisma.GuildScalarRelationFilter, Prisma.GuildWhereInput>
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
guild?: Prisma.XOR<Prisma.GuildScalarRelationFilter, Prisma.GuildWhereInput>
|
||||
complexes?: Prisma.ComplexListRelationFilter
|
||||
permission_businesses?: Prisma.PermissionBusinessListRelationFilter
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
customer_individuals?: Prisma.CustomerIndividualListRelationFilter
|
||||
customer_legals?: Prisma.CustomerLegalListRelationFilter
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
license_activation?: Prisma.XOR<Prisma.LicenseActivationNullableScalarRelationFilter, Prisma.LicenseActivationWhereInput> | null
|
||||
permission_businesses?: Prisma.PermissionBusinessListRelationFilter
|
||||
}, "id" | "economic_code_consumer_id">
|
||||
|
||||
export type BusinessActivityOrderByWithAggregationInput = {
|
||||
@@ -356,14 +356,14 @@ export type BusinessActivityCreateInput = {
|
||||
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
complexes?: Prisma.ComplexCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedCreateInput = {
|
||||
@@ -377,12 +377,12 @@ export type BusinessActivityUncheckedCreateInput = {
|
||||
updated_at?: Date | string
|
||||
guild_id: string
|
||||
consumer_id: string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
complexes?: Prisma.ComplexUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUpdateInput = {
|
||||
@@ -394,14 +394,14 @@ export type BusinessActivityUpdateInput = {
|
||||
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
complexes?: Prisma.ComplexUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateInput = {
|
||||
@@ -415,12 +415,12 @@ export type BusinessActivityUncheckedUpdateInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
complexes?: Prisma.ComplexUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateManyInput = {
|
||||
@@ -725,13 +725,13 @@ export type BusinessActivityCreateWithoutLicense_activationInput = {
|
||||
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
complexes?: Prisma.ComplexCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedCreateWithoutLicense_activationInput = {
|
||||
@@ -746,10 +746,10 @@ export type BusinessActivityUncheckedCreateWithoutLicense_activationInput = {
|
||||
guild_id: string
|
||||
consumer_id: string
|
||||
complexes?: Prisma.ComplexUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateOrConnectWithoutLicense_activationInput = {
|
||||
@@ -777,13 +777,13 @@ export type BusinessActivityUpdateWithoutLicense_activationInput = {
|
||||
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
complexes?: Prisma.ComplexUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateWithoutLicense_activationInput = {
|
||||
@@ -798,10 +798,10 @@ export type BusinessActivityUncheckedUpdateWithoutLicense_activationInput = {
|
||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complexes?: Prisma.ComplexUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateWithoutPermission_businessesInput = {
|
||||
@@ -813,13 +813,13 @@ export type BusinessActivityCreateWithoutPermission_businessesInput = {
|
||||
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
complexes?: Prisma.ComplexCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedCreateWithoutPermission_businessesInput = {
|
||||
@@ -833,11 +833,11 @@ export type BusinessActivityUncheckedCreateWithoutPermission_businessesInput = {
|
||||
updated_at?: Date | string
|
||||
guild_id: string
|
||||
consumer_id: string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
complexes?: Prisma.ComplexUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateOrConnectWithoutPermission_businessesInput = {
|
||||
@@ -865,13 +865,13 @@ export type BusinessActivityUpdateWithoutPermission_businessesInput = {
|
||||
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
complexes?: Prisma.ComplexUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateWithoutPermission_businessesInput = {
|
||||
@@ -885,11 +885,11 @@ export type BusinessActivityUncheckedUpdateWithoutPermission_businessesInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
complexes?: Prisma.ComplexUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateWithoutConsumerInput = {
|
||||
@@ -902,12 +902,12 @@ export type BusinessActivityCreateWithoutConsumerInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
complexes?: Prisma.ComplexCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedCreateWithoutConsumerInput = {
|
||||
@@ -920,12 +920,12 @@ export type BusinessActivityUncheckedCreateWithoutConsumerInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild_id: string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
complexes?: Prisma.ComplexUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateOrConnectWithoutConsumerInput = {
|
||||
@@ -979,13 +979,13 @@ export type BusinessActivityCreateWithoutComplexesInput = {
|
||||
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedCreateWithoutComplexesInput = {
|
||||
@@ -999,11 +999,11 @@ export type BusinessActivityUncheckedCreateWithoutComplexesInput = {
|
||||
updated_at?: Date | string
|
||||
guild_id: string
|
||||
consumer_id: string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateOrConnectWithoutComplexesInput = {
|
||||
@@ -1031,13 +1031,13 @@ export type BusinessActivityUpdateWithoutComplexesInput = {
|
||||
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateWithoutComplexesInput = {
|
||||
@@ -1051,11 +1051,11 @@ export type BusinessActivityUncheckedUpdateWithoutComplexesInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateWithoutGoodsInput = {
|
||||
@@ -1067,13 +1067,13 @@ export type BusinessActivityCreateWithoutGoodsInput = {
|
||||
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
complexes?: Prisma.ComplexCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedCreateWithoutGoodsInput = {
|
||||
@@ -1087,11 +1087,11 @@ export type BusinessActivityUncheckedCreateWithoutGoodsInput = {
|
||||
updated_at?: Date | string
|
||||
guild_id: string
|
||||
consumer_id: string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
complexes?: Prisma.ComplexUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateOrConnectWithoutGoodsInput = {
|
||||
@@ -1119,13 +1119,13 @@ export type BusinessActivityUpdateWithoutGoodsInput = {
|
||||
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
complexes?: Prisma.ComplexUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateWithoutGoodsInput = {
|
||||
@@ -1139,11 +1139,11 @@ export type BusinessActivityUncheckedUpdateWithoutGoodsInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
complexes?: Prisma.ComplexUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateWithoutGuildInput = {
|
||||
@@ -1156,12 +1156,12 @@ export type BusinessActivityCreateWithoutGuildInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
complexes?: Prisma.ComplexCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedCreateWithoutGuildInput = {
|
||||
@@ -1174,12 +1174,12 @@ export type BusinessActivityUncheckedCreateWithoutGuildInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
complexes?: Prisma.ComplexUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateOrConnectWithoutGuildInput = {
|
||||
@@ -1217,13 +1217,13 @@ export type BusinessActivityCreateWithoutCustomer_individualsInput = {
|
||||
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
complexes?: Prisma.ComplexCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedCreateWithoutCustomer_individualsInput = {
|
||||
@@ -1237,11 +1237,11 @@ export type BusinessActivityUncheckedCreateWithoutCustomer_individualsInput = {
|
||||
updated_at?: Date | string
|
||||
guild_id: string
|
||||
consumer_id: string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
complexes?: Prisma.ComplexUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateOrConnectWithoutCustomer_individualsInput = {
|
||||
@@ -1269,13 +1269,13 @@ export type BusinessActivityUpdateWithoutCustomer_individualsInput = {
|
||||
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
complexes?: Prisma.ComplexUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateWithoutCustomer_individualsInput = {
|
||||
@@ -1289,11 +1289,11 @@ export type BusinessActivityUncheckedUpdateWithoutCustomer_individualsInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
complexes?: Prisma.ComplexUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateWithoutCustomer_legalsInput = {
|
||||
@@ -1305,13 +1305,13 @@ export type BusinessActivityCreateWithoutCustomer_legalsInput = {
|
||||
invoice_number_sequence?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutBusiness_activitiesInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
guild: Prisma.GuildCreateNestedOneWithoutBusiness_activitiesInput
|
||||
complexes?: Prisma.ComplexCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedCreateWithoutCustomer_legalsInput = {
|
||||
@@ -1325,11 +1325,11 @@ export type BusinessActivityUncheckedCreateWithoutCustomer_legalsInput = {
|
||||
updated_at?: Date | string
|
||||
guild_id: string
|
||||
consumer_id: string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
complexes?: Prisma.ComplexUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
goods?: Prisma.GoodUncheckedCreateNestedManyWithoutBusiness_activityInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedCreateNestedOneWithoutBusiness_activityInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedCreateNestedManyWithoutBusinessInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateOrConnectWithoutCustomer_legalsInput = {
|
||||
@@ -1357,13 +1357,13 @@ export type BusinessActivityUpdateWithoutCustomer_legalsInput = {
|
||||
invoice_number_sequence?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
complexes?: Prisma.ComplexUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateWithoutCustomer_legalsInput = {
|
||||
@@ -1377,11 +1377,11 @@ export type BusinessActivityUncheckedUpdateWithoutCustomer_legalsInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
complexes?: Prisma.ComplexUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityCreateManyConsumerInput = {
|
||||
@@ -1406,12 +1406,12 @@ export type BusinessActivityUpdateWithoutConsumerInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
complexes?: Prisma.ComplexUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateWithoutConsumerInput = {
|
||||
@@ -1424,12 +1424,12 @@ export type BusinessActivityUncheckedUpdateWithoutConsumerInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
complexes?: Prisma.ComplexUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateManyWithoutConsumerInput = {
|
||||
@@ -1466,12 +1466,12 @@ export type BusinessActivityUpdateWithoutGuildInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutBusiness_activitiesNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
complexes?: Prisma.ComplexUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateWithoutGuildInput = {
|
||||
@@ -1484,12 +1484,12 @@ export type BusinessActivityUncheckedUpdateWithoutGuildInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
complexes?: Prisma.ComplexUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_individuals?: Prisma.CustomerIndividualUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
customer_legals?: Prisma.CustomerLegalUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
goods?: Prisma.GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput
|
||||
license_activation?: Prisma.LicenseActivationUncheckedUpdateOneWithoutBusiness_activityNestedInput
|
||||
permission_businesses?: Prisma.PermissionBusinessUncheckedUpdateManyWithoutBusinessNestedInput
|
||||
}
|
||||
|
||||
export type BusinessActivityUncheckedUpdateManyWithoutGuildInput = {
|
||||
@@ -1511,18 +1511,18 @@ export type BusinessActivityUncheckedUpdateManyWithoutGuildInput = {
|
||||
|
||||
export type BusinessActivityCountOutputType = {
|
||||
complexes: number
|
||||
permission_businesses: number
|
||||
goods: number
|
||||
customer_individuals: number
|
||||
customer_legals: number
|
||||
goods: number
|
||||
permission_businesses: number
|
||||
}
|
||||
|
||||
export type BusinessActivityCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
complexes?: boolean | BusinessActivityCountOutputTypeCountComplexesArgs
|
||||
permission_businesses?: boolean | BusinessActivityCountOutputTypeCountPermission_businessesArgs
|
||||
goods?: boolean | BusinessActivityCountOutputTypeCountGoodsArgs
|
||||
customer_individuals?: boolean | BusinessActivityCountOutputTypeCountCustomer_individualsArgs
|
||||
customer_legals?: boolean | BusinessActivityCountOutputTypeCountCustomer_legalsArgs
|
||||
goods?: boolean | BusinessActivityCountOutputTypeCountGoodsArgs
|
||||
permission_businesses?: boolean | BusinessActivityCountOutputTypeCountPermission_businessesArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1545,8 +1545,15 @@ export type BusinessActivityCountOutputTypeCountComplexesArgs<ExtArgs extends ru
|
||||
/**
|
||||
* BusinessActivityCountOutputType without action
|
||||
*/
|
||||
export type BusinessActivityCountOutputTypeCountPermission_businessesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.PermissionBusinessWhereInput
|
||||
export type BusinessActivityCountOutputTypeCountCustomer_individualsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.CustomerIndividualWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivityCountOutputType without action
|
||||
*/
|
||||
export type BusinessActivityCountOutputTypeCountCustomer_legalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.CustomerLegalWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1559,15 +1566,8 @@ export type BusinessActivityCountOutputTypeCountGoodsArgs<ExtArgs extends runtim
|
||||
/**
|
||||
* BusinessActivityCountOutputType without action
|
||||
*/
|
||||
export type BusinessActivityCountOutputTypeCountCustomer_individualsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.CustomerIndividualWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivityCountOutputType without action
|
||||
*/
|
||||
export type BusinessActivityCountOutputTypeCountCustomer_legalsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.CustomerLegalWhereInput
|
||||
export type BusinessActivityCountOutputTypeCountPermission_businessesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.PermissionBusinessWhereInput
|
||||
}
|
||||
|
||||
|
||||
@@ -1582,14 +1582,14 @@ export type BusinessActivitySelect<ExtArgs extends runtime.Types.Extensions.Inte
|
||||
updated_at?: boolean
|
||||
guild_id?: boolean
|
||||
consumer_id?: boolean
|
||||
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
license_activation?: boolean | Prisma.BusinessActivity$license_activationArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
||||
complexes?: boolean | Prisma.BusinessActivity$complexesArgs<ExtArgs>
|
||||
permission_businesses?: boolean | Prisma.BusinessActivity$permission_businessesArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.BusinessActivity$goodsArgs<ExtArgs>
|
||||
customer_individuals?: boolean | Prisma.BusinessActivity$customer_individualsArgs<ExtArgs>
|
||||
customer_legals?: boolean | Prisma.BusinessActivity$customer_legalsArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.BusinessActivity$goodsArgs<ExtArgs>
|
||||
license_activation?: boolean | Prisma.BusinessActivity$license_activationArgs<ExtArgs>
|
||||
permission_businesses?: boolean | Prisma.BusinessActivity$permission_businessesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.BusinessActivityCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["businessActivity"]>
|
||||
|
||||
@@ -1610,28 +1610,28 @@ export type BusinessActivitySelectScalar = {
|
||||
|
||||
export type BusinessActivityOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "economic_code" | "name" | "fiscal_id" | "partner_token" | "invoice_number_sequence" | "created_at" | "updated_at" | "guild_id" | "consumer_id", ExtArgs["result"]["businessActivity"]>
|
||||
export type BusinessActivityInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
license_activation?: boolean | Prisma.BusinessActivity$license_activationArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
||||
complexes?: boolean | Prisma.BusinessActivity$complexesArgs<ExtArgs>
|
||||
permission_businesses?: boolean | Prisma.BusinessActivity$permission_businessesArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.BusinessActivity$goodsArgs<ExtArgs>
|
||||
customer_individuals?: boolean | Prisma.BusinessActivity$customer_individualsArgs<ExtArgs>
|
||||
customer_legals?: boolean | Prisma.BusinessActivity$customer_legalsArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.BusinessActivity$goodsArgs<ExtArgs>
|
||||
license_activation?: boolean | Prisma.BusinessActivity$license_activationArgs<ExtArgs>
|
||||
permission_businesses?: boolean | Prisma.BusinessActivity$permission_businessesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.BusinessActivityCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $BusinessActivityPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "BusinessActivity"
|
||||
objects: {
|
||||
guild: Prisma.$GuildPayload<ExtArgs>
|
||||
consumer: Prisma.$ConsumerPayload<ExtArgs>
|
||||
license_activation: Prisma.$LicenseActivationPayload<ExtArgs> | null
|
||||
guild: Prisma.$GuildPayload<ExtArgs>
|
||||
complexes: Prisma.$ComplexPayload<ExtArgs>[]
|
||||
permission_businesses: Prisma.$PermissionBusinessPayload<ExtArgs>[]
|
||||
goods: Prisma.$GoodPayload<ExtArgs>[]
|
||||
customer_individuals: Prisma.$CustomerIndividualPayload<ExtArgs>[]
|
||||
customer_legals: Prisma.$CustomerLegalPayload<ExtArgs>[]
|
||||
goods: Prisma.$GoodPayload<ExtArgs>[]
|
||||
license_activation: Prisma.$LicenseActivationPayload<ExtArgs> | null
|
||||
permission_businesses: Prisma.$PermissionBusinessPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1984,14 +1984,14 @@ readonly fields: BusinessActivityFieldRefs;
|
||||
*/
|
||||
export interface Prisma__BusinessActivityClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
guild<T extends Prisma.GuildDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GuildDefaultArgs<ExtArgs>>): Prisma.Prisma__GuildClient<runtime.Types.Result.GetResult<Prisma.$GuildPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
consumer<T extends Prisma.ConsumerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerDefaultArgs<ExtArgs>>): Prisma.Prisma__ConsumerClient<runtime.Types.Result.GetResult<Prisma.$ConsumerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
license_activation<T extends Prisma.BusinessActivity$license_activationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivity$license_activationArgs<ExtArgs>>): Prisma.Prisma__LicenseActivationClient<runtime.Types.Result.GetResult<Prisma.$LicenseActivationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
guild<T extends Prisma.GuildDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GuildDefaultArgs<ExtArgs>>): Prisma.Prisma__GuildClient<runtime.Types.Result.GetResult<Prisma.$GuildPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
complexes<T extends Prisma.BusinessActivity$complexesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivity$complexesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ComplexPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
permission_businesses<T extends Prisma.BusinessActivity$permission_businessesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivity$permission_businessesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionBusinessPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
goods<T extends Prisma.BusinessActivity$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivity$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
customer_individuals<T extends Prisma.BusinessActivity$customer_individualsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivity$customer_individualsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomerIndividualPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
customer_legals<T extends Prisma.BusinessActivity$customer_legalsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivity$customer_legalsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$CustomerLegalPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
goods<T extends Prisma.BusinessActivity$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivity$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
license_activation<T extends Prisma.BusinessActivity$license_activationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivity$license_activationArgs<ExtArgs>>): Prisma.Prisma__LicenseActivationClient<runtime.Types.Result.GetResult<Prisma.$LicenseActivationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
permission_businesses<T extends Prisma.BusinessActivity$permission_businessesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.BusinessActivity$permission_businessesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionBusinessPayload<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.
|
||||
@@ -2378,25 +2378,6 @@ export type BusinessActivityDeleteManyArgs<ExtArgs extends runtime.Types.Extensi
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivity.license_activation
|
||||
*/
|
||||
export type BusinessActivity$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
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivity.complexes
|
||||
*/
|
||||
@@ -2421,54 +2402,6 @@ export type BusinessActivity$complexesArgs<ExtArgs extends runtime.Types.Extensi
|
||||
distinct?: Prisma.ComplexScalarFieldEnum | Prisma.ComplexScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivity.permission_businesses
|
||||
*/
|
||||
export type BusinessActivity$permission_businessesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the PermissionBusiness
|
||||
*/
|
||||
select?: Prisma.PermissionBusinessSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the PermissionBusiness
|
||||
*/
|
||||
omit?: Prisma.PermissionBusinessOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.PermissionBusinessInclude<ExtArgs> | null
|
||||
where?: Prisma.PermissionBusinessWhereInput
|
||||
orderBy?: Prisma.PermissionBusinessOrderByWithRelationInput | Prisma.PermissionBusinessOrderByWithRelationInput[]
|
||||
cursor?: Prisma.PermissionBusinessWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.PermissionBusinessScalarFieldEnum | Prisma.PermissionBusinessScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivity.goods
|
||||
*/
|
||||
export type BusinessActivity$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[]
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivity.customer_individuals
|
||||
*/
|
||||
@@ -2517,6 +2450,73 @@ export type BusinessActivity$customer_legalsArgs<ExtArgs extends runtime.Types.E
|
||||
distinct?: Prisma.CustomerLegalScalarFieldEnum | Prisma.CustomerLegalScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivity.goods
|
||||
*/
|
||||
export type BusinessActivity$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[]
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivity.license_activation
|
||||
*/
|
||||
export type BusinessActivity$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
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivity.permission_businesses
|
||||
*/
|
||||
export type BusinessActivity$permission_businessesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the PermissionBusiness
|
||||
*/
|
||||
select?: Prisma.PermissionBusinessSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the PermissionBusiness
|
||||
*/
|
||||
omit?: Prisma.PermissionBusinessOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.PermissionBusinessInclude<ExtArgs> | null
|
||||
where?: Prisma.PermissionBusinessWhereInput
|
||||
orderBy?: Prisma.PermissionBusinessOrderByWithRelationInput | Prisma.PermissionBusinessOrderByWithRelationInput[]
|
||||
cursor?: Prisma.PermissionBusinessWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.PermissionBusinessScalarFieldEnum | Prisma.PermissionBusinessScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* BusinessActivity without action
|
||||
*/
|
||||
|
||||
@@ -199,9 +199,9 @@ export type ComplexWhereInput = {
|
||||
updated_at?: Prisma.DateTimeFilter<"Complex"> | Date | string
|
||||
business_activity_id?: Prisma.StringFilter<"Complex"> | string
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
pos_list?: Prisma.PosListRelationFilter
|
||||
good_categories?: Prisma.GoodCategoryListRelationFilter
|
||||
permission_complexes?: Prisma.PermissionComplexListRelationFilter
|
||||
pos_list?: Prisma.PosListRelationFilter
|
||||
}
|
||||
|
||||
export type ComplexOrderByWithRelationInput = {
|
||||
@@ -213,9 +213,9 @@ export type ComplexOrderByWithRelationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
business_activity?: Prisma.BusinessActivityOrderByWithRelationInput
|
||||
pos_list?: Prisma.PosOrderByRelationAggregateInput
|
||||
good_categories?: Prisma.GoodCategoryOrderByRelationAggregateInput
|
||||
permission_complexes?: Prisma.PermissionComplexOrderByRelationAggregateInput
|
||||
pos_list?: Prisma.PosOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.ComplexOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -231,9 +231,9 @@ export type ComplexWhereUniqueInput = Prisma.AtLeast<{
|
||||
updated_at?: Prisma.DateTimeFilter<"Complex"> | Date | string
|
||||
business_activity_id?: Prisma.StringFilter<"Complex"> | string
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
pos_list?: Prisma.PosListRelationFilter
|
||||
good_categories?: Prisma.GoodCategoryListRelationFilter
|
||||
permission_complexes?: Prisma.PermissionComplexListRelationFilter
|
||||
pos_list?: Prisma.PosListRelationFilter
|
||||
}, "id">
|
||||
|
||||
export type ComplexOrderByWithAggregationInput = {
|
||||
@@ -270,9 +270,9 @@ export type ComplexCreateInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateInput = {
|
||||
@@ -283,9 +283,9 @@ export type ComplexUncheckedCreateInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUpdateInput = {
|
||||
@@ -296,9 +296,9 @@ export type ComplexUpdateInput = {
|
||||
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
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateInput = {
|
||||
@@ -309,9 +309,9 @@ export type ComplexUncheckedUpdateInput = {
|
||||
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
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateManyInput = {
|
||||
@@ -493,8 +493,8 @@ export type ComplexCreateWithoutPermission_complexesInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutPermission_complexesInput = {
|
||||
@@ -505,8 +505,8 @@ export type ComplexUncheckedCreateWithoutPermission_complexesInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutPermission_complexesInput = {
|
||||
@@ -533,8 +533,8 @@ export type ComplexUpdateWithoutPermission_complexesInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutPermission_complexesInput = {
|
||||
@@ -545,8 +545,8 @@ export type ComplexUncheckedUpdateWithoutPermission_complexesInput = {
|
||||
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
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateWithoutBusiness_activityInput = {
|
||||
@@ -556,9 +556,9 @@ export type ComplexCreateWithoutBusiness_activityInput = {
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutBusiness_activityInput = {
|
||||
@@ -568,9 +568,9 @@ export type ComplexUncheckedCreateWithoutBusiness_activityInput = {
|
||||
address?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutBusiness_activityInput = {
|
||||
@@ -684,8 +684,8 @@ export type ComplexCreateWithoutGood_categoriesInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutComplexesInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexCreateNestedManyWithoutComplexInput
|
||||
pos_list?: Prisma.PosCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedCreateWithoutGood_categoriesInput = {
|
||||
@@ -696,8 +696,8 @@ export type ComplexUncheckedCreateWithoutGood_categoriesInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
business_activity_id: string
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedCreateNestedManyWithoutComplexInput
|
||||
pos_list?: Prisma.PosUncheckedCreateNestedManyWithoutComplexInput
|
||||
}
|
||||
|
||||
export type ComplexCreateOrConnectWithoutGood_categoriesInput = {
|
||||
@@ -724,8 +724,8 @@ export type ComplexUpdateWithoutGood_categoriesInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutComplexesNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutGood_categoriesInput = {
|
||||
@@ -736,8 +736,8 @@ export type ComplexUncheckedUpdateWithoutGood_categoriesInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexCreateManyBusiness_activityInput = {
|
||||
@@ -756,9 +756,9 @@ export type ComplexUpdateWithoutBusiness_activityInput = {
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUpdateManyWithoutComplexNestedInput
|
||||
pos_list?: Prisma.PosUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
@@ -768,9 +768,9 @@ export type ComplexUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
address?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
good_categories?: Prisma.GoodCategoryUncheckedUpdateManyWithoutComplexNestedInput
|
||||
permission_complexes?: Prisma.PermissionComplexUncheckedUpdateManyWithoutComplexNestedInput
|
||||
pos_list?: Prisma.PosUncheckedUpdateManyWithoutComplexNestedInput
|
||||
}
|
||||
|
||||
export type ComplexUncheckedUpdateManyWithoutBusiness_activityInput = {
|
||||
@@ -788,15 +788,15 @@ export type ComplexUncheckedUpdateManyWithoutBusiness_activityInput = {
|
||||
*/
|
||||
|
||||
export type ComplexCountOutputType = {
|
||||
pos_list: number
|
||||
good_categories: number
|
||||
permission_complexes: number
|
||||
pos_list: number
|
||||
}
|
||||
|
||||
export type ComplexCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
pos_list?: boolean | ComplexCountOutputTypeCountPos_listArgs
|
||||
good_categories?: boolean | ComplexCountOutputTypeCountGood_categoriesArgs
|
||||
permission_complexes?: boolean | ComplexCountOutputTypeCountPermission_complexesArgs
|
||||
pos_list?: boolean | ComplexCountOutputTypeCountPos_listArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -809,13 +809,6 @@ export type ComplexCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Exte
|
||||
select?: Prisma.ComplexCountOutputTypeSelect<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* ComplexCountOutputType without action
|
||||
*/
|
||||
export type ComplexCountOutputTypeCountPos_listArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.PosWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ComplexCountOutputType without action
|
||||
*/
|
||||
@@ -830,6 +823,13 @@ export type ComplexCountOutputTypeCountPermission_complexesArgs<ExtArgs extends
|
||||
where?: Prisma.PermissionComplexWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ComplexCountOutputType without action
|
||||
*/
|
||||
export type ComplexCountOutputTypeCountPos_listArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.PosWhereInput
|
||||
}
|
||||
|
||||
|
||||
export type ComplexSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetSelect<{
|
||||
id?: boolean
|
||||
@@ -840,9 +840,9 @@ export type ComplexSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
updated_at?: boolean
|
||||
business_activity_id?: boolean
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
pos_list?: boolean | Prisma.Complex$pos_listArgs<ExtArgs>
|
||||
good_categories?: boolean | Prisma.Complex$good_categoriesArgs<ExtArgs>
|
||||
permission_complexes?: boolean | Prisma.Complex$permission_complexesArgs<ExtArgs>
|
||||
pos_list?: boolean | Prisma.Complex$pos_listArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ComplexCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["complex"]>
|
||||
|
||||
@@ -861,9 +861,9 @@ export type ComplexSelectScalar = {
|
||||
export type ComplexOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "branch_code" | "address" | "created_at" | "updated_at" | "business_activity_id", ExtArgs["result"]["complex"]>
|
||||
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>
|
||||
good_categories?: boolean | Prisma.Complex$good_categoriesArgs<ExtArgs>
|
||||
permission_complexes?: boolean | Prisma.Complex$permission_complexesArgs<ExtArgs>
|
||||
pos_list?: boolean | Prisma.Complex$pos_listArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ComplexCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
@@ -871,9 +871,9 @@ export type $ComplexPayload<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
name: "Complex"
|
||||
objects: {
|
||||
business_activity: Prisma.$BusinessActivityPayload<ExtArgs>
|
||||
pos_list: Prisma.$PosPayload<ExtArgs>[]
|
||||
good_categories: Prisma.$GoodCategoryPayload<ExtArgs>[]
|
||||
permission_complexes: Prisma.$PermissionComplexPayload<ExtArgs>[]
|
||||
pos_list: Prisma.$PosPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1224,9 +1224,9 @@ readonly fields: ComplexFieldRefs;
|
||||
export interface Prisma__ComplexClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
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>
|
||||
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>
|
||||
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>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1610,30 +1610,6 @@ export type ComplexDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex.pos_list
|
||||
*/
|
||||
export type Complex$pos_listArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Pos
|
||||
*/
|
||||
select?: Prisma.PosSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Pos
|
||||
*/
|
||||
omit?: Prisma.PosOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.PosInclude<ExtArgs> | null
|
||||
where?: Prisma.PosWhereInput
|
||||
orderBy?: Prisma.PosOrderByWithRelationInput | Prisma.PosOrderByWithRelationInput[]
|
||||
cursor?: Prisma.PosWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.PosScalarFieldEnum | Prisma.PosScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex.good_categories
|
||||
*/
|
||||
@@ -1682,6 +1658,30 @@ export type Complex$permission_complexesArgs<ExtArgs extends runtime.Types.Exten
|
||||
distinct?: Prisma.PermissionComplexScalarFieldEnum | Prisma.PermissionComplexScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex.pos_list
|
||||
*/
|
||||
export type Complex$pos_listArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Pos
|
||||
*/
|
||||
select?: Prisma.PosSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Pos
|
||||
*/
|
||||
omit?: Prisma.PosOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.PosInclude<ExtArgs> | null
|
||||
where?: Prisma.PosWhereInput
|
||||
orderBy?: Prisma.PosOrderByWithRelationInput | Prisma.PosOrderByWithRelationInput[]
|
||||
cursor?: Prisma.PosWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.PosScalarFieldEnum | Prisma.PosScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Complex without action
|
||||
*/
|
||||
|
||||
@@ -182,8 +182,8 @@ export type ConsumerWhereInput = {
|
||||
status?: Prisma.EnumConsumerStatusFilter<"Consumer"> | $Enums.ConsumerStatus
|
||||
created_at?: Prisma.DateTimeFilter<"Consumer"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Consumer"> | Date | string
|
||||
accounts?: Prisma.ConsumerAccountListRelationFilter
|
||||
business_activities?: Prisma.BusinessActivityListRelationFilter
|
||||
accounts?: Prisma.ConsumerAccountListRelationFilter
|
||||
individual?: Prisma.XOR<Prisma.ConsumerIndividualNullableScalarRelationFilter, Prisma.ConsumerIndividualWhereInput> | null
|
||||
legal?: Prisma.XOR<Prisma.ConsumerLegalNullableScalarRelationFilter, Prisma.ConsumerLegalWhereInput> | null
|
||||
}
|
||||
@@ -194,8 +194,8 @@ export type ConsumerOrderByWithRelationInput = {
|
||||
status?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
accounts?: Prisma.ConsumerAccountOrderByRelationAggregateInput
|
||||
business_activities?: Prisma.BusinessActivityOrderByRelationAggregateInput
|
||||
accounts?: Prisma.ConsumerAccountOrderByRelationAggregateInput
|
||||
individual?: Prisma.ConsumerIndividualOrderByWithRelationInput
|
||||
legal?: Prisma.ConsumerLegalOrderByWithRelationInput
|
||||
_relevance?: Prisma.ConsumerOrderByRelevanceInput
|
||||
@@ -210,8 +210,8 @@ export type ConsumerWhereUniqueInput = Prisma.AtLeast<{
|
||||
status?: Prisma.EnumConsumerStatusFilter<"Consumer"> | $Enums.ConsumerStatus
|
||||
created_at?: Prisma.DateTimeFilter<"Consumer"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"Consumer"> | Date | string
|
||||
accounts?: Prisma.ConsumerAccountListRelationFilter
|
||||
business_activities?: Prisma.BusinessActivityListRelationFilter
|
||||
accounts?: Prisma.ConsumerAccountListRelationFilter
|
||||
individual?: Prisma.XOR<Prisma.ConsumerIndividualNullableScalarRelationFilter, Prisma.ConsumerIndividualWhereInput> | null
|
||||
legal?: Prisma.XOR<Prisma.ConsumerLegalNullableScalarRelationFilter, Prisma.ConsumerLegalWhereInput> | null
|
||||
}, "id">
|
||||
@@ -244,8 +244,8 @@ export type ConsumerCreateInput = {
|
||||
status?: $Enums.ConsumerStatus
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
accounts?: Prisma.ConsumerAccountCreateNestedManyWithoutConsumerInput
|
||||
business_activities?: Prisma.BusinessActivityCreateNestedManyWithoutConsumerInput
|
||||
accounts?: Prisma.ConsumerAccountCreateNestedManyWithoutConsumerInput
|
||||
individual?: Prisma.ConsumerIndividualCreateNestedOneWithoutConsumerInput
|
||||
legal?: Prisma.ConsumerLegalCreateNestedOneWithoutConsumerInput
|
||||
}
|
||||
@@ -256,8 +256,8 @@ export type ConsumerUncheckedCreateInput = {
|
||||
status?: $Enums.ConsumerStatus
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
accounts?: Prisma.ConsumerAccountUncheckedCreateNestedManyWithoutConsumerInput
|
||||
business_activities?: Prisma.BusinessActivityUncheckedCreateNestedManyWithoutConsumerInput
|
||||
accounts?: Prisma.ConsumerAccountUncheckedCreateNestedManyWithoutConsumerInput
|
||||
individual?: Prisma.ConsumerIndividualUncheckedCreateNestedOneWithoutConsumerInput
|
||||
legal?: Prisma.ConsumerLegalUncheckedCreateNestedOneWithoutConsumerInput
|
||||
}
|
||||
@@ -268,8 +268,8 @@ export type ConsumerUpdateInput = {
|
||||
status?: Prisma.EnumConsumerStatusFieldUpdateOperationsInput | $Enums.ConsumerStatus
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.ConsumerAccountUpdateManyWithoutConsumerNestedInput
|
||||
business_activities?: Prisma.BusinessActivityUpdateManyWithoutConsumerNestedInput
|
||||
accounts?: Prisma.ConsumerAccountUpdateManyWithoutConsumerNestedInput
|
||||
individual?: Prisma.ConsumerIndividualUpdateOneWithoutConsumerNestedInput
|
||||
legal?: Prisma.ConsumerLegalUpdateOneWithoutConsumerNestedInput
|
||||
}
|
||||
@@ -280,8 +280,8 @@ export type ConsumerUncheckedUpdateInput = {
|
||||
status?: Prisma.EnumConsumerStatusFieldUpdateOperationsInput | $Enums.ConsumerStatus
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.ConsumerAccountUncheckedUpdateManyWithoutConsumerNestedInput
|
||||
business_activities?: Prisma.BusinessActivityUncheckedUpdateManyWithoutConsumerNestedInput
|
||||
accounts?: Prisma.ConsumerAccountUncheckedUpdateManyWithoutConsumerNestedInput
|
||||
individual?: Prisma.ConsumerIndividualUncheckedUpdateOneWithoutConsumerNestedInput
|
||||
legal?: Prisma.ConsumerLegalUncheckedUpdateOneWithoutConsumerNestedInput
|
||||
}
|
||||
@@ -475,8 +475,8 @@ export type ConsumerCreateWithoutIndividualInput = {
|
||||
status?: $Enums.ConsumerStatus
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
accounts?: Prisma.ConsumerAccountCreateNestedManyWithoutConsumerInput
|
||||
business_activities?: Prisma.BusinessActivityCreateNestedManyWithoutConsumerInput
|
||||
accounts?: Prisma.ConsumerAccountCreateNestedManyWithoutConsumerInput
|
||||
legal?: Prisma.ConsumerLegalCreateNestedOneWithoutConsumerInput
|
||||
}
|
||||
|
||||
@@ -486,8 +486,8 @@ export type ConsumerUncheckedCreateWithoutIndividualInput = {
|
||||
status?: $Enums.ConsumerStatus
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
accounts?: Prisma.ConsumerAccountUncheckedCreateNestedManyWithoutConsumerInput
|
||||
business_activities?: Prisma.BusinessActivityUncheckedCreateNestedManyWithoutConsumerInput
|
||||
accounts?: Prisma.ConsumerAccountUncheckedCreateNestedManyWithoutConsumerInput
|
||||
legal?: Prisma.ConsumerLegalUncheckedCreateNestedOneWithoutConsumerInput
|
||||
}
|
||||
|
||||
@@ -513,8 +513,8 @@ export type ConsumerUpdateWithoutIndividualInput = {
|
||||
status?: Prisma.EnumConsumerStatusFieldUpdateOperationsInput | $Enums.ConsumerStatus
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.ConsumerAccountUpdateManyWithoutConsumerNestedInput
|
||||
business_activities?: Prisma.BusinessActivityUpdateManyWithoutConsumerNestedInput
|
||||
accounts?: Prisma.ConsumerAccountUpdateManyWithoutConsumerNestedInput
|
||||
legal?: Prisma.ConsumerLegalUpdateOneWithoutConsumerNestedInput
|
||||
}
|
||||
|
||||
@@ -524,8 +524,8 @@ export type ConsumerUncheckedUpdateWithoutIndividualInput = {
|
||||
status?: Prisma.EnumConsumerStatusFieldUpdateOperationsInput | $Enums.ConsumerStatus
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.ConsumerAccountUncheckedUpdateManyWithoutConsumerNestedInput
|
||||
business_activities?: Prisma.BusinessActivityUncheckedUpdateManyWithoutConsumerNestedInput
|
||||
accounts?: Prisma.ConsumerAccountUncheckedUpdateManyWithoutConsumerNestedInput
|
||||
legal?: Prisma.ConsumerLegalUncheckedUpdateOneWithoutConsumerNestedInput
|
||||
}
|
||||
|
||||
@@ -535,8 +535,8 @@ export type ConsumerCreateWithoutLegalInput = {
|
||||
status?: $Enums.ConsumerStatus
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
accounts?: Prisma.ConsumerAccountCreateNestedManyWithoutConsumerInput
|
||||
business_activities?: Prisma.BusinessActivityCreateNestedManyWithoutConsumerInput
|
||||
accounts?: Prisma.ConsumerAccountCreateNestedManyWithoutConsumerInput
|
||||
individual?: Prisma.ConsumerIndividualCreateNestedOneWithoutConsumerInput
|
||||
}
|
||||
|
||||
@@ -546,8 +546,8 @@ export type ConsumerUncheckedCreateWithoutLegalInput = {
|
||||
status?: $Enums.ConsumerStatus
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
accounts?: Prisma.ConsumerAccountUncheckedCreateNestedManyWithoutConsumerInput
|
||||
business_activities?: Prisma.BusinessActivityUncheckedCreateNestedManyWithoutConsumerInput
|
||||
accounts?: Prisma.ConsumerAccountUncheckedCreateNestedManyWithoutConsumerInput
|
||||
individual?: Prisma.ConsumerIndividualUncheckedCreateNestedOneWithoutConsumerInput
|
||||
}
|
||||
|
||||
@@ -573,8 +573,8 @@ export type ConsumerUpdateWithoutLegalInput = {
|
||||
status?: Prisma.EnumConsumerStatusFieldUpdateOperationsInput | $Enums.ConsumerStatus
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.ConsumerAccountUpdateManyWithoutConsumerNestedInput
|
||||
business_activities?: Prisma.BusinessActivityUpdateManyWithoutConsumerNestedInput
|
||||
accounts?: Prisma.ConsumerAccountUpdateManyWithoutConsumerNestedInput
|
||||
individual?: Prisma.ConsumerIndividualUpdateOneWithoutConsumerNestedInput
|
||||
}
|
||||
|
||||
@@ -584,8 +584,8 @@ export type ConsumerUncheckedUpdateWithoutLegalInput = {
|
||||
status?: Prisma.EnumConsumerStatusFieldUpdateOperationsInput | $Enums.ConsumerStatus
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
accounts?: Prisma.ConsumerAccountUncheckedUpdateManyWithoutConsumerNestedInput
|
||||
business_activities?: Prisma.BusinessActivityUncheckedUpdateManyWithoutConsumerNestedInput
|
||||
accounts?: Prisma.ConsumerAccountUncheckedUpdateManyWithoutConsumerNestedInput
|
||||
individual?: Prisma.ConsumerIndividualUncheckedUpdateOneWithoutConsumerNestedInput
|
||||
}
|
||||
|
||||
@@ -655,13 +655,13 @@ export type ConsumerUncheckedUpdateWithoutBusiness_activitiesInput = {
|
||||
*/
|
||||
|
||||
export type ConsumerCountOutputType = {
|
||||
accounts: number
|
||||
business_activities: number
|
||||
accounts: number
|
||||
}
|
||||
|
||||
export type ConsumerCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
accounts?: boolean | ConsumerCountOutputTypeCountAccountsArgs
|
||||
business_activities?: boolean | ConsumerCountOutputTypeCountBusiness_activitiesArgs
|
||||
accounts?: boolean | ConsumerCountOutputTypeCountAccountsArgs
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -677,15 +677,15 @@ export type ConsumerCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Ext
|
||||
/**
|
||||
* ConsumerCountOutputType without action
|
||||
*/
|
||||
export type ConsumerCountOutputTypeCountAccountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
export type ConsumerCountOutputTypeCountBusiness_activitiesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.BusinessActivityWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerCountOutputType without action
|
||||
*/
|
||||
export type ConsumerCountOutputTypeCountBusiness_activitiesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.BusinessActivityWhereInput
|
||||
export type ConsumerCountOutputTypeCountAccountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
|
||||
@@ -695,8 +695,8 @@ export type ConsumerSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
status?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
accounts?: boolean | Prisma.Consumer$accountsArgs<ExtArgs>
|
||||
business_activities?: boolean | Prisma.Consumer$business_activitiesArgs<ExtArgs>
|
||||
accounts?: boolean | Prisma.Consumer$accountsArgs<ExtArgs>
|
||||
individual?: boolean | Prisma.Consumer$individualArgs<ExtArgs>
|
||||
legal?: boolean | Prisma.Consumer$legalArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ConsumerCountOutputTypeDefaultArgs<ExtArgs>
|
||||
@@ -714,8 +714,8 @@ export type ConsumerSelectScalar = {
|
||||
|
||||
export type ConsumerOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "type" | "status" | "created_at" | "updated_at", ExtArgs["result"]["consumer"]>
|
||||
export type ConsumerInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
accounts?: boolean | Prisma.Consumer$accountsArgs<ExtArgs>
|
||||
business_activities?: boolean | Prisma.Consumer$business_activitiesArgs<ExtArgs>
|
||||
accounts?: boolean | Prisma.Consumer$accountsArgs<ExtArgs>
|
||||
individual?: boolean | Prisma.Consumer$individualArgs<ExtArgs>
|
||||
legal?: boolean | Prisma.Consumer$legalArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ConsumerCountOutputTypeDefaultArgs<ExtArgs>
|
||||
@@ -724,8 +724,8 @@ export type ConsumerInclude<ExtArgs extends runtime.Types.Extensions.InternalArg
|
||||
export type $ConsumerPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "Consumer"
|
||||
objects: {
|
||||
accounts: Prisma.$ConsumerAccountPayload<ExtArgs>[]
|
||||
business_activities: Prisma.$BusinessActivityPayload<ExtArgs>[]
|
||||
accounts: Prisma.$ConsumerAccountPayload<ExtArgs>[]
|
||||
individual: Prisma.$ConsumerIndividualPayload<ExtArgs> | null
|
||||
legal: Prisma.$ConsumerLegalPayload<ExtArgs> | null
|
||||
}
|
||||
@@ -1075,8 +1075,8 @@ readonly fields: ConsumerFieldRefs;
|
||||
*/
|
||||
export interface Prisma__ConsumerClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
accounts<T extends Prisma.Consumer$accountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Consumer$accountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
business_activities<T extends Prisma.Consumer$business_activitiesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Consumer$business_activitiesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$BusinessActivityPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
accounts<T extends Prisma.Consumer$accountsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Consumer$accountsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
individual<T extends Prisma.Consumer$individualArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Consumer$individualArgs<ExtArgs>>): Prisma.Prisma__ConsumerIndividualClient<runtime.Types.Result.GetResult<Prisma.$ConsumerIndividualPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
legal<T extends Prisma.Consumer$legalArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Consumer$legalArgs<ExtArgs>>): Prisma.Prisma__ConsumerLegalClient<runtime.Types.Result.GetResult<Prisma.$ConsumerLegalPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
@@ -1460,30 +1460,6 @@ export type ConsumerDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Inte
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Consumer.accounts
|
||||
*/
|
||||
export type Consumer$accountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the ConsumerAccount
|
||||
*/
|
||||
select?: Prisma.ConsumerAccountSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the ConsumerAccount
|
||||
*/
|
||||
omit?: Prisma.ConsumerAccountOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ConsumerAccountInclude<ExtArgs> | null
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
orderBy?: Prisma.ConsumerAccountOrderByWithRelationInput | Prisma.ConsumerAccountOrderByWithRelationInput[]
|
||||
cursor?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.ConsumerAccountScalarFieldEnum | Prisma.ConsumerAccountScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Consumer.business_activities
|
||||
*/
|
||||
@@ -1508,6 +1484,30 @@ export type Consumer$business_activitiesArgs<ExtArgs extends runtime.Types.Exten
|
||||
distinct?: Prisma.BusinessActivityScalarFieldEnum | Prisma.BusinessActivityScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Consumer.accounts
|
||||
*/
|
||||
export type Consumer$accountsArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the ConsumerAccount
|
||||
*/
|
||||
select?: Prisma.ConsumerAccountSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the ConsumerAccount
|
||||
*/
|
||||
omit?: Prisma.ConsumerAccountOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ConsumerAccountInclude<ExtArgs> | null
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
orderBy?: Prisma.ConsumerAccountOrderByWithRelationInput | Prisma.ConsumerAccountOrderByWithRelationInput[]
|
||||
cursor?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.ConsumerAccountScalarFieldEnum | Prisma.ConsumerAccountScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Consumer.individual
|
||||
*/
|
||||
|
||||
@@ -190,13 +190,14 @@ export type ConsumerAccountWhereInput = {
|
||||
updated_at?: Prisma.DateTimeFilter<"ConsumerAccount"> | Date | string
|
||||
consumer_id?: Prisma.StringFilter<"ConsumerAccount"> | string
|
||||
account_id?: Prisma.StringFilter<"ConsumerAccount"> | string
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
|
||||
pos?: Prisma.XOR<Prisma.PosNullableScalarRelationFilter, Prisma.PosWhereInput> | null
|
||||
permission?: Prisma.XOR<Prisma.PermissionConsumerNullableScalarRelationFilter, Prisma.PermissionConsumerWhereInput> | null
|
||||
account_allocation?: Prisma.XOR<Prisma.LicenseAccountAllocationNullableScalarRelationFilter, Prisma.LicenseAccountAllocationWhereInput> | null
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
account_device?: Prisma.XOR<Prisma.ConsumerAccountDeviceNullableScalarRelationFilter, Prisma.ConsumerAccountDeviceWhereInput> | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteListRelationFilter
|
||||
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
account_allocation?: Prisma.XOR<Prisma.LicenseAccountAllocationNullableScalarRelationFilter, Prisma.LicenseAccountAllocationWhereInput> | null
|
||||
permission?: Prisma.XOR<Prisma.PermissionConsumerNullableScalarRelationFilter, Prisma.PermissionConsumerWhereInput> | null
|
||||
pos?: Prisma.XOR<Prisma.PosNullableScalarRelationFilter, Prisma.PosWhereInput> | null
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}
|
||||
|
||||
export type ConsumerAccountOrderByWithRelationInput = {
|
||||
@@ -206,13 +207,14 @@ export type ConsumerAccountOrderByWithRelationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
consumer_id?: Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
consumer?: Prisma.ConsumerOrderByWithRelationInput
|
||||
account?: Prisma.AccountOrderByWithRelationInput
|
||||
pos?: Prisma.PosOrderByWithRelationInput
|
||||
permission?: Prisma.PermissionConsumerOrderByWithRelationInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationOrderByWithRelationInput
|
||||
sales_invoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceOrderByWithRelationInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteOrderByRelationAggregateInput
|
||||
account?: Prisma.AccountOrderByWithRelationInput
|
||||
consumer?: Prisma.ConsumerOrderByWithRelationInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationOrderByWithRelationInput
|
||||
permission?: Prisma.PermissionConsumerOrderByWithRelationInput
|
||||
pos?: Prisma.PosOrderByWithRelationInput
|
||||
sales_invoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.ConsumerAccountOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -226,13 +228,14 @@ export type ConsumerAccountWhereUniqueInput = Prisma.AtLeast<{
|
||||
created_at?: Prisma.DateTimeFilter<"ConsumerAccount"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"ConsumerAccount"> | Date | string
|
||||
consumer_id?: Prisma.StringFilter<"ConsumerAccount"> | string
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
|
||||
pos?: Prisma.XOR<Prisma.PosNullableScalarRelationFilter, Prisma.PosWhereInput> | null
|
||||
permission?: Prisma.XOR<Prisma.PermissionConsumerNullableScalarRelationFilter, Prisma.PermissionConsumerWhereInput> | null
|
||||
account_allocation?: Prisma.XOR<Prisma.LicenseAccountAllocationNullableScalarRelationFilter, Prisma.LicenseAccountAllocationWhereInput> | null
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
account_device?: Prisma.XOR<Prisma.ConsumerAccountDeviceNullableScalarRelationFilter, Prisma.ConsumerAccountDeviceWhereInput> | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteListRelationFilter
|
||||
account?: Prisma.XOR<Prisma.AccountScalarRelationFilter, Prisma.AccountWhereInput>
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
account_allocation?: Prisma.XOR<Prisma.LicenseAccountAllocationNullableScalarRelationFilter, Prisma.LicenseAccountAllocationWhereInput> | null
|
||||
permission?: Prisma.XOR<Prisma.PermissionConsumerNullableScalarRelationFilter, Prisma.PermissionConsumerWhereInput> | null
|
||||
pos?: Prisma.XOR<Prisma.PosNullableScalarRelationFilter, Prisma.PosWhereInput> | null
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}, "id" | "account_id">
|
||||
|
||||
export type ConsumerAccountOrderByWithAggregationInput = {
|
||||
@@ -264,13 +267,14 @@ export type ConsumerAccountCreateInput = {
|
||||
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
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutConsumer_accountInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateInput = {
|
||||
@@ -280,11 +284,12 @@ export type ConsumerAccountUncheckedCreateInput = {
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateInput = {
|
||||
@@ -292,13 +297,14 @@ export type ConsumerAccountUpdateInput = {
|
||||
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
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutConsumer_accountNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateInput = {
|
||||
@@ -308,11 +314,12 @@ export type ConsumerAccountUncheckedUpdateInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateManyInput = {
|
||||
@@ -529,6 +536,20 @@ export type ConsumerAccountUpdateOneRequiredWithoutPosNestedInput = {
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutPosInput, Prisma.ConsumerAccountUpdateWithoutPosInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutPosInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateNestedOneWithoutConsumer_account_good_favoritesInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutConsumer_account_good_favoritesInput, Prisma.ConsumerAccountUncheckedCreateWithoutConsumer_account_good_favoritesInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutConsumer_account_good_favoritesInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateOneRequiredWithoutConsumer_account_good_favoritesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutConsumer_account_good_favoritesInput, Prisma.ConsumerAccountUncheckedCreateWithoutConsumer_account_good_favoritesInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutConsumer_account_good_favoritesInput
|
||||
upsert?: Prisma.ConsumerAccountUpsertWithoutConsumer_account_good_favoritesInput
|
||||
connect?: Prisma.ConsumerAccountWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.ConsumerAccountUpdateToOneWithWhereWithoutConsumer_account_good_favoritesInput, Prisma.ConsumerAccountUpdateWithoutConsumer_account_good_favoritesInput>, Prisma.ConsumerAccountUncheckedUpdateWithoutConsumer_account_good_favoritesInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateNestedOneWithoutSales_invoicesInput = {
|
||||
create?: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutSales_invoicesInput, Prisma.ConsumerAccountUncheckedCreateWithoutSales_invoicesInput>
|
||||
connectOrCreate?: Prisma.ConsumerAccountCreateOrConnectWithoutSales_invoicesInput
|
||||
@@ -548,12 +569,13 @@ export type ConsumerAccountCreateWithoutAccountInput = {
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutConsumer_accountInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutAccountInput = {
|
||||
@@ -562,11 +584,12 @@ export type ConsumerAccountUncheckedCreateWithoutAccountInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutAccountInput = {
|
||||
@@ -590,12 +613,13 @@ export type ConsumerAccountUpdateWithoutAccountInput = {
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutConsumer_accountNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutAccountInput = {
|
||||
@@ -604,11 +628,12 @@ export type ConsumerAccountUncheckedUpdateWithoutAccountInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutAccount_allocationInput = {
|
||||
@@ -616,12 +641,13 @@ export type ConsumerAccountCreateWithoutAccount_allocationInput = {
|
||||
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
|
||||
account_device?: Prisma.ConsumerAccountDeviceCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutConsumer_accountInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutAccount_allocationInput = {
|
||||
@@ -631,10 +657,11 @@ export type ConsumerAccountUncheckedCreateWithoutAccount_allocationInput = {
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutAccount_allocationInput = {
|
||||
@@ -658,12 +685,13 @@ export type ConsumerAccountUpdateWithoutAccount_allocationInput = {
|
||||
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
|
||||
account_device?: Prisma.ConsumerAccountDeviceUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutConsumer_accountNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput = {
|
||||
@@ -673,10 +701,11 @@ export type ConsumerAccountUncheckedUpdateWithoutAccount_allocationInput = {
|
||||
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
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutPermissionInput = {
|
||||
@@ -684,12 +713,13 @@ export type ConsumerAccountCreateWithoutPermissionInput = {
|
||||
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
|
||||
account_device?: Prisma.ConsumerAccountDeviceCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutConsumer_accountInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutPermissionInput = {
|
||||
@@ -699,10 +729,11 @@ export type ConsumerAccountUncheckedCreateWithoutPermissionInput = {
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutPermissionInput = {
|
||||
@@ -726,12 +757,13 @@ export type ConsumerAccountUpdateWithoutPermissionInput = {
|
||||
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
|
||||
account_device?: Prisma.ConsumerAccountDeviceUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutConsumer_accountNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutPermissionInput = {
|
||||
@@ -741,10 +773,11 @@ export type ConsumerAccountUncheckedUpdateWithoutPermissionInput = {
|
||||
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
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutAccount_deviceInput = {
|
||||
@@ -752,11 +785,12 @@ export type ConsumerAccountCreateWithoutAccount_deviceInput = {
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutConsumer_accountInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
@@ -767,9 +801,10 @@ export type ConsumerAccountUncheckedCreateWithoutAccount_deviceInput = {
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
@@ -794,11 +829,12 @@ export type ConsumerAccountUpdateWithoutAccount_deviceInput = {
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutConsumer_accountNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
@@ -809,9 +845,10 @@ export type ConsumerAccountUncheckedUpdateWithoutAccount_deviceInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
@@ -820,12 +857,13 @@ export type ConsumerAccountCreateWithoutConsumerInput = {
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutConsumer_accountInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutConsumerInput = {
|
||||
@@ -834,11 +872,12 @@ export type ConsumerAccountUncheckedCreateWithoutConsumerInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutConsumerInput = {
|
||||
@@ -884,12 +923,13 @@ export type ConsumerAccountCreateWithoutPosInput = {
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutConsumer_accountInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutPosInput = {
|
||||
@@ -899,10 +939,11 @@ export type ConsumerAccountUncheckedCreateWithoutPosInput = {
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutPosInput = {
|
||||
@@ -926,12 +967,13 @@ export type ConsumerAccountUpdateWithoutPosInput = {
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutConsumer_accountNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutPosInput = {
|
||||
@@ -941,10 +983,83 @@ export type ConsumerAccountUncheckedUpdateWithoutPosInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutConsumer_account_good_favoritesInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account_device?: Prisma.ConsumerAccountDeviceCreateNestedOneWithoutConsumer_accountInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutConsumer_account_good_favoritesInput = {
|
||||
id?: string
|
||||
role: $Enums.ConsumerRole
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutConsumer_account_good_favoritesInput = {
|
||||
where: Prisma.ConsumerAccountWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutConsumer_account_good_favoritesInput, Prisma.ConsumerAccountUncheckedCreateWithoutConsumer_account_good_favoritesInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpsertWithoutConsumer_account_good_favoritesInput = {
|
||||
update: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutConsumer_account_good_favoritesInput, Prisma.ConsumerAccountUncheckedUpdateWithoutConsumer_account_good_favoritesInput>
|
||||
create: Prisma.XOR<Prisma.ConsumerAccountCreateWithoutConsumer_account_good_favoritesInput, Prisma.ConsumerAccountUncheckedCreateWithoutConsumer_account_good_favoritesInput>
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateToOneWithWhereWithoutConsumer_account_good_favoritesInput = {
|
||||
where?: Prisma.ConsumerAccountWhereInput
|
||||
data: Prisma.XOR<Prisma.ConsumerAccountUpdateWithoutConsumer_account_good_favoritesInput, Prisma.ConsumerAccountUncheckedUpdateWithoutConsumer_account_good_favoritesInput>
|
||||
}
|
||||
|
||||
export type ConsumerAccountUpdateWithoutConsumer_account_good_favoritesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_device?: Prisma.ConsumerAccountDeviceUpdateOneWithoutConsumer_accountNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutConsumer_account_good_favoritesInput = {
|
||||
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
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateWithoutSales_invoicesInput = {
|
||||
@@ -952,12 +1067,13 @@ export type ConsumerAccountCreateWithoutSales_invoicesInput = {
|
||||
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
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutConsumer_accountInput
|
||||
account: Prisma.AccountCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutAccountsInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedCreateWithoutSales_invoicesInput = {
|
||||
@@ -967,10 +1083,11 @@ export type ConsumerAccountUncheckedCreateWithoutSales_invoicesInput = {
|
||||
updated_at?: Date | string
|
||||
consumer_id: string
|
||||
account_id: string
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutConsumer_accountInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedCreateNestedOneWithoutAccountInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedCreateNestedOneWithoutConsumer_accountInput
|
||||
pos?: Prisma.PosUncheckedCreateNestedOneWithoutAccountInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateOrConnectWithoutSales_invoicesInput = {
|
||||
@@ -994,12 +1111,13 @@ export type ConsumerAccountUpdateWithoutSales_invoicesInput = {
|
||||
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
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutConsumer_accountNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutAccountsNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutSales_invoicesInput = {
|
||||
@@ -1009,10 +1127,11 @@ export type ConsumerAccountUncheckedUpdateWithoutSales_invoicesInput = {
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
consumer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountCreateManyConsumerInput = {
|
||||
@@ -1028,12 +1147,13 @@ export type ConsumerAccountUpdateWithoutConsumerInput = {
|
||||
role?: Prisma.EnumConsumerRoleFieldUpdateOperationsInput | $Enums.ConsumerRole
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutConsumer_accountNestedInput
|
||||
account?: Prisma.AccountUpdateOneRequiredWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateWithoutConsumerInput = {
|
||||
@@ -1042,11 +1162,12 @@ export type ConsumerAccountUncheckedUpdateWithoutConsumerInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_device?: Prisma.ConsumerAccountDeviceUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
account_allocation?: Prisma.LicenseAccountAllocationUncheckedUpdateOneWithoutAccountNestedInput
|
||||
permission?: Prisma.PermissionConsumerUncheckedUpdateOneWithoutConsumer_accountNestedInput
|
||||
pos?: Prisma.PosUncheckedUpdateOneWithoutAccountNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUncheckedUpdateManyWithoutConsumer_accountNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerAccountUncheckedUpdateManyWithoutConsumerInput = {
|
||||
@@ -1063,10 +1184,12 @@ export type ConsumerAccountUncheckedUpdateManyWithoutConsumerInput = {
|
||||
*/
|
||||
|
||||
export type ConsumerAccountCountOutputType = {
|
||||
consumer_account_good_favorites: number
|
||||
sales_invoices: number
|
||||
}
|
||||
|
||||
export type ConsumerAccountCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
consumer_account_good_favorites?: boolean | ConsumerAccountCountOutputTypeCountConsumer_account_good_favoritesArgs
|
||||
sales_invoices?: boolean | ConsumerAccountCountOutputTypeCountSales_invoicesArgs
|
||||
}
|
||||
|
||||
@@ -1080,6 +1203,13 @@ export type ConsumerAccountCountOutputTypeDefaultArgs<ExtArgs extends runtime.Ty
|
||||
select?: Prisma.ConsumerAccountCountOutputTypeSelect<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccountCountOutputType without action
|
||||
*/
|
||||
export type ConsumerAccountCountOutputTypeCountConsumer_account_good_favoritesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.ConsumerAccountGoodFavoriteWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccountCountOutputType without action
|
||||
*/
|
||||
@@ -1095,13 +1225,14 @@ export type ConsumerAccountSelect<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
updated_at?: boolean
|
||||
consumer_id?: boolean
|
||||
account_id?: boolean
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
|
||||
pos?: boolean | Prisma.ConsumerAccount$posArgs<ExtArgs>
|
||||
permission?: boolean | Prisma.ConsumerAccount$permissionArgs<ExtArgs>
|
||||
account_allocation?: boolean | Prisma.ConsumerAccount$account_allocationArgs<ExtArgs>
|
||||
sales_invoices?: boolean | Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs>
|
||||
account_device?: boolean | Prisma.ConsumerAccount$account_deviceArgs<ExtArgs>
|
||||
consumer_account_good_favorites?: boolean | Prisma.ConsumerAccount$consumer_account_good_favoritesArgs<ExtArgs>
|
||||
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
account_allocation?: boolean | Prisma.ConsumerAccount$account_allocationArgs<ExtArgs>
|
||||
permission?: boolean | Prisma.ConsumerAccount$permissionArgs<ExtArgs>
|
||||
pos?: boolean | Prisma.ConsumerAccount$posArgs<ExtArgs>
|
||||
sales_invoices?: boolean | Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ConsumerAccountCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["consumerAccount"]>
|
||||
|
||||
@@ -1118,26 +1249,28 @@ export type ConsumerAccountSelectScalar = {
|
||||
|
||||
export type ConsumerAccountOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "role" | "created_at" | "updated_at" | "consumer_id" | "account_id", ExtArgs["result"]["consumerAccount"]>
|
||||
export type ConsumerAccountInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
|
||||
pos?: boolean | Prisma.ConsumerAccount$posArgs<ExtArgs>
|
||||
permission?: boolean | Prisma.ConsumerAccount$permissionArgs<ExtArgs>
|
||||
account_allocation?: boolean | Prisma.ConsumerAccount$account_allocationArgs<ExtArgs>
|
||||
sales_invoices?: boolean | Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs>
|
||||
account_device?: boolean | Prisma.ConsumerAccount$account_deviceArgs<ExtArgs>
|
||||
consumer_account_good_favorites?: boolean | Prisma.ConsumerAccount$consumer_account_good_favoritesArgs<ExtArgs>
|
||||
account?: boolean | Prisma.AccountDefaultArgs<ExtArgs>
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
account_allocation?: boolean | Prisma.ConsumerAccount$account_allocationArgs<ExtArgs>
|
||||
permission?: boolean | Prisma.ConsumerAccount$permissionArgs<ExtArgs>
|
||||
pos?: boolean | Prisma.ConsumerAccount$posArgs<ExtArgs>
|
||||
sales_invoices?: boolean | Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ConsumerAccountCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $ConsumerAccountPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "ConsumerAccount"
|
||||
objects: {
|
||||
consumer: Prisma.$ConsumerPayload<ExtArgs>
|
||||
account: Prisma.$AccountPayload<ExtArgs>
|
||||
pos: Prisma.$PosPayload<ExtArgs> | null
|
||||
permission: Prisma.$PermissionConsumerPayload<ExtArgs> | null
|
||||
account_allocation: Prisma.$LicenseAccountAllocationPayload<ExtArgs> | null
|
||||
sales_invoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
account_device: Prisma.$ConsumerAccountDevicePayload<ExtArgs> | null
|
||||
consumer_account_good_favorites: Prisma.$ConsumerAccountGoodFavoritePayload<ExtArgs>[]
|
||||
account: Prisma.$AccountPayload<ExtArgs>
|
||||
consumer: Prisma.$ConsumerPayload<ExtArgs>
|
||||
account_allocation: Prisma.$LicenseAccountAllocationPayload<ExtArgs> | null
|
||||
permission: Prisma.$PermissionConsumerPayload<ExtArgs> | null
|
||||
pos: Prisma.$PosPayload<ExtArgs> | null
|
||||
sales_invoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1486,13 +1619,14 @@ readonly fields: ConsumerAccountFieldRefs;
|
||||
*/
|
||||
export interface Prisma__ConsumerAccountClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
consumer<T extends Prisma.ConsumerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerDefaultArgs<ExtArgs>>): Prisma.Prisma__ConsumerClient<runtime.Types.Result.GetResult<Prisma.$ConsumerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
account<T extends Prisma.AccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AccountDefaultArgs<ExtArgs>>): Prisma.Prisma__AccountClient<runtime.Types.Result.GetResult<Prisma.$AccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
pos<T extends Prisma.ConsumerAccount$posArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$posArgs<ExtArgs>>): Prisma.Prisma__PosClient<runtime.Types.Result.GetResult<Prisma.$PosPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
permission<T extends Prisma.ConsumerAccount$permissionArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$permissionArgs<ExtArgs>>): Prisma.Prisma__PermissionConsumerClient<runtime.Types.Result.GetResult<Prisma.$PermissionConsumerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
account_allocation<T extends Prisma.ConsumerAccount$account_allocationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$account_allocationArgs<ExtArgs>>): Prisma.Prisma__LicenseAccountAllocationClient<runtime.Types.Result.GetResult<Prisma.$LicenseAccountAllocationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
sales_invoices<T extends Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
account_device<T extends Prisma.ConsumerAccount$account_deviceArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$account_deviceArgs<ExtArgs>>): Prisma.Prisma__ConsumerAccountDeviceClient<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountDevicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
consumer_account_good_favorites<T extends Prisma.ConsumerAccount$consumer_account_good_favoritesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$consumer_account_good_favoritesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountGoodFavoritePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
account<T extends Prisma.AccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.AccountDefaultArgs<ExtArgs>>): Prisma.Prisma__AccountClient<runtime.Types.Result.GetResult<Prisma.$AccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
consumer<T extends Prisma.ConsumerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerDefaultArgs<ExtArgs>>): Prisma.Prisma__ConsumerClient<runtime.Types.Result.GetResult<Prisma.$ConsumerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
account_allocation<T extends Prisma.ConsumerAccount$account_allocationArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$account_allocationArgs<ExtArgs>>): Prisma.Prisma__LicenseAccountAllocationClient<runtime.Types.Result.GetResult<Prisma.$LicenseAccountAllocationPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
permission<T extends Prisma.ConsumerAccount$permissionArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$permissionArgs<ExtArgs>>): Prisma.Prisma__PermissionConsumerClient<runtime.Types.Result.GetResult<Prisma.$PermissionConsumerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
pos<T extends Prisma.ConsumerAccount$posArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$posArgs<ExtArgs>>): Prisma.Prisma__PosClient<runtime.Types.Result.GetResult<Prisma.$PosPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
sales_invoices<T extends Prisma.ConsumerAccount$sales_invoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccount$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.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1876,22 +2010,65 @@ export type ConsumerAccountDeleteManyArgs<ExtArgs extends runtime.Types.Extensio
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccount.pos
|
||||
* ConsumerAccount.account_device
|
||||
*/
|
||||
export type ConsumerAccount$posArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type ConsumerAccount$account_deviceArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Pos
|
||||
* Select specific fields to fetch from the ConsumerAccountDevice
|
||||
*/
|
||||
select?: Prisma.PosSelect<ExtArgs> | null
|
||||
select?: Prisma.ConsumerAccountDeviceSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Pos
|
||||
* Omit specific fields from the ConsumerAccountDevice
|
||||
*/
|
||||
omit?: Prisma.PosOmit<ExtArgs> | null
|
||||
omit?: Prisma.ConsumerAccountDeviceOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.PosInclude<ExtArgs> | null
|
||||
where?: Prisma.PosWhereInput
|
||||
include?: Prisma.ConsumerAccountDeviceInclude<ExtArgs> | null
|
||||
where?: Prisma.ConsumerAccountDeviceWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccount.consumer_account_good_favorites
|
||||
*/
|
||||
export type ConsumerAccount$consumer_account_good_favoritesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the ConsumerAccountGoodFavorite
|
||||
*/
|
||||
select?: Prisma.ConsumerAccountGoodFavoriteSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the ConsumerAccountGoodFavorite
|
||||
*/
|
||||
omit?: Prisma.ConsumerAccountGoodFavoriteOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ConsumerAccountGoodFavoriteInclude<ExtArgs> | null
|
||||
where?: Prisma.ConsumerAccountGoodFavoriteWhereInput
|
||||
orderBy?: Prisma.ConsumerAccountGoodFavoriteOrderByWithRelationInput | Prisma.ConsumerAccountGoodFavoriteOrderByWithRelationInput[]
|
||||
cursor?: Prisma.ConsumerAccountGoodFavoriteWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.ConsumerAccountGoodFavoriteScalarFieldEnum | Prisma.ConsumerAccountGoodFavoriteScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccount.account_allocation
|
||||
*/
|
||||
export type ConsumerAccount$account_allocationArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the LicenseAccountAllocation
|
||||
*/
|
||||
select?: Prisma.LicenseAccountAllocationSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the LicenseAccountAllocation
|
||||
*/
|
||||
omit?: Prisma.LicenseAccountAllocationOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.LicenseAccountAllocationInclude<ExtArgs> | null
|
||||
where?: Prisma.LicenseAccountAllocationWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1914,22 +2091,22 @@ export type ConsumerAccount$permissionArgs<ExtArgs extends runtime.Types.Extensi
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccount.account_allocation
|
||||
* ConsumerAccount.pos
|
||||
*/
|
||||
export type ConsumerAccount$account_allocationArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type ConsumerAccount$posArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the LicenseAccountAllocation
|
||||
* Select specific fields to fetch from the Pos
|
||||
*/
|
||||
select?: Prisma.LicenseAccountAllocationSelect<ExtArgs> | null
|
||||
select?: Prisma.PosSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the LicenseAccountAllocation
|
||||
* Omit specific fields from the Pos
|
||||
*/
|
||||
omit?: Prisma.LicenseAccountAllocationOmit<ExtArgs> | null
|
||||
omit?: Prisma.PosOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.LicenseAccountAllocationInclude<ExtArgs> | null
|
||||
where?: Prisma.LicenseAccountAllocationWhereInput
|
||||
include?: Prisma.PosInclude<ExtArgs> | null
|
||||
where?: Prisma.PosWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1956,25 +2133,6 @@ export type ConsumerAccount$sales_invoicesArgs<ExtArgs extends runtime.Types.Ext
|
||||
distinct?: Prisma.SalesInvoiceScalarFieldEnum | Prisma.SalesInvoiceScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccount.account_device
|
||||
*/
|
||||
export type ConsumerAccount$account_deviceArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the ConsumerAccountDevice
|
||||
*/
|
||||
select?: Prisma.ConsumerAccountDeviceSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the ConsumerAccountDevice
|
||||
*/
|
||||
omit?: Prisma.ConsumerAccountDeviceOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ConsumerAccountDeviceInclude<ExtArgs> | null
|
||||
where?: Prisma.ConsumerAccountDeviceWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* ConsumerAccount without action
|
||||
*/
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -206,8 +206,8 @@ export type ConsumerIndividualWhereInput = {
|
||||
updated_at?: Prisma.DateTimeFilter<"ConsumerIndividual"> | Date | string
|
||||
partner_id?: Prisma.StringFilter<"ConsumerIndividual"> | string
|
||||
consumer_id?: Prisma.StringFilter<"ConsumerIndividual"> | string
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
}
|
||||
|
||||
export type ConsumerIndividualOrderByWithRelationInput = {
|
||||
@@ -219,8 +219,8 @@ export type ConsumerIndividualOrderByWithRelationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
partner_id?: Prisma.SortOrder
|
||||
consumer_id?: Prisma.SortOrder
|
||||
partner?: Prisma.PartnerOrderByWithRelationInput
|
||||
consumer?: Prisma.ConsumerOrderByWithRelationInput
|
||||
partner?: Prisma.PartnerOrderByWithRelationInput
|
||||
_relevance?: Prisma.ConsumerIndividualOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -238,8 +238,8 @@ export type ConsumerIndividualWhereUniqueInput = Prisma.AtLeast<{
|
||||
created_at?: Prisma.DateTimeFilter<"ConsumerIndividual"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"ConsumerIndividual"> | Date | string
|
||||
partner_id?: Prisma.StringFilter<"ConsumerIndividual"> | string
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
}, "consumer_id" | "mobile_number_consumer_id" | "partner_id_national_code">
|
||||
|
||||
export type ConsumerIndividualOrderByWithAggregationInput = {
|
||||
@@ -277,8 +277,8 @@ export type ConsumerIndividualCreateInput = {
|
||||
national_code: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
partner: Prisma.PartnerCreateNestedOneWithoutConsumers_individualInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutIndividualInput
|
||||
partner: Prisma.PartnerCreateNestedOneWithoutConsumers_individualInput
|
||||
}
|
||||
|
||||
export type ConsumerIndividualUncheckedCreateInput = {
|
||||
@@ -299,8 +299,8 @@ export type ConsumerIndividualUpdateInput = {
|
||||
national_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
partner?: Prisma.PartnerUpdateOneRequiredWithoutConsumers_individualNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutIndividualNestedInput
|
||||
partner?: Prisma.PartnerUpdateOneRequiredWithoutConsumers_individualNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerIndividualUncheckedUpdateInput = {
|
||||
@@ -650,8 +650,8 @@ export type ConsumerIndividualSelect<ExtArgs extends runtime.Types.Extensions.In
|
||||
updated_at?: boolean
|
||||
partner_id?: boolean
|
||||
consumer_id?: boolean
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["consumerIndividual"]>
|
||||
|
||||
|
||||
@@ -669,15 +669,15 @@ export type ConsumerIndividualSelectScalar = {
|
||||
|
||||
export type ConsumerIndividualOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"first_name" | "last_name" | "mobile_number" | "national_code" | "created_at" | "updated_at" | "partner_id" | "consumer_id", ExtArgs["result"]["consumerIndividual"]>
|
||||
export type ConsumerIndividualInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $ConsumerIndividualPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "ConsumerIndividual"
|
||||
objects: {
|
||||
partner: Prisma.$PartnerPayload<ExtArgs>
|
||||
consumer: Prisma.$ConsumerPayload<ExtArgs>
|
||||
partner: Prisma.$PartnerPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
first_name: string
|
||||
@@ -1028,8 +1028,8 @@ readonly fields: ConsumerIndividualFieldRefs;
|
||||
*/
|
||||
export interface Prisma__ConsumerIndividualClient<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>
|
||||
consumer<T extends Prisma.ConsumerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerDefaultArgs<ExtArgs>>): Prisma.Prisma__ConsumerClient<runtime.Types.Result.GetResult<Prisma.$ConsumerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
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.
|
||||
|
||||
@@ -190,8 +190,8 @@ export type ConsumerLegalWhereInput = {
|
||||
updated_at?: Prisma.DateTimeFilter<"ConsumerLegal"> | Date | string
|
||||
partner_id?: Prisma.StringFilter<"ConsumerLegal"> | string
|
||||
consumer_id?: Prisma.StringFilter<"ConsumerLegal"> | string
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
}
|
||||
|
||||
export type ConsumerLegalOrderByWithRelationInput = {
|
||||
@@ -201,8 +201,8 @@ export type ConsumerLegalOrderByWithRelationInput = {
|
||||
updated_at?: Prisma.SortOrder
|
||||
partner_id?: Prisma.SortOrder
|
||||
consumer_id?: Prisma.SortOrder
|
||||
partner?: Prisma.PartnerOrderByWithRelationInput
|
||||
consumer?: Prisma.ConsumerOrderByWithRelationInput
|
||||
partner?: Prisma.PartnerOrderByWithRelationInput
|
||||
_relevance?: Prisma.ConsumerLegalOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -217,8 +217,8 @@ export type ConsumerLegalWhereUniqueInput = Prisma.AtLeast<{
|
||||
created_at?: Prisma.DateTimeFilter<"ConsumerLegal"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"ConsumerLegal"> | Date | string
|
||||
partner_id?: Prisma.StringFilter<"ConsumerLegal"> | string
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
consumer?: Prisma.XOR<Prisma.ConsumerScalarRelationFilter, Prisma.ConsumerWhereInput>
|
||||
partner?: Prisma.XOR<Prisma.PartnerScalarRelationFilter, Prisma.PartnerWhereInput>
|
||||
}, "consumer_id" | "partner_id_registration_code">
|
||||
|
||||
export type ConsumerLegalOrderByWithAggregationInput = {
|
||||
@@ -250,8 +250,8 @@ export type ConsumerLegalCreateInput = {
|
||||
registration_code: string
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
partner: Prisma.PartnerCreateNestedOneWithoutConsumers_legalInput
|
||||
consumer: Prisma.ConsumerCreateNestedOneWithoutLegalInput
|
||||
partner: Prisma.PartnerCreateNestedOneWithoutConsumers_legalInput
|
||||
}
|
||||
|
||||
export type ConsumerLegalUncheckedCreateInput = {
|
||||
@@ -268,8 +268,8 @@ export type ConsumerLegalUpdateInput = {
|
||||
registration_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
partner?: Prisma.PartnerUpdateOneRequiredWithoutConsumers_legalNestedInput
|
||||
consumer?: Prisma.ConsumerUpdateOneRequiredWithoutLegalNestedInput
|
||||
partner?: Prisma.PartnerUpdateOneRequiredWithoutConsumers_legalNestedInput
|
||||
}
|
||||
|
||||
export type ConsumerLegalUncheckedUpdateInput = {
|
||||
@@ -576,8 +576,8 @@ export type ConsumerLegalSelect<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
updated_at?: boolean
|
||||
partner_id?: boolean
|
||||
consumer_id?: boolean
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["consumerLegal"]>
|
||||
|
||||
|
||||
@@ -593,15 +593,15 @@ export type ConsumerLegalSelectScalar = {
|
||||
|
||||
export type ConsumerLegalOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"name" | "registration_code" | "created_at" | "updated_at" | "partner_id" | "consumer_id", ExtArgs["result"]["consumerLegal"]>
|
||||
export type ConsumerLegalInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
consumer?: boolean | Prisma.ConsumerDefaultArgs<ExtArgs>
|
||||
partner?: boolean | Prisma.PartnerDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $ConsumerLegalPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "ConsumerLegal"
|
||||
objects: {
|
||||
partner: Prisma.$PartnerPayload<ExtArgs>
|
||||
consumer: Prisma.$ConsumerPayload<ExtArgs>
|
||||
partner: Prisma.$PartnerPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
name: string
|
||||
@@ -950,8 +950,8 @@ readonly fields: ConsumerLegalFieldRefs;
|
||||
*/
|
||||
export interface Prisma__ConsumerLegalClient<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>
|
||||
consumer<T extends Prisma.ConsumerDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerDefaultArgs<ExtArgs>>): Prisma.Prisma__ConsumerClient<runtime.Types.Result.GetResult<Prisma.$ConsumerPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
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.
|
||||
|
||||
@@ -166,11 +166,11 @@ export type CustomerIndividualGroupByArgs<ExtArgs extends runtime.Types.Extensio
|
||||
}
|
||||
|
||||
export type CustomerIndividualGroupByOutputType = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
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
|
||||
business_activity_id: string
|
||||
@@ -198,55 +198,56 @@ export type CustomerIndividualWhereInput = {
|
||||
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
|
||||
first_name?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
last_name?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
national_id?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
mobile_number?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
postal_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
customer_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
}
|
||||
|
||||
export type CustomerIndividualOrderByWithRelationInput = {
|
||||
first_name?: Prisma.SortOrder
|
||||
last_name?: Prisma.SortOrder
|
||||
national_id?: Prisma.SortOrder
|
||||
mobile_number?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
first_name?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
last_name?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
national_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
mobile_number?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
business_activity?: Prisma.BusinessActivityOrderByWithRelationInput
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
_relevance?: Prisma.CustomerIndividualOrderByRelevanceInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualWhereUniqueInput = Prisma.AtLeast<{
|
||||
customer_id?: string
|
||||
business_activity_id_national_id?: Prisma.CustomerIndividualBusiness_activity_idNational_idCompoundUniqueInput
|
||||
business_activity_id_postal_code_national_id?: Prisma.CustomerIndividualBusiness_activity_idPostal_codeNational_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
|
||||
first_name?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
last_name?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
national_id?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
mobile_number?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
postal_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerIndividual"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
}, "customer_id" | "business_activity_id_national_id">
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
}, "customer_id" | "business_activity_id_national_id" | "business_activity_id_postal_code_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
|
||||
first_name?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
last_name?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
national_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
mobile_number?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
@@ -259,86 +260,86 @@ export type CustomerIndividualScalarWhereWithAggregatesInput = {
|
||||
AND?: Prisma.CustomerIndividualScalarWhereWithAggregatesInput | Prisma.CustomerIndividualScalarWhereWithAggregatesInput[]
|
||||
OR?: Prisma.CustomerIndividualScalarWhereWithAggregatesInput[]
|
||||
NOT?: Prisma.CustomerIndividualScalarWhereWithAggregatesInput | Prisma.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
|
||||
first_name?: Prisma.StringNullableWithAggregatesFilter<"CustomerIndividual"> | string | null
|
||||
last_name?: Prisma.StringNullableWithAggregatesFilter<"CustomerIndividual"> | string | null
|
||||
national_id?: Prisma.StringNullableWithAggregatesFilter<"CustomerIndividual"> | string | null
|
||||
mobile_number?: Prisma.StringNullableWithAggregatesFilter<"CustomerIndividual"> | string | null
|
||||
postal_code?: Prisma.StringNullableWithAggregatesFilter<"CustomerIndividual"> | string | null
|
||||
economic_code?: Prisma.StringNullableWithAggregatesFilter<"CustomerIndividual"> | string | null
|
||||
customer_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
|
||||
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: Prisma.CustomerCreateNestedOneWithoutIndividualInput
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_individualsInput
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutIndividualInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
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
|
||||
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
|
||||
first_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
last_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
national_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
mobile_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutIndividualNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutCustomer_individualsNestedInput
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutIndividualNestedInput
|
||||
}
|
||||
|
||||
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
|
||||
first_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
last_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
national_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
mobile_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_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
|
||||
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
|
||||
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
|
||||
first_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
last_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
national_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
mobile_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
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
|
||||
first_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
last_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
national_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
mobile_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
@@ -370,6 +371,12 @@ export type CustomerIndividualBusiness_activity_idNational_idCompoundUniqueInput
|
||||
national_id: string
|
||||
}
|
||||
|
||||
export type CustomerIndividualBusiness_activity_idPostal_codeNational_idCompoundUniqueInput = {
|
||||
business_activity_id: string
|
||||
postal_code: string
|
||||
national_id: string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCountOrderByAggregateInput = {
|
||||
first_name?: Prisma.SortOrder
|
||||
last_name?: Prisma.SortOrder
|
||||
@@ -478,21 +485,21 @@ export type CustomerIndividualUncheckedUpdateOneWithoutCustomerNestedInput = {
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateWithoutBusiness_activityInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
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: Prisma.CustomerCreateNestedOneWithoutIndividualInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateWithoutBusiness_activityInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
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
|
||||
}
|
||||
@@ -527,32 +534,32 @@ export type CustomerIndividualScalarWhereInput = {
|
||||
AND?: Prisma.CustomerIndividualScalarWhereInput | Prisma.CustomerIndividualScalarWhereInput[]
|
||||
OR?: Prisma.CustomerIndividualScalarWhereInput[]
|
||||
NOT?: Prisma.CustomerIndividualScalarWhereInput | Prisma.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
|
||||
first_name?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
last_name?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
national_id?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
mobile_number?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
postal_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerIndividual"> | string | null
|
||||
customer_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
|
||||
first_name?: string | null
|
||||
last_name?: string | null
|
||||
national_id?: string | null
|
||||
mobile_number?: string | null
|
||||
postal_code?: string | null
|
||||
economic_code?: string | null
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_individualsInput
|
||||
}
|
||||
|
||||
export type CustomerIndividualUncheckedCreateWithoutCustomerInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
first_name?: string | null
|
||||
last_name?: string | null
|
||||
national_id?: string | null
|
||||
mobile_number?: string | null
|
||||
postal_code?: string | null
|
||||
economic_code?: string | null
|
||||
business_activity_id: string
|
||||
}
|
||||
@@ -574,61 +581,61 @@ export type CustomerIndividualUpdateToOneWithWhereWithoutCustomerInput = {
|
||||
}
|
||||
|
||||
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
|
||||
first_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
last_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
national_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
mobile_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
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
|
||||
first_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
last_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
national_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
mobile_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerIndividualCreateManyBusiness_activityInput = {
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
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
|
||||
}
|
||||
|
||||
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
|
||||
first_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
last_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
national_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
mobile_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutIndividualNestedInput
|
||||
}
|
||||
|
||||
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
|
||||
first_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
last_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
national_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
mobile_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
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
|
||||
first_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
last_name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
national_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
mobile_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
@@ -644,8 +651,8 @@ export type CustomerIndividualSelect<ExtArgs extends runtime.Types.Extensions.In
|
||||
economic_code?: boolean
|
||||
customer_id?: boolean
|
||||
business_activity_id?: boolean
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["customerIndividual"]>
|
||||
|
||||
|
||||
@@ -663,22 +670,22 @@ export type CustomerIndividualSelectScalar = {
|
||||
|
||||
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>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $CustomerIndividualPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "CustomerIndividual"
|
||||
objects: {
|
||||
customer: Prisma.$CustomerPayload<ExtArgs>
|
||||
business_activity: Prisma.$BusinessActivityPayload<ExtArgs>
|
||||
customer: Prisma.$CustomerPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
first_name: string
|
||||
last_name: string
|
||||
national_id: string
|
||||
mobile_number: string
|
||||
postal_code: string
|
||||
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
|
||||
business_activity_id: string
|
||||
@@ -1022,8 +1029,8 @@ 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>
|
||||
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>
|
||||
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>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
|
||||
@@ -154,10 +154,10 @@ export type CustomerLegalGroupByArgs<ExtArgs extends runtime.Types.Extensions.In
|
||||
}
|
||||
|
||||
export type CustomerLegalGroupByOutputType = {
|
||||
name: string
|
||||
economic_code: string
|
||||
name: string | null
|
||||
economic_code: string | null
|
||||
registration_number: string | null
|
||||
postal_code: string
|
||||
postal_code: string | null
|
||||
customer_id: string
|
||||
business_activity_id: string
|
||||
_count: CustomerLegalCountAggregateOutputType | null
|
||||
@@ -184,48 +184,49 @@ export type CustomerLegalWhereInput = {
|
||||
AND?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
OR?: Prisma.CustomerLegalWhereInput[]
|
||||
NOT?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
economic_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
name?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
registration_number?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
postal_code?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
customer_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
}
|
||||
|
||||
export type CustomerLegalOrderByWithRelationInput = {
|
||||
name?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
registration_number?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
business_activity?: Prisma.BusinessActivityOrderByWithRelationInput
|
||||
customer?: Prisma.CustomerOrderByWithRelationInput
|
||||
_relevance?: Prisma.CustomerLegalOrderByRelevanceInput
|
||||
}
|
||||
|
||||
export type CustomerLegalWhereUniqueInput = Prisma.AtLeast<{
|
||||
customer_id?: string
|
||||
business_activity_id_economic_code?: Prisma.CustomerLegalBusiness_activity_idEconomic_codeCompoundUniqueInput
|
||||
business_activity_id_postal_code_registration_number?: Prisma.CustomerLegalBusiness_activity_idPostal_codeRegistration_numberCompoundUniqueInput
|
||||
AND?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
OR?: Prisma.CustomerLegalWhereInput[]
|
||||
NOT?: Prisma.CustomerLegalWhereInput | Prisma.CustomerLegalWhereInput[]
|
||||
name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
economic_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
name?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
registration_number?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
postal_code?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityScalarRelationFilter, Prisma.BusinessActivityWhereInput>
|
||||
}, "customer_id" | "business_activity_id_economic_code">
|
||||
customer?: Prisma.XOR<Prisma.CustomerScalarRelationFilter, Prisma.CustomerWhereInput>
|
||||
}, "customer_id" | "business_activity_id_economic_code" | "business_activity_id_postal_code_registration_number">
|
||||
|
||||
export type CustomerLegalOrderByWithAggregationInput = {
|
||||
name?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
name?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
registration_number?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrder
|
||||
postal_code?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
customer_id?: Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrder
|
||||
_count?: Prisma.CustomerLegalCountOrderByAggregateInput
|
||||
@@ -237,71 +238,71 @@ export type CustomerLegalScalarWhereWithAggregatesInput = {
|
||||
AND?: Prisma.CustomerLegalScalarWhereWithAggregatesInput | Prisma.CustomerLegalScalarWhereWithAggregatesInput[]
|
||||
OR?: Prisma.CustomerLegalScalarWhereWithAggregatesInput[]
|
||||
NOT?: Prisma.CustomerLegalScalarWhereWithAggregatesInput | Prisma.CustomerLegalScalarWhereWithAggregatesInput[]
|
||||
name?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
economic_code?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
name?: Prisma.StringNullableWithAggregatesFilter<"CustomerLegal"> | string | null
|
||||
economic_code?: Prisma.StringNullableWithAggregatesFilter<"CustomerLegal"> | string | null
|
||||
registration_number?: Prisma.StringNullableWithAggregatesFilter<"CustomerLegal"> | string | null
|
||||
postal_code?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
postal_code?: Prisma.StringNullableWithAggregatesFilter<"CustomerLegal"> | string | null
|
||||
customer_id?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
business_activity_id?: Prisma.StringWithAggregatesFilter<"CustomerLegal"> | string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
name?: string | null
|
||||
economic_code?: string | null
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutLegalInput
|
||||
postal_code?: string | null
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_legalsInput
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutLegalInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
name?: string | null
|
||||
economic_code?: string | null
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
postal_code?: string | null
|
||||
customer_id: string
|
||||
business_activity_id: string
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutLegalNestedInput
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutCustomer_legalsNestedInput
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutLegalNestedInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateManyInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
name?: string | null
|
||||
economic_code?: string | null
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
postal_code?: string | null
|
||||
customer_id: string
|
||||
business_activity_id: string
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateManyMutationInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateManyInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
@@ -332,6 +333,12 @@ export type CustomerLegalBusiness_activity_idEconomic_codeCompoundUniqueInput =
|
||||
economic_code: string
|
||||
}
|
||||
|
||||
export type CustomerLegalBusiness_activity_idPostal_codeRegistration_numberCompoundUniqueInput = {
|
||||
business_activity_id: string
|
||||
postal_code: string
|
||||
registration_number: string
|
||||
}
|
||||
|
||||
export type CustomerLegalCountOrderByAggregateInput = {
|
||||
name?: Prisma.SortOrder
|
||||
economic_code?: Prisma.SortOrder
|
||||
@@ -434,18 +441,18 @@ export type CustomerLegalUncheckedUpdateOneWithoutCustomerNestedInput = {
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateWithoutBusiness_activityInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
name?: string | null
|
||||
economic_code?: string | null
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
postal_code?: string | null
|
||||
customer: Prisma.CustomerCreateNestedOneWithoutLegalInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateWithoutBusiness_activityInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
name?: string | null
|
||||
economic_code?: string | null
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
postal_code?: string | null
|
||||
customer_id: string
|
||||
}
|
||||
|
||||
@@ -479,27 +486,27 @@ export type CustomerLegalScalarWhereInput = {
|
||||
AND?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
OR?: Prisma.CustomerLegalScalarWhereInput[]
|
||||
NOT?: Prisma.CustomerLegalScalarWhereInput | Prisma.CustomerLegalScalarWhereInput[]
|
||||
name?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
economic_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
name?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
economic_code?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
registration_number?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
postal_code?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
postal_code?: Prisma.StringNullableFilter<"CustomerLegal"> | string | null
|
||||
customer_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
business_activity_id?: Prisma.StringFilter<"CustomerLegal"> | string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateWithoutCustomerInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
name?: string | null
|
||||
economic_code?: string | null
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
postal_code?: string | null
|
||||
business_activity: Prisma.BusinessActivityCreateNestedOneWithoutCustomer_legalsInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedCreateWithoutCustomerInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
name?: string | null
|
||||
economic_code?: string | null
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
postal_code?: string | null
|
||||
business_activity_id: string
|
||||
}
|
||||
|
||||
@@ -520,50 +527,50 @@ export type CustomerLegalUpdateToOneWithWhereWithoutCustomerInput = {
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateWithoutCustomerInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneRequiredWithoutCustomer_legalsNestedInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateWithoutCustomerInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
business_activity_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalCreateManyBusiness_activityInput = {
|
||||
name: string
|
||||
economic_code: string
|
||||
name?: string | null
|
||||
economic_code?: string | null
|
||||
registration_number?: string | null
|
||||
postal_code: string
|
||||
postal_code?: string | null
|
||||
customer_id: string
|
||||
}
|
||||
|
||||
export type CustomerLegalUpdateWithoutBusiness_activityInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer?: Prisma.CustomerUpdateOneRequiredWithoutLegalNestedInput
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
export type CustomerLegalUncheckedUpdateManyWithoutBusiness_activityInput = {
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
economic_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
economic_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
registration_number?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
postal_code?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
postal_code?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
customer_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
}
|
||||
|
||||
@@ -576,8 +583,8 @@ export type CustomerLegalSelect<ExtArgs extends runtime.Types.Extensions.Interna
|
||||
postal_code?: boolean
|
||||
customer_id?: boolean
|
||||
business_activity_id?: boolean
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["customerLegal"]>
|
||||
|
||||
|
||||
@@ -593,21 +600,21 @@ export type CustomerLegalSelectScalar = {
|
||||
|
||||
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>
|
||||
business_activity?: boolean | Prisma.BusinessActivityDefaultArgs<ExtArgs>
|
||||
customer?: boolean | Prisma.CustomerDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $CustomerLegalPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "CustomerLegal"
|
||||
objects: {
|
||||
customer: Prisma.$CustomerPayload<ExtArgs>
|
||||
business_activity: Prisma.$BusinessActivityPayload<ExtArgs>
|
||||
customer: Prisma.$CustomerPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
name: string
|
||||
economic_code: string
|
||||
name: string | null
|
||||
economic_code: string | null
|
||||
registration_number: string | null
|
||||
postal_code: string
|
||||
postal_code: string | null
|
||||
customer_id: string
|
||||
business_activity_id: string
|
||||
}, ExtArgs["result"]["customerLegal"]>
|
||||
@@ -950,8 +957,8 @@ 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>
|
||||
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>
|
||||
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>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
|
||||
@@ -304,10 +304,11 @@ export type GoodWhereInput = {
|
||||
measure_unit_id?: Prisma.StringFilter<"Good"> | string
|
||||
category_id?: Prisma.StringNullableFilter<"Good"> | string | null
|
||||
business_activity_id?: Prisma.StringNullableFilter<"Good"> | string | null
|
||||
sku?: Prisma.XOR<Prisma.StockKeepingUnitsScalarRelationFilter, Prisma.StockKeepingUnitsWhereInput>
|
||||
measure_unit?: Prisma.XOR<Prisma.MeasureUnitsScalarRelationFilter, Prisma.MeasureUnitsWhereInput>
|
||||
category?: Prisma.XOR<Prisma.GoodCategoryNullableScalarRelationFilter, Prisma.GoodCategoryWhereInput> | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteListRelationFilter
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityNullableScalarRelationFilter, Prisma.BusinessActivityWhereInput> | null
|
||||
category?: Prisma.XOR<Prisma.GoodCategoryNullableScalarRelationFilter, Prisma.GoodCategoryWhereInput> | null
|
||||
measure_unit?: Prisma.XOR<Prisma.MeasureUnitsScalarRelationFilter, Prisma.MeasureUnitsWhereInput>
|
||||
sku?: Prisma.XOR<Prisma.StockKeepingUnitsScalarRelationFilter, Prisma.StockKeepingUnitsWhereInput>
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
}
|
||||
|
||||
@@ -328,10 +329,11 @@ export type GoodOrderByWithRelationInput = {
|
||||
measure_unit_id?: Prisma.SortOrder
|
||||
category_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
business_activity_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
sku?: Prisma.StockKeepingUnitsOrderByWithRelationInput
|
||||
measure_unit?: Prisma.MeasureUnitsOrderByWithRelationInput
|
||||
category?: Prisma.GoodCategoryOrderByWithRelationInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteOrderByRelationAggregateInput
|
||||
business_activity?: Prisma.BusinessActivityOrderByWithRelationInput
|
||||
category?: Prisma.GoodCategoryOrderByWithRelationInput
|
||||
measure_unit?: Prisma.MeasureUnitsOrderByWithRelationInput
|
||||
sku?: Prisma.StockKeepingUnitsOrderByWithRelationInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.GoodOrderByRelevanceInput
|
||||
}
|
||||
@@ -356,10 +358,11 @@ export type GoodWhereUniqueInput = Prisma.AtLeast<{
|
||||
measure_unit_id?: Prisma.StringFilter<"Good"> | string
|
||||
category_id?: Prisma.StringNullableFilter<"Good"> | string | null
|
||||
business_activity_id?: Prisma.StringNullableFilter<"Good"> | string | null
|
||||
sku?: Prisma.XOR<Prisma.StockKeepingUnitsScalarRelationFilter, Prisma.StockKeepingUnitsWhereInput>
|
||||
measure_unit?: Prisma.XOR<Prisma.MeasureUnitsScalarRelationFilter, Prisma.MeasureUnitsWhereInput>
|
||||
category?: Prisma.XOR<Prisma.GoodCategoryNullableScalarRelationFilter, Prisma.GoodCategoryWhereInput> | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteListRelationFilter
|
||||
business_activity?: Prisma.XOR<Prisma.BusinessActivityNullableScalarRelationFilter, Prisma.BusinessActivityWhereInput> | null
|
||||
category?: Prisma.XOR<Prisma.GoodCategoryNullableScalarRelationFilter, Prisma.GoodCategoryWhereInput> | null
|
||||
measure_unit?: Prisma.XOR<Prisma.MeasureUnitsScalarRelationFilter, Prisma.MeasureUnitsWhereInput>
|
||||
sku?: Prisma.XOR<Prisma.StockKeepingUnitsScalarRelationFilter, Prisma.StockKeepingUnitsWhereInput>
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
}, "id" | "local_sku" | "barcode">
|
||||
|
||||
@@ -422,10 +425,11 @@ export type GoodCreateInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutGoodInput
|
||||
business_activity?: Prisma.BusinessActivityCreateNestedOneWithoutGoodsInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -446,6 +450,7 @@ export type GoodUncheckedCreateInput = {
|
||||
measure_unit_id: string
|
||||
category_id?: string | null
|
||||
business_activity_id?: string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutGoodInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -462,10 +467,11 @@ export type GoodUpdateInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutGoodNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneWithoutGoodsNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -486,6 +492,7 @@ export type GoodUncheckedUpdateInput = {
|
||||
measure_unit_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
category_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
business_activity_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutGoodNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -552,6 +559,11 @@ export type GoodOrderByRelationAggregateInput = {
|
||||
_count?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type GoodScalarRelationFilter = {
|
||||
is?: Prisma.GoodWhereInput
|
||||
isNot?: Prisma.GoodWhereInput
|
||||
}
|
||||
|
||||
export type GoodOrderByRelevanceInput = {
|
||||
fields: Prisma.GoodOrderByRelevanceFieldEnum | Prisma.GoodOrderByRelevanceFieldEnum[]
|
||||
sort: Prisma.SortOrder
|
||||
@@ -623,11 +635,6 @@ export type GoodSumOrderByAggregateInput = {
|
||||
base_sale_price?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type GoodScalarRelationFilter = {
|
||||
is?: Prisma.GoodWhereInput
|
||||
isNot?: Prisma.GoodWhereInput
|
||||
}
|
||||
|
||||
export type GoodCreateNestedManyWithoutBusiness_activityInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCreateWithoutBusiness_activityInput, Prisma.GoodUncheckedCreateWithoutBusiness_activityInput> | Prisma.GoodCreateWithoutBusiness_activityInput[] | Prisma.GoodUncheckedCreateWithoutBusiness_activityInput[]
|
||||
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutBusiness_activityInput | Prisma.GoodCreateOrConnectWithoutBusiness_activityInput[]
|
||||
@@ -670,6 +677,20 @@ export type GoodUncheckedUpdateManyWithoutBusiness_activityNestedInput = {
|
||||
deleteMany?: Prisma.GoodScalarWhereInput | Prisma.GoodScalarWhereInput[]
|
||||
}
|
||||
|
||||
export type GoodCreateNestedOneWithoutConsumer_account_good_favoritesInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCreateWithoutConsumer_account_good_favoritesInput, Prisma.GoodUncheckedCreateWithoutConsumer_account_good_favoritesInput>
|
||||
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutConsumer_account_good_favoritesInput
|
||||
connect?: Prisma.GoodWhereUniqueInput
|
||||
}
|
||||
|
||||
export type GoodUpdateOneRequiredWithoutConsumer_account_good_favoritesNestedInput = {
|
||||
create?: Prisma.XOR<Prisma.GoodCreateWithoutConsumer_account_good_favoritesInput, Prisma.GoodUncheckedCreateWithoutConsumer_account_good_favoritesInput>
|
||||
connectOrCreate?: Prisma.GoodCreateOrConnectWithoutConsumer_account_good_favoritesInput
|
||||
upsert?: Prisma.GoodUpsertWithoutConsumer_account_good_favoritesInput
|
||||
connect?: Prisma.GoodWhereUniqueInput
|
||||
update?: Prisma.XOR<Prisma.XOR<Prisma.GoodUpdateToOneWithWhereWithoutConsumer_account_good_favoritesInput, Prisma.GoodUpdateWithoutConsumer_account_good_favoritesInput>, Prisma.GoodUncheckedUpdateWithoutConsumer_account_good_favoritesInput>
|
||||
}
|
||||
|
||||
export type EnumGoodPricingModelFieldUpdateOperationsInput = {
|
||||
set?: $Enums.GoodPricingModel
|
||||
}
|
||||
@@ -839,9 +860,10 @@ export type GoodCreateWithoutBusiness_activityInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutGoodInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -861,6 +883,7 @@ export type GoodUncheckedCreateWithoutBusiness_activityInput = {
|
||||
sku_id: string
|
||||
measure_unit_id: string
|
||||
category_id?: string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutGoodInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -912,6 +935,102 @@ export type GoodScalarWhereInput = {
|
||||
business_activity_id?: Prisma.StringNullableFilter<"Good"> | string | null
|
||||
}
|
||||
|
||||
export type GoodCreateWithoutConsumer_account_good_favoritesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
is_default_guild_good?: boolean
|
||||
pricing_model: $Enums.GoodPricingModel
|
||||
description?: string | null
|
||||
local_sku?: string | null
|
||||
barcode?: string | null
|
||||
base_sale_price?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
image_url?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
business_activity?: Prisma.BusinessActivityCreateNestedOneWithoutGoodsInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
export type GoodUncheckedCreateWithoutConsumer_account_good_favoritesInput = {
|
||||
id?: string
|
||||
name: string
|
||||
is_default_guild_good?: boolean
|
||||
pricing_model: $Enums.GoodPricingModel
|
||||
description?: string | null
|
||||
local_sku?: string | null
|
||||
barcode?: string | null
|
||||
base_sale_price?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
image_url?: string | null
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
sku_id: string
|
||||
measure_unit_id: string
|
||||
category_id?: string | null
|
||||
business_activity_id?: string | null
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
export type GoodCreateOrConnectWithoutConsumer_account_good_favoritesInput = {
|
||||
where: Prisma.GoodWhereUniqueInput
|
||||
create: Prisma.XOR<Prisma.GoodCreateWithoutConsumer_account_good_favoritesInput, Prisma.GoodUncheckedCreateWithoutConsumer_account_good_favoritesInput>
|
||||
}
|
||||
|
||||
export type GoodUpsertWithoutConsumer_account_good_favoritesInput = {
|
||||
update: Prisma.XOR<Prisma.GoodUpdateWithoutConsumer_account_good_favoritesInput, Prisma.GoodUncheckedUpdateWithoutConsumer_account_good_favoritesInput>
|
||||
create: Prisma.XOR<Prisma.GoodCreateWithoutConsumer_account_good_favoritesInput, Prisma.GoodUncheckedCreateWithoutConsumer_account_good_favoritesInput>
|
||||
where?: Prisma.GoodWhereInput
|
||||
}
|
||||
|
||||
export type GoodUpdateToOneWithWhereWithoutConsumer_account_good_favoritesInput = {
|
||||
where?: Prisma.GoodWhereInput
|
||||
data: Prisma.XOR<Prisma.GoodUpdateWithoutConsumer_account_good_favoritesInput, Prisma.GoodUncheckedUpdateWithoutConsumer_account_good_favoritesInput>
|
||||
}
|
||||
|
||||
export type GoodUpdateWithoutConsumer_account_good_favoritesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
pricing_model?: Prisma.EnumGoodPricingModelFieldUpdateOperationsInput | $Enums.GoodPricingModel
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
local_sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
base_sale_price?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneWithoutGoodsNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
export type GoodUncheckedUpdateWithoutConsumer_account_good_favoritesInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
name?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
is_default_guild_good?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
pricing_model?: Prisma.EnumGoodPricingModelFieldUpdateOperationsInput | $Enums.GoodPricingModel
|
||||
description?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
local_sku?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
barcode?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
base_sale_price?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
image_url?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sku_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
measure_unit_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
category_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
business_activity_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
export type GoodCreateWithoutCategoryInput = {
|
||||
id?: string
|
||||
name: string
|
||||
@@ -925,9 +1044,10 @@ export type GoodCreateWithoutCategoryInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutGoodInput
|
||||
business_activity?: Prisma.BusinessActivityCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -947,6 +1067,7 @@ export type GoodUncheckedCreateWithoutCategoryInput = {
|
||||
sku_id: string
|
||||
measure_unit_id: string
|
||||
business_activity_id?: string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutGoodInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -989,9 +1110,10 @@ export type GoodCreateWithoutMeasure_unitInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutGoodInput
|
||||
business_activity?: Prisma.BusinessActivityCreateNestedOneWithoutGoodsInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -1011,6 +1133,7 @@ export type GoodUncheckedCreateWithoutMeasure_unitInput = {
|
||||
sku_id: string
|
||||
category_id?: string | null
|
||||
business_activity_id?: string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutGoodInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -1053,9 +1176,10 @@ export type GoodCreateWithoutSkuInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutGoodInput
|
||||
business_activity?: Prisma.BusinessActivityCreateNestedOneWithoutGoodsInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -1075,6 +1199,7 @@ export type GoodUncheckedCreateWithoutSkuInput = {
|
||||
measure_unit_id: string
|
||||
category_id?: string | null
|
||||
business_activity_id?: string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutGoodInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
@@ -1117,10 +1242,11 @@ export type GoodCreateWithoutSales_invoice_itemsInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteCreateNestedManyWithoutGoodInput
|
||||
business_activity?: Prisma.BusinessActivityCreateNestedOneWithoutGoodsInput
|
||||
category?: Prisma.GoodCategoryCreateNestedOneWithoutGoodsInput
|
||||
measure_unit: Prisma.MeasureUnitsCreateNestedOneWithoutGoodsInput
|
||||
sku: Prisma.StockKeepingUnitsCreateNestedOneWithoutGoodsInput
|
||||
}
|
||||
|
||||
export type GoodUncheckedCreateWithoutSales_invoice_itemsInput = {
|
||||
@@ -1140,6 +1266,7 @@ export type GoodUncheckedCreateWithoutSales_invoice_itemsInput = {
|
||||
measure_unit_id: string
|
||||
category_id?: string | null
|
||||
business_activity_id?: string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedCreateNestedManyWithoutGoodInput
|
||||
}
|
||||
|
||||
export type GoodCreateOrConnectWithoutSales_invoice_itemsInput = {
|
||||
@@ -1171,10 +1298,11 @@ export type GoodUpdateWithoutSales_invoice_itemsInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutGoodNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneWithoutGoodsNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
}
|
||||
|
||||
export type GoodUncheckedUpdateWithoutSales_invoice_itemsInput = {
|
||||
@@ -1194,6 +1322,7 @@ export type GoodUncheckedUpdateWithoutSales_invoice_itemsInput = {
|
||||
measure_unit_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
category_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
business_activity_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
export type GoodCreateManyBusiness_activityInput = {
|
||||
@@ -1227,9 +1356,10 @@ export type GoodUpdateWithoutBusiness_activityInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutGoodNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -1249,6 +1379,7 @@ export type GoodUncheckedUpdateWithoutBusiness_activityInput = {
|
||||
sku_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
measure_unit_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
category_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutGoodNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -1301,9 +1432,10 @@ export type GoodUpdateWithoutCategoryInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutGoodNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -1323,6 +1455,7 @@ export type GoodUncheckedUpdateWithoutCategoryInput = {
|
||||
sku_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
measure_unit_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
business_activity_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutGoodNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -1375,9 +1508,10 @@ export type GoodUpdateWithoutMeasure_unitInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutGoodNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneWithoutGoodsNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
sku?: Prisma.StockKeepingUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -1397,6 +1531,7 @@ export type GoodUncheckedUpdateWithoutMeasure_unitInput = {
|
||||
sku_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
category_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
business_activity_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutGoodNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -1449,9 +1584,10 @@ export type GoodUpdateWithoutSkuInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUpdateManyWithoutGoodNestedInput
|
||||
business_activity?: Prisma.BusinessActivityUpdateOneWithoutGoodsNestedInput
|
||||
category?: Prisma.GoodCategoryUpdateOneWithoutGoodsNestedInput
|
||||
measure_unit?: Prisma.MeasureUnitsUpdateOneRequiredWithoutGoodsNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -1471,6 +1607,7 @@ export type GoodUncheckedUpdateWithoutSkuInput = {
|
||||
measure_unit_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
category_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
business_activity_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
consumer_account_good_favorites?: Prisma.ConsumerAccountGoodFavoriteUncheckedUpdateManyWithoutGoodNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUncheckedUpdateManyWithoutGoodNestedInput
|
||||
}
|
||||
|
||||
@@ -1498,10 +1635,12 @@ export type GoodUncheckedUpdateManyWithoutSkuInput = {
|
||||
*/
|
||||
|
||||
export type GoodCountOutputType = {
|
||||
consumer_account_good_favorites: number
|
||||
sales_invoice_items: number
|
||||
}
|
||||
|
||||
export type GoodCountOutputTypeSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
consumer_account_good_favorites?: boolean | GoodCountOutputTypeCountConsumer_account_good_favoritesArgs
|
||||
sales_invoice_items?: boolean | GoodCountOutputTypeCountSales_invoice_itemsArgs
|
||||
}
|
||||
|
||||
@@ -1515,6 +1654,13 @@ export type GoodCountOutputTypeDefaultArgs<ExtArgs extends runtime.Types.Extensi
|
||||
select?: Prisma.GoodCountOutputTypeSelect<ExtArgs> | null
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCountOutputType without action
|
||||
*/
|
||||
export type GoodCountOutputTypeCountConsumer_account_good_favoritesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
where?: Prisma.ConsumerAccountGoodFavoriteWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCountOutputType without action
|
||||
*/
|
||||
@@ -1540,10 +1686,11 @@ export type GoodSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
||||
measure_unit_id?: boolean
|
||||
category_id?: boolean
|
||||
business_activity_id?: boolean
|
||||
sku?: boolean | Prisma.StockKeepingUnitsDefaultArgs<ExtArgs>
|
||||
measure_unit?: boolean | Prisma.MeasureUnitsDefaultArgs<ExtArgs>
|
||||
category?: boolean | Prisma.Good$categoryArgs<ExtArgs>
|
||||
consumer_account_good_favorites?: boolean | Prisma.Good$consumer_account_good_favoritesArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.Good$business_activityArgs<ExtArgs>
|
||||
category?: boolean | Prisma.Good$categoryArgs<ExtArgs>
|
||||
measure_unit?: boolean | Prisma.MeasureUnitsDefaultArgs<ExtArgs>
|
||||
sku?: boolean | Prisma.StockKeepingUnitsDefaultArgs<ExtArgs>
|
||||
sales_invoice_items?: boolean | Prisma.Good$sales_invoice_itemsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.GoodCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["good"]>
|
||||
@@ -1571,10 +1718,11 @@ export type GoodSelectScalar = {
|
||||
|
||||
export type GoodOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "is_default_guild_good" | "pricing_model" | "description" | "local_sku" | "barcode" | "base_sale_price" | "image_url" | "created_at" | "updated_at" | "deleted_at" | "sku_id" | "measure_unit_id" | "category_id" | "business_activity_id", ExtArgs["result"]["good"]>
|
||||
export type GoodInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
sku?: boolean | Prisma.StockKeepingUnitsDefaultArgs<ExtArgs>
|
||||
measure_unit?: boolean | Prisma.MeasureUnitsDefaultArgs<ExtArgs>
|
||||
category?: boolean | Prisma.Good$categoryArgs<ExtArgs>
|
||||
consumer_account_good_favorites?: boolean | Prisma.Good$consumer_account_good_favoritesArgs<ExtArgs>
|
||||
business_activity?: boolean | Prisma.Good$business_activityArgs<ExtArgs>
|
||||
category?: boolean | Prisma.Good$categoryArgs<ExtArgs>
|
||||
measure_unit?: boolean | Prisma.MeasureUnitsDefaultArgs<ExtArgs>
|
||||
sku?: boolean | Prisma.StockKeepingUnitsDefaultArgs<ExtArgs>
|
||||
sales_invoice_items?: boolean | Prisma.Good$sales_invoice_itemsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.GoodCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
@@ -1582,10 +1730,11 @@ export type GoodInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs =
|
||||
export type $GoodPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "Good"
|
||||
objects: {
|
||||
sku: Prisma.$StockKeepingUnitsPayload<ExtArgs>
|
||||
measure_unit: Prisma.$MeasureUnitsPayload<ExtArgs>
|
||||
category: Prisma.$GoodCategoryPayload<ExtArgs> | null
|
||||
consumer_account_good_favorites: Prisma.$ConsumerAccountGoodFavoritePayload<ExtArgs>[]
|
||||
business_activity: Prisma.$BusinessActivityPayload<ExtArgs> | null
|
||||
category: Prisma.$GoodCategoryPayload<ExtArgs> | null
|
||||
measure_unit: Prisma.$MeasureUnitsPayload<ExtArgs>
|
||||
sku: Prisma.$StockKeepingUnitsPayload<ExtArgs>
|
||||
sales_invoice_items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
@@ -1945,10 +2094,11 @@ readonly fields: GoodFieldRefs;
|
||||
*/
|
||||
export interface Prisma__GoodClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
sku<T extends Prisma.StockKeepingUnitsDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.StockKeepingUnitsDefaultArgs<ExtArgs>>): Prisma.Prisma__StockKeepingUnitsClient<runtime.Types.Result.GetResult<Prisma.$StockKeepingUnitsPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
measure_unit<T extends Prisma.MeasureUnitsDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.MeasureUnitsDefaultArgs<ExtArgs>>): Prisma.Prisma__MeasureUnitsClient<runtime.Types.Result.GetResult<Prisma.$MeasureUnitsPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
category<T extends Prisma.Good$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Good$categoryArgs<ExtArgs>>): Prisma.Prisma__GoodCategoryClient<runtime.Types.Result.GetResult<Prisma.$GoodCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
consumer_account_good_favorites<T extends Prisma.Good$consumer_account_good_favoritesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Good$consumer_account_good_favoritesArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountGoodFavoritePayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
business_activity<T extends Prisma.Good$business_activityArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Good$business_activityArgs<ExtArgs>>): Prisma.Prisma__BusinessActivityClient<runtime.Types.Result.GetResult<Prisma.$BusinessActivityPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
category<T extends Prisma.Good$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Good$categoryArgs<ExtArgs>>): Prisma.Prisma__GoodCategoryClient<runtime.Types.Result.GetResult<Prisma.$GoodCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
measure_unit<T extends Prisma.MeasureUnitsDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.MeasureUnitsDefaultArgs<ExtArgs>>): Prisma.Prisma__MeasureUnitsClient<runtime.Types.Result.GetResult<Prisma.$MeasureUnitsPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
sku<T extends Prisma.StockKeepingUnitsDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.StockKeepingUnitsDefaultArgs<ExtArgs>>): Prisma.Prisma__StockKeepingUnitsClient<runtime.Types.Result.GetResult<Prisma.$StockKeepingUnitsPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
sales_invoice_items<T extends Prisma.Good$sales_invoice_itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Good$sales_invoice_itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
@@ -2343,22 +2493,27 @@ export type GoodDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
}
|
||||
|
||||
/**
|
||||
* Good.category
|
||||
* Good.consumer_account_good_favorites
|
||||
*/
|
||||
export type Good$categoryArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
export type Good$consumer_account_good_favoritesArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the GoodCategory
|
||||
* Select specific fields to fetch from the ConsumerAccountGoodFavorite
|
||||
*/
|
||||
select?: Prisma.GoodCategorySelect<ExtArgs> | null
|
||||
select?: Prisma.ConsumerAccountGoodFavoriteSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the GoodCategory
|
||||
* Omit specific fields from the ConsumerAccountGoodFavorite
|
||||
*/
|
||||
omit?: Prisma.GoodCategoryOmit<ExtArgs> | null
|
||||
omit?: Prisma.ConsumerAccountGoodFavoriteOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.GoodCategoryInclude<ExtArgs> | null
|
||||
where?: Prisma.GoodCategoryWhereInput
|
||||
include?: Prisma.ConsumerAccountGoodFavoriteInclude<ExtArgs> | null
|
||||
where?: Prisma.ConsumerAccountGoodFavoriteWhereInput
|
||||
orderBy?: Prisma.ConsumerAccountGoodFavoriteOrderByWithRelationInput | Prisma.ConsumerAccountGoodFavoriteOrderByWithRelationInput[]
|
||||
cursor?: Prisma.ConsumerAccountGoodFavoriteWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.ConsumerAccountGoodFavoriteScalarFieldEnum | Prisma.ConsumerAccountGoodFavoriteScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2380,6 +2535,25 @@ export type Good$business_activityArgs<ExtArgs extends runtime.Types.Extensions.
|
||||
where?: Prisma.BusinessActivityWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Good.category
|
||||
*/
|
||||
export type Good$categoryArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the GoodCategory
|
||||
*/
|
||||
select?: Prisma.GoodCategorySelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the GoodCategory
|
||||
*/
|
||||
omit?: Prisma.GoodCategoryOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.GoodCategoryInclude<ExtArgs> | null
|
||||
where?: Prisma.GoodCategoryWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Good.sales_invoice_items
|
||||
*/
|
||||
|
||||
@@ -222,9 +222,9 @@ export type GoodCategoryWhereInput = {
|
||||
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
guild?: Prisma.XOR<Prisma.GuildNullableScalarRelationFilter, Prisma.GuildWhereInput> | null
|
||||
complex?: Prisma.XOR<Prisma.ComplexNullableScalarRelationFilter, Prisma.ComplexWhereInput> | null
|
||||
guild?: Prisma.XOR<Prisma.GuildNullableScalarRelationFilter, Prisma.GuildWhereInput> | null
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
}
|
||||
|
||||
export type GoodCategoryOrderByWithRelationInput = {
|
||||
@@ -238,9 +238,9 @@ export type GoodCategoryOrderByWithRelationInput = {
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
deleted_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
goods?: Prisma.GoodOrderByRelationAggregateInput
|
||||
guild?: Prisma.GuildOrderByWithRelationInput
|
||||
complex?: Prisma.ComplexOrderByWithRelationInput
|
||||
guild?: Prisma.GuildOrderByWithRelationInput
|
||||
goods?: Prisma.GoodOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.GoodCategoryOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -258,9 +258,9 @@ export type GoodCategoryWhereUniqueInput = Prisma.AtLeast<{
|
||||
created_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"GoodCategory"> | Date | string
|
||||
deleted_at?: Prisma.DateTimeNullableFilter<"GoodCategory"> | Date | string | null
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
guild?: Prisma.XOR<Prisma.GuildNullableScalarRelationFilter, Prisma.GuildWhereInput> | null
|
||||
complex?: Prisma.XOR<Prisma.ComplexNullableScalarRelationFilter, Prisma.ComplexWhereInput> | null
|
||||
guild?: Prisma.XOR<Prisma.GuildNullableScalarRelationFilter, Prisma.GuildWhereInput> | null
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
}, "id">
|
||||
|
||||
export type GoodCategoryOrderByWithAggregationInput = {
|
||||
@@ -304,9 +304,9 @@ export type GoodCategoryCreateInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||
complex?: Prisma.ComplexCreateNestedOneWithoutGood_categoriesInput
|
||||
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateInput = {
|
||||
@@ -332,9 +332,9 @@ export type GoodCategoryUpdateInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneWithoutGood_categoriesNestedInput
|
||||
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateInput = {
|
||||
@@ -557,8 +557,8 @@ export type GoodCategoryCreateWithoutComplexInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateWithoutComplexInput = {
|
||||
@@ -625,8 +625,8 @@ export type GoodCategoryCreateWithoutGoodsInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||
complex?: Prisma.ComplexCreateNestedOneWithoutGood_categoriesInput
|
||||
guild?: Prisma.GuildCreateNestedOneWithoutGood_categoriesInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateWithoutGoodsInput = {
|
||||
@@ -667,8 +667,8 @@ export type GoodCategoryUpdateWithoutGoodsInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneWithoutGood_categoriesNestedInput
|
||||
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateWithoutGoodsInput = {
|
||||
@@ -693,8 +693,8 @@ export type GoodCategoryCreateWithoutGuildInput = {
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
deleted_at?: Date | string | null
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||
complex?: Prisma.ComplexCreateNestedOneWithoutGood_categoriesInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutCategoryInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedCreateWithoutGuildInput = {
|
||||
@@ -757,8 +757,8 @@ export type GoodCategoryUpdateWithoutComplexInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||
guild?: Prisma.GuildUpdateOneWithoutGood_categoriesNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateWithoutComplexInput = {
|
||||
@@ -807,8 +807,8 @@ export type GoodCategoryUpdateWithoutGuildInput = {
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
deleted_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneWithoutGood_categoriesNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutCategoryNestedInput
|
||||
}
|
||||
|
||||
export type GoodCategoryUncheckedUpdateWithoutGuildInput = {
|
||||
@@ -878,9 +878,9 @@ export type GoodCategorySelect<ExtArgs extends runtime.Types.Extensions.Internal
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
deleted_at?: boolean
|
||||
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GoodCategory$guildArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.GoodCategory$complexArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GoodCategory$guildArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["goodCategory"]>
|
||||
|
||||
@@ -901,18 +901,18 @@ export type GoodCategorySelectScalar = {
|
||||
|
||||
export type GoodCategoryOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "image_url" | "complex_id" | "is_default_guild_good" | "guild_id" | "created_at" | "updated_at" | "deleted_at", ExtArgs["result"]["goodCategory"]>
|
||||
export type GoodCategoryInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GoodCategory$guildArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.GoodCategory$complexArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GoodCategory$guildArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.GoodCategory$goodsArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.GoodCategoryCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $GoodCategoryPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "GoodCategory"
|
||||
objects: {
|
||||
goods: Prisma.$GoodPayload<ExtArgs>[]
|
||||
guild: Prisma.$GuildPayload<ExtArgs> | null
|
||||
complex: Prisma.$ComplexPayload<ExtArgs> | null
|
||||
guild: Prisma.$GuildPayload<ExtArgs> | null
|
||||
goods: Prisma.$GoodPayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1265,9 +1265,9 @@ readonly fields: GoodCategoryFieldRefs;
|
||||
*/
|
||||
export interface Prisma__GoodCategoryClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
goods<T extends Prisma.GoodCategory$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
guild<T extends Prisma.GoodCategory$guildArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$guildArgs<ExtArgs>>): Prisma.Prisma__GuildClient<runtime.Types.Result.GetResult<Prisma.$GuildPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
complex<T extends Prisma.GoodCategory$complexArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$complexArgs<ExtArgs>>): Prisma.Prisma__ComplexClient<runtime.Types.Result.GetResult<Prisma.$ComplexPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
guild<T extends Prisma.GoodCategory$guildArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$guildArgs<ExtArgs>>): Prisma.Prisma__GuildClient<runtime.Types.Result.GetResult<Prisma.$GuildPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
goods<T extends Prisma.GoodCategory$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodCategory$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
@@ -1654,6 +1654,44 @@ export type GoodCategoryDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCategory.complex
|
||||
*/
|
||||
export type GoodCategory$complexArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Complex
|
||||
*/
|
||||
select?: Prisma.ComplexSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Complex
|
||||
*/
|
||||
omit?: Prisma.ComplexOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ComplexInclude<ExtArgs> | null
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCategory.guild
|
||||
*/
|
||||
export type GoodCategory$guildArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Guild
|
||||
*/
|
||||
select?: Prisma.GuildSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Guild
|
||||
*/
|
||||
omit?: Prisma.GuildOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.GuildInclude<ExtArgs> | null
|
||||
where?: Prisma.GuildWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCategory.goods
|
||||
*/
|
||||
@@ -1678,44 +1716,6 @@ export type GoodCategory$goodsArgs<ExtArgs extends runtime.Types.Extensions.Inte
|
||||
distinct?: Prisma.GoodScalarFieldEnum | Prisma.GoodScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCategory.guild
|
||||
*/
|
||||
export type GoodCategory$guildArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Guild
|
||||
*/
|
||||
select?: Prisma.GuildSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Guild
|
||||
*/
|
||||
omit?: Prisma.GuildOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.GuildInclude<ExtArgs> | null
|
||||
where?: Prisma.GuildWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCategory.complex
|
||||
*/
|
||||
export type GoodCategory$complexArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the Complex
|
||||
*/
|
||||
select?: Prisma.ComplexSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the Complex
|
||||
*/
|
||||
omit?: Prisma.ComplexOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ComplexInclude<ExtArgs> | null
|
||||
where?: Prisma.ComplexWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* GoodCategory without action
|
||||
*/
|
||||
|
||||
@@ -238,11 +238,11 @@ export type PosWhereInput = {
|
||||
device_id?: Prisma.StringNullableFilter<"Pos"> | string | null
|
||||
provider_id?: Prisma.StringNullableFilter<"Pos"> | string | null
|
||||
account_id?: Prisma.StringFilter<"Pos"> | string
|
||||
permission_pos?: Prisma.PermissionPosListRelationFilter
|
||||
account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
device?: Prisma.XOR<Prisma.DeviceNullableScalarRelationFilter, Prisma.DeviceWhereInput> | null
|
||||
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
|
||||
account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
||||
permission_pos?: Prisma.PermissionPosListRelationFilter
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}
|
||||
|
||||
@@ -259,11 +259,11 @@ export type PosOrderByWithRelationInput = {
|
||||
device_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
provider_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
permission_pos?: Prisma.PermissionPosOrderByRelationAggregateInput
|
||||
account?: Prisma.ConsumerAccountOrderByWithRelationInput
|
||||
complex?: Prisma.ComplexOrderByWithRelationInput
|
||||
device?: Prisma.DeviceOrderByWithRelationInput
|
||||
provider?: Prisma.ProviderOrderByWithRelationInput
|
||||
account?: Prisma.ConsumerAccountOrderByWithRelationInput
|
||||
permission_pos?: Prisma.PermissionPosOrderByRelationAggregateInput
|
||||
sales_invoices?: Prisma.SalesInvoiceOrderByRelationAggregateInput
|
||||
_relevance?: Prisma.PosOrderByRelevanceInput
|
||||
}
|
||||
@@ -284,11 +284,11 @@ export type PosWhereUniqueInput = Prisma.AtLeast<{
|
||||
complex_id?: Prisma.StringFilter<"Pos"> | string
|
||||
device_id?: Prisma.StringNullableFilter<"Pos"> | string | null
|
||||
provider_id?: Prisma.StringNullableFilter<"Pos"> | string | null
|
||||
permission_pos?: Prisma.PermissionPosListRelationFilter
|
||||
account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
||||
complex?: Prisma.XOR<Prisma.ComplexScalarRelationFilter, Prisma.ComplexWhereInput>
|
||||
device?: Prisma.XOR<Prisma.DeviceNullableScalarRelationFilter, Prisma.DeviceWhereInput> | null
|
||||
provider?: Prisma.XOR<Prisma.ProviderNullableScalarRelationFilter, Prisma.ProviderWhereInput> | null
|
||||
account?: Prisma.XOR<Prisma.ConsumerAccountScalarRelationFilter, Prisma.ConsumerAccountWhereInput>
|
||||
permission_pos?: Prisma.PermissionPosListRelationFilter
|
||||
sales_invoices?: Prisma.SalesInvoiceListRelationFilter
|
||||
}, "id" | "serial_number" | "account_id">
|
||||
|
||||
@@ -337,11 +337,11 @@ export type PosCreateInput = {
|
||||
pos_type: $Enums.POSType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutPos_listInput
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
@@ -371,11 +371,11 @@ export type PosUpdateInput = {
|
||||
pos_type?: Prisma.EnumPOSTypeFieldUpdateOperationsInput | $Enums.POSType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutPos_listNestedInput
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
@@ -711,10 +711,10 @@ export type PosCreateWithoutDeviceInput = {
|
||||
pos_type: $Enums.POSType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutPos_listInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
@@ -787,10 +787,10 @@ export type PosCreateWithoutPermission_posInput = {
|
||||
pos_type: $Enums.POSType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutPos_listInput
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
@@ -835,10 +835,10 @@ export type PosUpdateWithoutPermission_posInput = {
|
||||
pos_type?: Prisma.EnumPOSTypeFieldUpdateOperationsInput | $Enums.POSType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutPos_listNestedInput
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
@@ -867,10 +867,10 @@ export type PosCreateWithoutProviderInput = {
|
||||
pos_type: $Enums.POSType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutPos_listInput
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
@@ -925,10 +925,10 @@ export type PosCreateWithoutAccountInput = {
|
||||
pos_type: $Enums.POSType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutPos_listInput
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
@@ -973,10 +973,10 @@ export type PosUpdateWithoutAccountInput = {
|
||||
pos_type?: Prisma.EnumPOSTypeFieldUpdateOperationsInput | $Enums.POSType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutPos_listNestedInput
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
@@ -1005,10 +1005,10 @@ export type PosCreateWithoutComplexInput = {
|
||||
pos_type: $Enums.POSType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
sales_invoices?: Prisma.SalesInvoiceCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
@@ -1063,11 +1063,11 @@ export type PosCreateWithoutSales_invoicesInput = {
|
||||
pos_type: $Enums.POSType
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
complex: Prisma.ComplexCreateNestedOneWithoutPos_listInput
|
||||
device?: Prisma.DeviceCreateNestedOneWithoutPosesInput
|
||||
provider?: Prisma.ProviderCreateNestedOneWithoutPos_listInput
|
||||
account: Prisma.ConsumerAccountCreateNestedOneWithoutPosInput
|
||||
permission_pos?: Prisma.PermissionPosCreateNestedManyWithoutPosInput
|
||||
}
|
||||
|
||||
export type PosUncheckedCreateWithoutSales_invoicesInput = {
|
||||
@@ -1111,11 +1111,11 @@ export type PosUpdateWithoutSales_invoicesInput = {
|
||||
pos_type?: Prisma.EnumPOSTypeFieldUpdateOperationsInput | $Enums.POSType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutPos_listNestedInput
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
export type PosUncheckedUpdateWithoutSales_invoicesInput = {
|
||||
@@ -1157,10 +1157,10 @@ export type PosUpdateWithoutDeviceInput = {
|
||||
pos_type?: Prisma.EnumPOSTypeFieldUpdateOperationsInput | $Enums.POSType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutPos_listNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
@@ -1217,10 +1217,10 @@ export type PosUpdateWithoutProviderInput = {
|
||||
pos_type?: Prisma.EnumPOSTypeFieldUpdateOperationsInput | $Enums.POSType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
complex?: Prisma.ComplexUpdateOneRequiredWithoutPos_listNestedInput
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
@@ -1277,10 +1277,10 @@ export type PosUpdateWithoutComplexInput = {
|
||||
pos_type?: Prisma.EnumPOSTypeFieldUpdateOperationsInput | $Enums.POSType
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
device?: Prisma.DeviceUpdateOneWithoutPosesNestedInput
|
||||
provider?: Prisma.ProviderUpdateOneWithoutPos_listNestedInput
|
||||
account?: Prisma.ConsumerAccountUpdateOneRequiredWithoutPosNestedInput
|
||||
permission_pos?: Prisma.PermissionPosUpdateManyWithoutPosNestedInput
|
||||
sales_invoices?: Prisma.SalesInvoiceUpdateManyWithoutPosNestedInput
|
||||
}
|
||||
|
||||
@@ -1367,11 +1367,11 @@ export type PosSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs = ru
|
||||
device_id?: boolean
|
||||
provider_id?: boolean
|
||||
account_id?: boolean
|
||||
permission_pos?: boolean | Prisma.Pos$permission_posArgs<ExtArgs>
|
||||
account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
device?: boolean | Prisma.Pos$deviceArgs<ExtArgs>
|
||||
provider?: boolean | Prisma.Pos$providerArgs<ExtArgs>
|
||||
account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
||||
permission_pos?: boolean | Prisma.Pos$permission_posArgs<ExtArgs>
|
||||
sales_invoices?: boolean | Prisma.Pos$sales_invoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.PosCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["pos"]>
|
||||
@@ -1395,11 +1395,11 @@ export type PosSelectScalar = {
|
||||
|
||||
export type PosOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "model" | "serial_number" | "status" | "pos_type" | "created_at" | "updated_at" | "complex_id" | "device_id" | "provider_id" | "account_id", ExtArgs["result"]["pos"]>
|
||||
export type PosInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
permission_pos?: boolean | Prisma.Pos$permission_posArgs<ExtArgs>
|
||||
account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
||||
complex?: boolean | Prisma.ComplexDefaultArgs<ExtArgs>
|
||||
device?: boolean | Prisma.Pos$deviceArgs<ExtArgs>
|
||||
provider?: boolean | Prisma.Pos$providerArgs<ExtArgs>
|
||||
account?: boolean | Prisma.ConsumerAccountDefaultArgs<ExtArgs>
|
||||
permission_pos?: boolean | Prisma.Pos$permission_posArgs<ExtArgs>
|
||||
sales_invoices?: boolean | Prisma.Pos$sales_invoicesArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.PosCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
@@ -1407,11 +1407,11 @@ export type PosInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = r
|
||||
export type $PosPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "Pos"
|
||||
objects: {
|
||||
permission_pos: Prisma.$PermissionPosPayload<ExtArgs>[]
|
||||
account: Prisma.$ConsumerAccountPayload<ExtArgs>
|
||||
complex: Prisma.$ComplexPayload<ExtArgs>
|
||||
device: Prisma.$DevicePayload<ExtArgs> | null
|
||||
provider: Prisma.$ProviderPayload<ExtArgs> | null
|
||||
account: Prisma.$ConsumerAccountPayload<ExtArgs>
|
||||
permission_pos: Prisma.$PermissionPosPayload<ExtArgs>[]
|
||||
sales_invoices: Prisma.$SalesInvoicePayload<ExtArgs>[]
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
@@ -1767,11 +1767,11 @@ readonly fields: PosFieldRefs;
|
||||
*/
|
||||
export interface Prisma__PosClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
permission_pos<T extends Prisma.Pos$permission_posArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Pos$permission_posArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionPosPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
account<T extends Prisma.ConsumerAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__ConsumerAccountClient<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountPayload<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>
|
||||
device<T extends Prisma.Pos$deviceArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Pos$deviceArgs<ExtArgs>>): Prisma.Prisma__DeviceClient<runtime.Types.Result.GetResult<Prisma.$DevicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
provider<T extends Prisma.Pos$providerArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Pos$providerArgs<ExtArgs>>): Prisma.Prisma__ProviderClient<runtime.Types.Result.GetResult<Prisma.$ProviderPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
account<T extends Prisma.ConsumerAccountDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.ConsumerAccountDefaultArgs<ExtArgs>>): Prisma.Prisma__ConsumerAccountClient<runtime.Types.Result.GetResult<Prisma.$ConsumerAccountPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
permission_pos<T extends Prisma.Pos$permission_posArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Pos$permission_posArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$PermissionPosPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
sales_invoices<T extends Prisma.Pos$sales_invoicesArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Pos$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.
|
||||
@@ -2161,6 +2161,30 @@ export type PosDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.InternalA
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Pos.permission_pos
|
||||
*/
|
||||
export type Pos$permission_posArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the PermissionPos
|
||||
*/
|
||||
select?: Prisma.PermissionPosSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the PermissionPos
|
||||
*/
|
||||
omit?: Prisma.PermissionPosOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.PermissionPosInclude<ExtArgs> | null
|
||||
where?: Prisma.PermissionPosWhereInput
|
||||
orderBy?: Prisma.PermissionPosOrderByWithRelationInput | Prisma.PermissionPosOrderByWithRelationInput[]
|
||||
cursor?: Prisma.PermissionPosWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.PermissionPosScalarFieldEnum | Prisma.PermissionPosScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Pos.device
|
||||
*/
|
||||
@@ -2199,30 +2223,6 @@ export type Pos$providerArgs<ExtArgs extends runtime.Types.Extensions.InternalAr
|
||||
where?: Prisma.ProviderWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Pos.permission_pos
|
||||
*/
|
||||
export type Pos$permission_posArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the PermissionPos
|
||||
*/
|
||||
select?: Prisma.PermissionPosSelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the PermissionPos
|
||||
*/
|
||||
omit?: Prisma.PermissionPosOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.PermissionPosInclude<ExtArgs> | null
|
||||
where?: Prisma.PermissionPosWhereInput
|
||||
orderBy?: Prisma.PermissionPosOrderByWithRelationInput | Prisma.PermissionPosOrderByWithRelationInput[]
|
||||
cursor?: Prisma.PermissionPosWhereUniqueInput
|
||||
take?: number
|
||||
skip?: number
|
||||
distinct?: Prisma.PermissionPosScalarFieldEnum | Prisma.PermissionPosScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Pos.sales_invoices
|
||||
*/
|
||||
|
||||
@@ -43,6 +43,7 @@ export type SaleInvoiceTspAttemptsMinAggregateOutputType = {
|
||||
received_at: Date | null
|
||||
created_at: Date | null
|
||||
invoice_id: string | null
|
||||
error_message: string | null
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsMaxAggregateOutputType = {
|
||||
@@ -54,20 +55,24 @@ export type SaleInvoiceTspAttemptsMaxAggregateOutputType = {
|
||||
received_at: Date | null
|
||||
created_at: Date | null
|
||||
invoice_id: string | null
|
||||
error_message: string | null
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsCountAggregateOutputType = {
|
||||
id: number
|
||||
attempt_no: number
|
||||
status: number
|
||||
raw_request_payload: number
|
||||
provider_request_payload: number
|
||||
provider_response_payload: number
|
||||
message: number
|
||||
sent_at: number
|
||||
received_at: number
|
||||
created_at: number
|
||||
invoice_id: number
|
||||
provider_request_payload: number
|
||||
raw_request_payload: number
|
||||
error_message: number
|
||||
fiscal_warnings: number
|
||||
provider_response: number
|
||||
validation_errors: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -89,6 +94,7 @@ export type SaleInvoiceTspAttemptsMinAggregateInputType = {
|
||||
received_at?: true
|
||||
created_at?: true
|
||||
invoice_id?: true
|
||||
error_message?: true
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsMaxAggregateInputType = {
|
||||
@@ -100,20 +106,24 @@ export type SaleInvoiceTspAttemptsMaxAggregateInputType = {
|
||||
received_at?: true
|
||||
created_at?: true
|
||||
invoice_id?: true
|
||||
error_message?: true
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsCountAggregateInputType = {
|
||||
id?: true
|
||||
attempt_no?: true
|
||||
status?: true
|
||||
raw_request_payload?: true
|
||||
provider_request_payload?: true
|
||||
provider_response_payload?: true
|
||||
message?: true
|
||||
sent_at?: true
|
||||
received_at?: true
|
||||
created_at?: true
|
||||
invoice_id?: true
|
||||
provider_request_payload?: true
|
||||
raw_request_payload?: true
|
||||
error_message?: true
|
||||
fiscal_warnings?: true
|
||||
provider_response?: true
|
||||
validation_errors?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -207,14 +217,17 @@ export type SaleInvoiceTspAttemptsGroupByOutputType = {
|
||||
id: string
|
||||
attempt_no: number
|
||||
status: $Enums.TspProviderResponseStatus
|
||||
raw_request_payload: runtime.JsonValue
|
||||
provider_request_payload: runtime.JsonValue | null
|
||||
provider_response_payload: runtime.JsonValue | null
|
||||
message: string
|
||||
sent_at: Date | null
|
||||
received_at: Date | null
|
||||
created_at: Date
|
||||
invoice_id: string
|
||||
provider_request_payload: runtime.JsonValue
|
||||
raw_request_payload: runtime.JsonValue
|
||||
error_message: string | null
|
||||
fiscal_warnings: runtime.JsonValue | null
|
||||
provider_response: runtime.JsonValue | null
|
||||
validation_errors: runtime.JsonValue | null
|
||||
_count: SaleInvoiceTspAttemptsCountAggregateOutputType | null
|
||||
_avg: SaleInvoiceTspAttemptsAvgAggregateOutputType | null
|
||||
_sum: SaleInvoiceTspAttemptsSumAggregateOutputType | null
|
||||
@@ -244,14 +257,17 @@ export type SaleInvoiceTspAttemptsWhereInput = {
|
||||
id?: Prisma.StringFilter<"SaleInvoiceTspAttempts"> | string
|
||||
attempt_no?: Prisma.IntFilter<"SaleInvoiceTspAttempts"> | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFilter<"SaleInvoiceTspAttempts"> | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonFilter<"SaleInvoiceTspAttempts">
|
||||
provider_request_payload?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
provider_response_payload?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
message?: Prisma.StringFilter<"SaleInvoiceTspAttempts"> | string
|
||||
sent_at?: Prisma.DateTimeNullableFilter<"SaleInvoiceTspAttempts"> | Date | string | null
|
||||
received_at?: Prisma.DateTimeNullableFilter<"SaleInvoiceTspAttempts"> | Date | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"SaleInvoiceTspAttempts"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SaleInvoiceTspAttempts"> | string
|
||||
provider_request_payload?: Prisma.JsonFilter<"SaleInvoiceTspAttempts">
|
||||
raw_request_payload?: Prisma.JsonFilter<"SaleInvoiceTspAttempts">
|
||||
error_message?: Prisma.StringNullableFilter<"SaleInvoiceTspAttempts"> | string | null
|
||||
fiscal_warnings?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
provider_response?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
validation_errors?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
}
|
||||
|
||||
@@ -259,14 +275,17 @@ export type SaleInvoiceTspAttemptsOrderByWithRelationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
attempt_no?: Prisma.SortOrder
|
||||
status?: Prisma.SortOrder
|
||||
raw_request_payload?: Prisma.SortOrder
|
||||
provider_request_payload?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
provider_response_payload?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
message?: Prisma.SortOrder
|
||||
sent_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
received_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
provider_request_payload?: Prisma.SortOrder
|
||||
raw_request_payload?: Prisma.SortOrder
|
||||
error_message?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
fiscal_warnings?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
provider_response?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
validation_errors?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
||||
_relevance?: Prisma.SaleInvoiceTspAttemptsOrderByRelevanceInput
|
||||
}
|
||||
@@ -279,14 +298,17 @@ export type SaleInvoiceTspAttemptsWhereUniqueInput = Prisma.AtLeast<{
|
||||
NOT?: Prisma.SaleInvoiceTspAttemptsWhereInput | Prisma.SaleInvoiceTspAttemptsWhereInput[]
|
||||
attempt_no?: Prisma.IntFilter<"SaleInvoiceTspAttempts"> | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFilter<"SaleInvoiceTspAttempts"> | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonFilter<"SaleInvoiceTspAttempts">
|
||||
provider_request_payload?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
provider_response_payload?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
message?: Prisma.StringFilter<"SaleInvoiceTspAttempts"> | string
|
||||
sent_at?: Prisma.DateTimeNullableFilter<"SaleInvoiceTspAttempts"> | Date | string | null
|
||||
received_at?: Prisma.DateTimeNullableFilter<"SaleInvoiceTspAttempts"> | Date | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"SaleInvoiceTspAttempts"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SaleInvoiceTspAttempts"> | string
|
||||
provider_request_payload?: Prisma.JsonFilter<"SaleInvoiceTspAttempts">
|
||||
raw_request_payload?: Prisma.JsonFilter<"SaleInvoiceTspAttempts">
|
||||
error_message?: Prisma.StringNullableFilter<"SaleInvoiceTspAttempts"> | string | null
|
||||
fiscal_warnings?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
provider_response?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
validation_errors?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
}, "id" | "invoice_id_attempt_no">
|
||||
|
||||
@@ -294,14 +316,17 @@ export type SaleInvoiceTspAttemptsOrderByWithAggregationInput = {
|
||||
id?: Prisma.SortOrder
|
||||
attempt_no?: Prisma.SortOrder
|
||||
status?: Prisma.SortOrder
|
||||
raw_request_payload?: Prisma.SortOrder
|
||||
provider_request_payload?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
provider_response_payload?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
message?: Prisma.SortOrder
|
||||
sent_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
received_at?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
provider_request_payload?: Prisma.SortOrder
|
||||
raw_request_payload?: Prisma.SortOrder
|
||||
error_message?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
fiscal_warnings?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
provider_response?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
validation_errors?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
_count?: Prisma.SaleInvoiceTspAttemptsCountOrderByAggregateInput
|
||||
_avg?: Prisma.SaleInvoiceTspAttemptsAvgOrderByAggregateInput
|
||||
_max?: Prisma.SaleInvoiceTspAttemptsMaxOrderByAggregateInput
|
||||
@@ -316,27 +341,33 @@ export type SaleInvoiceTspAttemptsScalarWhereWithAggregatesInput = {
|
||||
id?: Prisma.StringWithAggregatesFilter<"SaleInvoiceTspAttempts"> | string
|
||||
attempt_no?: Prisma.IntWithAggregatesFilter<"SaleInvoiceTspAttempts"> | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusWithAggregatesFilter<"SaleInvoiceTspAttempts"> | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonWithAggregatesFilter<"SaleInvoiceTspAttempts">
|
||||
provider_request_payload?: Prisma.JsonNullableWithAggregatesFilter<"SaleInvoiceTspAttempts">
|
||||
provider_response_payload?: Prisma.JsonNullableWithAggregatesFilter<"SaleInvoiceTspAttempts">
|
||||
message?: Prisma.StringWithAggregatesFilter<"SaleInvoiceTspAttempts"> | string
|
||||
sent_at?: Prisma.DateTimeNullableWithAggregatesFilter<"SaleInvoiceTspAttempts"> | Date | string | null
|
||||
received_at?: Prisma.DateTimeNullableWithAggregatesFilter<"SaleInvoiceTspAttempts"> | Date | string | null
|
||||
created_at?: Prisma.DateTimeWithAggregatesFilter<"SaleInvoiceTspAttempts"> | Date | string
|
||||
invoice_id?: Prisma.StringWithAggregatesFilter<"SaleInvoiceTspAttempts"> | string
|
||||
provider_request_payload?: Prisma.JsonWithAggregatesFilter<"SaleInvoiceTspAttempts">
|
||||
raw_request_payload?: Prisma.JsonWithAggregatesFilter<"SaleInvoiceTspAttempts">
|
||||
error_message?: Prisma.StringNullableWithAggregatesFilter<"SaleInvoiceTspAttempts"> | string | null
|
||||
fiscal_warnings?: Prisma.JsonNullableWithAggregatesFilter<"SaleInvoiceTspAttempts">
|
||||
provider_response?: Prisma.JsonNullableWithAggregatesFilter<"SaleInvoiceTspAttempts">
|
||||
validation_errors?: Prisma.JsonNullableWithAggregatesFilter<"SaleInvoiceTspAttempts">
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsCreateInput = {
|
||||
id?: string
|
||||
attempt_no: number
|
||||
status: $Enums.TspProviderResponseStatus
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message: string
|
||||
sent_at?: Date | string | null
|
||||
received_at?: Date | string | null
|
||||
created_at?: Date | string
|
||||
provider_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutTsp_attemptsInput
|
||||
}
|
||||
|
||||
@@ -344,27 +375,33 @@ export type SaleInvoiceTspAttemptsUncheckedCreateInput = {
|
||||
id?: string
|
||||
attempt_no: number
|
||||
status: $Enums.TspProviderResponseStatus
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message: string
|
||||
sent_at?: Date | string | null
|
||||
received_at?: Date | string | null
|
||||
created_at?: Date | string
|
||||
invoice_id: string
|
||||
provider_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
attempt_no?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFieldUpdateOperationsInput | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sent_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
received_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
provider_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutTsp_attemptsNestedInput
|
||||
}
|
||||
|
||||
@@ -372,55 +409,67 @@ export type SaleInvoiceTspAttemptsUncheckedUpdateInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
attempt_no?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFieldUpdateOperationsInput | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sent_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
received_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
provider_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsCreateManyInput = {
|
||||
id?: string
|
||||
attempt_no: number
|
||||
status: $Enums.TspProviderResponseStatus
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message: string
|
||||
sent_at?: Date | string | null
|
||||
received_at?: Date | string | null
|
||||
created_at?: Date | string
|
||||
invoice_id: string
|
||||
provider_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsUpdateManyMutationInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
attempt_no?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFieldUpdateOperationsInput | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sent_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
received_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
provider_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsUncheckedUpdateManyInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
attempt_no?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFieldUpdateOperationsInput | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sent_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
received_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
provider_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsListRelationFilter = {
|
||||
@@ -448,14 +497,17 @@ export type SaleInvoiceTspAttemptsCountOrderByAggregateInput = {
|
||||
id?: Prisma.SortOrder
|
||||
attempt_no?: Prisma.SortOrder
|
||||
status?: Prisma.SortOrder
|
||||
raw_request_payload?: Prisma.SortOrder
|
||||
provider_request_payload?: Prisma.SortOrder
|
||||
provider_response_payload?: Prisma.SortOrder
|
||||
message?: Prisma.SortOrder
|
||||
sent_at?: Prisma.SortOrder
|
||||
received_at?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
provider_request_payload?: Prisma.SortOrder
|
||||
raw_request_payload?: Prisma.SortOrder
|
||||
error_message?: Prisma.SortOrder
|
||||
fiscal_warnings?: Prisma.SortOrder
|
||||
provider_response?: Prisma.SortOrder
|
||||
validation_errors?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsAvgOrderByAggregateInput = {
|
||||
@@ -471,6 +523,7 @@ export type SaleInvoiceTspAttemptsMaxOrderByAggregateInput = {
|
||||
received_at?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
error_message?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsMinOrderByAggregateInput = {
|
||||
@@ -482,6 +535,7 @@ export type SaleInvoiceTspAttemptsMinOrderByAggregateInput = {
|
||||
received_at?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
error_message?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsSumOrderByAggregateInput = {
|
||||
@@ -538,26 +592,32 @@ export type SaleInvoiceTspAttemptsCreateWithoutInvoiceInput = {
|
||||
id?: string
|
||||
attempt_no: number
|
||||
status: $Enums.TspProviderResponseStatus
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message: string
|
||||
sent_at?: Date | string | null
|
||||
received_at?: Date | string | null
|
||||
created_at?: Date | string
|
||||
provider_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsUncheckedCreateWithoutInvoiceInput = {
|
||||
id?: string
|
||||
attempt_no: number
|
||||
status: $Enums.TspProviderResponseStatus
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message: string
|
||||
sent_at?: Date | string | null
|
||||
received_at?: Date | string | null
|
||||
created_at?: Date | string
|
||||
provider_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsCreateOrConnectWithoutInvoiceInput = {
|
||||
@@ -593,66 +653,81 @@ export type SaleInvoiceTspAttemptsScalarWhereInput = {
|
||||
id?: Prisma.StringFilter<"SaleInvoiceTspAttempts"> | string
|
||||
attempt_no?: Prisma.IntFilter<"SaleInvoiceTspAttempts"> | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFilter<"SaleInvoiceTspAttempts"> | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonFilter<"SaleInvoiceTspAttempts">
|
||||
provider_request_payload?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
provider_response_payload?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
message?: Prisma.StringFilter<"SaleInvoiceTspAttempts"> | string
|
||||
sent_at?: Prisma.DateTimeNullableFilter<"SaleInvoiceTspAttempts"> | Date | string | null
|
||||
received_at?: Prisma.DateTimeNullableFilter<"SaleInvoiceTspAttempts"> | Date | string | null
|
||||
created_at?: Prisma.DateTimeFilter<"SaleInvoiceTspAttempts"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SaleInvoiceTspAttempts"> | string
|
||||
provider_request_payload?: Prisma.JsonFilter<"SaleInvoiceTspAttempts">
|
||||
raw_request_payload?: Prisma.JsonFilter<"SaleInvoiceTspAttempts">
|
||||
error_message?: Prisma.StringNullableFilter<"SaleInvoiceTspAttempts"> | string | null
|
||||
fiscal_warnings?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
provider_response?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
validation_errors?: Prisma.JsonNullableFilter<"SaleInvoiceTspAttempts">
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsCreateManyInvoiceInput = {
|
||||
id?: string
|
||||
attempt_no: number
|
||||
status: $Enums.TspProviderResponseStatus
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message: string
|
||||
sent_at?: Date | string | null
|
||||
received_at?: Date | string | null
|
||||
created_at?: Date | string
|
||||
provider_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsUpdateWithoutInvoiceInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
attempt_no?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFieldUpdateOperationsInput | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sent_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
received_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
provider_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsUncheckedUpdateWithoutInvoiceInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
attempt_no?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFieldUpdateOperationsInput | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sent_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
received_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
provider_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsUncheckedUpdateManyWithoutInvoiceInput = {
|
||||
id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
attempt_no?: Prisma.IntFieldUpdateOperationsInput | number
|
||||
status?: Prisma.EnumTspProviderResponseStatusFieldUpdateOperationsInput | $Enums.TspProviderResponseStatus
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
provider_request_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response_payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
message?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
sent_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
received_at?: Prisma.NullableDateTimeFieldUpdateOperationsInput | Date | string | null
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
provider_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
raw_request_payload?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
error_message?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
fiscal_warnings?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
provider_response?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
validation_errors?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
}
|
||||
|
||||
|
||||
@@ -661,14 +736,17 @@ export type SaleInvoiceTspAttemptsSelect<ExtArgs extends runtime.Types.Extension
|
||||
id?: boolean
|
||||
attempt_no?: boolean
|
||||
status?: boolean
|
||||
raw_request_payload?: boolean
|
||||
provider_request_payload?: boolean
|
||||
provider_response_payload?: boolean
|
||||
message?: boolean
|
||||
sent_at?: boolean
|
||||
received_at?: boolean
|
||||
created_at?: boolean
|
||||
invoice_id?: boolean
|
||||
provider_request_payload?: boolean
|
||||
raw_request_payload?: boolean
|
||||
error_message?: boolean
|
||||
fiscal_warnings?: boolean
|
||||
provider_response?: boolean
|
||||
validation_errors?: boolean
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["saleInvoiceTspAttempts"]>
|
||||
|
||||
@@ -678,17 +756,20 @@ export type SaleInvoiceTspAttemptsSelectScalar = {
|
||||
id?: boolean
|
||||
attempt_no?: boolean
|
||||
status?: boolean
|
||||
raw_request_payload?: boolean
|
||||
provider_request_payload?: boolean
|
||||
provider_response_payload?: boolean
|
||||
message?: boolean
|
||||
sent_at?: boolean
|
||||
received_at?: boolean
|
||||
created_at?: boolean
|
||||
invoice_id?: boolean
|
||||
provider_request_payload?: boolean
|
||||
raw_request_payload?: boolean
|
||||
error_message?: boolean
|
||||
fiscal_warnings?: boolean
|
||||
provider_response?: boolean
|
||||
validation_errors?: boolean
|
||||
}
|
||||
|
||||
export type SaleInvoiceTspAttemptsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "attempt_no" | "status" | "raw_request_payload" | "provider_request_payload" | "provider_response_payload" | "message" | "sent_at" | "received_at" | "created_at" | "invoice_id", ExtArgs["result"]["saleInvoiceTspAttempts"]>
|
||||
export type SaleInvoiceTspAttemptsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "attempt_no" | "status" | "message" | "sent_at" | "received_at" | "created_at" | "invoice_id" | "provider_request_payload" | "raw_request_payload" | "error_message" | "fiscal_warnings" | "provider_response" | "validation_errors", ExtArgs["result"]["saleInvoiceTspAttempts"]>
|
||||
export type SaleInvoiceTspAttemptsInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
}
|
||||
@@ -702,14 +783,17 @@ export type $SaleInvoiceTspAttemptsPayload<ExtArgs extends runtime.Types.Extensi
|
||||
id: string
|
||||
attempt_no: number
|
||||
status: $Enums.TspProviderResponseStatus
|
||||
raw_request_payload: runtime.JsonValue
|
||||
provider_request_payload: runtime.JsonValue | null
|
||||
provider_response_payload: runtime.JsonValue | null
|
||||
message: string
|
||||
sent_at: Date | null
|
||||
received_at: Date | null
|
||||
created_at: Date
|
||||
invoice_id: string
|
||||
provider_request_payload: runtime.JsonValue
|
||||
raw_request_payload: runtime.JsonValue
|
||||
error_message: string | null
|
||||
fiscal_warnings: runtime.JsonValue | null
|
||||
provider_response: runtime.JsonValue | null
|
||||
validation_errors: runtime.JsonValue | null
|
||||
}, ExtArgs["result"]["saleInvoiceTspAttempts"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -1083,14 +1167,17 @@ export interface SaleInvoiceTspAttemptsFieldRefs {
|
||||
readonly id: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'String'>
|
||||
readonly attempt_no: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'Int'>
|
||||
readonly status: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'TspProviderResponseStatus'>
|
||||
readonly raw_request_payload: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'Json'>
|
||||
readonly provider_request_payload: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'Json'>
|
||||
readonly provider_response_payload: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'Json'>
|
||||
readonly message: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'String'>
|
||||
readonly sent_at: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'DateTime'>
|
||||
readonly received_at: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'DateTime'>
|
||||
readonly created_at: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'DateTime'>
|
||||
readonly invoice_id: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'String'>
|
||||
readonly provider_request_payload: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'Json'>
|
||||
readonly raw_request_payload: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'Json'>
|
||||
readonly error_message: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'String'>
|
||||
readonly fiscal_warnings: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'Json'>
|
||||
readonly provider_response: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'Json'>
|
||||
readonly validation_errors: Prisma.FieldRef<"SaleInvoiceTspAttempts", 'Json'>
|
||||
}
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -32,6 +32,8 @@ export type SalesInvoiceItemAvgAggregateOutputType = {
|
||||
unit_price: runtime.Decimal | null
|
||||
total_amount: runtime.Decimal | null
|
||||
discount: runtime.Decimal | null
|
||||
discount_amount: runtime.Decimal | null
|
||||
tax_amount: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemSumAggregateOutputType = {
|
||||
@@ -40,6 +42,8 @@ export type SalesInvoiceItemSumAggregateOutputType = {
|
||||
unit_price: runtime.Decimal | null
|
||||
total_amount: runtime.Decimal | null
|
||||
discount: runtime.Decimal | null
|
||||
discount_amount: runtime.Decimal | null
|
||||
tax_amount: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemMinAggregateOutputType = {
|
||||
@@ -57,6 +61,8 @@ export type SalesInvoiceItemMinAggregateOutputType = {
|
||||
invoice_id: string | null
|
||||
good_id: string | null
|
||||
service_id: string | null
|
||||
discount_amount: runtime.Decimal | null
|
||||
tax_amount: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemMaxAggregateOutputType = {
|
||||
@@ -74,6 +80,8 @@ export type SalesInvoiceItemMaxAggregateOutputType = {
|
||||
invoice_id: string | null
|
||||
good_id: string | null
|
||||
service_id: string | null
|
||||
discount_amount: runtime.Decimal | null
|
||||
tax_amount: runtime.Decimal | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCountAggregateOutputType = {
|
||||
@@ -93,6 +101,8 @@ export type SalesInvoiceItemCountAggregateOutputType = {
|
||||
invoice_id: number
|
||||
good_id: number
|
||||
service_id: number
|
||||
discount_amount: number
|
||||
tax_amount: number
|
||||
_all: number
|
||||
}
|
||||
|
||||
@@ -103,6 +113,8 @@ export type SalesInvoiceItemAvgAggregateInputType = {
|
||||
unit_price?: true
|
||||
total_amount?: true
|
||||
discount?: true
|
||||
discount_amount?: true
|
||||
tax_amount?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemSumAggregateInputType = {
|
||||
@@ -111,6 +123,8 @@ export type SalesInvoiceItemSumAggregateInputType = {
|
||||
unit_price?: true
|
||||
total_amount?: true
|
||||
discount?: true
|
||||
discount_amount?: true
|
||||
tax_amount?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemMinAggregateInputType = {
|
||||
@@ -128,6 +142,8 @@ export type SalesInvoiceItemMinAggregateInputType = {
|
||||
invoice_id?: true
|
||||
good_id?: true
|
||||
service_id?: true
|
||||
discount_amount?: true
|
||||
tax_amount?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemMaxAggregateInputType = {
|
||||
@@ -145,6 +161,8 @@ export type SalesInvoiceItemMaxAggregateInputType = {
|
||||
invoice_id?: true
|
||||
good_id?: true
|
||||
service_id?: true
|
||||
discount_amount?: true
|
||||
tax_amount?: true
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCountAggregateInputType = {
|
||||
@@ -164,6 +182,8 @@ export type SalesInvoiceItemCountAggregateInputType = {
|
||||
invoice_id?: true
|
||||
good_id?: true
|
||||
service_id?: true
|
||||
discount_amount?: true
|
||||
tax_amount?: true
|
||||
_all?: true
|
||||
}
|
||||
|
||||
@@ -270,6 +290,8 @@ export type SalesInvoiceItemGroupByOutputType = {
|
||||
invoice_id: string
|
||||
good_id: string
|
||||
service_id: string | null
|
||||
discount_amount: runtime.Decimal | null
|
||||
tax_amount: runtime.Decimal | null
|
||||
_count: SalesInvoiceItemCountAggregateOutputType | null
|
||||
_avg: SalesInvoiceItemAvgAggregateOutputType | null
|
||||
_sum: SalesInvoiceItemSumAggregateOutputType | null
|
||||
@@ -312,8 +334,10 @@ export type SalesInvoiceItemWhereInput = {
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||
good_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
discount_amount?: Prisma.DecimalNullableFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.DecimalNullableFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
good?: Prisma.XOR<Prisma.GoodScalarRelationFilter, Prisma.GoodWhereInput>
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
service?: Prisma.XOR<Prisma.ServiceNullableScalarRelationFilter, Prisma.ServiceWhereInput> | null
|
||||
}
|
||||
|
||||
@@ -334,8 +358,10 @@ export type SalesInvoiceItemOrderByWithRelationInput = {
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
||||
discount_amount?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
tax_amount?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
good?: Prisma.GoodOrderByWithRelationInput
|
||||
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
||||
service?: Prisma.ServiceOrderByWithRelationInput
|
||||
_relevance?: Prisma.SalesInvoiceItemOrderByRelevanceInput
|
||||
}
|
||||
@@ -360,8 +386,10 @@ export type SalesInvoiceItemWhereUniqueInput = Prisma.AtLeast<{
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||
good_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
discount_amount?: Prisma.DecimalNullableFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.DecimalNullableFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
good?: Prisma.XOR<Prisma.GoodScalarRelationFilter, Prisma.GoodWhereInput>
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
service?: Prisma.XOR<Prisma.ServiceNullableScalarRelationFilter, Prisma.ServiceWhereInput> | null
|
||||
}, "id">
|
||||
|
||||
@@ -382,6 +410,8 @@ export type SalesInvoiceItemOrderByWithAggregationInput = {
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
discount_amount?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
tax_amount?: Prisma.SortOrderInput | Prisma.SortOrder
|
||||
_count?: Prisma.SalesInvoiceItemCountOrderByAggregateInput
|
||||
_avg?: Prisma.SalesInvoiceItemAvgOrderByAggregateInput
|
||||
_max?: Prisma.SalesInvoiceItemMaxOrderByAggregateInput
|
||||
@@ -409,6 +439,8 @@ export type SalesInvoiceItemScalarWhereWithAggregatesInput = {
|
||||
invoice_id?: Prisma.StringWithAggregatesFilter<"SalesInvoiceItem"> | string
|
||||
good_id?: Prisma.StringWithAggregatesFilter<"SalesInvoiceItem"> | string
|
||||
service_id?: Prisma.StringNullableWithAggregatesFilter<"SalesInvoiceItem"> | string | null
|
||||
discount_amount?: Prisma.DecimalNullableWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.DecimalNullableWithAggregatesFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateInput = {
|
||||
@@ -425,8 +457,10 @@ export type SalesInvoiceItemCreateInput = {
|
||||
notes?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
good: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
}
|
||||
|
||||
@@ -447,6 +481,8 @@ export type SalesInvoiceItemUncheckedCreateInput = {
|
||||
invoice_id: string
|
||||
good_id: string
|
||||
service_id?: string | null
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUpdateInput = {
|
||||
@@ -463,8 +499,10 @@ export type SalesInvoiceItemUpdateInput = {
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
good?: Prisma.GoodUpdateOneRequiredWithoutSales_invoice_itemsNestedInput
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||
}
|
||||
|
||||
@@ -485,6 +523,8 @@ export type SalesInvoiceItemUncheckedUpdateInput = {
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateManyInput = {
|
||||
@@ -504,6 +544,8 @@ export type SalesInvoiceItemCreateManyInput = {
|
||||
invoice_id: string
|
||||
good_id: string
|
||||
service_id?: string | null
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUpdateManyMutationInput = {
|
||||
@@ -520,6 +562,8 @@ export type SalesInvoiceItemUpdateManyMutationInput = {
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
||||
@@ -539,6 +583,8 @@ export type SalesInvoiceItemUncheckedUpdateManyInput = {
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemListRelationFilter = {
|
||||
@@ -574,6 +620,8 @@ export type SalesInvoiceItemCountOrderByAggregateInput = {
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrder
|
||||
discount_amount?: Prisma.SortOrder
|
||||
tax_amount?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemAvgOrderByAggregateInput = {
|
||||
@@ -582,6 +630,8 @@ export type SalesInvoiceItemAvgOrderByAggregateInput = {
|
||||
unit_price?: Prisma.SortOrder
|
||||
total_amount?: Prisma.SortOrder
|
||||
discount?: Prisma.SortOrder
|
||||
discount_amount?: Prisma.SortOrder
|
||||
tax_amount?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
||||
@@ -599,6 +649,8 @@ export type SalesInvoiceItemMaxOrderByAggregateInput = {
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrder
|
||||
discount_amount?: Prisma.SortOrder
|
||||
tax_amount?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemMinOrderByAggregateInput = {
|
||||
@@ -616,6 +668,8 @@ export type SalesInvoiceItemMinOrderByAggregateInput = {
|
||||
invoice_id?: Prisma.SortOrder
|
||||
good_id?: Prisma.SortOrder
|
||||
service_id?: Prisma.SortOrder
|
||||
discount_amount?: Prisma.SortOrder
|
||||
tax_amount?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemSumOrderByAggregateInput = {
|
||||
@@ -624,6 +678,8 @@ export type SalesInvoiceItemSumOrderByAggregateInput = {
|
||||
unit_price?: Prisma.SortOrder
|
||||
total_amount?: Prisma.SortOrder
|
||||
discount?: Prisma.SortOrder
|
||||
discount_amount?: Prisma.SortOrder
|
||||
tax_amount?: Prisma.SortOrder
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateNestedManyWithoutGoodInput = {
|
||||
@@ -766,6 +822,8 @@ export type SalesInvoiceItemCreateWithoutGoodInput = {
|
||||
notes?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
}
|
||||
@@ -786,6 +844,8 @@ export type SalesInvoiceItemUncheckedCreateWithoutGoodInput = {
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_id: string
|
||||
service_id?: string | null
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateOrConnectWithoutGoodInput = {
|
||||
@@ -834,6 +894,8 @@ export type SalesInvoiceItemScalarWhereInput = {
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||
good_id?: Prisma.StringFilter<"SalesInvoiceItem"> | string
|
||||
service_id?: Prisma.StringNullableFilter<"SalesInvoiceItem"> | string | null
|
||||
discount_amount?: Prisma.DecimalNullableFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.DecimalNullableFilter<"SalesInvoiceItem"> | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
||||
@@ -850,6 +912,8 @@ export type SalesInvoiceItemCreateWithoutInvoiceInput = {
|
||||
notes?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
good: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
service?: Prisma.ServiceCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
}
|
||||
@@ -870,6 +934,8 @@ export type SalesInvoiceItemUncheckedCreateWithoutInvoiceInput = {
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
good_id: string
|
||||
service_id?: string | null
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateOrConnectWithoutInvoiceInput = {
|
||||
@@ -912,8 +978,10 @@ export type SalesInvoiceItemCreateWithoutServiceInput = {
|
||||
notes?: string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
good: Prisma.GoodCreateNestedOneWithoutSales_invoice_itemsInput
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutItemsInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUncheckedCreateWithoutServiceInput = {
|
||||
@@ -932,6 +1000,8 @@ export type SalesInvoiceItemUncheckedCreateWithoutServiceInput = {
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_id: string
|
||||
good_id: string
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateOrConnectWithoutServiceInput = {
|
||||
@@ -976,6 +1046,8 @@ export type SalesInvoiceItemCreateManyGoodInput = {
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_id: string
|
||||
service_id?: string | null
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUpdateWithoutGoodInput = {
|
||||
@@ -992,6 +1064,8 @@ export type SalesInvoiceItemUpdateWithoutGoodInput = {
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||
}
|
||||
@@ -1012,6 +1086,8 @@ export type SalesInvoiceItemUncheckedUpdateWithoutGoodInput = {
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutGoodInput = {
|
||||
@@ -1030,6 +1106,8 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutGoodInput = {
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateManyInvoiceInput = {
|
||||
@@ -1048,6 +1126,8 @@ export type SalesInvoiceItemCreateManyInvoiceInput = {
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
good_id: string
|
||||
service_id?: string | null
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
||||
@@ -1064,6 +1144,8 @@ export type SalesInvoiceItemUpdateWithoutInvoiceInput = {
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
good?: Prisma.GoodUpdateOneRequiredWithoutSales_invoice_itemsNestedInput
|
||||
service?: Prisma.ServiceUpdateOneWithoutSales_invoice_itemsNestedInput
|
||||
}
|
||||
@@ -1084,6 +1166,8 @@ export type SalesInvoiceItemUncheckedUpdateWithoutInvoiceInput = {
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
||||
@@ -1102,6 +1186,8 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutInvoiceInput = {
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
service_id?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemCreateManyServiceInput = {
|
||||
@@ -1120,6 +1206,8 @@ export type SalesInvoiceItemCreateManyServiceInput = {
|
||||
good_snapshot: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_id: string
|
||||
good_id: string
|
||||
discount_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUpdateWithoutServiceInput = {
|
||||
@@ -1136,8 +1224,10 @@ export type SalesInvoiceItemUpdateWithoutServiceInput = {
|
||||
notes?: Prisma.NullableStringFieldUpdateOperationsInput | string | null
|
||||
payload?: Prisma.NullableJsonNullValueInput | runtime.InputJsonValue
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
good?: Prisma.GoodUpdateOneRequiredWithoutSales_invoice_itemsNestedInput
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutItemsNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUncheckedUpdateWithoutServiceInput = {
|
||||
@@ -1156,6 +1246,8 @@ export type SalesInvoiceItemUncheckedUpdateWithoutServiceInput = {
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput = {
|
||||
@@ -1174,6 +1266,8 @@ export type SalesInvoiceItemUncheckedUpdateManyWithoutServiceInput = {
|
||||
good_snapshot?: Prisma.JsonNullValueInput | runtime.InputJsonValue
|
||||
invoice_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
good_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
discount_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
tax_amount?: Prisma.NullableDecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string | null
|
||||
}
|
||||
|
||||
|
||||
@@ -1195,8 +1289,10 @@ export type SalesInvoiceItemSelect<ExtArgs extends runtime.Types.Extensions.Inte
|
||||
invoice_id?: boolean
|
||||
good_id?: boolean
|
||||
service_id?: boolean
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
discount_amount?: boolean
|
||||
tax_amount?: boolean
|
||||
good?: boolean | Prisma.GoodDefaultArgs<ExtArgs>
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
service?: boolean | Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["salesInvoiceItem"]>
|
||||
|
||||
@@ -1219,20 +1315,22 @@ export type SalesInvoiceItemSelectScalar = {
|
||||
invoice_id?: boolean
|
||||
good_id?: boolean
|
||||
service_id?: boolean
|
||||
discount_amount?: boolean
|
||||
tax_amount?: boolean
|
||||
}
|
||||
|
||||
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "quantity" | "measure_unit_text" | "measure_unit_code" | "sku_code" | "sku_vat" | "unit_price" | "total_amount" | "created_at" | "discount" | "notes" | "payload" | "good_snapshot" | "invoice_id" | "good_id" | "service_id", ExtArgs["result"]["salesInvoiceItem"]>
|
||||
export type SalesInvoiceItemOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "quantity" | "measure_unit_text" | "measure_unit_code" | "sku_code" | "sku_vat" | "unit_price" | "total_amount" | "created_at" | "discount" | "notes" | "payload" | "good_snapshot" | "invoice_id" | "good_id" | "service_id" | "discount_amount" | "tax_amount", ExtArgs["result"]["salesInvoiceItem"]>
|
||||
export type SalesInvoiceItemInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
good?: boolean | Prisma.GoodDefaultArgs<ExtArgs>
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
service?: boolean | Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "SalesInvoiceItem"
|
||||
objects: {
|
||||
invoice: Prisma.$SalesInvoicePayload<ExtArgs>
|
||||
good: Prisma.$GoodPayload<ExtArgs>
|
||||
invoice: Prisma.$SalesInvoicePayload<ExtArgs>
|
||||
service: Prisma.$ServicePayload<ExtArgs> | null
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
@@ -1252,6 +1350,8 @@ export type $SalesInvoiceItemPayload<ExtArgs extends runtime.Types.Extensions.In
|
||||
invoice_id: string
|
||||
good_id: string
|
||||
service_id: string | null
|
||||
discount_amount: runtime.Decimal | null
|
||||
tax_amount: runtime.Decimal | null
|
||||
}, ExtArgs["result"]["salesInvoiceItem"]>
|
||||
composites: {}
|
||||
}
|
||||
@@ -1592,8 +1692,8 @@ readonly fields: SalesInvoiceItemFieldRefs;
|
||||
*/
|
||||
export interface Prisma__SalesInvoiceItemClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
invoice<T extends Prisma.SalesInvoiceDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceDefaultArgs<ExtArgs>>): Prisma.Prisma__SalesInvoiceClient<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
good<T extends Prisma.GoodDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GoodDefaultArgs<ExtArgs>>): Prisma.Prisma__GoodClient<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
invoice<T extends Prisma.SalesInvoiceDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceDefaultArgs<ExtArgs>>): Prisma.Prisma__SalesInvoiceClient<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
service<T extends Prisma.SalesInvoiceItem$serviceArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceItem$serviceArgs<ExtArgs>>): Prisma.Prisma__ServiceClient<runtime.Types.Result.GetResult<Prisma.$ServicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
@@ -1640,6 +1740,8 @@ export interface SalesInvoiceItemFieldRefs {
|
||||
readonly invoice_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||
readonly good_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||
readonly service_id: Prisma.FieldRef<"SalesInvoiceItem", 'String'>
|
||||
readonly discount_amount: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
||||
readonly tax_amount: Prisma.FieldRef<"SalesInvoiceItem", 'Decimal'>
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -224,8 +224,8 @@ export type SalesInvoicePaymentWhereInput = {
|
||||
paid_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
terminal_info?: Prisma.XOR<Prisma.SalesInvoicePaymentTerminalInfoNullableScalarRelationFilter, Prisma.SalesInvoicePaymentTerminalInfoWhereInput> | null
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentOrderByWithRelationInput = {
|
||||
@@ -235,8 +235,8 @@ export type SalesInvoicePaymentOrderByWithRelationInput = {
|
||||
paid_at?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
invoice_id?: Prisma.SortOrder
|
||||
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoOrderByWithRelationInput
|
||||
invoice?: Prisma.SalesInvoiceOrderByWithRelationInput
|
||||
_relevance?: Prisma.SalesInvoicePaymentOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -250,8 +250,8 @@ export type SalesInvoicePaymentWhereUniqueInput = Prisma.AtLeast<{
|
||||
paid_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
created_at?: Prisma.DateTimeFilter<"SalesInvoicePayment"> | Date | string
|
||||
invoice_id?: Prisma.StringFilter<"SalesInvoicePayment"> | string
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
terminal_info?: Prisma.XOR<Prisma.SalesInvoicePaymentTerminalInfoNullableScalarRelationFilter, Prisma.SalesInvoicePaymentTerminalInfoWhereInput> | null
|
||||
invoice?: Prisma.XOR<Prisma.SalesInvoiceScalarRelationFilter, Prisma.SalesInvoiceWhereInput>
|
||||
}, "id">
|
||||
|
||||
export type SalesInvoicePaymentOrderByWithAggregationInput = {
|
||||
@@ -286,8 +286,8 @@ export type SalesInvoicePaymentCreateInput = {
|
||||
payment_method: $Enums.PaymentMethodType
|
||||
paid_at: Date | string
|
||||
created_at?: Date | string
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutPaymentsInput
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoCreateNestedOneWithoutPaymentInput
|
||||
invoice: Prisma.SalesInvoiceCreateNestedOneWithoutPaymentsInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUncheckedCreateInput = {
|
||||
@@ -306,8 +306,8 @@ export type SalesInvoicePaymentUpdateInput = {
|
||||
payment_method?: Prisma.EnumPaymentMethodTypeFieldUpdateOperationsInput | $Enums.PaymentMethodType
|
||||
paid_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutPaymentsNestedInput
|
||||
terminal_info?: Prisma.SalesInvoicePaymentTerminalInfoUpdateOneWithoutPaymentNestedInput
|
||||
invoice?: Prisma.SalesInvoiceUpdateOneRequiredWithoutPaymentsNestedInput
|
||||
}
|
||||
|
||||
export type SalesInvoicePaymentUncheckedUpdateInput = {
|
||||
@@ -613,8 +613,8 @@ export type SalesInvoicePaymentSelect<ExtArgs extends runtime.Types.Extensions.I
|
||||
paid_at?: boolean
|
||||
created_at?: boolean
|
||||
invoice_id?: boolean
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
terminal_info?: boolean | Prisma.SalesInvoicePayment$terminal_infoArgs<ExtArgs>
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["salesInvoicePayment"]>
|
||||
|
||||
|
||||
@@ -630,15 +630,15 @@ export type SalesInvoicePaymentSelectScalar = {
|
||||
|
||||
export type SalesInvoicePaymentOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "amount" | "payment_method" | "paid_at" | "created_at" | "invoice_id", ExtArgs["result"]["salesInvoicePayment"]>
|
||||
export type SalesInvoicePaymentInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
terminal_info?: boolean | Prisma.SalesInvoicePayment$terminal_infoArgs<ExtArgs>
|
||||
invoice?: boolean | Prisma.SalesInvoiceDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $SalesInvoicePaymentPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "SalesInvoicePayment"
|
||||
objects: {
|
||||
invoice: Prisma.$SalesInvoicePayload<ExtArgs>
|
||||
terminal_info: Prisma.$SalesInvoicePaymentTerminalInfoPayload<ExtArgs> | null
|
||||
invoice: Prisma.$SalesInvoicePayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -987,8 +987,8 @@ readonly fields: SalesInvoicePaymentFieldRefs;
|
||||
*/
|
||||
export interface Prisma__SalesInvoicePaymentClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
invoice<T extends Prisma.SalesInvoiceDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceDefaultArgs<ExtArgs>>): Prisma.Prisma__SalesInvoiceClient<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
terminal_info<T extends Prisma.SalesInvoicePayment$terminal_infoArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoicePayment$terminal_infoArgs<ExtArgs>>): Prisma.Prisma__SalesInvoicePaymentTerminalInfoClient<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePaymentTerminalInfoPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
invoice<T extends Prisma.SalesInvoiceDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.SalesInvoiceDefaultArgs<ExtArgs>>): Prisma.Prisma__SalesInvoiceClient<runtime.Types.Result.GetResult<Prisma.$SalesInvoicePayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
/**
|
||||
* Attaches callbacks for the resolution and/or rejection of the Promise.
|
||||
* @param onfulfilled The callback to execute when the Promise is resolved.
|
||||
|
||||
@@ -280,8 +280,8 @@ export type ServiceWhereInput = {
|
||||
base_sale_price?: Prisma.DecimalFilter<"Service"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
account_id?: Prisma.StringFilter<"Service"> | string
|
||||
complex_id?: Prisma.StringFilter<"Service"> | string
|
||||
category?: Prisma.XOR<Prisma.ServiceCategoryNullableScalarRelationFilter, Prisma.ServiceCategoryWhereInput> | null
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
category?: Prisma.XOR<Prisma.ServiceCategoryNullableScalarRelationFilter, Prisma.ServiceCategoryWhereInput> | null
|
||||
}
|
||||
|
||||
export type ServiceOrderByWithRelationInput = {
|
||||
@@ -298,8 +298,8 @@ export type ServiceOrderByWithRelationInput = {
|
||||
base_sale_price?: Prisma.SortOrder
|
||||
account_id?: Prisma.SortOrder
|
||||
complex_id?: Prisma.SortOrder
|
||||
category?: Prisma.ServiceCategoryOrderByWithRelationInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemOrderByRelationAggregateInput
|
||||
category?: Prisma.ServiceCategoryOrderByWithRelationInput
|
||||
_relevance?: Prisma.ServiceOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -320,8 +320,8 @@ export type ServiceWhereUniqueInput = Prisma.AtLeast<{
|
||||
base_sale_price?: Prisma.DecimalFilter<"Service"> | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
account_id?: Prisma.StringFilter<"Service"> | string
|
||||
complex_id?: Prisma.StringFilter<"Service"> | string
|
||||
category?: Prisma.XOR<Prisma.ServiceCategoryNullableScalarRelationFilter, Prisma.ServiceCategoryWhereInput> | null
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemListRelationFilter
|
||||
category?: Prisma.XOR<Prisma.ServiceCategoryNullableScalarRelationFilter, Prisma.ServiceCategoryWhereInput> | null
|
||||
}, "id" | "sku" | "local_sku" | "barcode">
|
||||
|
||||
export type ServiceOrderByWithAggregationInput = {
|
||||
@@ -377,8 +377,8 @@ export type ServiceCreateInput = {
|
||||
base_sale_price?: runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
account_id: string
|
||||
complex_id: string
|
||||
category?: Prisma.ServiceCategoryCreateNestedOneWithoutServicesInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemCreateNestedManyWithoutServiceInput
|
||||
category?: Prisma.ServiceCategoryCreateNestedOneWithoutServicesInput
|
||||
}
|
||||
|
||||
export type ServiceUncheckedCreateInput = {
|
||||
@@ -411,8 +411,8 @@ export type ServiceUpdateInput = {
|
||||
base_sale_price?: Prisma.DecimalFieldUpdateOperationsInput | runtime.Decimal | runtime.DecimalJsLike | number | string
|
||||
account_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
complex_id?: Prisma.StringFieldUpdateOperationsInput | string
|
||||
category?: Prisma.ServiceCategoryUpdateOneWithoutServicesNestedInput
|
||||
sales_invoice_items?: Prisma.SalesInvoiceItemUpdateManyWithoutServiceNestedInput
|
||||
category?: Prisma.ServiceCategoryUpdateOneWithoutServicesNestedInput
|
||||
}
|
||||
|
||||
export type ServiceUncheckedUpdateInput = {
|
||||
@@ -878,8 +878,8 @@ export type ServiceSelect<ExtArgs extends runtime.Types.Extensions.InternalArgs
|
||||
base_sale_price?: boolean
|
||||
account_id?: boolean
|
||||
complex_id?: boolean
|
||||
category?: boolean | Prisma.Service$categoryArgs<ExtArgs>
|
||||
sales_invoice_items?: boolean | Prisma.Service$sales_invoice_itemsArgs<ExtArgs>
|
||||
category?: boolean | Prisma.Service$categoryArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ServiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["service"]>
|
||||
|
||||
@@ -903,16 +903,16 @@ export type ServiceSelectScalar = {
|
||||
|
||||
export type ServiceOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "name" | "description" | "sku" | "local_sku" | "barcode" | "created_at" | "updated_at" | "deleted_at" | "category_id" | "base_sale_price" | "account_id" | "complex_id", ExtArgs["result"]["service"]>
|
||||
export type ServiceInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
category?: boolean | Prisma.Service$categoryArgs<ExtArgs>
|
||||
sales_invoice_items?: boolean | Prisma.Service$sales_invoice_itemsArgs<ExtArgs>
|
||||
category?: boolean | Prisma.Service$categoryArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.ServiceCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $ServicePayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "Service"
|
||||
objects: {
|
||||
category: Prisma.$ServiceCategoryPayload<ExtArgs> | null
|
||||
sales_invoice_items: Prisma.$SalesInvoiceItemPayload<ExtArgs>[]
|
||||
category: Prisma.$ServiceCategoryPayload<ExtArgs> | null
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1268,8 +1268,8 @@ readonly fields: ServiceFieldRefs;
|
||||
*/
|
||||
export interface Prisma__ServiceClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
category<T extends Prisma.Service$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Service$categoryArgs<ExtArgs>>): Prisma.Prisma__ServiceCategoryClient<runtime.Types.Result.GetResult<Prisma.$ServiceCategoryPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | null, null, ExtArgs, GlobalOmitOptions>
|
||||
sales_invoice_items<T extends Prisma.Service$sales_invoice_itemsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Service$sales_invoice_itemsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$SalesInvoiceItemPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
category<T extends Prisma.Service$categoryArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.Service$categoryArgs<ExtArgs>>): Prisma.Prisma__ServiceCategoryClient<runtime.Types.Result.GetResult<Prisma.$ServiceCategoryPayload<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.
|
||||
@@ -1659,25 +1659,6 @@ export type ServiceDeleteManyArgs<ExtArgs extends runtime.Types.Extensions.Inter
|
||||
limit?: number
|
||||
}
|
||||
|
||||
/**
|
||||
* Service.category
|
||||
*/
|
||||
export type Service$categoryArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the ServiceCategory
|
||||
*/
|
||||
select?: Prisma.ServiceCategorySelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the ServiceCategory
|
||||
*/
|
||||
omit?: Prisma.ServiceCategoryOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ServiceCategoryInclude<ExtArgs> | null
|
||||
where?: Prisma.ServiceCategoryWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Service.sales_invoice_items
|
||||
*/
|
||||
@@ -1702,6 +1683,25 @@ export type Service$sales_invoice_itemsArgs<ExtArgs extends runtime.Types.Extens
|
||||
distinct?: Prisma.SalesInvoiceItemScalarFieldEnum | Prisma.SalesInvoiceItemScalarFieldEnum[]
|
||||
}
|
||||
|
||||
/**
|
||||
* Service.category
|
||||
*/
|
||||
export type Service$categoryArgs<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
/**
|
||||
* Select specific fields to fetch from the ServiceCategory
|
||||
*/
|
||||
select?: Prisma.ServiceCategorySelect<ExtArgs> | null
|
||||
/**
|
||||
* Omit specific fields from the ServiceCategory
|
||||
*/
|
||||
omit?: Prisma.ServiceCategoryOmit<ExtArgs> | null
|
||||
/**
|
||||
* Choose, which related nodes to fetch as well
|
||||
*/
|
||||
include?: Prisma.ServiceCategoryInclude<ExtArgs> | null
|
||||
where?: Prisma.ServiceCategoryWhereInput
|
||||
}
|
||||
|
||||
/**
|
||||
* Service without action
|
||||
*/
|
||||
|
||||
@@ -248,8 +248,8 @@ export type StockKeepingUnitsWhereInput = {
|
||||
guild_id?: Prisma.StringFilter<"StockKeepingUnits"> | string
|
||||
created_at?: Prisma.DateTimeFilter<"StockKeepingUnits"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"StockKeepingUnits"> | Date | string
|
||||
guild?: Prisma.XOR<Prisma.GuildScalarRelationFilter, Prisma.GuildWhereInput>
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
guild?: Prisma.XOR<Prisma.GuildScalarRelationFilter, Prisma.GuildWhereInput>
|
||||
}
|
||||
|
||||
export type StockKeepingUnitsOrderByWithRelationInput = {
|
||||
@@ -262,8 +262,8 @@ export type StockKeepingUnitsOrderByWithRelationInput = {
|
||||
guild_id?: Prisma.SortOrder
|
||||
created_at?: Prisma.SortOrder
|
||||
updated_at?: Prisma.SortOrder
|
||||
guild?: Prisma.GuildOrderByWithRelationInput
|
||||
goods?: Prisma.GoodOrderByRelationAggregateInput
|
||||
guild?: Prisma.GuildOrderByWithRelationInput
|
||||
_relevance?: Prisma.StockKeepingUnitsOrderByRelevanceInput
|
||||
}
|
||||
|
||||
@@ -280,8 +280,8 @@ export type StockKeepingUnitsWhereUniqueInput = Prisma.AtLeast<{
|
||||
guild_id?: Prisma.StringFilter<"StockKeepingUnits"> | string
|
||||
created_at?: Prisma.DateTimeFilter<"StockKeepingUnits"> | Date | string
|
||||
updated_at?: Prisma.DateTimeFilter<"StockKeepingUnits"> | Date | string
|
||||
guild?: Prisma.XOR<Prisma.GuildScalarRelationFilter, Prisma.GuildWhereInput>
|
||||
goods?: Prisma.GoodListRelationFilter
|
||||
guild?: Prisma.XOR<Prisma.GuildScalarRelationFilter, Prisma.GuildWhereInput>
|
||||
}, "id" | "code">
|
||||
|
||||
export type StockKeepingUnitsOrderByWithAggregationInput = {
|
||||
@@ -325,8 +325,8 @@ export type StockKeepingUnitsCreateInput = {
|
||||
is_domestic?: boolean
|
||||
created_at?: Date | string
|
||||
updated_at?: Date | string
|
||||
guild: Prisma.GuildCreateNestedOneWithoutStockKeepingUnitsInput
|
||||
goods?: Prisma.GoodCreateNestedManyWithoutSkuInput
|
||||
guild: Prisma.GuildCreateNestedOneWithoutStockKeepingUnitsInput
|
||||
}
|
||||
|
||||
export type StockKeepingUnitsUncheckedCreateInput = {
|
||||
@@ -351,8 +351,8 @@ export type StockKeepingUnitsUpdateInput = {
|
||||
is_domestic?: Prisma.BoolFieldUpdateOperationsInput | boolean
|
||||
created_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
updated_at?: Prisma.DateTimeFieldUpdateOperationsInput | Date | string
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutStockKeepingUnitsNestedInput
|
||||
goods?: Prisma.GoodUpdateManyWithoutSkuNestedInput
|
||||
guild?: Prisma.GuildUpdateOneRequiredWithoutStockKeepingUnitsNestedInput
|
||||
}
|
||||
|
||||
export type StockKeepingUnitsUncheckedUpdateInput = {
|
||||
@@ -740,8 +740,8 @@ export type StockKeepingUnitsSelect<ExtArgs extends runtime.Types.Extensions.Int
|
||||
guild_id?: boolean
|
||||
created_at?: boolean
|
||||
updated_at?: boolean
|
||||
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.StockKeepingUnits$goodsArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.StockKeepingUnitsCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}, ExtArgs["result"]["stockKeepingUnits"]>
|
||||
|
||||
@@ -761,16 +761,16 @@ export type StockKeepingUnitsSelectScalar = {
|
||||
|
||||
export type StockKeepingUnitsOmit<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = runtime.Types.Extensions.GetOmit<"id" | "code" | "name" | "VAT" | "is_public" | "is_domestic" | "guild_id" | "created_at" | "updated_at", ExtArgs["result"]["stockKeepingUnits"]>
|
||||
export type StockKeepingUnitsInclude<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
||||
goods?: boolean | Prisma.StockKeepingUnits$goodsArgs<ExtArgs>
|
||||
guild?: boolean | Prisma.GuildDefaultArgs<ExtArgs>
|
||||
_count?: boolean | Prisma.StockKeepingUnitsCountOutputTypeDefaultArgs<ExtArgs>
|
||||
}
|
||||
|
||||
export type $StockKeepingUnitsPayload<ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs> = {
|
||||
name: "StockKeepingUnits"
|
||||
objects: {
|
||||
guild: Prisma.$GuildPayload<ExtArgs>
|
||||
goods: Prisma.$GoodPayload<ExtArgs>[]
|
||||
guild: Prisma.$GuildPayload<ExtArgs>
|
||||
}
|
||||
scalars: runtime.Types.Extensions.GetPayloadResult<{
|
||||
id: string
|
||||
@@ -1122,8 +1122,8 @@ readonly fields: StockKeepingUnitsFieldRefs;
|
||||
*/
|
||||
export interface Prisma__StockKeepingUnitsClient<T, Null = never, ExtArgs extends runtime.Types.Extensions.InternalArgs = runtime.Types.Extensions.DefaultArgs, GlobalOmitOptions = {}> extends Prisma.PrismaPromise<T> {
|
||||
readonly [Symbol.toStringTag]: "PrismaPromise"
|
||||
guild<T extends Prisma.GuildDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GuildDefaultArgs<ExtArgs>>): Prisma.Prisma__GuildClient<runtime.Types.Result.GetResult<Prisma.$GuildPayload<ExtArgs>, T, "findUniqueOrThrow", GlobalOmitOptions> | Null, Null, ExtArgs, GlobalOmitOptions>
|
||||
goods<T extends Prisma.StockKeepingUnits$goodsArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.StockKeepingUnits$goodsArgs<ExtArgs>>): Prisma.PrismaPromise<runtime.Types.Result.GetResult<Prisma.$GoodPayload<ExtArgs>, T, "findMany", GlobalOmitOptions> | Null>
|
||||
guild<T extends Prisma.GuildDefaultArgs<ExtArgs> = {}>(args?: Prisma.Subset<T, Prisma.GuildDefaultArgs<ExtArgs>>): Prisma.Prisma__GuildClient<runtime.Types.Result.GetResult<Prisma.$GuildPayload<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.
|
||||
|
||||
@@ -1,8 +1,16 @@
|
||||
import { Body, Controller, Get, Param, Patch, Post } from '@nestjs/common'
|
||||
import { ApiTags } from '@nestjs/swagger'
|
||||
import { AccountsService } from './accounts.service'
|
||||
import { CreateConsumerAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||
import type { AccountsServiceCreateResponseDto, AccountsServiceFindAllResponseDto, AccountsServiceFindOneResponseDto, AccountsServiceUpdateResponseDto } from './dto/accounts-response.dto'
|
||||
import {
|
||||
CreateAdminConsumerAccountDto,
|
||||
UpdateAdminConsumerAccountDto,
|
||||
} from './dto/account.dto'
|
||||
import type {
|
||||
AccountsServiceCreateResponseDto,
|
||||
AccountsServiceFindAllResponseDto,
|
||||
AccountsServiceFindOneResponseDto,
|
||||
AccountsServiceUpdateResponseDto,
|
||||
} from './dto/accounts-response.dto'
|
||||
|
||||
@ApiTags('AdminConsumerAccounts')
|
||||
@Controller('admin/consumers/:consumerId/accounts')
|
||||
@@ -10,7 +18,9 @@ export class AccountsController {
|
||||
constructor(private readonly accountsService: AccountsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Param('consumerId') consumerId: string): Promise<AccountsServiceFindAllResponseDto> {
|
||||
async findAll(
|
||||
@Param('consumerId') consumerId: string,
|
||||
): Promise<AccountsServiceFindAllResponseDto> {
|
||||
return this.accountsService.findAll(consumerId)
|
||||
}
|
||||
|
||||
@@ -22,13 +32,16 @@ export class AccountsController {
|
||||
@Post()
|
||||
async create(
|
||||
@Param('consumerId') consumerId: string,
|
||||
@Body() data: CreateConsumerAccountDto,
|
||||
@Body() data: CreateAdminConsumerAccountDto,
|
||||
): Promise<AccountsServiceCreateResponseDto> {
|
||||
return this.accountsService.create(consumerId, data)
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateAccountDto): Promise<AccountsServiceUpdateResponseDto> {
|
||||
async update(
|
||||
@Param('id') id: string,
|
||||
@Body() data: UpdateAdminConsumerAccountDto,
|
||||
): Promise<AccountsServiceUpdateResponseDto> {
|
||||
return this.accountsService.update(id, data)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ import { AccountStatus, AccountType } from '@/generated/prisma/enums'
|
||||
import { PrismaService } from '@/prisma/prisma.service'
|
||||
import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { CreateConsumerAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||
import {
|
||||
CreateAdminConsumerAccountDto,
|
||||
UpdateAdminConsumerAccountDto,
|
||||
} from './dto/account.dto'
|
||||
|
||||
@Injectable()
|
||||
export class AccountsService {
|
||||
@@ -70,7 +73,7 @@ export class AccountsService {
|
||||
return ResponseMapper.single(account)
|
||||
}
|
||||
|
||||
async create(consumerId: string, data: CreateConsumerAccountDto) {
|
||||
async create(consumerId: string, data: CreateAdminConsumerAccountDto) {
|
||||
const account = await this.prisma.consumerAccount.create({
|
||||
data: {
|
||||
role: data.role,
|
||||
@@ -95,7 +98,7 @@ export class AccountsService {
|
||||
return ResponseMapper.create(account)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdateAccountDto) {
|
||||
async update(id: string, data: UpdateAdminConsumerAccountDto) {
|
||||
const account = await this.prisma.account.update({ where: { id }, data })
|
||||
return ResponseMapper.update(account)
|
||||
}
|
||||
|
||||
@@ -1,13 +1,16 @@
|
||||
import { PasswordFieldValidator, UsernameFieldValidator } from '@/common/utils'
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsEnum, IsOptional, IsString } from 'class-validator'
|
||||
import { AccountStatus, ConsumerRole } from 'generated/prisma/enums'
|
||||
|
||||
export class CreateConsumerAccountDto {
|
||||
export class CreateAdminConsumerAccountDto {
|
||||
@IsString()
|
||||
@UsernameFieldValidator()
|
||||
@ApiProperty({ required: true })
|
||||
username: string
|
||||
|
||||
@IsString()
|
||||
@PasswordFieldValidator()
|
||||
@ApiProperty({ required: true })
|
||||
password: string
|
||||
|
||||
@@ -16,7 +19,9 @@ export class CreateConsumerAccountDto {
|
||||
role: ConsumerRole
|
||||
}
|
||||
|
||||
export class UpdateAccountDto extends PartialType(CreateConsumerAccountDto) {
|
||||
export class UpdateAdminConsumerAccountDto extends PartialType(
|
||||
CreateAdminConsumerAccountDto,
|
||||
) {
|
||||
@IsOptional()
|
||||
@IsEnum(AccountStatus)
|
||||
@ApiProperty({ enum: AccountStatus })
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { PasswordFieldValidator, UsernameFieldValidator } from '@/common/utils'
|
||||
import { ConsumerStatus } from '@/generated/prisma/enums'
|
||||
import { ApiProperty, OmitType, PartialType } from '@nestjs/swagger'
|
||||
import { IsEnum, IsOptional, IsString } from 'class-validator'
|
||||
@@ -16,10 +17,12 @@ export class CreateConsumerDto {
|
||||
last_name: string
|
||||
|
||||
@IsString()
|
||||
@UsernameFieldValidator()
|
||||
@ApiProperty({ required: true })
|
||||
username: string
|
||||
|
||||
@IsString()
|
||||
@PasswordFieldValidator()
|
||||
@ApiProperty({ required: true })
|
||||
password: string
|
||||
|
||||
|
||||
@@ -12,6 +12,6 @@ export class AdminGuildCacheInvalidationService {
|
||||
|
||||
async invalidateGoodsList(guildId: string): Promise<void> {
|
||||
await this.redisService.delete(RedisKeyMaker.guildGoodsList(guildId))
|
||||
await this.posCacheInvalidationService.invalidateGoodsListByGuild(guildId)
|
||||
await this.posCacheInvalidationService.invalidatePosGoodsByGuildPattern(guildId)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -39,8 +39,12 @@ export class GoodsController {
|
||||
},
|
||||
},
|
||||
})
|
||||
create(@Body() data: CreateGuildGoodDto, @UploadedFile() file: Express.Multer.File) {
|
||||
return this.goodsService.create(data, file)
|
||||
create(
|
||||
@Param('guildId') guildId: string,
|
||||
@Body() data: CreateGuildGoodDto,
|
||||
@UploadedFile() file: Express.Multer.File,
|
||||
) {
|
||||
return this.goodsService.create(guildId, data, file)
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
@@ -55,10 +59,11 @@ export class GoodsController {
|
||||
},
|
||||
})
|
||||
update(
|
||||
@Param('guildId') guildId: string,
|
||||
@Param('id') id: string,
|
||||
@Body() data: UpdateGuildGoodDto,
|
||||
@UploadedFile() file: Express.Multer.File,
|
||||
) {
|
||||
return this.goodsService.update(id, data, file)
|
||||
return this.goodsService.update(guildId, id, data, file)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -57,26 +57,22 @@ export class GoodsService {
|
||||
|
||||
async findAll(guildId: string) {
|
||||
const cacheKey = RedisKeyMaker.guildGoodsList(guildId)
|
||||
const cached = await this.redisService.getJson<{ goods: unknown[]; total: number }>(
|
||||
return this.redisService.getAndSet(
|
||||
cacheKey,
|
||||
'paginate',
|
||||
async () => {
|
||||
const [goods, total] = await this.prisma.$transaction([
|
||||
this.prisma.good.findMany({
|
||||
where: this.defaultWhere(guildId),
|
||||
select: this.defaultSelect,
|
||||
}),
|
||||
this.prisma.good.count(),
|
||||
])
|
||||
|
||||
return { items: goods, total }
|
||||
},
|
||||
this.listCacheTtlSeconds,
|
||||
)
|
||||
if (cached) {
|
||||
return ResponseMapper.paginate(cached.goods, { total: cached.total })
|
||||
}
|
||||
|
||||
const [goods, total] = await this.prisma.$transaction([
|
||||
this.prisma.good.findMany({
|
||||
where: this.defaultWhere(guildId),
|
||||
select: this.defaultSelect,
|
||||
}),
|
||||
this.prisma.good.count(),
|
||||
])
|
||||
|
||||
await this.redisService.setJson(cacheKey, { goods, total }, this.listCacheTtlSeconds)
|
||||
|
||||
return ResponseMapper.paginate(goods, {
|
||||
total,
|
||||
})
|
||||
}
|
||||
|
||||
async findOne(guild_id: string, id: string) {
|
||||
@@ -91,12 +87,8 @@ export class GoodsService {
|
||||
return ResponseMapper.single(good)
|
||||
}
|
||||
|
||||
async create(data: CreateGuildGoodDto, file: Express.Multer.File) {
|
||||
async create(guildId: string, data: CreateGuildGoodDto, file: Express.Multer.File) {
|
||||
const { category_id, measure_unit_id, sku_id, ...rest } = data
|
||||
const category = await this.prisma.goodCategory.findUnique({
|
||||
where: { id: category_id },
|
||||
select: { guild_id: true },
|
||||
})
|
||||
|
||||
const good = await this.prisma.$transaction(async tx => {
|
||||
let image_url = ''
|
||||
@@ -133,28 +125,21 @@ export class GoodsService {
|
||||
})
|
||||
})
|
||||
|
||||
if (category?.guild_id) {
|
||||
await this.cacheInvalidationService.invalidateGoodsList(category.guild_id)
|
||||
}
|
||||
await this.cacheInvalidationService.invalidateGoodsList(guildId)
|
||||
|
||||
return ResponseMapper.create(good)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdateGuildGoodDto, file: Express.Multer.File) {
|
||||
async update(
|
||||
guildId: string,
|
||||
id: string,
|
||||
data: UpdateGuildGoodDto,
|
||||
file: Express.Multer.File,
|
||||
) {
|
||||
const { category_id, measure_unit_id, sku_id, ...rest } = data
|
||||
const prevGood = await this.prisma.good.findUnique({
|
||||
where: { id },
|
||||
select: { category: { select: { guild_id: true } } },
|
||||
})
|
||||
const nextCategory = category_id
|
||||
? await this.prisma.goodCategory.findUnique({
|
||||
where: { id: category_id },
|
||||
select: { guild_id: true },
|
||||
})
|
||||
: null
|
||||
|
||||
const good = await this.prisma.$transaction(async tx => {
|
||||
let image_url = ''
|
||||
let image_url = undefined as string | undefined
|
||||
if (file) {
|
||||
const uploadedUrl = await this.uploaderService.uploadFile(
|
||||
file,
|
||||
@@ -198,17 +183,7 @@ export class GoodsService {
|
||||
})
|
||||
})
|
||||
|
||||
const cacheGuildIds = new Set<string>()
|
||||
if (prevGood?.category?.guild_id) {
|
||||
cacheGuildIds.add(prevGood.category.guild_id)
|
||||
}
|
||||
if (nextCategory?.guild_id) {
|
||||
cacheGuildIds.add(nextCategory.guild_id)
|
||||
}
|
||||
|
||||
for (const guildId of cacheGuildIds) {
|
||||
await this.cacheInvalidationService.invalidateGoodsList(guildId)
|
||||
}
|
||||
await this.cacheInvalidationService.invalidateGoodsList(guildId)
|
||||
|
||||
return ResponseMapper.create(good)
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { SKUGuildType } from '@/generated/prisma/enums'
|
||||
import { SKUGuildType } from '@/common/enums/enums'
|
||||
import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger'
|
||||
import { Type } from 'class-transformer'
|
||||
import { IsBoolean, IsEnum, IsNumber, IsString, Min } from 'class-validator'
|
||||
|
||||
@@ -31,20 +31,20 @@ export class StockKeepingUnitsService {
|
||||
|
||||
async findAll(guild_id: string) {
|
||||
const cacheKey = this.getListCacheKey(guild_id)
|
||||
const cached = await this.redisService.getJson<unknown[]>(cacheKey)
|
||||
if (cached) {
|
||||
return ResponseMapper.list(cached)
|
||||
}
|
||||
return await this.redisService.getAndSet(
|
||||
cacheKey,
|
||||
'list',
|
||||
async () => {
|
||||
const items = await this.prisma.stockKeepingUnits.findMany({
|
||||
where: { guild_id },
|
||||
orderBy: { created_at: 'desc' },
|
||||
})
|
||||
|
||||
const items = await this.prisma.stockKeepingUnits.findMany({
|
||||
where: { guild_id },
|
||||
orderBy: { created_at: 'desc' },
|
||||
})
|
||||
|
||||
const mappedData = items.map(this.mapData)
|
||||
await this.redisService.setJson(cacheKey, mappedData, this.listCacheTtlSeconds)
|
||||
|
||||
return ResponseMapper.list(mappedData)
|
||||
const mappedData = items.map(this.mapData)
|
||||
return mappedData
|
||||
},
|
||||
this.listCacheTtlSeconds,
|
||||
)
|
||||
}
|
||||
|
||||
async create(guild_id: string, data: CreateStockKeepingUnitDto) {
|
||||
|
||||
@@ -17,14 +17,6 @@ export class PartnerActivatedLicensesService {
|
||||
) {}
|
||||
|
||||
async findAll(partner_id: string, page = 1, perPage = 10) {
|
||||
const cacheKey = RedisKeyMaker.partnerActivatedLicensesList(partner_id, page, perPage)
|
||||
const cached = await this.redisService.getJson<{ data: unknown[]; total: number }>(
|
||||
cacheKey,
|
||||
)
|
||||
if (cached) {
|
||||
return ResponseMapper.paginate(cached.data, { page, perPage, total: cached.total })
|
||||
}
|
||||
|
||||
const defaultWhere: LicenseActivationWhereInput = {
|
||||
license: {
|
||||
charge_transaction: {
|
||||
@@ -32,69 +24,70 @@ export class PartnerActivatedLicensesService {
|
||||
},
|
||||
},
|
||||
}
|
||||
const [activatedLicense, total] = await this.prisma.$transaction(async tx => [
|
||||
await tx.licenseActivation.findMany({
|
||||
where: defaultWhere,
|
||||
skip: (page - 1) * perPage,
|
||||
take: perPage,
|
||||
select: {
|
||||
id: true,
|
||||
starts_at: true,
|
||||
expires_at: true,
|
||||
created_at: true,
|
||||
account_allocations: {
|
||||
select: {
|
||||
id: true,
|
||||
account_id: true,
|
||||
const cacheKey = RedisKeyMaker.partnerActivatedLicensesList(partner_id, page, perPage)
|
||||
return await this.redisService.getAndSet(cacheKey, 'paginate', async () => {
|
||||
const [activatedLicense, total] = await this.prisma.$transaction(async tx => [
|
||||
await tx.licenseActivation.findMany({
|
||||
where: defaultWhere,
|
||||
skip: (page - 1) * perPage,
|
||||
take: perPage,
|
||||
select: {
|
||||
id: true,
|
||||
starts_at: true,
|
||||
expires_at: true,
|
||||
created_at: true,
|
||||
account_allocations: {
|
||||
select: {
|
||||
id: true,
|
||||
account_id: true,
|
||||
},
|
||||
},
|
||||
},
|
||||
business_activity: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
consumer: {
|
||||
select: {
|
||||
id: true,
|
||||
...QUERY_CONSTANTS.CONSUMER.infoSelect,
|
||||
business_activity: {
|
||||
select: {
|
||||
id: true,
|
||||
name: true,
|
||||
consumer: {
|
||||
select: {
|
||||
id: true,
|
||||
...QUERY_CONSTANTS.CONSUMER.infoSelect,
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}),
|
||||
await tx.licenseActivation.count({
|
||||
where: defaultWhere,
|
||||
}),
|
||||
])
|
||||
}),
|
||||
await tx.licenseActivation.count({
|
||||
where: defaultWhere,
|
||||
}),
|
||||
])
|
||||
|
||||
const mappedLicenses = activatedLicense.map(license => {
|
||||
const { account_allocations, business_activity, ...rest } = license
|
||||
const { consumer, ...businessActivityRest } = business_activity
|
||||
const mappedLicenses = activatedLicense.map(license => {
|
||||
const { account_allocations, business_activity, ...rest } = license
|
||||
const { consumer, ...businessActivityRest } = business_activity
|
||||
|
||||
const mappedConsumer = consumer_mappersUtil(consumer)
|
||||
const mappedConsumer = consumer_mappersUtil(consumer)
|
||||
|
||||
return {
|
||||
...rest,
|
||||
license: {
|
||||
accounts_limit: account_allocations.length,
|
||||
allocated_account_count: account_allocations.filter(
|
||||
allocation => allocation.account_id !== null,
|
||||
).length,
|
||||
},
|
||||
business_activity: {
|
||||
...business_activity,
|
||||
consumer_name: mappedConsumer.name,
|
||||
},
|
||||
}
|
||||
})
|
||||
return {
|
||||
...rest,
|
||||
license: {
|
||||
accounts_limit: account_allocations.length,
|
||||
allocated_account_count: account_allocations.filter(
|
||||
allocation => allocation.account_id !== null,
|
||||
).length,
|
||||
},
|
||||
business_activity: {
|
||||
...business_activity,
|
||||
consumer_name: mappedConsumer.name,
|
||||
},
|
||||
items: mappedLicenses,
|
||||
page,
|
||||
perPage,
|
||||
total,
|
||||
}
|
||||
})
|
||||
|
||||
await this.redisService.setJson(cacheKey, { data: mappedLicenses, total }, 300)
|
||||
|
||||
return ResponseMapper.paginate(mappedLicenses, {
|
||||
page,
|
||||
perPage,
|
||||
total,
|
||||
})
|
||||
}
|
||||
|
||||
// async update(partnerId: string, id: string, data: UpdateLicenseDto) {
|
||||
|
||||
+28
-39
@@ -65,56 +65,45 @@ export class PartnerLicenseChargeTransactionService {
|
||||
page,
|
||||
perPage,
|
||||
)
|
||||
const cached = await this.redisService.getJson<{ data: unknown[]; total: number }>(
|
||||
cacheKey,
|
||||
)
|
||||
if (cached) {
|
||||
return ResponseMapper.paginate(cached.data, { page, perPage, total: cached.total })
|
||||
}
|
||||
|
||||
const defaultWhere: LicenseChargeTransactionWhereInput = {
|
||||
partner_id,
|
||||
}
|
||||
return await this.redisService.getAndSet(cacheKey, 'paginate', async () => {
|
||||
const [transactions, total] = await this.prisma.$transaction(async tx => [
|
||||
await tx.licenseChargeTransaction.findMany({
|
||||
where: defaultWhere,
|
||||
skip: (page - 1) * perPage,
|
||||
take: perPage,
|
||||
select: this.defaultSelect,
|
||||
}),
|
||||
await tx.licenseChargeTransaction.count({
|
||||
where: defaultWhere,
|
||||
}),
|
||||
])
|
||||
|
||||
const [transactions, total] = await this.prisma.$transaction(async tx => [
|
||||
await tx.licenseChargeTransaction.findMany({
|
||||
where: defaultWhere,
|
||||
skip: (page - 1) * perPage,
|
||||
take: perPage,
|
||||
select: this.defaultSelect,
|
||||
}),
|
||||
await tx.licenseChargeTransaction.count({
|
||||
where: defaultWhere,
|
||||
}),
|
||||
])
|
||||
|
||||
const mappedTransactions = transactions.map(this.mappedTransaction)
|
||||
await this.redisService.setJson(cacheKey, { data: mappedTransactions, total }, 300)
|
||||
|
||||
return ResponseMapper.paginate(mappedTransactions, {
|
||||
page,
|
||||
perPage,
|
||||
total,
|
||||
const mappedTransactions = transactions.map(this.mappedTransaction)
|
||||
return {
|
||||
items: mappedTransactions,
|
||||
page,
|
||||
perPage,
|
||||
total,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async findOne(partner_id: string, id: string) {
|
||||
const cacheKey = RedisKeyMaker.partnerLicenseChargeTransactionDetail(partner_id, id)
|
||||
const cached = await this.redisService.getJson<unknown>(cacheKey)
|
||||
if (cached) {
|
||||
return ResponseMapper.single(cached)
|
||||
}
|
||||
|
||||
const transaction = await this.prisma.licenseChargeTransaction.findUniqueOrThrow({
|
||||
where: {
|
||||
id,
|
||||
partner_id,
|
||||
},
|
||||
select: this.defaultSelect,
|
||||
return await this.redisService.getAndSet(cacheKey, 'single', async () => {
|
||||
const transaction = await this.prisma.licenseChargeTransaction.findUniqueOrThrow({
|
||||
where: {
|
||||
id,
|
||||
partner_id,
|
||||
},
|
||||
select: this.defaultSelect,
|
||||
})
|
||||
return this.mappedTransaction(transaction)
|
||||
})
|
||||
const mappedTransaction = this.mappedTransaction(transaction)
|
||||
await this.redisService.setJson(cacheKey, mappedTransaction, 300)
|
||||
return ResponseMapper.single(mappedTransaction)
|
||||
}
|
||||
|
||||
async create(partner_id: string, data: ChargeLicenseDto) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { PasswordFieldValidator, UsernameFieldValidator } from '@/common/utils'
|
||||
import { PartnerStatus, TspProviderType } from '@/generated/prisma/enums'
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsEnum, IsNumber, IsOptional, IsString } from 'class-validator'
|
||||
@@ -21,10 +22,12 @@ export class CreatePartnerDto {
|
||||
// license_quota?: number
|
||||
|
||||
@IsString()
|
||||
@UsernameFieldValidator()
|
||||
@ApiProperty({ required: true })
|
||||
username: string
|
||||
|
||||
@IsString()
|
||||
@PasswordFieldValidator()
|
||||
@ApiProperty({ required: true })
|
||||
password: string
|
||||
|
||||
|
||||
@@ -1,14 +1,25 @@
|
||||
import { Body, Controller, Delete, Get, Param, Patch, Post } from '@nestjs/common'
|
||||
import { AccountsService } from './accounts.service'
|
||||
import { CreatePartnerAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||
import type { AccountsServiceCreateResponseDto, AccountsServiceDeleteResponseDto, AccountsServiceFindAllResponseDto, AccountsServiceFindOneResponseDto, AccountsServiceUpdateResponseDto } from './dto/accounts-response.dto'
|
||||
import {
|
||||
CreateAdminPartnerAccountDto,
|
||||
UpdateAdminPartnerAccountDto,
|
||||
} from './dto/account.dto'
|
||||
import type {
|
||||
AccountsServiceCreateResponseDto,
|
||||
AccountsServiceDeleteResponseDto,
|
||||
AccountsServiceFindAllResponseDto,
|
||||
AccountsServiceFindOneResponseDto,
|
||||
AccountsServiceUpdateResponseDto,
|
||||
} from './dto/accounts-response.dto'
|
||||
|
||||
@Controller('admin/partners/:partnerId/accounts')
|
||||
export class AccountsController {
|
||||
constructor(private readonly accountsService: AccountsService) {}
|
||||
|
||||
@Get()
|
||||
async findAll(@Param('partnerId') partnerId: string): Promise<AccountsServiceFindAllResponseDto> {
|
||||
async findAll(
|
||||
@Param('partnerId') partnerId: string,
|
||||
): Promise<AccountsServiceFindAllResponseDto> {
|
||||
return this.accountsService.findAll(partnerId)
|
||||
}
|
||||
|
||||
@@ -20,13 +31,16 @@ export class AccountsController {
|
||||
@Post()
|
||||
async create(
|
||||
@Param('partnerId') partnerId: string,
|
||||
@Body() data: CreatePartnerAccountDto,
|
||||
@Body() data: CreateAdminPartnerAccountDto,
|
||||
): Promise<AccountsServiceCreateResponseDto> {
|
||||
return this.accountsService.create(partnerId, data)
|
||||
}
|
||||
|
||||
@Patch(':id')
|
||||
async update(@Param('id') id: string, @Body() data: UpdateAccountDto): Promise<AccountsServiceUpdateResponseDto> {
|
||||
async update(
|
||||
@Param('id') id: string,
|
||||
@Body() data: UpdateAdminPartnerAccountDto,
|
||||
): Promise<AccountsServiceUpdateResponseDto> {
|
||||
return this.accountsService.update(id, data)
|
||||
}
|
||||
|
||||
|
||||
@@ -4,7 +4,10 @@ import { Injectable } from '@nestjs/common'
|
||||
import { ResponseMapper } from 'common/response/response-mapper'
|
||||
import { PasswordUtil } from 'common/utils/password.util'
|
||||
import { AccountStatus, AccountType, PartnerRole } from 'generated/prisma/enums'
|
||||
import { CreatePartnerAccountDto, UpdateAccountDto } from './dto/account.dto'
|
||||
import {
|
||||
CreateAdminPartnerAccountDto,
|
||||
UpdateAdminPartnerAccountDto,
|
||||
} from './dto/account.dto'
|
||||
|
||||
@Injectable()
|
||||
export class AccountsService {
|
||||
@@ -38,7 +41,7 @@ export class AccountsService {
|
||||
return ResponseMapper.single(account)
|
||||
}
|
||||
|
||||
async create(partnerId: string, data: CreatePartnerAccountDto) {
|
||||
async create(partnerId: string, data: CreateAdminPartnerAccountDto) {
|
||||
const { username, password } = data
|
||||
|
||||
const result = await this.prisma.$transaction(async tx => {
|
||||
@@ -69,7 +72,7 @@ export class AccountsService {
|
||||
return ResponseMapper.create(result)
|
||||
}
|
||||
|
||||
async update(id: string, data: UpdateAccountDto) {
|
||||
async update(id: string, data: UpdateAdminPartnerAccountDto) {
|
||||
const account = await this.prisma.account.update({ where: { id }, data })
|
||||
return ResponseMapper.update(account)
|
||||
}
|
||||
|
||||
@@ -1,18 +1,23 @@
|
||||
import { PasswordFieldValidator, UsernameFieldValidator } from '@/common/utils'
|
||||
import { ApiProperty, PartialType } from '@nestjs/swagger'
|
||||
import { IsEnum, IsOptional, IsString } from 'class-validator'
|
||||
import { PartnerRole } from 'generated/prisma/enums'
|
||||
|
||||
export class CreatePartnerAccountDto {
|
||||
export class CreateAdminPartnerAccountDto {
|
||||
@IsString()
|
||||
@ApiProperty({})
|
||||
@UsernameFieldValidator()
|
||||
username: string
|
||||
|
||||
@IsString()
|
||||
@PasswordFieldValidator()
|
||||
@ApiProperty({})
|
||||
password: string
|
||||
}
|
||||
|
||||
export class UpdateAccountDto extends PartialType(CreatePartnerAccountDto) {
|
||||
export class UpdateAdminPartnerAccountDto extends PartialType(
|
||||
CreateAdminPartnerAccountDto,
|
||||
) {
|
||||
@IsOptional()
|
||||
@IsEnum(PartnerRole)
|
||||
@ApiProperty({ enum: PartnerRole })
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user